Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable the JSP validation in Eclipse helios?

Tags:

java

eclipse

jsp

I have a Maven project set up in my Eclipse Helios 3.6. It builds and deploys perfectly fine. But it shows a red mark on my project and shows a lot of JSP issues. I want to somehow get rid of these JSP validation issues in problem view. One example of JSP issue is ArrayList can not be resolved to a type. What I have done for this is inside window->preferences->web->jsp files->validation I have unchecked the validate jsp fragments Apart from this I right clicked On my project. Go to Properties->Validations then checked suspend all validator check box but stiil i see same issues in problem view and see red mark on my project?

like image 900
M Sach Avatar asked Jan 25 '12 05:01

M Sach


People also ask

How do I stop validation in eclipse?

Click Window > Preferences and select Validation in the left pane. The Validation page of the Preferences window lists the validators available in your project and their settings. To disable individual validators, clear the check boxes next to each validator that you want to disable.

What is validate option in eclipse?

Quoting from Eclipse docs: The workbench includes validators that check certain files in your enterprise application module projects for errors. By default, the workbench validates your files automatically after any build, including automatic builds.

How do I get JSP in Eclipse?

You right click on the jsp file and then highlight "Open With" . You will get options like JSP Editor, Text editor, Web Page Editor.


2 Answers

I do similar as Aravind but I do it on the general settings: Preferences > Validation. Here I deselect all 'Build' checkboxes but leave the 'Manual' select for when I want to manually validate a JSP, XML, ... .

like image 200
Stijn Geukens Avatar answered Sep 17 '22 18:09

Stijn Geukens


@Stijn's answer works great, but it disables all validation for JSPs. Sometimes, that validation can be very useful to point out where you've got errors.

If you still want to have your normal JSPs validated, just not your JSPFs (JSP fragments), follow these steps:

  1. Open Window > Preferences from the menu.
  2. Navigate to Web > JSP Files > Validation.
  3. Uncheck the "Validate JSP fragments" checkbox.

This is one of the first things I do with web projects that use JSPs in a new Eclipse installation. I've just confirmed in the JEE version of Eclipse Mars, but I'm pretty sure it'll work pretty much the same way in older versions as well, going back to around 3.2. Your JSPs should still get validated, but the validator should leave your JSPFs alone... obviously, your fragments must use the .jspf extension for this to work.

like image 29
Amos M. Carpenter Avatar answered Sep 17 '22 18:09

Amos M. Carpenter