-
1. Re: DOCROOT
jonlee Aug 20, 2003 8:19 PM (in response to mortsahl)You can configure an additional empty WAR directory in deploy - say uploads.war. Anything you place in there will be accessed as http://localhost:8080/uploads/*. This assumes that your existing web applications have not already reserved the URL.
Pass to the servlet that saves the file an initparam that specifies the absolute directory location for the upload storage. Obviously you can programmatically hard code it, but having an initparam in the deployment descriptor allows the deployment engineer to deal with it, not the programmer.
Save the file, dealing with the appropriate things problems such as multiple users and so on - use the passed parameter to target the save location.
Hope that makes sense. -
2. Re: DOCROOT
mortsahl Aug 20, 2003 8:37 PM (in response to mortsahl)Thanks ... I'll give that a try.
Wouldn't it be a bit more conventional to get JBoss/Tomcat working with Apache then just dump the files in docroot?
That's what I'm trying to figure out now -- reading TONS of messages here from people trying the same ... so much material but no real cookbook on how to do it successfully. -
3. Re: DOCROOT
jonlee Aug 20, 2003 9:25 PM (in response to mortsahl)You can dump it in the Apache docroot if you are using Apache as a front-end. However, in most cases, the front-end is usually not on the same hardware so this becomes problematic as a general solution.
For your case where everything is on the same boxen, you can write directly to the Apache docroot directory or a subdirectory, thereof. The same technique applies. Just ensure that permissions for writing are adequate. -
4. Re: DOCROOT
mortsahl Aug 21, 2003 2:18 AM (in response to mortsahl)BTW, this works great. I can serve static content without the need for Apache. Thanks. I'd never have thought of faking a war as a directory ... the only thing I really needed to do was to add a WEB-INF directory with a jboss-web.xml .