• Post Reply Bookmark Topic Watch Topic
  • New Topic

HTTP Session Creation  RSS feed

 
Ashley Sharlene
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a servlet filter that checks the session for every incoming request.
The session validation is done for every request except the login request. If a request with a new session, which is not a login request is sent, then unauthorised user is sent in the response.

If the http request for login is sent in the form of : <a href="http://<b rel="nofollow">ipaddress" target="_blank">http://ipaddress ortnumber/myApp/login.do, and after successful login, if the subsequent requests are sent in the form of
<a href="http://<b rel="nofollow">mymachinename.domain.com</b>/myApp/processotherrequests.do" target="_blank">http://[B]mymachinename.domain.com/myApp/processotherrequests.do (since Apache server is configured on my machine), then these requests are treated as new sessions and hence unauthorised user response is sent back.

what could be the problem?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"A Aqwrwqr",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Ashley A",

Nice try, but no cigar. Please read my message again and change your display name accordingly. An initial is not acceptable for a last name.
 
Emanuel Kadziela
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Other than your name problems, do you actually have a problem with your application? If so state it, please, or are you just asking a philosphical question about what could be the problem with your app?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what could be the problem?

Since there are two host addresses in use, the ip address and the domain name, the browser will not supply cookies set by the first to the second.
You will need to find a way to bridge the gap.

Bill
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!