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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:45:18+00:00 2026-05-17T21:45:18+00:00

I am using Eclipse IDE for Java Developers Helios. I have mainly done desktop

  • 0

I am using Eclipse IDE for Java Developers Helios. I have mainly done desktop applications before but now I would like to learn about Servlets. I have installed Jetty on my computer. And I wrote a simple Servlet in Java using Eclipse. But how do I compile it and export it to a war file in Eclipse? I have found some tutorials doing it with Ant, but I would like to do it native in Eclipse if possible.

Here is my Servlet:

package org.jonas;

// some imports from java.io, java.servlet and java.servlet.http

public class MyServlet extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException {

        response.setContentType("text/html");
        PrintWriter out = response.getWriter();

        String name = request.getParameter("name");

        out.println(
                "<html><body>" +
                "<h1>" + name + "</h1>" +
                "</body></html>");
    }
}

How can I compile it and export it as a war file in Eclipse? Without Ant or Maven. So I can deploy it in Jetty.

  • 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-17T21:45:18+00:00Added an answer on May 17, 2026 at 9:45 pm

    Edit: As @nos has inferred, the OP was using “Eclipse IDE for Java Developers” and not “Eclipse IDE for Java EE Developers”. The below is only relevant for the latter.

    Assuming you created this as a Dynamic Web project in Eclipse, just

    right-click on the

    project name, > Export > WAR file
    

    and fill in the details it asks for.

    If you didnt create this as Dynamic Web Project, you can convert your static web project into one first

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

Sidebar

Related Questions

I have developed a simple Apache-Axis java web service using Eclipse IDE and now
When using Eclipse or NetBeans IDE on a Java project I get to see
For a new Java web project I thought about using: Eclipse as IDE Mercurial
I have been using Eclipse as an IDE for a short amount of time
I'm using Eclipse 3.4 and have configured the Java code formatter with all of
If I start with a Eclipse IDE for Java Developers (85 MB) (Ganymede) installation.
I have installed MercurialEclipse in both Helios Eclipse Classic 3.6.0 and Helios Eclipse IDE
This is my first Java application I am creating (using Eclipse IDE) and the
I am using Eclipse IDE with few plug-ins for PHP dev. I am using
I'm using Eclipse IDE and notice an option in the Debug perspective in the

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.