aspose file tools*
The moose likes JSP and the fly likes Writing dynamically inside the web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Writing dynamically inside the web application" Watch "Writing dynamically inside the web application" New topic
Author

Writing dynamically inside the web application

Mishra Anshu
Ranch Hand

Joined: Sep 16, 2003
Posts: 224
Suppose, I have a web application deployed.
The application uses a map service, to generate new maps for each request.
Can the map service, write its output to a directory (Say it "output") which is parallel to WEB-INF ?

Will that (output dir) be not writable? If yes, is there any way to show the dynamically generated map (the jpg files), in the application using some url ?

Thanks
[ April 18, 2006: Message edited by: Mishra Anshu ]

"Ignorance is bliss"
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1027
>Can the map service, write its output to a directory (Say it "output") which is parallel to WEB-INF ?

Yes.

Will that (output dir) be not writable?

That depends upon the server setup. You need to grant permissions so that your server can write to that directory.

You could also just send the requested image to the client without saving it to disk.
Either way, to load an image onto the page, you use the <img> tag as normal in HTML.
<img src="<%= imageFileName %>">
or
<img src="ImageServlet?imageid=42">

Using a Servlet to send the image back via an output stream is a good option.
Cheers,
evnafets
Mishra Anshu
Ranch Hand

Joined: Sep 16, 2003
Posts: 224
Thanks,

I had tried yesterday, to change the permission on the server and it worked.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Writing dynamically inside the web application