File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes jsp:include.. Has anyone ever got it to work!? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp:include.. Has anyone ever got it to work!?" Watch "jsp:include.. Has anyone ever got it to work!?" New topic
Author

jsp:include.. Has anyone ever got it to work!?

Chentzen
Greenhorn

Joined: Sep 24, 2000
Posts: 4
Hello,
I have beat my head against the wall for far too long and still have no definite answers to this problem. I use a simple <jsp:include..flush="true"/> tag in a simple fifteen line .jsp. Every single time i get Error 500: IllegalStateException: Repsonse has already been commited. I don't want to use <@include...%> cause of the modification update hassles. I do not get the response (explicitly) anywhere else on the page.
Has anyone ever got this to work?
If so please post code snippets and name and version of web server your using.
I think Sun is just playing with us and you can't really include anything in jsps
Please respond or I'm libel to go postal here
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Sun is not playing with anyone's head I use the jsp:include all the time, even nested ones. Without seeing the actual JSP code I can't do anything else...


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Please post your code, we try to help.
regds
maha anna
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Chentzen: Please take a look at this link: http://www.javaranch.com/ubb/Forum10/HTML/000180.html
Chentzen
Greenhorn

Joined: Sep 24, 2000
Posts: 4
My code:
The jsp
<html>
<body>
<jsp:include page="/path/to/includetest.html" flush="true"/>
<body>
</html>
includetest.html
<b>Hello jsp include</b>
Thats it
Using Tomcat 3.1
Thanks for the help.
And sheriff I read that post I'll change my name (give me a day I'm kinda busy )
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
I checked this with JSWDK pack. It works . I had to remove the flush tag since the JSP does not support it.
Now I don't know what to say. Why don't you do this? Just elminate everything and call the main.jsp file staright from the browser. See what happens. change the main.jsp file to include another .html file and try to change the tags and check. Sorry I couldn't help much.
regds
maha anna
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp:include.. Has anyone ever got it to work!?
 
Similar Threads
jsp:useBean & jsp:include tags
a recursive include?
JSP include and param problem !!!
Problem with forward and include JSP tag
passing parameters to included jsp file