Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

action 'parameter' - getParameter returns empty string

 
James Ward
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my struts-config.xml i have parameter attribute in the action tag.

<action ....
parameter="myVal"
...
</action>

But in my action class when i do mapping.getParameter it returns empty string. It should have returned "myVal".(mapping is instance of ActionMapping here)

Funny thing - it works perfectly fine in Tomcat, but not in WebSphere...no idea what went wrong.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic