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的变量中
相关文档:
树节点组合模型
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 ......
JSP共有以下9种基本内置组件(可与ASP的6种内部组件相对应):
1.request 用户端请求,此请求会包含来自GET/POST请求的参数。
2. response 网页传回用户端的回应 。
3.pageContext 网页的属性是在这里管理 。
4.session 与请求有关的会话期。
5.ap ......
JSP共有以下6种基本动作:
1.jsp:include:在页面被请求的时候引入一个文件。
2.jsp:useBean:寻找或者实例化一个JavaBean。
3.jsp:setProperty:设置JavaBean的属性。
4.jsp:getProperty:输出某个JavaBean的属性。
5.jsp:forward:把请求转到 ......