0 Replies Latest reply on May 20, 2004 9:01 PM by John Anderson

    Request for Information.

    John Anderson Newbie

      I'm completely new to JSP. However, I'm familiar with servlets and tomcat. I'm following an IBM tutorial from developerworks on jsp. Their first example is really simple:

      hello.jsp

      
      <jsp:directive.page languag="java"/>
      <?xml version="1.0" encoding="iso-8859-1"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
      <html><head><title>Hello World</title></head><body>
      <center><h1>Hello World!</h1></center>
      <cetner>The local server time is: <jsp:expression> new java.util.Date().toString()<jsp:expression>.</center>
      </body></html>
      
      


      I've packaged it to deploy into the app root directory. I have several cmp beans from another tutorial packaged with this application, but I've not yet begun to access them via jsp. Thus my app root is /cmp.

      When I deploy the package to JBoss 3.2.3's default server config, and point my web browser to http://localhost:8080/cmp/hello.jsp, I get an exception as follows:

      HTTP Status - 500

      org.apache.jasper.JasperException: /hello.jsp(1,5) jsp.error.badaction
       at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
       at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
       at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
       at org.apache.jasper.compiler.Parser.parseAction(Parser.java:671)
       at org.apache.jasper.compiler.Parser.parseElements(Parser.java:803)
       at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
       at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
       at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
       at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
       at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
       at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      etc, etc, etc.....
      


      The turorial I'm working in doesn't say anything about deployment descriptors, etc. So I have no entries in any deployment .xml for the jsp page. Do I need to declare the .jsp somewhere like I do a servlet? I haven't found any rescources suggesting this yet.

      If anyone has any better tutorials/rescources for JBoss/Tomcat jsp, please point me in that direction. I think I'm just getting more lost with the IBM Tutorial.