Integrate maven jsp / webapp project with eclipse

What is the current approach for integrating maven webapp project with eclipse to get context sensitive support for java code in jsp files?

In eclipse-luna, I can use maven master with maven-archetype-webapp to create a project and it works fine.

But if I then check the maven project with pom.xml (but no .settings, .project files) in source control, then someone else checks this and imports it as Maven => "existing maven project" in eclipse, it doesn't recognize java fragments <% ...%> in jsp files as java code and just treats it as plain text.

Instead, I found:

maven eclipse:eclipse -Dwtpversion=2.0

      

and import as "Existing eclipse project" which seems to work, but I am under the impression that this is a rather outdated approach today (only supports wtp up to 2.0).

So what's the correct way to work properly in both maven and eclipse?

+3


source to share





All Articles