Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in logging in web application

 
prasenjitkumar das
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Our team made a web application which is on a Customer Care Portal. It is using logging page. So we deployed our application in a remote TOMCAT Server.
And we also migrated our local database to that server machine. It was working fine on that day. But the next day my application was not allowing me to log in. But When I m restarting the remote Tomcat server, the application is running fine again.

I want to know what exactly the problem would be. Any help regarding this problem will be deeply appreciated.


-Prasenjit
 
prasenjitkumar das
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
prasenjit.svnit das wrote:Hi All,

Our team made a web application which is on a Customer Care Portal. It is using logging page. So we deployed our application in a remote TOMCAT Server.
And we also migrated our local database to that server machine. It was working fine on that day. But the next day my application was not allowing me to log in. But When I m restarting the remote Tomcat server, the application is running fine again.

I want to know what exactly the problem would be. Any help regarding this problem will be deeply appreciated.


-Prasenjit
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Patience is a virtue

Anything useful in the log-files?
 
prasenjitkumar das
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not get you . Do you want the log files?
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are telling us, that you cannot log-in after your server is running for one day. After restarting the server, it works again. Those information are not really sufficient to help you. That's why I am asking if you find anything useful in the log-files, like exceptions that are thrown in the meanwhile (e.g. server is running out of memory, application cannot connect to database) or anything else that might indicate unwanted behaviour.
To make it clear: I don't want to have the complete log-files but you need to provide more details, like: is the problem reproduceable (does this behaviour always occur after the server is running for one day), is an exception thrown when you are trying to log-in (and the application refuses the log-in), etc.
 
prasenjitkumar das
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Joachim ,

The same thing happened today also. I mean it is happening everyday. I went through the log files and I found out that it is not processing the
resources-config. XML file today in the morning. Then I stopped the server and again restarted . After that it is working fine. But the same thing will happen again tomorrow.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18276
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, cynic that I am, I'm willing to bet your login system is Yet Another Do-It-Yourself Security System. And if you hang around the J2EE forums for very long, you're going to get more than you can stand of my bashing DIY security, because it quite frequently doesn't work right, and it's rarely secure against anything more than a 5 mile-per-hour breeze.

But in this case, the bigger problem is that when you don't use the J2EE standard security framework, or failing that, at least one of the major add-on packages, you're asking for help with a product that no one outside your own shop knows anything about.

Anyone can find books galore on how to set up and use J2EE Container Managed Security. The security mechanism available for Spring Web has decent docs. But with DIY, you're on your own.
 
prasenjitkumar das
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I think i found something. I compared the 2 log files , 1 is before restarting and the other is after restarting , and I found out that the first one do not have the
"jsessionId" parameter. Does any1 have any information about jsessionid??
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18276
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jsessionid is simply Java sessionID. If the client has cookies disabled, the identifier that lets the server know which of its collection of active HttpSession objects corresponds to that client should be used is the value of jsessionid. jsessionid is basically just a hash key.

If you lose the jsessionid value and there's no alternative way to let the server know which session you are bound to, then you've effectively logged out.

JsessionID is appended to the URL when you dynamically create a URL with session encoding. I forget the exact name of the method that does that, however.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic