You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by coder5436uk <sl...@hotmail.com> on 2007/07/02 10:55:09 UTC
Re: Tomcat adding files
my web xml:
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<include-prelude>/WEB-INF/headers/v2header.jsp</include-prelude>
</jsp-property-group>
</jsp-config>
file does exist in location
I get
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: /index.jsp(1,1) The absolute uri:
http://java.sun.com/jstl/xml cannot be resolved in either web.xml or the jar
files deployed with this application
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:334)
org.apache.jasper.compiler.Parser.addInclude(Parser.java:385)
org.apache.jasper.compiler.Parser.parse(Parser.java:130)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
I have been able to get it NOT to break the code but it seems to ignore the
file I want to include
Tim Funk wrote:
>
> Look at projects such as tiles.
>
> An alternative is to use jsp preludes. Which allow you to add stuff to
> the beginning or end of all jsp pages.
>
> For example: put this in web.xml:
> <jsp-config>
> <jsp-property-group>
> <url-pattern>*.jsp</url-pattern>
> <include-prelude>/WEB-INF/prelude1.jspf</include-prelude>
> </jsp-property-group>
> </jsp-config>
>
>
> -Tim
>
> coder5436uk wrote:
>> I have an install of tomcat and I wish to add a default header and footer
>> to
>> each page, any one know how to do this ?
>>
>> I am running files which come out with simple text, I want to include
>> them
>> all in a site template without having to change the code in each page.
>>
>>
>> eg.
>>
>> simple page
>>
>> <%= hello %>
>>
>>
>> will out put the java variable "hello" on a blank page, I want to
>> simulate
>> the code
>>
>>
>> <%@ include file="header.html" %>
>>
>> <%= hello %>
>>
>> <%@ include file="header.html" %>
>>
>> without having to put the JSP include in every page
>> I would appreciate some help on how to do this within the tomcat config
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Tomcat-adding-files-tf3999518.html#a11390634
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat adding files
Posted by Tim Funk <fu...@joedog.org>.
2 problems
1) If you have *.jsp - don't make the include file a file that ends with
jsp. Use jspf as your include extension.
2) Try access the include file all by itself. Sounds like a simple
compile issue.
-Tim
coder5436uk wrote:
> my web xml:
> <jsp-config>
> <jsp-property-group>
> <url-pattern>*.jsp</url-pattern>
> <include-prelude>/WEB-INF/headers/v2header.jsp</include-prelude>
> </jsp-property-group>
> </jsp-config>
>
> file does exist in location
>
> I get
>
> 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: /index.jsp(1,1) The absolute uri:
> http://java.sun.com/jstl/xml cannot be resolved in either web.xml or the jar
> files deployed with this application
>
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
>
>
> I have been able to get it NOT to break the code but it seems to ignore the
> file I want to include
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat adding files
Posted by Titi Wangsa <bl...@gmail.com>.
looks like the can't be included..
try zeroing the file
of set the content to "this is the header file"
or move the file to the root directory and try to access the file
directly to see what kind of error you are dealing with
i mean move the file so that
you can view the header using http://server:port/appname/v2header.jsp
On 7/2/07, coder5436uk <sl...@hotmail.com> wrote:
>
> my web xml:
> <jsp-config>
> <jsp-property-group>
> <url-pattern>*.jsp</url-pattern>
> <include-prelude>/WEB-INF/headers/v2header.jsp</include-prelude>
> </jsp-property-group>
> </jsp-config>
>
> file does exist in location
>
> I get
>
> 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: /index.jsp(1,1) The absolute uri:
> http://java.sun.com/jstl/xml cannot be resolved in either web.xml or the jar
> files deployed with this application
>
> 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:334)
> org.apache.jasper.compiler.Parser.addInclude(Parser.java:385)
> org.apache.jasper.compiler.Parser.parse(Parser.java:130)
>
> org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
>
> org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
>
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
>
>
> I have been able to get it NOT to break the code but it seems to ignore the
> file I want to include
>
>
>
>
>
> Tim Funk wrote:
> >
> > Look at projects such as tiles.
> >
> > An alternative is to use jsp preludes. Which allow you to add stuff to
> > the beginning or end of all jsp pages.
> >
> > For example: put this in web.xml:
> > <jsp-config>
> > <jsp-property-group>
> > <url-pattern>*.jsp</url-pattern>
> > <include-prelude>/WEB-INF/prelude1.jspf</include-prelude>
> > </jsp-property-group>
> > </jsp-config>
> >
> >
> > -Tim
> >
> > coder5436uk wrote:
> >> I have an install of tomcat and I wish to add a default header and footer
> >> to
> >> each page, any one know how to do this ?
> >>
> >> I am running files which come out with simple text, I want to include
> >> them
> >> all in a site template without having to change the code in each page.
> >>
> >>
> >> eg.
> >>
> >> simple page
> >>
> >> <%= hello %>
> >>
> >>
> >> will out put the java variable "hello" on a blank page, I want to
> >> simulate
> >> the code
> >>
> >>
> >> <%@ include file="header.html" %>
> >>
> >> <%= hello %>
> >>
> >> <%@ include file="header.html" %>
> >>
> >> without having to put the JSP include in every page
> >> I would appreciate some help on how to do this within the tomcat config
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Tomcat-adding-files-tf3999518.html#a11390634
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat adding files
Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
Oh, it normally just a silly thing, like its picking up a relative link, not
an absolute ref
try... <%@ include file="/thething.jsp" %>
Also half the problem is you only picking up the hassle at run time...
In Netbeans if you right click "on the JSP file and compile it", you will
see the problem immediately.... its because JSP are only compiled at run
time.
----- Original Message -----
From: "coder5436uk" <sl...@hotmail.com>
To: <us...@tomcat.apache.org>
Sent: Monday, July 02, 2007 10:55 AM
Subject: Re: Tomcat adding files
>
> my web xml:
> <jsp-config>
> <jsp-property-group>
> <url-pattern>*.jsp</url-pattern>
> <include-prelude>/WEB-INF/headers/v2header.jsp</include-prelude>
> </jsp-property-group>
> </jsp-config>
>
> file does exist in location
>
> I get
>
> 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: /index.jsp(1,1) The absolute uri:
> http://java.sun.com/jstl/xml cannot be resolved in either web.xml or the
> jar
> files deployed with this application
>
> 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:334)
> org.apache.jasper.compiler.Parser.addInclude(Parser.java:385)
> org.apache.jasper.compiler.Parser.parse(Parser.java:130)
>
> org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
>
> org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
>
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
>
>
> I have been able to get it NOT to break the code but it seems to ignore
> the
> file I want to include
>
>
>
>
>
> Tim Funk wrote:
>>
>> Look at projects such as tiles.
>>
>> An alternative is to use jsp preludes. Which allow you to add stuff to
>> the beginning or end of all jsp pages.
>>
>> For example: put this in web.xml:
>> <jsp-config>
>> <jsp-property-group>
>> <url-pattern>*.jsp</url-pattern>
>> <include-prelude>/WEB-INF/prelude1.jspf</include-prelude>
>> </jsp-property-group>
>> </jsp-config>
>>
>>
>> -Tim
>>
>> coder5436uk wrote:
>>> I have an install of tomcat and I wish to add a default header and
>>> footer
>>> to
>>> each page, any one know how to do this ?
>>>
>>> I am running files which come out with simple text, I want to include
>>> them
>>> all in a site template without having to change the code in each page.
>>>
>>>
>>> eg.
>>>
>>> simple page
>>>
>>> <%= hello %>
>>>
>>>
>>> will out put the java variable "hello" on a blank page, I want to
>>> simulate
>>> the code
>>>
>>>
>>> <%@ include file="header.html" %>
>>>
>>> <%= hello %>
>>>
>>> <%@ include file="header.html" %>
>>>
>>> without having to put the JSP include in every page
>>> I would appreciate some help on how to do this within the tomcat config
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Tomcat-adding-files-tf3999518.html#a11390634
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org