Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Tweaking the JSP include path in Eclipse
Tweaking the JSP include path in Eclipse [message #899032] Mon, 30 July 2012 09:34 Go to next message
Robert Munteanu is currently offline Robert MunteanuFriend
Messages: 21
Registered: July 2009
Junior Member
Hi,

I'm currently using a Java project with the following configuration:

- one source folder at '/content'
- JSPs, JS and CSS files are all placed under '/content'
- all JSPs start with a '<%@include file="/global.jsp"%>' directive
- the project is _not_ a web tools project since all our projects are Maven-based and we discourage manual configuration of projects ( see below for more details ).

The main problem that I have is that the @include directive is not getting resolved ( that JSP is just a bunch of taglib declarations and imports, for convenience ).

I did try adding a Dynamic Web Project facet to that project and configuring the content root to be '/content' and the context path '/'. However, that seems overkill to me since:

- I have to ask everyone to perform a manual configuration step ; if they get the paths wrong when configuring the facets there is no UI to fix them; they have to re-import
- I have to disable all validators, including the JS one since they use a lot of CPU and the JS one fails with internal errors
- The import creates unneeded src, META-INF and WEB-INF folders

Given that, I'd like to make Eclipse resolve that import without adding a project nature, and I'm willing to look into all options, including code contributions.

I'd like to hear your thoughts on this though before starting looking at the code though.

Thanks,

Robert

[Updated on: Mon, 30 July 2012 13:27]

Report message to a moderator

Re: Tweaking the JSP include path in Eclipse [message #899073 is a reply to message #899032] Mon, 30 July 2012 13:34 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2330
Registered: July 2009
Senior Member
The path resolving could be handled by the m2e-wtp plug-in (http://www.eclipse.org/m2e-wtp/), but I don't have any experience using it. Otherwise, the org.eclipse.wst.common.modulecore.ModuleCoreNature nature in the .project file and the project's .settings/org.eclipse.wst.common.component are really all that's needed to support defining where '/' actually is.

---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Tweaking the JSP include path in Eclipse [message #899254 is a reply to message #899073] Tue, 31 July 2012 08:51 Go to previous message
Robert Munteanu is currently offline Robert MunteanuFriend
Messages: 21
Registered: July 2009
Junior Member
Thanks, Nitin.
Previous Topic:J2EE preview
Next Topic:entity expansion limit
Goto Forum:
  


Current Time: Fri Nov 21 18:16:04 GMT 2014

Powered by FUDForum. Page generated in 0.01574 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software