aspose file tools*
The moose likes Tomcat and the fly likes Tomcat , Unable to compile classfile, pls help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat , Unable to compile classfile, pls help" Watch "Tomcat , Unable to compile classfile, pls help" New topic
Author

Tomcat , Unable to compile classfile, pls help

shailu gaddam
Greenhorn

Joined: Aug 26, 2003
Posts: 4
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
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
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 ]

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
shailu gaddam
Greenhorn

Joined: Aug 26, 2003
Posts: 4
Hi Mr.Carl
thx for ur suggestion, i'll try it n let u know..
shailaja
shailu gaddam
Greenhorn

Joined: Aug 26, 2003
Posts: 4
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?..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat , Unable to compile classfile, pls help
 
Similar Threads
JSTL killing me
Regarding JSTL
JSTL Not working on Tomcat 5.0.28 & Weblogic 8.1
Error while executing JSTL
JSTL and hashmap