| Summary: | Running Tomcat with 'Serve Modules Without Publishing' option and multiple wb-resource deploy-path | ||
|---|---|---|---|
| Product: | [WebTools] WTP ServerTools | Reporter: | Matteo TURRA <m.turra> |
| Component: | jst.server | Assignee: | Larry Isaacs <larryisaacs> |
| Status: | RESOLVED FIXED | QA Contact: | Angel Vera <arvera> |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | ccc, enrico.bottacin01, f.munafo, stryker, thatnitind |
| Version: | 3.1 | Keywords: | plan |
| Target Milestone: | 3.2 M6 | ||
| Hardware: | PC | ||
| OS: | Windows Server 2003 | ||
| See Also: | https://git.eclipse.org/r/108867 | ||
| Whiteboard: | |||
| Attachments: | |||
|
Description
Matteo TURRA
Is this something that the JEE support and will pick up during the members() call? Created attachment 143872 [details]
Eclipse Web Resuorces
Created attachment 143874 [details]
Patch to add a webResource attribute to element Resources of server.xml
This is the patch to add the attribute webResources to Resources element in the server.xml created when "serve without publishing" is used.
Created attachment 143875 [details]
Patch to WtpDirContext to lookup the additional web Resourses
This is the patch to the WtpDirContext class. If a resource is not found in the base root, it look up in the other web resources.
Created attachment 143876 [details]
Patch to WtpDirContext to lookup the additional web Resourses
This is the patch to the WtpDirContext class. If a resource is not found in the base root, it look up in the other web resources.
Created attachment 143877 [details]
Patch to WtpDirContext to lookup the additional web Resourses
This is the patch to the WtpDirContext class. If a resource is not found in the base root, it look up in the other web resources.
Comment on attachment 143876 [details]
Patch to WtpDirContext to lookup the additional web Resourses
sorry
Comment on attachment 143875 [details]
Patch to WtpDirContext to lookup the additional web Resourses
Correct mime type and patch flg
I add two patches to org.eclipse.jst.server.tomcat plugin. The first one is used to write an addition attribute in the Resource element of server.xml, called webResources. The second is to let tomcat search in this web resources if nothing is found in the doc base. Angel: In response to Comment 1, no. The jee team will not change the results of a member() call depending on if it's single root or not. isSingleRoot() is now just a flag and hte server adapter can do whatever optimizations they want at that point. (In reply to comment #10) Agreed, but it was my understanding that there were some problems with some optimization code that JEE was doing, which might already be fixed. I thought this problem might be related to that, but it sounds like the members is returning the full set of files, and in this case there is some missing functionality in tomcat. Passing down to Larry, to asses if this non-single root modules is something that Tomcat can add to its code. But I doubt this is something they can add to 3.1.1, I am leaving the target as 3.1.1 for now, but Larry please asses if this is new functionality (as it sounds like it is). I did a quick test and 3.1.1 was not mis-identifying this object as single root. The tools correctly realize it is not single root and return all resources =] This is a known limitation of the "Serve modules without publishing" feature since it was introduced in WTP 2.0.x, so I'm changing this report to an enhancement. The default implmentation in Tomcat only supports a single "docBase". For this use case, Tomcat support for multiple "docBase"s is needed. The attached patches seem to be a good approach to address this, so I'll see about working something into WTP 3.2. This represents too big a change to include in WTP 3.1.x. Larry, will my patch commited on wtp 3.2 release? Do you need something else? Thanks. It is my goal to add this support in M6. I'm using your work (thanks!) as a starting point, but I'm reworking it to support mapping the additional resources to something other than "/". The WTP changes are done, now it's a matter of implementing the Tomcat side for 5.0, 5.5, 6.0, and maybe 7.0. This support is present in WTP 3.2M6. It should handle most any mapping you can add with the new UI. The one thing that is *not* supported is mapping a *content* folder to "/WEB-INF/classes". A mapping to "/WEB-INF/classes" is assumed to be associated with a Java source folder, not a content folder. Any *content* folder mapped to "/WEB-INF/classes" will be ignored. You can however, map a content folder to "/WEB-INF". If this content folder contains a "classes" subfolder, the effective "WEB-INF/classes" will get included in the webapp classloader's classpath in addition to being included in the list of "docBases" to search for resources. Also, if you map a folder to "/WEB-INF/lib", or map a folder that contains a "lib" subfolder to "/WEB-INF", any jars present in the effective "WEB-INF/lib" will also be included in the webapp classloader's classpath. Note that when 'Serve Modules Without Publishing' is enabled, tag files in utility projects won't work in Tomcat 6.0.18 through 6.0.26. See Tomcat bug https://issues.apache.org/bugzilla/show_bug.cgi?id=48737 for details. This issue should be fixed in the next release of Tomcat 6.0.x. Adding the "plan" keyword to add a little more visibility to this enhancement beyond the mention in the M6 New and Noteworthy, which I will add soon. New Gerrit change created: https://git.eclipse.org/r/108867 |