If it does, then it's violating the spec. The spec doesn't specify any
extensions that can or cannot be included. It just says it has to be a
String that is a relative URL. The string "./myText.foo" satisfies that and
the file myText.foo pulls up correctly in my browser with the following
content:

"This is the myText.foo file!"

However, when you include the myText.foo file using the jsp:include
directive, you get an exception. I think that's a bug.

My setup is TC 4.0.1 stand-alone on RedHat 7.1 using the IBM JDK 1.2 -- in
case anyone was wondering...

--jeff

----- Original Message -----
From: "August Detlefsen" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 2:16 PM
Subject: Re: Unable to include *.sum files (Again)


> It might, if somewhere in the code of the <jsp:include> tag it
> specifies to only include a file if it is of a relevant mime type, say
> JSP, text/xyz, or image/abc.
>
> This would prevent the server from sending out potentially damaging
> stuff with the include tag, like .java or .exe files.
>
> Again, I am just speculating...
>
>
>
>
> --- Jeff Kilbride <[EMAIL PROTECTED]> wrote:
> > Nope. I tried it with *.doc files, too, and it still doesn't work.
> > *.doc is
> > defined in web.xml.
> >
> > Besides, it doesn't really make sense for MIME types to affect
> > included
> > files, does it?
> >
> > --jeff
> >
> > ----- Original Message -----
> > From: "August Detlefsen" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Friday, December 07, 2001 12:40 PM
> > Subject: Re: Unable to include *.sum files (Again)
> >
> >
> > > I am totally guessing, but maybe you have to define a MIME type for
> > > .sum files in your web.xml (and perhaps also where Apache
> > configures
> > > MIME types?)?
> > >
> > > HTH,
> > > -August
> > >
> > > --- "Kusel, Jonathan J" <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi all,
> > > > I've mailed the follwoing to the tomcat users group but nobody
> > has
> > > > responded
> > > > yet so I took the liberty of posting it again.
> > > >
> > > > Here's the message:
> > > > -------------------------------->
> > > >
> > > > I'm trying to include normal text files with ".sum"  extensions
> > using
> > > > the
> > > > jsp:include directive:
> > > >    '<jsp:include page="testTxt.sum" flush="true" />'
> > > > but tomcat throws an exception(see bottom for the exception).
> > When I
> > > > change
> > > > the file's extension to .txt for example it works, but the files
> > that
> > > > I
> > > > wan't to include are generated by another program on a daily
> > basis so
> > > > changing the extension is not an option.
> > > >
> > > > When I use the '<%@include file="testTxt.sum" %>' directive it
> > works,
> > > > but I
> > > > need to use the <jsp:include> since the filenames are dynamically
> > > > generated.
> > > >
> > > > Is this a bug or am I doing something wrong? I'm using tomcat4.0
> > for
> > > > NT 4.0.
> > > >
> > > > THE STACKTRACE:
> > > > ----------------
> > > >
> > > > ApplicationDispatcher[/interestrates]: Servlet.service() for
> > servlet
> > > > default
> > > > threw exception
> > > > java.lang.IllegalStateException
> > > > at
> > > >
> > >
> >
>
org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(Serv
> > > > letResponseWrapperInclude.java:109)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.jav
> > > > a:1143)
> > > > at
> > > >
> > >
> >
> org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:519)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
> > > > java:679)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
> > > > er.java:570)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
> > > > .java:493)
> > > > at
> > > >
> > >
> >
>
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
> > > > 18)
> > > > at org.apache.jsp.test$jsp._jspService(test$jsp.java:67)
> > > > at
> > > >
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > > at
> > > >
> > >
> >
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
> > > > va:202)
> > > > at
> > > >
> > >
> >
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
> > > > at
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > > > FilterChain.java:247)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > > > ain.java:193)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> > > > va:243)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > > > 66)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > > > at
> > > >
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> > > > va:201)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > > > 66)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > > > at
> > > >
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > > > at
> > > >
> > >
> >
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
> > > > )
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > > > 66)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> > > > java:170)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > > > 64)
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
> > > > )
> > > > at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > > > 64)
> > > > at
> >
> === message truncated ===
>
>
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to