rs.close();
st.close();
closeConnectionDB();
---------------------------
把这几个去掉试试!
st.close();
closeConnectionDB();
---------------------------
把这几个去掉试试!
解决方案 »
- linux服务器下tomcat部署工程问题
- Servlet小问题
- 大家帮忙提供几个题可以考查答题人对struts,spring,ibatis的使用情况
- 关于xml解析的问题
- getHibernateTemplate 是否用 释放数据库连接? 我们网站 总当机 我在找原因 我们对数据库操作都是用 getHibernateTemplate
- Struts - actionForm 数据传递
- 有关于通用查询,想了很久,但没有想通,大家进来讨论讨论(Hibernate)
- jce里3des加密问题,急,2000分求助(本人手头还有3000分)
- 初学数据库连接不懂问问。
- 谁有jaxrpc.jar文件,立即结贴!
- 下载J2EE的问题
- 在笔记本上安装了Fedora Core 5,用FC5自带的Eclipse的开发java程序,Eclipse运行非常慢,了解者请回答,谢谢。
<action path = "/loginAction"
type = "loginstruts.LoginAction"
name = "LoginForm"
scope = "request"
input = "/Login.jsp">
<forward name="Success" path="/Welcome.jsp" redirect="true" />
<forward name="Failure" path="/Login.jsp" redirect="true" />
</action>
</action-mappings>这段改成:
<action-mappings>
<action path = "/loginAction"
type = "loginstruts.LoginAction"
name = "LoginForm"
scope = "request"
input = "/Login.jsp">
<forward name="Success" path="/Welcome.jsp" redirect="false" /><!-如果设为true就不会把参数转发-->
<forward name="Failure" path="/Login.jsp" redirect="false" />
</action>
</action-mappings>
<h2>Hello,
<bean:write name="userbean" property="name" />!<p>
</h2>
</logic:present>你的是个对象,直接这样输出是不行的,需要这样写
<logic:present name="userbean" scope="request">
<h2>Hello,
<bean:define id="elment" name="userbean"/>
<bean:write name="elment" property="name" />!<p>
</h2>
</logic:present> 当然前提你的User user=new User(userName,password);必须是返回了一个user对象,而且不为空,否则就是显示不出来。
<logic:present name="userbean" scope="request">
<h2>Hello,
<bean:write name="userbean" property="name" />!<p>
</h2>
</logic:present>
你可以去查查:reqwuest.setAttribute(String,Object);
<logic:present name="userbean" scope="request">
<h2>Hello,
<bean:write name="userbean" property="userName" />!<p><!-- property="name"改为User.java中的userName,注:bean:define 不用这样写也是可以的 -->
</h2>
</logic:present>谢谢大家!!