JSP works normally only on Localhost

Asked

Viewed 212 times

0

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

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

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

EDIT

As some comments tried to use Maven and it still didn’t work it opens only index.jsp after I log in the Error 404 application.

Here are some images of how I organize the project inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

EDIT 2

How can I put the entire project folders on the server? Is there any way to leave the breakpoints in the War file? How can I debug outside of localhost?

  • Welcome to the Stackoverflow in Portuguese. As the name suggests, the official language used here is Portuguese. So, could you please translate your question? If you prefer, you can also ask the same question on Stackoverflow website in English.

  • You can post the codes from web.xml and pom.xml (if there is), please? By the way, how are you deploying on your server? You generate a .war and insert into Tomcat manually?

  • @Igorventurelli am using classes that dao extends in the HttpServlets ... I’m not using Maven Repository, I’m using Libs that are added in BuildPath. I’m generating a .war yes and I hand deploy on Manager App of TOMCAT 8.5

  • 2

    Like I said before, I’m not wearing the Maven. I’m generating the .war for Export of Eclipse

  • Got it. Is there some very big reason you don’t use Maven? I ask because I particularly trust much more in builds and wars generated by Maven than builds and wars generated by Eclipse. Maven is more than just dependency manager :-)

  • 1

    Yes, because some libs were giving a lot of trouble by Maven, I know a lot about him and know his "magic", but I could not use it in this project

  • 2 "kicks": (1) If you are using Serrvlets, remember that instance variables in Serrvlets are shared by all users. (2) Also, nothing strange appears in the server logs or in the browser logs? Go that has some AJAX being blocked...

  • I think it’s not problems with the Servlets or some call AJAX (I didn’t even use AJAX), even because the product search works, login also works, the application correctly searches the values of the bank except when adding a search product in the shopping cart it does not bring the right values and often exchange values, in localhost it works normally, and on the web I am not able to debug the JSP other than localhost

  • As you can see, my JSP’s are inside the WEB-INF which is a "protected" folder of the project itself. The routes are working normally, but I’m not getting past the login screen

Show 4 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.