Article View: borland.public.jbuilder.java.api
Article #1085include files in jsp (non-relative path)
From: Mehmet Gunacti
Date: Wed, 12 Jun 2002 14:32
Date: Wed, 12 Jun 2002 14:32
41 lines
1967 bytes
1967 bytes
hello
i wrote a scriplet which lists files from a given directory, e.g.
c:/exampledir.
it's output :
a.htm
b.htm
...
these are links, linking to "callingjsp.jsp?filename=a.htm" .
now, all i want is when i click the link the file should be included at the
bottom
of the page.
i tried :
...
<%
String url = "c:/exampledir/";
url = url + request.getParameter("filename");
%>
url = <%= url%>
<br>---------------------------<br>
<%@ include file="<%= url %>%>
<br>---------------------------<br>
<% pageContext.include(url);%>
<br>---------------------------<br>
<jsp:include page="<%= url %>"/>
<br>---------------------------<br>
<IFRAME align=left FRAMEBORDER=0 SCROLLING="yes" SRC=<%=url%>
style="width:660;height:400;"> </IFRAME>
</BODY>
</HTML>
all of the above code failed, but the latter one, but i don't want to use an
iframe.
how can i make this work? has anybody a solution ? (that would be great by
the way :)
i use blazix as a web server, but this jsp is supposed to run on websphere
application server. are there any restrictions in was?
thanks in advance
Mehmet Gunacti
Technical Details
Message-ID:
<3d082971$1_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!supernews.com!news.cs.utwente.nl!logbridge.uoregon.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,8971eaf62eeedc97,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-06-12 22:32:36 PST From: "Mehmet Gunacti" <mserkan@esc.com.tr> Newsgroups: borland.public.jbuilder.java.api Subject: include files in jsp (non-relative path) Date: Wed, 12 Jun 2002 17:32:56 +0300 Lines: 46 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 212.174.148.254 Message-ID: <3d082971$1_2@dnews> X-Trace: dnews 1023945073 212.174.148.254 (12 Jun 2002 22:11:13 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!supernews.com!news.cs.utwente.nl!logbridge.uoregon.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews