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

  • Home
  • SEARCH
  • 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 8582797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:23:02+00:00 2026-06-11T21:23:02+00:00

I have a servlet. I’m new in java. But i need to run the

  • 0

I have a servlet. I’m new in java. But i need to run the servlet. It has two methods:

public void doGet (HttpServletRequest request,
                     HttpServletResponse response) {...}

and

public void doPost HttpServletRequest request,
                     HttpServletResponse response) {...}

What steps i need to do to run the servlet? (I have tomcat 7 installed, eclipse SE with tomcat plugin, netBeans)

  • 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-06-11T21:23:04+00:00Added an answer on June 11, 2026 at 9:23 pm
    1. Create a dynamic web project
    2. Create a new class extending HttpServlet and override the method doGet and doPost, write your business logic in there
    3. Configure web.xml, something like :

        <servlet>
          <servlet-name>helloworld</servlet-name>
          <servlet-class>test.helloworld</servlet-class>
        </servlet>
      
        <servlet-mapping>
          <servlet-name>helloworld</servlet-name>
          <url-pattern>/helloworld</url-pattern>
        </servlet-mapping>
      
    4. Deploy your web project in the tomcat

    5. Type localhost:8080/mywebapp/helloworld.do in the browser’s address bar, mywebapp is your project name

    If you are lucky, you will see the result.

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

Sidebar

Related Questions

I have servlet - @WebServlet(/servlet123) public class servlet123 extends HttpServlet { protected void doPost(HttpServletRequest
I have a servlet that looks like this: public void doPost(HttpServletRequest request, HttpServletResponse response)
I have the servlet name ExampleServlet.java which have only init method with HttpServletRequest and
I have two * Servlet * and i want to run both Servlet on
I have a servlet. But it is not working as desired. Hence for debugging
I have a servlet that has a suspending method and a broadcasting one: @GET
I have two servlet: first servlet is similar to a client and creates an
I have servlet that does the following: public class LoginServlet extends HttpServlet { protected
I have a servlet with an overridden doGet method in a Dynamic Web App
I have a servlet that has resized and encoded an image into base64. I

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.