• 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

Image In struts a big question mark?

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI friends I want to retrive image in struts from specified folder and show it to on jsp with resize can any one tell me how can I achieve it, if any one have source code demo it will be helpful for rapid devlopment

Thanks
Sam
Feellll
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use an HTML <img> tag and provide a URL-rewritten path?

You should provide more helpful information, like which version of Struts, where the images are located, and things like that.
 
sam dims
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:Use an HTML <img> tag and provide a URL-rewritten path?

You should provide more helpful information, like which version of Struts, where the images are located, and things like that.



the images were uploaded on server's upload folder i am using struts 1.3

David Newton wrote:" Use an HTML <img> tag and provide a URL-rewritten path?.

can you explain more briefly...

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the images are in a non-webapp-relative path you'll probably have to do something on the server side--as far as I know on the view (JSP) side you'll only have access to directories within the web application. I could be wrong about that, though.
 
sam dims
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:If the images are in a non-webapp-relative path you'll probably have to do something on the server side--as far as I know on the view (JSP) side you'll only have access to directories within the web application. I could be wrong about that, though.



Ok I have created folder on server side the folder name called as image
String myf= getServlet().getServletContext().getRealPath("/") +"image";

how should i take this form this folder to my jsp file in struts
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic