You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Arion Yu <ar...@stt.com.hk> on 2000/07/06 03:45:54 UTC

Re: problems compile .jsp with a
Hi!

Could you check where is your "response.jsp"?

Arion

David Parker wrote:

> I'm attempting to use the set and get properties from a bean, following the
> tutorial from sun.
> http://java.sun.com/products/jsp/html/jspbasics.fm2.html
>
> This is my directory structure.
> E:\Express\jsp\hellouser.jsp
> E:\Express\WEB-INF\jsp\beans\hello\NameHandler.java
>
> I have the following context in the tomcat.conf
>
> ApJservMount /express /root
> <Location /express/WEB-INF/>
>      AllowOverride None
>      deny from all
> </Location>
>
> <LocationMatch /express/*.jsp>
>      SetHandler jserv-servlet
> </LocationMatch>
>
> ____________________________________________________________________________
> ___________________
>
> There seems to be a problem with the directory structure because the
> servlet engine is not able to find include files.
>
> Error: 500
> Location: /express/jsp/hellouser.jsp
> Internal Servlet Error:
> org.apache.jasper.JasperException: Bad file argument to include
>          at
> org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
> ntListener.java, Compiled Code)
>          at
> org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
> ener.java:116)
>          at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java,
> Compiled Code)
>          at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code)
>          at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
>          at org.apache.jasper.compiler.Parser.parse(Parser.java:1034)
>          at org.apache.jasper.compiler.Compiler.compile(Compiler.java,
> Compiled Code)
>          at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
>          at
> org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
> rvlet.java:149)
>          at
> org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
> va:161)
>          at
> org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
>          at org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
> Compiled Code)
>          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>          at
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
> Compiled Code)
>          at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>          at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
> (Ajp12ConnectionHandler.java, Compiled Code)
>          at
> org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java,
> Compiled Code)
>          at java.lang.Thread.run(Unknown Source)
>
> ____________________________________________________________________________
> ___________________
>
> E:\Express\jsp\hellouser.jsp
>
> <%@ page import="hello.NameHandler" %>
>
> <jsp:useBean id="mybean" scope="page" class="hello.NameHandler" />
> <jsp:setProperty name="mybean" property="*" />
>
> <html>
> <head><title>Hello, User</title></head>
> <body bgcolor="#ffffff" background="background.gif">
>
> <%@ include file="dukebanner.html" %>
>
> <table border="0" width="700">
> <tr>
> <td width="150"> &nbsp; </td>
> <td width="550">
> <h1>My name is Duke. What's yours?</h1>
> </td>
> </tr>
> <tr>
> <td width="150" &nbsp; </td>
> <td width="550">
> <form method="get">
> <input type="text" name="username" size="25">
> <br>
> <input type="submit" value="Submit">
> <input type="reset" value="Reset">
> </td>
> </tr>
> </form>
> </table>
>
> <%
>      if ( request.getParameter("username") != null ) {
> %>
>
> <%@ include file="response.jsp" %>
>
> <%
>      }
> %>
>
> </body>
> </html>
> ____________________________________________________________________________
> ___________
> E:\Express\WEB-INF\jsp\beans\hello\NameHandler.java
> package hello;
>
> public class NameHandler {
>
>      private String username;
>
>      public NameHandler() {
>          username = null;
>      }
>
>      public void setUsername( String name ) {
>          username = name;
>      }
>
>            public String getUsername() {
>          return username;
>      }
> }

--
[This email and any files transmitted with it are confidential and may contain
information that is legally privileged. They are intended solely for the
addressee(s). Access to this email by anyone else is unauthorized. If you are not
the intended recipient, please delete it and notify the sender by email
immediately; you should not copy or use it for any purpose, nor disclose its
contents to any other person. Thank you.]