Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6752175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:00:50+00:00 2026-05-26T13:00:50+00:00

i need to direct url in my web server to be : http://localhost:8080/console/myws/mymethod i

  • 0

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 ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:00:51+00:00Added an answer on May 26, 2026 at 1:00 pm

    Assuming that /console is the context path and the /mymethod is the path info, then you need to map the servlet on /myws/*.

    <servlet-mapping>
        <servlet-name>yourServletName</servlet-name>
        <url-pattern>/myws/*</url-pattern>
    </servlet-mapping>
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Same question for Windows Server 2003. Do I need to direct people to install
I'm writing an app, and in many situations need to have direct access to
need ask you about some help. I have web app running in Net 2.0.
Hey. I need to prevent direct access to http://www.site.com/wp-content/uploads/folder/something.pdf through the browser. However the
So I have a situation where I need to pass some parameters on url.
Very direct question, i need to know if its possible and maybe where to
I need to direct user to Paypal site for payment . Is there a
i need to create an url like this: www.example.com/index.php/scheda/name-surname-id.html so i create the Scheda
I need to create a flowchart to show Developer computers, Development server, Development DB,
I have a site that needs to use mod_rewrite to direct traffic to www.example.com

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.