'Hello world' servlet with Sun Java System Application Server

  • Thread starter Thomas Armstrong
  • Start date
T

Thomas Armstrong

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();
}
}
 

mkw

Joined
Aug 20, 2008
Messages
4
Reaction score
0
Hi,

Has anybody managed to get this simple HelloWorld servlet to work on Sun Java System Application Server 9.1_02 (build b04-fcs) ?

I can deploy it and send request to it, but all I get in response is a web page from the Application Server titled "Directory Listing For /".

I've tried deploying both as simple .class file and also in a .war file - both with same result. Also, I could not get the Web Applications deployment to work properly from the admin console, but dropping it in the autodeploy folder is OK.

Thanks for any help on this.
MKW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top