I have an Eclipse Java web application that I am deploying to Tomcat 7 from with开发者_如何学Cin Eclipse 3.7. In my Eclipse server configuration at Servers > Tomcatv7-config > server.xml
, I see the following line is added when I deploy my application:
<Context docBase="myapp" path="/myapp" reloadable="true" source="org.eclipse.jst.j2ee.server:myapp"/>
My question is this: is there any way for me to add a parameter to this <Context>
element for a specific project?
What I need to do is add useHttpOnly=”false”
in order for DWR to work properly in Tomcat 7. I understand the security risks with this, so please no lecture :)
You should be able to specify a context.xml in /META-INF/ within your WAR/Project which will trump the server.xml line:
In an individual file at /META-INF/context.xml inside the application files. Optionally (based on the Host's copyXML attribute) this may be copied to $CATALINA_BASE/conf/[enginename]/[hostname]/ and renamed to application's base file name plus a ".xml" extension.
精彩评论