• Post Reply Bookmark Topic Watch Topic
  • New Topic

simple jsp scriplet question

 
steve Pentas
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple jsp scriplet like

<% String s = request.getParameter("var"); %>

...

<s:submit action="..." value="Submit to <%= s %> " name="submit"></s:submit>

The

value="Submit to <%= s %> " does not work. it shows "Submit to <%= s %>" on the page instead "Submit to xxx" where xxx is the parameter I get.

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35743
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it work if you just have <%= s %> outside the custom tag?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot use a scriptlet expression as just part of a custom tag attribute value. It's all or nothing.

Why are you still using scriptlets? It's no longer 2002.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!