![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Do what I say below. You will see the problem. 1.Write a HTML page. There's a button on it. When you click it, send a request(whatever is ok, for example, "value=1") to a JSP page. 2.Write a JSP page to recieve the request. On the JSP page you should set a session variable to count how many requests you recieved. Then show the variable's value on the HTML page by alert. 3.Click the button. Then watch the value returned. You will see the value is a constant. 4.If you write some output to console in the JSP, you will see the JSP is only be excuted one time - the first time you click the button. I tried it on Tomcat5.5 and JBoss4. I use "get" method to transport the parameters. Does it matter? Why? and How to solve it? |
![]() |
| Thread Tools | |
| Display Modes | |
| |