cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boissé Denis <denis.boi...@umontreal.ca>
Subject RE: JSP problem
Date Tue, 14 Aug 2007 14:01:16 GMT

Hi Andrew,

Thank for answers: 

Here my answers to you're question:

1) Which jsp-engine implementation is specified in your cocoon.xconf, and how is it configured?

In my cocoon.xconf I have (default installation):

<jsp-engine logger="core.jsp-engine">
    <parameter name="servlet-class" value="org.apache.jasper.servlet.JspServlet"/>
 </jsp-engine>

Following by this in comment:

<!--
  <jsp-engine logger="core.jsp-engine" class="org.apache.cocoon.components.jsp.JSPEngineImplNamedDispatcherInclude">
    <parameter name="servlet-name" value="*.jsp"/>
    <parameter name="forward" value="false"/>
  </jsp-engine>
  -->

2) What exactly do you have in the JSP (It's generate with MyEclipse)?  

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Test JSP</title>
</head>
<body>
 Hello World
</body>
</html>

 
After what you said, I eliminate the "<%@ page... "  line and I still get 
"Not able to compile JSP classe" error


3) Is there anything else in the stack trace (or any nested exceptions) to indicate why it
can't compile (I don't have ClassNotFoundException)

I put the complete stack trace at the bottom of this email if you want to see



4) If you copy the JSP file into some other (non-Cocoon) web app and call it directly, does
it work?  yes


NB: I also bypass (put in comment) the following line in the cocoon web.xml:

<servlet-mapping>
    <servlet-name>Cocoon</servlet-name>
    <url-pattern>*.jsp</url-pattern>
  </servlet-mapping> 


With that, the jsp file are suppose to be manage directly by the jsp servlet in the global
web.xml in tomcat, but I still have the error !!




 
STACK TRACE:

at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
	at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
	at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.cocoon.components.jsp.JSPEngineImpl.executeJSP(JSPEngineImpl.java:75)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
	at $Proxy19.executeJSP(Unknown Source)
	at org.apache.cocoon.reading.JSPReader.generate(JSPReader.java:106)
	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processReader(AbstractCachingProcessingPipeline.java:900)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:473)
	at org.apache.cocoon.components.treeprocessor.sitemap.ReadNode.invoke(ReadNode.java:85)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:253)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:699)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1154)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
	at java.lang.Thread.run(Thread.java:619)



-----Message d'origine-----
De : Andrew Stevens [mailto:ats37@hotmail.com] 
Envoyé : 13 août 2007 20:22
À : users@cocoon.apache.org
Objet : RE: JSP problem


> Date: Mon, 13 Aug 2007 15:37:46 -0400
> From: denis.boisse@umontreal.ca
> 
> I have Cocoon version 2.1.10
> I have tomcat version 6.0.10
> I have Java version 1.6
> 
> I put these lines in the sitemap:
> 
> 
>   
> 
> 
> The file testJSP.jsp only display "Hello World"  
> 
> When I type the URL "http://localhost:8080/cocoon/revue/testJSP.html"
> 
> I have the following error:
> 
> org.apache.jasper.JasperException: 
> Impossible de compiler la classe pour la JSP  
> (English: Not able to compile JSP classe)
> 
> If somebody knows something ?

Which jsp-engine implementation is specified in your cocoon.xconf, and how is it configured?
What exactly do you have in the JSP?  Just the "Hello World" text, or are there any scriptlets
or JSP tags?  Does it use the original JSP style or XML-based equivalent?  Is there an @page
directive?  Is there anything else in the stack trace (or any nested exceptions) to indicate
why it can't compile (e.g. ClassNotFoundException of any referenced classes)?  If you copy
the JSP file into some other (non-Cocoon) web app and call it directly, does it work?


Andrew.
-- 
http://pseudoq.sourceforge.net/
Open source java Sudoku application

_________________________________________________________________
The next generation of MSN Hotmail has arrived - Windows Live Hotmail
http://www.newhotmail.co.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message