Incompatibility between STRUTS TAGS and JSTL TAGS

2003-12-10 Thread Todor Sergueev Petkov
Hello everybody. I have a small problem that maybe someone has already 
had in the past.

In a jsp page I try to retrive request parameters thus ( STRUTS + 
Jakarta TAGLIBS ) :

req:parameters id=loop
Name: bean:write  name=loop property=name/
Value: bean:write name=loop property=value/
/req:parameters
and this works fine...

When I try JSTL

c:out value=${requestScope.source}/
c:out value=${requestScope.animalId}/
c:out value=${requestScope.injId}/
doesn't work...

The names of the the request parameters that should be there are correct...

Is there any masking between JSTL vars and STRUTS vars that someone is 
aware of?

Todor

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


Re: Incompatibility between STRUTS TAGS and JSTL TAGS

2003-12-10 Thread Kris Schneider
You seem to be confusing request parameters and request attributes (or
request-scoped variables). Try:

c:out value=${param.source}/

JSTL gives you two ways (implicit objects) to get at request parameters:

param
a Map that maps parameter names to a single String parameter value (obtained by
calling ServletRequest.getParameter(String name))

paramValues
a Map that maps parameter names to a String[] of all values for that parameter
(obtained by calling ServletRequest.getParameterValues(String name))

Quoting Todor Sergueev Petkov [EMAIL PROTECTED]:

 Hello everybody. I have a small problem that maybe someone has already 
 had in the past.
 
 In a jsp page I try to retrive request parameters thus ( STRUTS + 
 Jakarta TAGLIBS ) :
 
 req:parameters id=loop
 Name: bean:write  name=loop property=name/
 Value: bean:write name=loop property=value/
 /req:parameters
 
 and this works fine...
 
 When I try JSTL
 
 c:out value=${requestScope.source}/
 c:out value=${requestScope.animalId}/
 c:out value=${requestScope.injId}/
 
 doesn't work...
 
 The names of the the request parameters that should be there are correct...
 
 Is there any masking between JSTL vars and STRUTS vars that someone is 
 aware of?
 
 Todor

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



Re: Incompatibility between STRUTS TAGS and JSTL TAGS

2003-12-10 Thread Christian Bollmeyer
Am Mittwoch, 10. Dezember 2003 17:57 schrieb Todor Sergueev Petkov:

 When I try JSTL

 c:out value=${requestScope.source}/
 c:out value=${requestScope.animalId}/
 c:out value=${requestScope.injId}/

 doesn't work...

The above code looks for *attributes* in request scope,
not parameters. To access parameters via JSTL, you
have to make use of the implicit EL variable (actually
a java.util.Map) named 'param', like this:

c:out value=${param.source}/
c:out value=${param.animalId}/
c:out value=${param.injId}/

HTH,
-- Chris.

 The names of the the request parameters that should be there are
 correct...

 Is there any masking between JSTL vars and STRUTS vars that someone
 is aware of?

 Todor


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


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