救急! myeclipse3.1 + struts1.2 + tomcat5.0 的问题
我的开发环境是eclipse3.1 + myeclipse4.1 + struts + 1.2 ,现在做了个web 工程。
流程是这样的:登录页面-(登录成功进入)主页面-(在主页面选择功能菜单后进入)显示数据页面
对应的文件如下:
login.jsp,loginForm.java, loginAction.java
main.jsp,
center.jsp, CenterAction.java
我的struts-config.xml 文件是这样配置的:
<struts-config>
<data-sources >
//为了节约篇幅这里省略
</data-sources>
<form-beans>
<form-bean name="LoginForm" type="com.xineng.main.action.LoginForm"></form-bean>
</form-beans>
<global-forwards>
<forward name="login" path="/jsp/login.jsp"></forward>
<forward name="center" path="/center.do"></forward>
</global-forwards>
<action-mappings>
<action path="/login"
type="com.xineng.main.action.LoginAction"
name="LoginForm"
scope="request"
validate="true"
input="/jsp/login.jsp">
<forward name="success" path="/jsp/main.jsp"></forward>
</action>
<action path="/center"
type="com.xineng.main.action.CenterAction"
scope="request">
<forward name="success" path="/jsp/center.jsp"></forward>
</action>
</action-mappings>
<message-resources parameter="com.xineng.struts.ApplicationResources" />
</struts-config>
main.jsp文件如下代码(省略了头部分自动生成的代码)
<html:html lang="true">
<head>
<html:base />
<title><bean:message key="main.title"/></title>
</head>
<body>
<table border="0">
<tr>
<td><html:link forward="center"><bean:message key="center.title"/></html:link></td>
</tr>
</table>
</body>
</html:html>
CenterAction.java 文件代码如下:
public class CenterAction extends Action {
public ActionForward execute(ActionMapping mapp, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
String target="success";
return mapp.findForward(target);
}
}
center.jsp 代码如下(什么都不填):
<html:html lang="true">
<head>
</head>
<body>
This is the Center Info.
</body>
</html:html>
我砰到的问题是:
登录成功后,已经显示主页面了(main.jsp),在main.jsp 选择了链接后,就显示如下错误:
找不到网页
您要查看的网页可能已被删除、名称已被更改,或者暂时不可用。
--------------------------------------------------------------------------------
请尝试以下操作:
如果您已经在地址栏中输入该网页的地址,请确认其拼写正确。
打开 localhost:8080 主页,然后查找指向您感兴趣信息的链接。
单击后退按钮,尝试其他链接。
单击搜索,寻找 Internet 上的信息。
HTTP 404 - 未找到文件
Internet Explorer
这个问题郁闷了我好几天了,都没解决,请高手帮个忙。
我的QQ是:8814453,方便的话我希望能语音交流,因为感觉好像就这么说不清楚
非常感谢!