aspose file tools*
The moose likes Struts and the fly likes Struts 2  value append while using s:text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2  value append while using s:text" Watch "Struts 2  value append while using s:text" New topic
Author

Struts 2 value append while using s:text

Aaron Raja
Ranch Hand

Joined: Jun 07, 2007
Posts: 206
When I try to show image in jsp page.
Following code work .


Now I want to show image based on userImageFileName
I want to show image dynamically based on userImageFileName, this value chage for each user.
Value it pass is correct. eg smith123.jpg, smith 234.jpg something like this
but it won't work when I try to append value


tried this too but no luck


Thanks, AR
SCWCD 5, SCJP 1.4, OCA (PL/SQL)
Jesus Mireles
Ranch Hand

Joined: Mar 10, 2010
Posts: 122

Not sure what the best solution is as of course there are more than one ... but I think you can do something like:



I actually just checked an old project on how I solved this. Basically what I did was that I built the location of in the action controller. Basically the location and image name was in the database and then there was a getter for my property ... my JSP then had:


Aaron Raja
Ranch Hand

Joined: Jun 07, 2007
Posts: 206
Thanks IT work
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 value append while using s:text