javabeanÏò´«jsp´«Öµ
struts-config:
<action path="/articleManage" name="articleManageForm" scope="request" type="auction.action.ArticleManageAction" validate="false">
<forward name="atriclesList" path="/WEB-INF/publish/articleManage/atriclesList.jsp"/>
<forward name="registerGood" path="/WEB-INF/publish/articleManage/registerGood.jsp"/>
</action>
Action:
ArticleManageForm theForm = new ArticleManageForm ();
theForm = theOperation.getInfo(request.getParameter("noId"));
request.setAttribute("articleManageForm", theForm);
1¡¢ÅäÖõÄbeanµÄÃû³ÆÒªºÍstruts-configÖеÄÒ»Ñù
2¡¢ÔÚbeanÖÐдһ¸ö·½·¨£¬½«È¡³öµÄÊý¾Ý·Åµ½ÏàÓ¦µÄbeanµÄ±äÁ¿ÖÐ
Ïà¹ØÎĵµ£º
JSP»ù±¾Óï·¨Ó붨Òå
ÏÈÀ´¿´Ò»¶Î¼òµ¥µÄС³ÌÐò£º
³ÌÐò£º
1.jsp
<html>
<head>
<title>example</title>
</head>
1
¡¡
<%@ page language=”java” %>
2
¡¡
<%@ page
contentType=”text/html,charset=”GB2312””>
3
¡¡ ......
¡¡¡¡1 Javascript £¬ÉèÖÃÒ»¸ö±äÁ¿£¬Ö»ÔÊÐíÌá½»Ò»´Î¡£
¡¡¡¡#lt;script language="javascript"#gt;
¡¡¡¡ var checkSubmitFlg = false;
¡¡¡¡ function checkSubmit() {
¡¡¡¡ if (checkSubmitFlg == true) {
¡¡¡¡ return false;
¡¡¡¡ }
¡¡¡¡ checkSubmitFlg = true;
¡¡¡¡ return true;
¡¡¡¡ }
¡¡¡¡ document.ondblcli ......
ÓÃÁËcommons-fileupload-1.2.jarºÍcommons-io-1.3.2.jarÕâÁ½¸ö°ü¡£
save.jsp
<%@ page language="java" contentType="text/html;charset=utf-8"%>
<%@ page import="java.util.*"%>
<%@ page import="java.io.*"%>
<%@ page import="java.util.regex.*"%>
<%@ page import="org.apache.co ......
Ê÷½Úµã×éºÏÄ£ÐÍ
package cn.com.jsnh.model.catalog;
public class TreeModel {
private String node;
private CatalogModel model;
public String getNode() {
return node;
}
public void setNode(String node) {
this.node = node;
}
public CatalogModel getModel() {
return model;
}
public void setMo ......
Ò»¡¢
ÔÚÒ»¸öÉè¼ÆÁ¼ºÃµÄWebÓ¦ÓÃÖУ¬¶¼»á×ÛºÏʹÓÃServletºÍJSP¼¼Êõ¡£Servlet¿ØÖÆÒµÎñÁ÷ת£¬JSPÔò¸ºÔðÒµÎñ´¦Àí½á¹ûµÄÏÔʾ¡£´Ëʱ£¬½«´óÁ¿Óõ½Öض¨Ïò¼¼Êõ¡£
¡¡¡¡Öض¨Ïò¼¼Êõ¿ÉÒÔ·ÖΪÁ½À࣬һÀàÊǿͻ§¶ËÖØ¶¨Ïò£¬Ò»ÀàÊ ......