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 888347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:22:57+00:00 2026-05-15T13:22:57+00:00

I’m using Eclipse and can get each of my servlets to work independently (using

  • 0

I’m using Eclipse and can get each of my servlets to work independently (using HTTP Client to test) through Eclipse. But the real work is getting them to work at the same time.

I’m using Tomcat, but have no idea how to run all three servlets at the same time. They are all mapped properly in the web.xml file. How do I deploy these from Eclipse?

  • 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-15T13:22:58+00:00Added an answer on May 15, 2026 at 1:22 pm

    Well, simply map all 3 of them in the web.xml and deploy them. Below, a sample web.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    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">
      <servlet>
        <servlet-name>Servlet1</servlet-name>
        <servlet-class>com.acme.Servlet1</servlet-class>
      </servlet>
      <servlet>
        <servlet-name>Servlet2</servlet-name>
        <servlet-class>com.acme.Servlet2</servlet-class>
      </servlet>
      <servlet>
        <servlet-name>Servlet3</servlet-name>
        <servlet-class>com.acme.Servlet3</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>Servlet1</servlet-name>
        <url-pattern>/path1/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>Servlet2</servlet-name>
        <url-pattern>/path2/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>Servlet3</servlet-name>
        <url-pattern>/path3/*</url-pattern>
      </servlet-mapping>
    </web-app>
    

    Note that the following URLs (assuming mycontext is the context):

    • http://hostname:port/mycontext/path1/foo
    • http://hostname:port/mycontext/path1/bar?aparam=avalue
    • http://hostname:port/mycontext/path1

    Match the pattern <url-pattern>/path1/*</url-pattern> (so you don’t need to map them on /path1, /path1/*).

    If you are using Eclipse WTP, you can register Tomcat as a Server and deploy your Dynamic Web Project on it from Eclipse (right-click on the project and select Run As > Run on Server).

    Outside Eclipse, you’ll have to package your application as a .war (the standard format for a webapp) and deploy this war on Tomcat. There are several ways to do this but the most straightforward way is to copy the war into $TOMCAT_HOME/webapps.

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a French site that I want to parse, but am running into

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.