Servlet not found once on web server

The main problem is that the servlet is basically not found on the web server after I upload it to any web hosting server that I received, while it detects that everything is fine and dandy in accommodation mode with integrated berth

I canโ€™t check the full tomcat configuration on the host, but actually where some of the .jsp test files work fine there, if something is missing there, I'm not sure

When you go directly to the servlet path, when in host mode it makes the HTTP GET method, it is not supported by this URL, but only 404 on the web server

web.xml:

<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"> <!-- Servlets --> <servlet> <servlet-name>retailQuery</servlet-name> <servlet-class>com.retail.report.server.DBConnectionServiceImpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>retailQuery</servlet-name> <url-pattern>/retailreport/retailQuery</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>RetailReport.html</welcome-file> </welcome-file-list> </web-app> 

RetailReport.gwt.xml:

 <?xml version="1.0" encoding="UTF-8"?> <module rename-to='retailreport'> <inherits name='com.google.gwt.user.User'/> <inherits name='com.google.gwt.user.theme.clean.Clean'/> <!-- Specify the app entry point class. --> <entry-point class='com.retail.report.client.RetailReport'/> <servlet class="com.retail.report.server.DBConnectionServiceImpl" path="/retailQuery" /> 

DBConnectionServiceImpl:

package com.retail.report.client;

 import java.util.ArrayList; import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; @RemoteServiceRelativePath("retailQuery") public interface DBConnectionService extends RemoteService { public ArrayList<SalesEntry> dayOfWeekQuery(String hier); public ArrayList<SalesEntry> weekQuery(String hier); } 

As far as I can tell, everything seems normal if you look at similar problems with servlets not found, the only thing I canโ€™t check for 100%, for sure, these are some tomcat parameters that I donโ€™t know about what needs to be installed , since this is one common tomcat server on web hosting that I cannot change anything with myself (although it may be possible to ask the hosting if there is something that needs to be changed)

+4
source share
1 answer

What is inside your tomcat / lib folder on the host? It is possible that GWT assumes that some libraries are available in host mode, but they are not available in your deployed host libraries. Just make sure all the necessary .jar files are in the war file in classes or lib.

+1
source

Source: https://habr.com/ru/post/1402258/


All Articles