Best unofficial Apache Server developers community |
|
Hi Folks, I am successful to map an external directory by creating an xml file like : And I named this xml file as uploads.xml and saved under "#Tomcat\conf\Catalina\localhost" here # = Directory where Tomcat has been installed. And when I start Tomcat(5) from cammand line (batch file) i.e. startup.bat The images can be accessed normally like "http://localhost:8080/uploads/user1.png" It works. Actually I am using IntelliJ Idea 8 for devevelopment. When I start Tomcat from IntelliJ Idea, I am not able to access the context i.e. the images. "http://localhost:8080/uploads/user1.png" It shows "HTTP 400 Bad Request" The context path for my project is "http://localhost:8080/spark/" Any help or suggestion is needed at the earliest time. Looking forward to as many appreciative responses as possible. Thanx Pink
posted via StackOverflow
|
|
 
|
thanx Zeki Yeah we have a context.xml where we define the current context i.e. spark for example "http://localhost:8080/spark" this is located at ../WebRoot/META-INF/context.xml. This is set up in Tomcat Context Descriptor in Facets of IntelliJ Idea. Can we somehow define another xml file which maps to an external directory outside the webapps. If so, how can define another context specifically for images (uploads and fetching into the presentation layer) Please let me know. |
|
 
|
IntelliJ uses it's own Tomcat Base, so you will need to add a web facet to your project and add your directory there. This is for IntellijJ 9 and 10. I don't have 8. |