| Summary: | Eclipse + Tomcat ignores META-INF/context.xml | ||
|---|---|---|---|
| Product: | [WebTools] WTP ServerTools | Reporter: | Graham Leggett <minfrin> |
| Component: | jst.server | Assignee: | Larry Isaacs <larryisaacs> |
| Status: | RESOLVED WORKSFORME | QA Contact: | Angel Vera <arvera> |
| Severity: | major | ||
| Priority: | P3 | CC: | eclipse |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Graham Leggett
Try taking a look at Bug# 215228, hope it helps. If not Larry, should be able to assist you with more info. A simple test works for me. Check the server.xml down under "<workspace>/.metadata/.plugins/org.eclipse.wst.server.core/tmp?/conf" and see if the <Context> it contains for your project includes your <Environment> element(s). A simple test for me does not work. My context.xml in META-INF contains <Context path="/my-context-path" debug="0"> <Resource name="jdbc/GoDocumentDB" auth="Container" type="javax.sql.DataSource" removeAbandoned="true" removeAbandonedTimeout="30" maxActive="10" maxIdle="30" maxWait="10000" username="godoc" password="godoc" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/my-app" validationQuery="select 1 from dual"/> </Context> The complete resource element is 'ignored' (have not tried other elements). It makes no difference if I use the option to have separate files or have it integrated in the server.xml. In both cases I see a <Context docBase="/home/user1/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/my-app-webapp" path="/my-app-webapp" reloadable="true" source="org.eclipse.jst.j2ee.server:my-app-webapp"/> The server.xml under the Servers project in your workspace is unaffected by an META-INF/context.xml in your project. It is the "merged" server.xml or context XML created during publishing (appears under the ".metadata\.plugins\org.eclipse.wst.server.core\tmp?\conf" directory by default) that should contain the child <Resource>. Is that what you are looking at? Marking as WORKSFORME since the last question remains unanswered. I'm assuming that the context.xml content was expected to appear in the server.xml found under the Servers project. The content is actually merged during publishing and only appears in the published server.xml or separate context XML file for the context. |