javaeclipsejspincludejspinclude

Eclipse - How to disable / get rid of bogus "fragment not found" errors


I am using a JSP include statement to include a controller method like below :

<jsp:include page="/menu/showMenu"/>

/menu is mapped to the controller, /showMenu is mapped to the method that checks what the user logged in to the web page has access to, sets boolean flags in the model accordingly and returns the menu.jsp file. Everything works perfectly but Eclipse gives an error because it's trying to find a files called showMenu.jsp in a folder called menu where all my JSPs reside. Of course, neither this JSP or this folder exist and all my 60+ JSPs are throwing this error every time i save changes in one of them, forcing me to manually delete the error every time.

Is there a way to disable this type of error only or, better even, change it so that Eclipse stops looking for a file and understands i'm including a controller method?

Thanks!


Solution

  • You can disable that exact check on the Web/JSP Files/Validation preference page on recent versions. Please file a bug report about this at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=WTP%20Source%20Editing&component=jst.jsp .

    The relevant preference page