i need to direct url in my web server to be :
http://localhost:8080/console/myws/mymethod
i have servlet class called MyServlet
with some methods ( that in the end are web services converted with JAXWS)
how can i map this servlet to be in the tomcat server if it possible without changing the servlet class name:
http://localhost:8080/console/myws/mymethod
here is my web.xml configuration i just can’t make it work. i define console to be my Context root without the “/” just console
<listener>
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
</listener>
<servlet>
<servlet-name>jax-ws</servlet-name>
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>jax-ws</servlet-name>
<url-pattern>/myws/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
90
</session-timeout>
</session-config>
also how can i debug the configuration in tomcat to check what i did wrong ?
Assuming that
/consoleis the context path and the/mymethodis the path info, then you need to map the servlet on/myws/*.The servlet class and name is totally independent from the URL pattern you choose, so you don’t need to change it as well at all.