aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes JSP Tags are coming up as syntax errors on Eclipse 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 "JSP Tags are coming up as syntax errors on Eclipse" Watch "JSP Tags are coming up as syntax errors on Eclipse" New topic
Author

JSP Tags are coming up as syntax errors on Eclipse

Toni Howlett
Ranch Hand

Joined: Jan 18, 2012
Posts: 35
I was in the middle of writing a Javascript function, and then all my JSP tags became Syntax errors saying to remove the %

They were working fine before I added the JS so I even tested it by taking out all the JS I just added and it still says they are errors.

What might be the cause of this?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

JSP tags don't have "%" in them. Scriptlets do.

It's possible that the Eclipse XML/HTML editor got its brains scrambled. That's fairly easy to do. Generally restarting Eclipse clears stuff like that, although a refresh is a good idea, too.

For actual tags (not scriptlets), you can attach an XML catalog where the tags' DOCTYPES resolve to a syntactical reference (DOCTYPE or XML schema) in the catalog. I do this whenever I think I have too much hair and need an excuse to rip some out.

Finally, check to see that you're using the right editor when editing the JSPs (you can right-click on the file in the Navigator view to select an editor). I'm not sure that the strict XML editor would like scriptlets at all.

Then again, neither does Bear. His position is that code belongs in Java classes, not on JSPs, and most experts agree. Scriptlets are mostly just left over from when J2EE was less powerful.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP Tags are coming up as syntax errors on Eclipse
 
Similar Threads
How volume 2 will deal with custom tags?
multiple js and jsp
Strange behaviour of JSP file
Difference between translation and compilation errors in a JSP
strange checkbox problem