In strut2, the <s:img> tag is gone. How can I create dynamic images?
Update
I want to set the image ‘src’ according to a parameter in the value stack (like ${userName_}).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I did a search on the struts2’s offical website and found they doesn’t provide a dynamic image tag. There is a struts2 image plug which provide this, however it is in alpha stage.
http://code.google.com/p/s2-image/. At last, I had to do this in pure JSP codes.
Update
Gashhh…There is another simple way by using
<img src=<s:text name="genTP" /> />. But I think is quite strange.