Sunday, 18 August 2013

jboss deployment issue - can not visit servlet

jboss deployment issue - can not visit servlet

I am trying to write a simple web application and deploy on jboss EAP 6.
The application is named "webapp" and I was able to build and deploy it to
jboss. The context root is /webapp.
I was able to then visit localhost:8080/webapp and it returns a "Hello
World" printed from the defaulted index.jsp that was generated by eclipse
at /src/main/webapp.
However, when I tried to actually visit the servlet at
localhost:8080/webapp/sessionsetup I got the following error:
JBWEB000065: HTTP Status 404 - /webapp/sessionsetup
JBWEB000309: type JBWEB000067: Status report
JBWEB000068: message /webapp/sessionsetup
JBWEB000069: description JBWEB000124: The requested resource is not
available.
Below is my simple code for the servlet:
@WebServlet("/sessionsetup") public class SessionSetup extends HttpServlet{
private static final Logger log =
LoggerFactory.getLogger(SessionSetup.class);
public void doGet(HttpServletRequest request, HttpServletResponse
response) throws IOException {
log.info(this.toString());
log.info("Do get method is called");
response.setContentType("text/xml");
PrintWriter printer = response.getWriter();
printer.println("<html>");
printer.println("<head>" + "</head>");
printer.println("<body>");
printer.println("<h1>" + "Welcome! You are in session setup" + "</h1>");
printer.println("</body>");
printer.println("</html>");
printer.close();
}
}
Could anyone comment on where I might miss something? Is there a way to
find some log information no this error? I tried to look for server.log at
/standalone/log but couldn't find anything.
thanks.

No comments:

Post a Comment