File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Oracle/OAS and the fly likes Please help me with problem moving servlet from ApacheTomCat to Oracle AS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Please help me with problem moving servlet from ApacheTomCat to Oracle AS" Watch "Please help me with problem moving servlet from ApacheTomCat to Oracle AS" New topic
Author

Please help me with problem moving servlet from ApacheTomCat to Oracle AS

Simon Kelly
Greenhorn

Joined: Oct 02, 2002
Posts: 11
My servlet, which runs fine under ApacheTomCat 404 and WebLogic is not holding on to sessions when deployed under OAS 9iAS(9.0.3). It gives back a User Defined NotLoggedInException where it shouldn't because the session is null when in fact it should have been retrieved successfully from the HttpRequest with a call to "request.getSession(false)" upon entering "doPost".
Here is some tracing from my servlet, taken from the server logs for OAS and Tomcat respectively which might help :
Oracle 9iAS(9.0.3) :
MyServlet.printRequestInfo: just entered - session is null
MyServlet.printRequestInfo: isRequestedSessionIdFromCookie = true
MyServlet.printRequestInfo: isRequestedSessionIdFromURL = false
MyServlet.printRequestInfo: headerName = ACCEPT, headerValue = text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
MyServlet.printRequestInfo: headerName = CONNECTION, headerValue = keep-alive
MyServlet.printRequestInfo: headerName = CONTENT-LENGTH, headerValue = 564
MyServlet.printRequestInfo: headerName = CONTENT-TYPE, headerValue = java-internal/mypackage.MyClass
MyServlet.printRequestInfo: headerName = COOKIE, headerValue = JSESSIONID=821c13afbd3749e3ad7ba3832798ec3f.oQ9vokqUaN0KahD3lN4TawSLbxuIawSLbMSRckmTn3uInx8Knx0Pc6aRn2SHc30Ka2bJqA4Tok5N-AHwmkzB-AbDq6vzqBbJnBfDpAaImQXH8NqOc3aO8OjSq79zqRaxflvKqAjNqMbynknvrkLOlQzNp65In0__
MyServlet.printRequestInfo: headerName = HOST, headerValue = defMach:7777
MyServlet.printRequestInfo: headerName = USER-AGENT, headerValue = Java1.3.0
ApacheTomCat 404 :
MyServlet.printRequestInfo: just entered - session id is
= 5BF72D3108C7CA865C88B79EE5313F34
MyServlet.printRequestInfo: session is
= org.apache.catalina.session.StandardSessionFacade@5a18ac
MyServlet.printRequestInfo: isRequestedSessionIdFromCookie = true
MyServlet.printRequestInfo: isRequestedSessionIdFromURL = false
MyServlet.printRequestInfo: headerName = content-type, headerValue = java-internal/mypackage.MyClass MyServlet.printRequestInfo: headerName = cookie, headerValue = JSESSIONID=5BF72D3108C7CA865C88B79EE5313F34
MyServlet.printRequestInfo: headerName = user-agent, headerValue = Java1.3.0
MyServlet.printRequestInfo: headerName = host, headerValue = localhost:8001
MyServlet.printRequestInfo: headerName = accept, headerValue = text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
MyServlet.printRequestInfo: headerName = connection, headerValue = keep-alive
MyServlet.printRequestInfo: headerName = content-length, headerValue = 429
The cookie contains a session id in the request. The servlet container doesn't seem to have retained that session id though. I am thinking this problem arises from a peculiarity of the OAS servlet engine. Can anyone help on this issue.
Thanks in advance...
 
wood burning stoves
 
subject: Please help me with problem moving servlet from ApacheTomCat to Oracle AS