473,405 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

how to use variable in page attribute of jsp include tag?

how to use variable in page attribute of jsp include tag?
Expand|Select|Wrap|Line Numbers
  1. <jsp:include  page="/WEB-INF/fd_jsp/layouts/basketcontent.jsp" />
I want to insert a variable passed as parameter in page attribute .Something like

Expand|Select|Wrap|Line Numbers
  1. <jsp:include  page="/WEB-INF/${templateName}/layouts/basketcontent.jsp" />
Jan 30 '15 #1

✓ answered by chaarmann

You can use
Expand|Select|Wrap|Line Numbers
  1. <% String s = "templateName"; %>
  2. <jsp:include  page='/WEB-INF/<%=s%>/layouts/basketcontent.jsp' />

1 4467
chaarmann
785 Expert 512MB
You can use
Expand|Select|Wrap|Line Numbers
  1. <% String s = "templateName"; %>
  2. <jsp:include  page='/WEB-INF/<%=s%>/layouts/basketcontent.jsp' />
Feb 3 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Tom | last post by:
I'm tying myself in knots trying to figure out variable scope with constants and include files. This is what I'm doing: A page (index.php) on my website includes a general purpose include file...
2
by: Anthony Judd | last post by:
I am opening a recordset on page 'A' then using server.execute to populate a form on page 'B'. I am getting a a type mismatch error, which suggests the variable doesn't exist on page 'B'. I...
2
by: Richard | last post by:
Suppose I create a variable named "var" such as: <xsl:variable name="var">VarValue</xsl:variable> and then I want to insert its value into an attribute <Element attr=" {the value of var} "> so...
2
by: John Aspinall | last post by:
Hi, Ive got a navigation bar for my web pages in an include (top_nav.asp). On my homepage (index.asp) and all the other site pages I have a reference to this include which includes my...
6
by: anon | last post by:
Post Forwarding question...... For this control below, <asp:Button runat="server" PostTargetUrl="page2.aspx" /> The Attribute: PostTargetUrl="page2.aspx" Is this PostTargetUrl Attribute...
3
by: John Yopp | last post by:
I seem to be have problems with what appears to be variable scoping. If I define a constant in my main HTML page, I do not seem to be able to reference it within functions in JavaScript include...
4
by: spectre | last post by:
Hello, I first create a session variable 'client' in the login.asp file The login.asp file opens a file (xxx.asp) with an include file .. If I write <!--#include file="../../../data/" &...
4
by: benwylie | last post by:
I am running IIS 6.0 on Windows 2003. I would like to be able to run a perl script from a web page and include the output. I have tried doing it with an ssi: <form action='docsearch.shtml'...
2
by: Marc | last post by:
I am studying a bit and I have encountered some reading stuff about skin files, css files and themes in asp.net. To me the name of the StyleSheetTheme page attribute has little a no connection...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.