A site created by JSP can obtain some information only after logon. Generally, websites, ASP, and aspx maintain the logon status through cookies or sessions (marked by cookies, therefore, access the logon page to obtain the cookie, and then attach the cookie to the request to obtain the target page. The result was fruitless one afternoon in the JSP site yesterday, the post logon page is successful, and the seesion information is returned (as follows. allowautoredirect = false; then, you can get the JSESSIONID correctly. However, if you attach this JSESSIONID to a new request (when the page needs to be collected), the server will always return the 500 Error !,
Observe the header information repeatedly.
// ==================== Header information returned after Logging
HTTP/1.1 302 moved temporarily
Set-COOKIE: JSESSIONID = a8e7b16c1786f6e3d40457cf1_8c4c2; Path =/scoretable
Location: http://xxx.com: 8080/xxx. jsp
Content-Type: text/html; charset = GBK
Content-Length: 0
Date: Thu, 19 Feb 2009 03:07:28 GMT
Server: APACHE-Coyote/1.1
// ======================================
The redirection command is generated when location in the information, which will first locate the page to the http://xxx.com: 8080/xxx. jsp when using IE, but now use Program Access should be ignored after obtaining the cookie. You can directly access the target page (at least in an ASP or aspx environment )....
Finally, the helpless in the program to complete the cookie to obtain the first visit a http://xxx.com: 8080/xxx. JSP, and then visit the target page. The result is a miracle, and the data is obtained successfully. Of course, the two requests are appended with the obtained session flag.
I don't know the specific cause. It is probably because of the special nature of the Apache server. It may check whether the location command is correctly executed for a session (a session). Finally, I hope someone can give me some advice!