contactos is a folder in my sites_empresa.lardocelar.com application
so the URLs should work fine.
In server.xml I have
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Host name="sites_empresa.lardocelar.com" debug="0"
appBase="c:/caixatec/webapps/sites_empresa/"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="" debug="1"/>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="site_empresa_log." suffix=".txt"
timestamp="false"/>
</Host>
</Engine>
Following Martin tip I noticed something different from what I would
see in Tomcat 5.5.
All the JSP files that are on my app ROOT folder compile just fine and
the java and classes are generated in
C:\caixatec\programs\Apache Software Foundation\Tomcat
6.0\work\Catalina\sites_empresa.lardocelar.com\_\org\apache\jsp
However the URL
http://sites_empresa.lardocelar.com:8080/includes/application_logger.jsp
Generated its class and java files in
C:\caixatec\programs\Apache Software Foundation\Tomcat
6.0\work\Catalina\sites_empresa.lardocelar.com\includes\org\apache\jsp
Is this normal behaviour in Tomcat 6? I was expecting them at
C:\caixatec\programs\Apache Software Foundation\Tomcat
6.0\work\Catalina\sites_empresa.lardocelar.com\_\org\apache\jsp\includes
My problem is that my Tomcat does not compile the JSP files with
includes that are in folders under the app root dir.
I created test.jsp in folder /contactos/ with simply Hello in its body
and all is fine when calling
http://sites_empresa.lardocelar.com:8080/contactos/test.jsp
Then I changed the content of test.jsp to
<%...@include file="/includes/application_logger.jsp"%>
Hello
Hit refresh and
org.apache.jasper.JasperException: /test.jsp(1,2) File
"/includes/application_logger.jsp" not found
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:297)
org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:330)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:438)
org.apache.jasper.compiler.Parser.parseFileDirectives(Parser.java:1745)
org.apache.jasper.compiler.Parser.parse(Parser.java:127)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:120)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:180)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
and
http://sites_empresa.lardocelar.com:8080/includes/application_logger.jsp
is ok.
It can be a relative vs absolute path thing but I don“t have a clue
where to fix it.
On Thu, Apr 29, 2010 at 9:33 PM, Konstantin Kolinko
<[email protected]> wrote:
> 2010/4/29 Nuno Faria <[email protected]>:
>> Strange thing. This is a fresh install of a 6.0.26 and I had created
>> the example from scratch.
>> But I did as you suggested and cleaned my work folder and now it compiles!?
>>
>> The names I used where slightly different but I reverted to mine to
>> check it back.
>> I attached the files and every one with /subdir/*_nested* gave me a
>> compile error that it is now fixed.
>>
> I cannot reproduce the error with any pages in the examples.zip that
> you attached.
>
> By the way, this list removes attachments, but sometimes they are
> visible -- probably when both the sender and the recipient use gmail.
>
>> Then if i try the missing file
>> http://sites_empresa.lardocelar.com:8080/includes/site_parameters.jsp
>>
>> I get (from the first include in the file)
>>
>> org.apache.jasper.JasperException: /site_parameters.jsp(6,1) File (...)
>
> Note that the above line should have mentioned
> "/includes/site_parameters.jsp", not "/site_parameters.jsp" as it
> does.
>
> The correct way to call the included file will be
> http://sites_empresa.lardocelar.com:8080/contactos/includes/site_parameters.jsp
>
> if contactos is your web application.
>
> The paths in @include are relative to the web application and not to
> the site root.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]