- 博客(8)
- 收藏
- 关注
原创 struts-config.xml的forward注意点之一
redirect="true",可以使你的URL地址跳到showuser.do,http://localhost:8084/demo/showuser.do;如果redirect为false或者不设置的时候,此属性则URL保留为上一次的URL地址,但显示的是showuser.do!http://localhost:8084/demo/showuser.do?id=7
2008-10-29 22:27:00 765
转载 使用Sitemesh框架
1.<span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman"">包文件Sitemesh.jar<span style="font-family:宋体;mso-ascii-font-family:"Times New Roman
2008-10-18 16:26:00 537
转载 Struts的Action表单验证
1.在Action中添加if(isValid){ session.setAttribute("username",username); log.info("User"+username+"login.");}else{errors.add(ActionErrors.GLOBAL_MESSAGE,new ActionMessage("login.messa
2008-10-14 12:19:00 330
转载 Struts的ActionForm表单验证
1.在ActionForm中添加Public ActionErrors validate(ActionMapping arg0,HttpServletRequest arg1){ ActionErrors errors=new ActionErrors(); arg1.setAttribute("loginFormBean",this); if(usernam
2008-10-14 12:17:00 487
转载 JSP连接MySQL
page language="java" pageEncoding="gb2312"%>page import="java.sql.*"%> String drv="com.mysql.jdbc.Driver"; String sql="select * from user"; String url="jdbc:mysql://localhost:3306/
2008-10-13 15:07:00 372
转载 JavaBean使用MySQL
package com.zzhoujsp_jbean.javabean; public class UserBean { public boolean valid(String username,String password) { boolean isValid=false; DBAccess db=new DBAccess();
2008-10-13 14:57:00 504
转载 JavaBean连接MySQL
package com.zzhoujsp_jbean.javabean; import java.sql.*; public class DBAccess { private String drv="com.mysql.jdbc.Driver"; private String url="jdbc:mysql://localhost:3306/demo";
2008-10-13 08:14:00 592
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人