li bei

Greenhorn
+ Follow
since Jul 22, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by li bei

If you want to display a tree structure in the browser, maybe javascript is needed. There are many ready-made, usable javascript tree like DTree . You can google it.
use java code to load the dirs and files, then generate javascript code
It seems that the class com.tvs.tran.servlet.Logincheck is missing.
Make sure there is the .class file WEB-INF/classes/com/tvs/tran/servlet/Logincheck.class.
Or some other reason, I'm not sure.
for(MailSession mail : test) {
StringBuilder xml = new StringBuilder();
xml.append(mail.getLetter());
}

And this, maybe there is something wrong.

you defined the StringBuilder "xml" in the loop.

it should be outside, I guess.
16 years ago
HttpSession getMailSession = request.getSession(false);
List<MailSession> test = ( List<MailSession> ) checkSession.getAttribute("MailSession");


You typed it , or just copy and paste?

You named the reference "getMailSession", but use another reference "checkSession".
16 years ago
Maybe the JRE System Libraries are missing.
Are you sure you maked a java project , not a simple project in eclipse?
17 years ago
See the jarkata common-fileupload lib.
17 years ago
Dosn't the Iterator likes a resultset?

The interface List has a iterator() method returns a Iterator
17 years ago
ah~ The filter is a good idea.
I'll try that.
Thanks.
17 years ago
JSP
Thank you.
I am sure your solution will be help.
But if I embed these beans in the request by the actions ,I have to modify all the actions when one of the chips' requirement changed ,isn't it?
I can resolve the problem whith your help now . I am wondering a even perfect way. Is there one ?
17 years ago
JSP
This application is about clubs.
One chip shows the new members in the current club,
one shows the new songs shared ,
one show the new pictures uploaded, and so on...
17 years ago
JSP
strtus.apache.org release

You don't have to add any file to tomcat.

Instead ,you have to put the jar file in the WEB-INF/lib directory in your application which use struts.
17 years ago
Thanks for your reading my words.
Maybe I haven't described it clearly.Let us take an example:
suppose I have 5 actions named action1,action2,action3,action4 and action5. They forward to jsp1,jsp2,jsp3,jsp4,and jsp5. The 5 jsps all have to include 3 chips(chip1,chip2,chip3) as parts.
If I query the data which chips need in action1-5, that is a bad design,because if one of the 3 chips have to be changed ,I have to modify all the 5 actions.

I have tried to write 3 actions name chipaction1,chipaction2,chipaction3,they query the data ,and then forward to chip1,chip2,and chip3,then include the url-patterns in jsp1-5,but that seems doesn't work.

I really wonder the best design.
Thanks in advance.
17 years ago
JSP
Hi Ranchers.
I have 3 jsp files, they are not full page to view,but they are use to included into other jsp files. I call them chips. The 3 chips all have to access the database.

Here the question is ,I have many jsp files wants to include the 3 chips.And I don't want to write database accessing code in the jsp file. So where should I write the database accessing code ?

Thanks in advance.
17 years ago
JSP
This is no problem .
We usually do like this.
17 years ago
Hi all.
I am in trouble with the refresh button now . It is like this:
I have two jsp page ,one called a.jsp ,it has a form ,and post to b.jsp.
b.jsp handles the request, and insert a record to the database,then forward back to a.jsp.At this time ,the page seems to be a.jsp ,but the address of the browser is still b.jsp .If refresh , there is one more record inserted to the database.
I think if use a servlet or struts' action to do the work which b.jsp does,the problem will appear the same.
If use redirect , I can't pass parameters. I have to display a "inserted done!" at the a.jsp if the record is inserted into the database ,or display "error" on the page and write-back the form data just inputed.

I wonder how to resolve this problem .
Thanks in advance.
17 years ago