shaonan zhang

+ Follow
since Dec 12, 2002
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by shaonan zhang


I want to observe the amount of the session use. because An excellent performance in less session data is obtained.

I can do it by C#

But I dont know how do it by Java, (The Same Java class doesn't exist. ?)

please help me if any body know this.
i need it urgently.

thanks ina dvance,

13 years ago
hello friends!
I use javascript to product some html'element Dynamicly. e.g
var aRows=oTable.rows;
var aCells=oRow1.cells;
var oCell1_1=aRows (oRow1.rowIndex).insertCell(aCells.length);
oCells.innerHTML="<p align=center><input type=text size=5 name="txtCard"></p>";
Client can freely produce these elements which name or id is the same . but how to do ,in action formbean ,get these Dynamic value that is post.
and that,reture these value to jsp when validate
is failure.
All help will be highly appreciated.
19 years ago
how to do ,update jbuilder8.0 struts1.02 to struts1.1,thanks
19 years ago
I read and write a xml file by jdom in servlet.In client ,Client access xml data binding the element of html in xml file.but when I delete and add the data to xml file by servlet.Client cannot right now see the data that I delete and add in servlet. and only after client refresh the IE , could see instant data .I suspect the reason is IE'cache,
therefore, I add those code in my jsp
response.setDateHeader ("Expires", 0);
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<meta http-equiv="Expires" content="Tue, 01 Jan 2000 12:12:12 GMT">
<meta http-equiv="Pragma" content="no-cache">
But I have still failed. How to do? please help me.
[ January 24, 2003: Message edited by: shaonan zhang ]
[ January 24, 2003: Message edited by: shaonan zhang ]
19 years ago
I use xml to be small database in my webapplation.By servlet I manipulate the xml file that is local. When I use servlet I need notice Security(read and write the local file) and threads(At one time many user read and write the xml file).But I dont know how to do to avoid these question in servlet. what is a good solution. please help me.
[ January 19, 2003: Message edited by: shaonan zhang ]
.I also have the same question.I want somebody who has experience of xml'programme on servlet has a good talk for us.
Think for all!
[ January 16, 2003: Message edited by: shaonan zhang ]

why ? I use the Jbuilder7.0 , Jdk1.4 and Jdom8.0
my file selectdata.xml is at D:\wepapp\defaultroot\selectdata.xml.
In servlet.I use this
Document doc = FileInputStream("/selectdata.xml")); but I cannt get it .
Error message: \selectdata.xml at Method)
at webapp.XmlSelectSet.doPost(
my servlet code is:
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import org.jdom.input.*;
import org.jdom.output.*;
import org.jdom.*;
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
String nodeName=request.getParameter("nodeName");
String addItem=request.getParameter("addItem");
String delItem=request.getParameter("delItem");
String itemText=request.getParameter("Description");
int item;
SAXBuilder sb = new SAXBuilder();
Document doc = FileInputStream("/selectdata.xml"));//here if I use absolute path, can get this xml file. but, of course xml data cannt access.
Element root = doc.getRootElement();
Element selectTitle = root.getChild(nodeName);
java.util.List selectItem=selectTitle.getChildren();
Element selectTitle = root.getChild(nodeName);
java.util.List selectItem=selectTitle.getChildren();
int l=selectItem.size();
Element select=new Element("select"+l);
XMLOutputter outp = new XMLOutputter("\t", false,"Shift_JIS");
outp.output(doc, new FileOutputStream("/selectdata.xml"));
}catch(JDOMException e){out.print(e.toString());}
my selectdata.xml code:
<?xml version="1.0" encoding="Shift_JIS"?>
<!-- save web all select element concent -->
<select1>--NO Select--</select1>
<select3>New York Mets</select3>
<select1>--NO Select--</select1>
<select1>--NO Select--</select1>
please help me. the servlet code is correct? How can I do ? Thanks
[ January 15, 2003: Message edited by: shaonan zhang ]
[ January 15, 2003: Message edited by: shaonan zhang ]
[ January 15, 2003: Message edited by: shaonan zhang ]
[ January 16, 2003: Message edited by: shaonan zhang ]