M Sach
M Sach

Reputation: 34424

How to disable the JSP validation in Eclipse helios?

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?

Upvotes: 33

Views: 66942

Answers (6)

Amos M. Carpenter
Amos M. Carpenter

Reputation: 4958

@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.

Upvotes: 3

Philippe
Philippe

Reputation: 1

Right-click on the JSP file > Properties Select the "Derived" checkbox.

Upvotes: -1

Abel ANEIROS
Abel ANEIROS

Reputation: 6474

I'm using sts-2.5.0.RELEASE (based on Eclipse 3.6) and I solved the problem unchecking these properties:

Preferences > Validation > JSP Content Validator (uncheck manual & build)

Preferences > Validation > JSP Syntax Validator (uncheck manual & build)

Upvotes: 2

Advait
Advait

Reputation: 127

Instead of disabling your validations, which is a good aspect in eclipse.

Just select the whole code cut and paste it back on the same page, All the reds will vanish automatically. If the reds are still present, that means there is some problem in the code which you are writing.

Validations generally help you alot in eclipse, the jsp's can sometimes be an issue regarding these validations.

Upvotes: -1

Stijn Geukens
Stijn Geukens

Reputation: 15628

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, ... .

Upvotes: 51

Aravind A
Aravind A

Reputation: 9697

I usually do the following - Right click project - properties -Validation -->Configure settings link on validation frame - Disable all .Also Right click project - properties -Validation --> JSP Syntax - Uncheck project specific settings .

Upvotes: 2

Related Questions