I tried to run a sample application from "core JSP" by D.Hougland &
A.Tavistock on Tomcat3.1(all sample apps which came with tomcat work fine).
Here the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN">

<HTML>
<BODY BGCOLOR="white">
<H1> Request Information </H1>
<H2> Request MetaData: </H2>
<BLOCKQUOTE>
<FONT SIZE=4>
Request Method: <CODE><%=  request.getMethod() %></CODE>
<BR>
Query string: <CODE><%= request.getQueryString() %></CODE>
</FONT>
</BLOCKQUOTE>

<H2> Parameter Names and Values: </H2>
<BLOCKQUOTE>
<FONT SIZE=4>
<CODE>
<TABLE BORDER=0>
<%
  Enumeration requestNames = request.getParameterNames();
  StringBuffer outPut = new StringBuffer();

  while (requestNames.hasMoreElements()) {

    String     Name = (String)requestNames.nextElement();
    String[] Values = request.getParameterValues(Name);

    for(int count = 0; count < Values.length; count++){
      outPut.append("<TR>")
            .append("<TD>").append(Name).append("</TD>")
            .append("<TD> = </TD>")
            .append("<TD>").append(Values[count]).append("</TD>")
            .append("</TR>\n");
      Name = "&nbsp;";
    }
  }
  out.print(outPut.toString());
%>
</TABLE>
</CODE></FONT></BLOCKQUOTE>
</BODY>
</HTML>

On some reason I keep getting the folowing error:

Error: 500
Location: /examples/jsp/parameters.jsp
Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile class for
JSPC:\Tomcat\work\localhost_8080%2Fexamples\_0002fjsp_0002fparameters_0002ej
spparameters_jsp_1.java:75: Class jsp.Enumeration not found.
                  Enumeration requestNames = request.getParameterNames();
                  ^
1 error

        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:247)
        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:369)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
        at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
        at java.lang.Thread.run(Unknown Source)


Any ideas?

Thanks... Leo

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to