This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse: JSP page has no errors, still eclipse complains

 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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]
 
Mourouganandame Arunachalam
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What these lines do? note a ">" after img tag, before the "id" attribute

[code]
# <h2>Supplier List <img <br /> # >
# id="loading" /></h2>
[code]
 
Mourouganandame Arunachalam
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think its easy if you attach your jsp as it is....
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you check the missing closure for the "img" tag?

here.....

 
Mourouganandame Arunachalam
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also make sure all open tags are closed properly.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
error.jpg
[Thumbnail for error.jpg]
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic