• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session gets null on mapping the application

 
Manpreet Patil
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you explain what you mean by "the session gets null"?
 
Manpreet Patil
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20369
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic