| Author |
Session gets null on mapping the application
|
Manpreet Patil
Greenhorn
Joined: Oct 18, 2009
Posts: 18
|
|
Hello guys,
I am using struts 2 and saving some information in the session. When i try to access the application using the folllowing url
http://www.example.net:8080/MyApp
it works fine.
But i have mapped the application at http://www.example.net. When i am using the application using this url the session gets null.
Could anyone tells me where am i mistaking.
thanks in advance.
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Can you explain what you mean by "the session gets null"?
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Manpreet Patil
Greenhorn
Joined: Oct 18, 2009
Posts: 18
|
|
I mean to say that values in the session that i put get invalidated.
I am saving some values in the session but when i try to retrieve those values those it throws null pointer exceptions
i have done apache to tomcat mapping using mode proxy for mapping the url "www.example.com:8080/myapp" into www.example.com. but after mapping i got the session null exception in my application in some place. but it's work fine in my old URL "www.example.com:8080/myapp"
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Are cookies enabled? If not and you do not use URL rewriting to include the session ID in the URL, the server doesn't know there already is a session and creates a new one.
Anyway, I'm moving this to Servlets.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Session gets null on mapping the application
|
|
|