易截截图软件、单文件、免安装、纯绿色、仅160KB

Ext+json+jsp构建的动态树

树节点组合模型
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 setModel(CatalogModel model) {
this.model = model;
}
}
栏目模型【实际的树节点】
package cn.com.jsnh.model.catalog;
public class CatalogModel {
private String id;
private String text;
private Boolean leaf;
private String cls;
private String action;
private String model;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public Boolean getLeaf() {
return leaf;
}
public void setLeaf(Boolean leaf) {
this.leaf = leaf;
}
public String getCls() {
return cls;
}
public void setCls(String cls) {
this.cls = cls;
}
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
}
<%@ page import="java.util.*,
cn.com.jsnh.model.catalog.TreeModel,
cn.com.jsnh.model.catalog.CatalogModel,
net.sf.json.JSONObject,
net.sf.json.JSONArray,
net.sf.ezmorph.bean.MorphDynaBean"
contentType="text/html;charset=utf-8"%>
<%
try{
String node = request.getParameter("node");
System.out.println("node="+node);
List<TreeModel> tree = new ArrayList<TreeModel>();
TreeModel treeModel = new TreeModel();
CatalogModel catalogModel = new CatalogModel();
catalogModel.setId("100000");
catalogModel.setText("个人管理专区");
catalogModel.setLeaf(Boolean.FALSE);
catalogModel.setCls("folder");
catalogModel.setAction("100000");
catalogModel.setModel("100000");
treeModel.setNode("root");
treeModel.setModel(catalogModel);
tree.add(treeModel);
treeModel = new TreeM


相关文档:

JSP内置对象之request

HTTP 通信协议是客户与服务器之间一种提交(请求) 信息与响应信息
(request/respone)的通信协议。在JSP 中,内置对象request 封装了用户提交的信息,
那么该对象调用相应的方法可以获取封装的信息,即使用该对象可以获取用户提交的信
息。
客户通常使用HTML 表单向服务器的某个JSP 页面提交信息,表单的一般格式是: ......

JSP数据库连接疑问(Mysql)

package com.wxpn.tutorial.db;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.util.Date;
/**
 * 描述: 数据库连接池类
 * 
 * 
&n ......

jsp生成html静态页面代码

<%@ page contentType="text/html;charset=GBK"%>
<%@page import="java.util.*"%>
<%@page import="java.io.*" %>
<%
//在这里如果写成“WEB-INF\templates\template.htm”程序会报错
 String filePath = request.getRealPath("/")+"WEB-INF/templates/template.htm"; &nbs ......

jsp页面跳转问题

 这是一个用户注册的页面,部分代码(没有错误)已略,可是不能实现form的action跳转
checkform()里明明有document.form.submit(),就是不能跳转,
 
能帮我看下问题出在哪吗?
这是照着书上的例子写的,注册和重置动都作是通过图片来处理的。
请不吝赐教,在下不胜感激。。。
<%@ page contentType="te ......

JSP文件

<%@ page language="java" import="kg.TestBean2;" %>
<%@ page contentType="text/html;charset=gb2312" %>
<html>
<head>
<title>HelloBean</title>
</head>
<body>
<%--
<%
kg.TestBean2 testbean=(kg.TestBean2)session.setAttribute("testbean");
if ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号