Hi Everybody!, Just got in the list :) I am developing a webapp with Netbeans 8.0.2, and deploying it as a WAR file with Apache 8.5.57 Tomcat Manager onto my VPS where a mydomain.com is publically mapped on the DNS.
It works fine in localhost, and even at the VPS when the IP and path is set in the url browser: http://ip:port/myapp. Then, it works. When trying to connect via my registered domain in the browser url, astonishingly, the index.jsp is correctly shown, but none of its links to other JSPs are going on. The first one is called cursos.jsp. The included file before the <head> tag is the same in index.jsp as in cursos.jsp, located in webapps/myapp/cursos/cursos.jsp which produces the error. The begining of both files is: ------------------------------------------------------------------------------------------------------- <%@page session="true" %> <%@page import="lib.Text"%> ------------------------------------------------------------------------------------------------------ I also have been looking at stackoverflow, and found some amazing solutions, like ending the import with a semicolon. But it neither worked at all. My purpose is to make it work on mydomain.eu that I have already registered and mapped in the DNS. The error message given by any browser is printed next. ------------------------------------------------------------------------------------------------------ Tipo Informe de Excepción mensaje Unable to compile class for JSP Descripción El servidor encontró un error interno que hizo que no pudiera rellenar este requerimiento. excepción org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: [14] in the generated java file: [/opt/tomcat/work/Catalina/ mydoamin.com/cursos/org/apache/jsp/cursos_jsp.java] Only a type can be imported. lib.Text resolves to a package ... and here, error is repeated for several classes ------------------------------------------------------------------------------------------------------ So, it seems that the class loader does not find the classes located at its default repository. I have been looking for the way tomcat uses classpaths. In particular, the role of its class loaders. And specifically, the "shared.loader" class loader. I even tried to set the value "webapps/myapp/WEB-INF/classes" in the catalina.properties file (even though it is not supposed to be needed). I have been looking for this in http://tomcat.apache.org/tomcat-8.5-doc/class-loader-howto.html. There, learned about the four loaders of tomcat. And as long as I understood, the classes repository should be located at ${CATALINA_HOME}/webapps/myapp/WEB-INF/classes. The place where Tomcat Manager leaves it when the WAR is uploaded. Ultimately, the ${CATALINA_HOME}/webapps/myapp/WEB-INF/classes/lib/Text.class certainly exists!, so I am stuck in telling the loader where the classes are. Thanks for your time, Any help will be much appreciated! Carles