struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hibbs, David" <David.Hi...@ANICO.com>
Subject RE: Include response in the JSP page
Date Wed, 09 Jul 2003 18:03:46 GMT
	You probably don't want to set a mime type for *.do, because all
your actions might have different types.  However, you _can_ use the
response methods to set the content type, write to the response, and return
a null forward.

	If you are trying to display a dynamicly generated image, I would
personally eschew the <jsp:include />  as that will likely put the binary in
your page. Instead, use an image pointing at the action as the source:

<html:img src="/someAction.do" /> 

	Which should cause the browser to request the image and render it
properly.

David Hibbs
Staff Programmer / Analyst
Distributed Applications Development and Support
American National Insurance Company

> -----Original Message-----
> From: Affan Qureshi [mailto:quereshi@etilize.com]
> Sent: Wednesday, July 09, 2003 9:37 AM
> To: struts-user@jakarta.apache.org
> Subject: Include response in the JSP page
> 
> 
> Hi,
> I have a JSP page which needs to dynamically include response 
> from actions
> (or servlets) which are actually images streamed over the 
> response. I tried
> to use <jsp:include href="/someAction.do" /> but I guess it 
> has some problem
> for extensions other than jsp and html. (I saw a similar bug 
> for Tomcat
> bugzilla). I have tried to define a mime-type for 'do' in 
> web.xml but does
> not help. I guess I cannot use <bean:include > for the purpose.
> 
> Any suggestions?
> 
> Also another question, can I get request Attributes set in 
> this page in the
> action/servlet that I call thru <jsp:include />?
> 
> 
> Thanks,
> Affan
> 
> 
> 
> 


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message