Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL question

 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the following URL:

http://localhost:8080/example/page.jsp=A=1&A=2

Parameter A has values:

<%
for (int i=0 ; i < request.getParameterValues("A").lenght ; i++ ) {
${paramValues.A[i]},
}
%>
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that a typo in the URL?
 
Mahendar Reddy
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi felipe...
The code will raise translation error, as scriptlet should not contain EL.
 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry, that wasn�t what i wanted

again

<% for (int i=0 ; i < request.getParameterValues("A").lenght ; i++ ) { %>

<core ut value="${paramValues.A[i]}," />

<%}%>

and yes, that was a typo.

http://localhost:8080/example/page.jsp?A=1&A=2

tks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic