aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse: JSP page has no errors, still eclipse complains Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse: JSP page has no errors, still eclipse complains" Watch "Eclipse: JSP page has no errors, still eclipse complains" New topic
Author

Eclipse: JSP page has no errors, still eclipse complains

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Hi All,

I'm facing a weird problem, I'm using Eclipse Europa and building a web application.
In one of my JSP there is no error shown while editing/opening JSP in a editor window, but the "Problems" view from eclipse shows 3 errors in the same JSP, the errors as follows:

and the perticaule JSP is:

[Edited: Some indention problems]


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
What these lines do? note a ">" after img tag, before the "id" attribute

[code]
# <h2>Supplier List <img <br /> # >
# id="loading" /></h2>
[code]


Mourougan
Open Source leads to Open Mind
Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
i think its easy if you attach your jsp as it is....
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

I make it proper now, I format JSP page using 'Ctrl + SHift + F' and Eclipse produce some weird indentations for it
Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Could you check the missing closure for the "img" tag?

here.....

Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Also make sure all open tags are closed properly.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

hmm OK, but the problem still persist and the open tags should shows warnings and the not the error message like, "Syntax error on token "}", delete this token".Why Eclipse behaves such weird, I clean, rebuild, close tomcat 2 - 4times , still it shows "red" mark about errors in project ..
Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
As per the below DTD standard, it is expected that each tag in your JSP should be closed properly.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


In fact, I used the JSP code you provided in my eclipse environment and clearly shows the error. See the attachment.


[Thumbnail for error.jpg]

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Thanks Mourouganandame , thanks for the effort shown, you're right as per the DTD validation is concerned and as I told earlier I closed all the open tags.

Even if the error there because of unclosed tags, why Eclipse complains about

like errors.

OK this is not a serious stuff, I just want to get rid of that "red" symbol indicating error on my project folder.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse: JSP page has no errors, still eclipse complains