开发者

How to delegate ServletContext?

开发者 https://www.devze.com 2023-02-19 05:26 出处:网络
I want to override the ServletContext.getResource() method. So as to manage .jsp files myself, rathe开发者_JAVA技巧r then put all .jsp files under webapp/ directory.

I want to override the ServletContext.getResource() method. So as to manage .jsp files myself, rathe开发者_JAVA技巧r then put all .jsp files under webapp/ directory.

Currently, I can patch on Jetty server, or Tomcat server, but is there a common way to do this?


yes you can change appBase property in server.xml of your tomcat server for instance :

 <Host name="localhost" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
0

精彩评论

暂无评论...
验证码 换一张
取 消