• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat , Unable to compile classfile, pls help

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
i installed tomcat 5.0.7, and j2sdk 1.4.1_01, jakarta taglibs 1.0.3
i am able to run simple jsp pages and servlets, but when i write the following program
i endup with an error
i installed jstl in the same directory where mt j2sdk and tomcat are, and i copied all the jar files in
the lib folder of jstl to my webapplication lib directory.
the directory is webapps/RequestHeaders/WEB-INF/
classes
lib

this is my jsp file

<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<html>
<body>
You sent the following request headers:
<p />
<table border="1">
<tr>
<th>
Header
</th>
<th>
Value
</th>
</tr>
<c:forEach var="entry" items="${header}">
<tr>
<td>
${entry.key}
</td>
<td>
${entry.value}
</td>
</tr>
</c:forEach>
</table>
</body>
</html>

and i placed it in RequestHeaders folder(my web application)
can any give my any suggestions on how to proceed further??
thx in advance..
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:561)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

root cause
java.lang.IllegalArgumentException: -18
org.apache.jasper.compiler.SmapStratum$LineInfo.setOutputLineIncrement(SmapStratum.java:124)
org.apache.jasper.compiler.SmapStratum.optimizeLineSection(SmapStratum.java:221)
org.apache.jasper.compiler.SmapUtil.evaluateNodes(SmapUtil.java:490)
org.apache.jasper.compiler.SmapUtil.generateSmap(SmapUtil.java:123)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:301)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

note The full stack trace of the root cause is available in the Tomcat logs.
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<html>
<body>
You sent the following request headers:
<p />
<table border="1">
<tr>
<th>
Header
</th>
<th>
Value
</th>
</tr>
<c:forEach var="entry" items="${header}">
<tr>
<td>
${entry.key}
</td>
<td>
${entry.value}
</td>
</tr>
</c:forEach>
</table>
</body>
</html>

--------------------------------------------------------------------------------
Apache Tomcat/5.0.7
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are improperly using header. header is an implciate Map Object.
From the specs:
header - a Map that maps header names to a single String header value (obtained by calling ServletRequest.getHeader(String name))
You would need to do some work to get this to output what you want. I haven't tried it but, this should work.

Now, you should use the JSTL distributed with the jwsdk 1.2. I beleive there is a change to EL in JSP 1.2 that permits this to work. The EL with JSTL previous to JSP 2.0 may not have enough features.
[ August 26, 2003: Message edited by: Carl Trusiak ]
 
shailu gaddam
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mr.Carl
thx for ur suggestion, i'll try it n let u know..
shailaja
 
shailu gaddam
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I tried in many ways to get the output, donno where i am doing wrong..getting the same error..
using tomact 5 and j2ee 1.4_2 binary. i want to work on taglibs..
where will i get the documentation?..
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic