Caroline Jen wrote:
In my JSP, I passed a number of parameters inside the
JSTL core c:url tag.  This is the way I coded:

<c:url value="/myAction.do" var="theUrl">
<c:param name="param1" value="${user.fullName}"/>
<c:param name="param2" value="${user.hashID}"/>
</c:url>
<a href='<c:out value="${theUrl}"/>'>Click</a>

How do I retrieve the respective values of param1 and
param2 in MyAction.java?

String parameter1 = request.getParameter( "param1" );
String parameter2 = request.getParameter( "param2" );

It does not seem to be working.

How is it failing? Here are some things to check:

- is there a non-null bean in some scope under the key 'user'?
- are the fullName and hashID properties on that bean non-null?
- what does theUrl get set to? (i.e. what is the generated link)
- what happens if you browse to .../myAction.do?param1=1&param2=2

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to