Skip to main content

'Hello world' servlet with Sun Java System Application Server

No replies
guarriman
Offline
Joined: 2007-08-31
Points: 0

Hi.

I'm trying to create a simple "Hello World" servlet to be served with Sun Java System Application Server Platform Edition 8.2.

I installed it ok on Linux:
/opt/SUNWappserver/
http://localhost:8080 works fine
http://localhost:4848 works fine

But I'm not able to fin the way to serve my 'HelloWorld' servlet:
-------
import java.io.*;

import javax.servlet.http.*;
import javax.servlet.*;

public class HelloServlet extends HttpServlet {
public void doGet (HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException
{
PrintWriter out = res.getWriter();

out.println("Hello, world!");
out.close();
}
}
--------------

No idea about where to copy it or how to modify 'web.xml' file.

Any suggestion?