struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thai Thanh Ha <tha...@psv.com.vn>
Subject RE: problem in including file in INCLUDE TAG in jsp
Date Wed, 22 Aug 2001 10:39:06 GMT
Hi Anwar,
 
If you want to include dynamically, you should use this action
 
<jsp:include page='<%= sUrl %>' flush="true"/>
 
Regards,
Thai 

-----Original Message-----
From: Anwar Sadat [mailto:anwar.sadat@mphasis.com]
Sent: Wednesday, August 22, 2001 5:21 PM
To: 'struts-user@jakarta.apache.org'
Subject: problem in including file in INCLUDE TAG in jsp


Hi all,
   I have a problem in including a html file in the JSP file. 
I have a 2 jsp's. The first jsp has a submit button.
When i click on this submit button, I pass the filename as hidden type.
I get this hidden variable in my next jsp.
I will am trying to include this hidden variable in my include tag.
 
here is the code snippet.
 
first JSP.
 
<form name=editPreferences method="post" action="http://serverb/two.jsp">
<input type="submit" value="Edit Preferences">
<input type="hidden" name="url" value="/abc.htm">
</form>
 
My second JSP 
<% String sUrl = request.getParameter("url"); %>
 
<%@ include file="<%=sUrl%>" %>
 
 
Is this correct.. I am having problems in compiling the second JSP..
 
Kindly help me regarding this. 
Quick response is appreciated.
 
Thanx in advance.
 
Regards
Anwar K



Mime
View raw message