I am probably missing something small here, but cannot see what it is. Can somebody please spend some time reading through my issue and point me in the right direction.
I want to pass a value of textbox/hidden field to a custom tag in my Struts2 application - I am not sure if this question belongs to the
JSP forum or the
Struts forum.
If I hard-code a value for num in
, it works. But I need this value from a bean in the Value Stack and can't hard-code it. I can see that the textbox is getting the right value - I am able to validate this through Fiddler.
TLD file:
JSP - shows a compile error in Eclipse
I tried
- nothing happens, it does not seem to even go into my tag and no errors.
I also tried this in my Tag class, I am able to retrieve everything (like servername, protocol etc from request) but request parameters from the PageContext. Is it not considered as being part of the same request while calling the custom tag?
I also tried this approach from
Struts user guide
and added this to the JSP:
This generates OGNL syntax errors in the second line. I do not know what to change in the TLD to accomplish this.
Many thanks