two things: 1) I sometimes use "telnet" as a "poor man's" protocol debugger. If you look at the http spec, you can determine exactly what you browser would have sent for a "GET" request. You can build a test case that doesn't require any cookies (ie no session requirements). You can use telnet from a unix box or win2k/xp to generate a browser request by something like:
$ telnet myserver.mydomain.com 8080 GET /myproject/myservlet HTTP/1.1<enter> Host: myserver.mydomain.com<enter> <enter> This will show you exactly what headers are added to your response. 2) You could write your own "file serving servlet". I did this for several projects that had a requirement to dynamically include static content files from outside the "ear" deployment directory structure. My servlet looks for an "init parm" to establish a "document root" and will look for files under the document root directory. It does not allow requests for directory patterns that are not to be served. (eg WEB-INF/*,META-INF/*, *.jsp, etc) I have it mapped to a uri something like /fs/*. In my jsps, I can use it via something like: <jsp:include flush="true" page="/fs/pageheader.html"></jsp:include> The point is that in you own file serving servlet, you can decide exactly what to add to the response object. -----Original Message----- From: Steffen Fiedler [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2003 3:57 PM To: [EMAIL PROTECTED] Subject: Re: Problems with <jsp:include> My servlet engine is tomcat 4.0.3. Is there a way to control the mime-type-handling? Am Donnerstag, 3. Juli 2003 21:11 schrieben Sie: > What servlet engine are you using? > > I suspect that the default file serving servlet in your container is > changing the page's mime type to be appropriate for the file extention of > the requested file. > > I don't believe that it is supposed to do that on an "include" request > though. > > -----Original Message----- > From: Steffen Fiedler [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 03, 2003 2:32 PM > To: [EMAIL PROTECTED] > Subject: Re: Problems with <jsp:include> > > > Hi, > thanks for this tip, but i have to decide at runtime which side should be > inclouded. > > Am Mittwoch, 2. Juli 2003 23:13 schrieben Sie: > > I would assume that the @include page directive would work better, > > given that the content is static. The jsp:include is for including > > dynamic output from another object in your response. > > > > Steffen Fiedler wrote: > > >Hi, > > > > > >I have two problems with <jsp:inlude> - tag: > > > > > >1) I can only include files with extension .html or .jsp, when i try to > > >include other files (e.g. .txt) , the generated HTML-code just ends > > >at the point where the included text should appear, without any > > >error-message. When i rename file.txt to file.html its included > > >correctly. I found this behaviour nowhere described. > > > > > >2) The include-tag seems to destroy the correct character-encoding. > > >E.g. german Umlaute are shown as ?. When i request the included > > >file directly its shown correct, on the including jsp-page too. > > > > > >Thanks for any help, > > >Steffen > > > > > >======================================================================== > > >== = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > > JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set > > > JSP-INTEREST DIGEST". > > > > > >Some relevant archives, FAQs and Forums on JSPs can be found at: > > > > > > http://java.sun.com/products/jsp > > > http://archives.java.sun.com/jsp-interest.html > > > http://forums.java.sun.com > > > http://www.jspinsider.com > > > > ========================================================================= > >== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set > > JSP-INTEREST DIGEST". > > > > Some relevant archives, FAQs and Forums on JSPs can be found at: > > > > http://java.sun.com/products/jsp > > http://archives.java.sun.com/jsp-interest.html > > http://forums.java.sun.com > > http://www.jspinsider.com > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set > JSP-INTEREST DIGEST". > > Some relevant archives, FAQs and Forums on JSPs can be found at: > > http://java.sun.com/products/jsp > http://archives.java.sun.com/jsp-interest.html > http://forums.java.sun.com > http://www.jspinsider.com > > =====================================To unsubscribe: mailto > [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto > [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > > Some relevant archives, FAQs and Forums on JSPs can be found at: > > http://java.sun.com/products/jsp > http://archives.java.sun.com/jsp-interest.html > http://forums.java.sun.com > http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com ==========================================================================To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com