• Post Reply Bookmark Topic Watch Topic
  • New Topic

WAR file of the web app doesn't work as it did from the Eclipse IDE  RSS feed

 
Robert Insanovation White
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following 2 situations:

1) When I run my web project from Eclipse, using Tomcat 8.0, it runs perfectly. The application is based on sessions, so there is a log in and register page (working with MySQL).

2) The web application is exported as a WAR file, and placed in the web apps folder of Tomcat. When Tomcat is launched, I access the application from the Chrome browser. Now: the JDBC is established with success, because on the home page there is some data retrieved. But: when I access the log in/register page and try to insert a email&password to proceed (which worked when running the web app from Eclipse), clicking log in/register simply redirects me to the index page of the application. I didn't plan it to work this way. As from the IDE, it should log in the user, or register it, creating a session which will permit him to access some pages.

I'm curious about why those 2 above mentioned situations act differently with the same code.


Any idea would be great, Thank You!
 
Tim Cooke
Marshal
Posts: 4039
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's very difficult to say what the problem is from what you've told us.

Have you inspected your log files for any clues?
 
Robert Insanovation White
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I bet it's difficult to say what's wrong.

The web-app runs like there are no errors. And in the console it displays the info that the session has not been set, so the home page after the log in looks like the user didn't register/log in.

But, as I mentioned, in Eclipse it sets the session and, after the log in/register, it displays the home page as logged.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!