Sounds like a workable solution. Are you using apache or some other front-end to Tomcat? If so then you can use an alias to serve up the images rather than serve them up manually with your servlet. I've done it both ways in content management systems I've made and letting apache do it saves a class or two...
Actually you might be able to let Tomcat do it for you if you set up a connector to listen on port 80. I've never used Tomcat alone so don't have any experience doing it that way. Adrian Lanning ----- Original Message ----- From: "Parsons Technical Services" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Wednesday, March 17, 2004 6:30 PM Subject: A plan to access files outside the context/Tomcat? > I have a need to place and get, image files, to and from a directory outside > of the context and outside of Tomcat. > > My plan is this: > > Have an upload page to allow user to select local file on client and upload > to server. This is the same tactic as the manager is using with war files. > > The folder will have rights set to allow read/write by Tomcat user. > > This part, I think, will be staight forward. OK so far?? > > Next to retrieve the image and serve it back to the client is a little more > involved. > > The plan: > > Servlet to accept all request for the /context/pics/* . > > Servlet reads file from directory and writes it out to the Servlet output > stream. > > Am I nuts or is this a feasible plan? > > Just need to know if I am going in the right direction and if anyone has any > code snippets of the servlet writes. > > As for the file I/O I have that covered I think. > > Any/all comments welcome. > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
