Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Database/JDBC/SQL/JDO/Hibernate » MS SQL  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 struts 与数据库连接问题
xingchao





发贴: 32
积分: 0
于 2007-11-09 01:19 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
这是我第一个用struts写的小小程序
目的是在用户名和密码都正确的情况下页面条转到success.jsp
但是却不成*** 总是跳转到error.jsp
具体代码请看附件

开发工具netbeans6.0
数据库是sql server 2000

望各位高手不吝赐教
谢谢了

FirstStruts.rar (2290.97k)



作者 Re:struts 与数据库连接问题 [Re:xingchao]
gimgen1026





发贴: 5
积分: 0
于 2007-12-22 01:51 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
把你的struts-config.xml里的这部分:
<global-forwards>
<forward name="welcome" path="/Welcome.do"/>
<forward name="success" path="/success.jsp"/>
<forward name="false" path="/false.jsp"/>
</global-forwards>

<action-mappings>
<action path="/Welcome" forward="/welcomeStruts.jsp"/>
<action name="loginForm" path="/login" type="firstStruts.action.Login" validate="true" input="/Login.jsp"/>
</action-mappings>

改成:
<global-forwards>
<forward name="welcome" path="/Welcome.do"/>
</global-forwards>

<action-mappings>
<action path="/Welcome" forward="/welcomeStruts.jsp"/>
<action name="loginForm" path="/login" type="firstStruts.action.Login" validate="true" input="/Login.jsp">
<forward name="success" path="/success.jsp"/>
<forward name="false" path="/false.jsp"/>
</action>
</action-mappings>

估计是这问题,一般global-forwards里不写success&false之类的。




flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923