tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Monnahan <monna...@apl.washington.edu>
Subject Can't get <jsp:include> of a servlet genertated page to work
Date Tue, 07 Jan 2003 03:15:30 GMT
Hi all,

I have a jsp page that I want to be able to include a page generated by
one of my servlets.  I am pretty new to jsp/servlet programming so I may
be going about this all wrong.  From looking at the documentation
<jsp:include> happens at request time so it seems I should be able to use
a servlet generated page without issue.  But I can't seem to get it to
work.  It is always empty.  There is nothing in the hmtl where the include
would have happend.

I have tried the servlet generated page by itself and it works.  I've
tried passing parameters in the include, fiddled with the flush attribute
but it doesn't seem to have any effect.  I've checked the logs and no
exceptions are thrown in any case.

Here is the source of a little test page I wrote to limit the number of
complications as much as possible.  All of this stuff happens in a single
webapp. Accessing legend.jsp invokes the servlet which returns a html
page.

----------------------------------------------------------------
<HTML>

<BODY>
 
should be right after here<BR>

<jsp:include page="legend.jsp" flush="true">
	<jsp:param name="legend" value="true"/>
</jsp:include>

<BR>and before here

<!-- This is just to make sure its generating a valid page.  I saved the
output from the servlet to a file. -->		
<jsp:include page="static_legend.jsp" flush="true">
			<jsp:param name="legend" value="true"/>
		</jsp:include>

</BODY> 

</HTML>
--------------------------------------------------------------------------


The include of the static page works, but the dynamic one doesn't.  It
just seems like the servlet one should work too.  Am I doing something
wrong?  Am I misunderstanding the documentation?  Maybe I'm trying to do
this in a wierd way.  This is what I want:

---------------------

Bunch of jsp code.

A graph(image/png) generated by the servlet.
A legend(text/html) generated by the servlet.

More jsp code.

----------------------

Everthing works but the legend.  The graph is being successfully included
with an <img src=...> tag.  Does anyone know what may be causing me
problems?  Or suggestions for doing this better.  Like I said I'm
relatively new to web programming so I may be going about this is in a
poor manner.  Any insights or ideas what I may be doing wrong would be
much appreciated.

Redhat 7.2
Tomcat 4.1.10 (Standalone)


Thanks for your time,

Ben



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message