jsp跳转,谢谢

sungirlzcy 2009-04-28 03:21:24
我用struts2 跳转的时候每次都是这样呢?
HTTP Status 404 - /login!login.jsp

--------------------------------------------------------------------------------

type Status report

message /login!login.jsp

description The requested resource (/login!login.jsp) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/5.5.20


我的jsp页面部分代码

<form action="login!login" method="post">
<table width="60%" height="98%" align="center" background="img/bg_4.gif">
<tr>
<td>
<table align="center">
<tr>
<td>用户名</td>
<td><input type="text" name="username"></td>
</tr>
<tr>
<td>    </td>
</tr>
<tr>
<td>密码</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td>    </td>
</tr>
<tr>
<td align="right" valign="top">验证码</td>
<td valign="top">
<input maxlength="6" size="20" name="num_auth" dataType="Numauth" msg="验证码输入不正确!">
<br>
<a href="javascript:onclick(reloadcode());"><img id="safecode"
src="./yzm.jsp" width="152" height="30" align="middle"
style="cursor: pointer;" alt="验证码看不清楚?请点击刷新验证码" />
</a>
</td>
</tr>
<tr>
<td colspan="2">    </td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="submit" value="登录">
<input type="button" name="button" value="取消" onClick="window.close()">
<a href="./JspPage/forget_pass.jsp"><input type="button" name="button1" value="忘记密码"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</form>

配置文件
<package name="com.vianet.security" extends="struts-default">
<action name="change">
<result>/JspPage/index_main.jsp</result>
</action>
<action name="login" class="loginAction" method="login">
<result type="redirectAction">change</result>
<result name="input">/JspPage/falier.jsp</result>
</action>
.......


请各位赐教
...全文
213 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
sungirlzcy 2009-04-28
  • 打赏
  • 举报
回复
o了
谢谢各位!
dadizhilong 2009-04-28
  • 打赏
  • 举报
回复
找不到的问题是1。2楼帮解决了。错误是因为你的ism没有定义。
sungirlzcy 2009-04-28
  • 打赏
  • 举报
回复
一点击登录就跑到这个页面来了


Struts Problem Report
Struts has detected an unhandled exception:

Messages: No bean named 'ism' is defined
Error creating bean with name 'loginAction' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Cannot resolve reference to bean 'ism' while setting bean property 'ism'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'ism' is defined
Unable to instantiate Action, loginAction, defined for 'login' in namespace '/'Error creating bean with name 'loginAction' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Cannot resolve reference to bean 'ism' while setting bean property 'ism'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'ism' is defined

File: org/springframework/beans/factory/support/DefaultListableBeanFactory.java
Line number: 387
sungirlzcy 2009-04-28
  • 打赏
  • 举报
回复
谢谢二位
可是还是不行啊,
一点登录就掉到错误页面啊
Struts Problem Report
Struts has detected an unhandled exception:
专业二三维GIS 2009-04-28
  • 打赏
  • 举报
回复
<form action="login!login" method="post">

这是html的标签,不是struts标签,表单提交的时候当然会找不到login!login这样莫名其妙的地址.
把这个替换成struts2的Form标签.
yctang 2009-04-28
  • 打赏
  • 举报
回复
<form action="login!login" method="post">
写成<form action="login.action" method="post">

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧