• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 2 value append while using s:text

 
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 122
Mac IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 206
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks IT work
 
reply
    Bookmark Topic Watch Topic
  • New Topic