*
The moose likes Struts and the fly likes Image In struts a big question mark? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Image In struts a big question mark?" Watch "Image In struts a big question mark?" New topic
Author

Image In struts a big question mark?

sam dims
Greenhorn

Joined: Dec 01, 2008
Posts: 20
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
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Dec 01, 2008
Posts: 20
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
Rancher

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Dec 01, 2008
Posts: 20
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Image In struts a big question mark?
 
Similar Threads
http 404 error in uploading the file
error in dwonloading a pdf file
the best struts book
struts
Struts 2 reset button using immage