JSTL c:import parameters

A

alan_sec

Hi.
Is there a way to pass parameters to another JSP, using c:import tag,
that are not type String.
I'm trying to pass object type java.util.Map.
Example:
<c:import
url="${acsAMDir}/${amParam.authModuleName}/am.jsp"> <c:param
name="map" value="${mymap}"/>
</c:import>
mymap is java util.Map.
Thanks.
Alan
 
B

bharat_sharma_5005

Hi.
Is there a way to pass parameters to another JSP, using c:import tag,
that are not type String.
I'm trying to pass object type java.util.Map.
Example:
<c:import
url="${acsAMDir}/${amParam.authModuleName}/am.jsp"> <c:param
name="map" value="${mymap}"/>
</c:import>
mymap is java util.Map.
Thanks.
Alan
 
M

Manish Pandit

Hi Alan,

Since the params are passed as strings (querystrings to give you a
comparison), you cannot pass objects this way. What you need is to
model am.jsp as a tag file, and invoke the tag, passing it *attributes*
that can be objects, and not *params*. You can find information on tag
files at a lot of sites, but this article may very well help you right
away:

http://www.onjava.com/pub/a/onjava/2004/05/12/jsp2part4.html


-cheers,
Manish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top