• Post Reply Bookmark Topic Watch Topic
  • New Topic

Noob problem with JSTL / EL (probably syntax)  RSS feed

 
Mark Williams
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am playing with JSTL / EL and I admit I should probably read up on it some more but I couldn't stop myself from trying it out. I am having a little trouble with my first attempt to move away from scripting:

This bit of code is resulting in an empty span tag in my HTML:


Here is how I am setting the request value in the servlet that forwards to the JSP:


I think it's the EL giving me trouble because in debug I see that the request object has my string. Can anyone show me how I am being stupid this time?
 
Mark Williams
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I take that back, when I call Login.jsp directly with errorText in the query string, the value does show up in the span tag. Hmm... I must be too tired to think clearly.

The good news is that post made me a ranch hand
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The param builtin variable is a Map of the request parameters. If you want to access a scoped variable (one that you create with setAttribute) just reference it directly.
 
Mark Williams
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh Cool, I see how that works now. That was a rather important concept I did not take away from my cursory glance at the tutorials. Thanks again.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!