Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Works fine on localhost but is buggy on hosting server  RSS feed

 
julio boll
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am developing a dynamic web project in JAVA. I'm using JAVA 1.8_0121, Tomcat 8.5 and mySQL.

Since I started the project I used localhost to debug my application, I am now trying to deploy to my server, when I did this, the program started to show some bugs ... The login works fine, the search works fine, but when I select objects to add to a shopping cart to calculate their values, it does not work, much less shows the discount (percentage discount) and sometimes the object description does not appear.

I think it is not a problem in the code but some configuration of the web server that I have no idea where to move, much less I can debug the JSP on the web.

Untitled3.png
[Thumbnail for Untitled3.png]
Here's how my JSP are organized
 
Dave Tolls
Rancher
Posts: 2913
35
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you say it worked on localhost, are you saying you deployed to a non-IDE Tomcat (or similar), or did you just let the IDE do the work?
I'm wondering if the IDE was doing something for you.

As for tracing your issue, you shouldn't need to debug a JSP as it shouldn't have any code in it to debug.
You should have logging in your servlets and other Java code...can you switch on DEBUG level on those and track where the problem lies?

Other than that, without any more detail on what issues you are seeing it's not really going to be possible to give a more detailed answer.
 
julio boll
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm installed TOMCAT on my eclipse to run and debug the cod. I didn't saw anything wrong, 'cause in localhsot works really fine all functions.
 
Tim Moores
Saloon Keeper
Posts: 3883
91
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave makes an excellent point: the first thing you should do is to run the web app in a standalone Tomcat. IDEs may do all kinds of stuff that wouldn't happen on the live server.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66188
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My advice is to never run the server in an IDE. It hides too much and results in these sorts of "surprises". I use an IDE as a smart editor, but run stand-alone servers.
 
julio boll
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:My advice is to never run the server in an IDE. It hides too much and results in these sorts of "surprises". I use an IDE as a smart editor, but run stand-alone servers.

How can I put breakpoints on the .war archive? Or how I place my folders(all the project) into the server without being by .war?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!