hi.

i have a problem and need some assistance.

i want to map an external directory to a tomcat wepapp(virtual directory).

i can achieve this in many ways.
1- adding another context, and setting docbase to my external directory(in server.xml) 2- adding a subcontext to $CATALINA_BASE/conf/[enginename]/[hostname]/mainApp#mysubContext.xml 3- implementing a filter, checking url, if find mysubContext in the url, reading appropriate resource as a InputStream, and sending read bytes to servlet outputstream.(buffering is included) 4- moving external directory to under main app. But this is impossible. Because external directory content
size too large. and found on an external disk.

i am currently using the third one. but it is a bit slow and i dont want to use a filter
for such a task.

i am trying to add subcontext(second one). But here the problem is, my filters/servlets
in main app's deployment descriptor, not called on external directory urls.

example :
* myapp name is tw. and its jar(tw.jar) is under $CATALINA_BASE/wepapps directory.(auto deployment)

* $CATALINA_BASE/conf/Catalina/localhost/tw#repo.xml includes
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="/somedir/someotherdir/" >
</Context>

*$CATALINA_BASE/wepapps/tw/WEB-INF/web.xml includes
...
 <filter>
   <display-name>TestFilter</display-name>
   <filter-name>TestFilter</filter-name>
   <filter-class>tw.filter.TestFilter</filter-class>
 </filter>
 <filter-mapping>
   <filter-name>TestFilter</filter-name>
   <url-pattern>/*</url-pattern>
   <dispatcher>FORWARD</dispatcher>
   <dispatcher>INCLUDE</dispatcher>
   <dispatcher>REQUEST</dispatcher>
 </filter-mapping>
...

when i request the /tw/newspaper.gif, filter works. that is good.
but when i request the /tw/repo/clip.gif filter not works.

how can i achieve this?

thanks for any help.
yavuz.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to