?
Solved

dymanic include in jsp -- is it possible?

Posted on 2007-12-04
2
Medium Priority
?
216 Views
Last Modified: 2011-10-03
I have:

<%@ include file="faq.txt" %>

That works fine. What I would like is for the filename to be variable such as:

<%@ include file=getParameter("faqFile") %>

that doesn't work. Is there a way to do this?
0
Comment
Question by:jmarkfoley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 20406490
u need to use jsp:include for dynamic include

http://java.sun.com/products/jsp/tags/11/syntaxref1112.html

be aware that the two behave differently
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 20406756
OK, that gave *almost* enough detail for my solution. I had to play around a bit but this works:

<jsp:include page="<%=request.getParameter("faqFile")%>" />
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
I don't pretend to be an expert at this, but I have found a few things that are useful. I hope that sharing them here will help others, so they will not have to face some rather hard choices. Since I felt this to be a topic of enough importance and…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question