aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes red squiggly lines under scriptlets in 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 "red squiggly lines under scriptlets in Eclipse " Watch "red squiggly lines under scriptlets in Eclipse " New topic
Author

red squiggly lines under scriptlets in Eclipse

Chris Disilva
Greenhorn

Joined: Apr 29, 2012
Posts: 5
Hi, I'm just learning to write java. My background is front-end dev. I'm practicising creating a .jsp page. In Eclipse, there are red squiggly lines underneath this code:



When I click the red square in the "Error" block (on the right side of the code editor), I get this explanation:

Multiple annotations found at this line:
- Processing instructions not closed
- End tag of element <p>


Here is the full code:



Would someone tell me why I am getting the squiggly lines and how to fix? I have closed the tags and the code runs in the browser, but there must be something wrong, right?

Thanks!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

Please be sure to ask IDE questions in the IEDs forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

If you are just starting out you should know right off the bat that using scriptlets as you have in that code is something that's 10 years out of date. You must be using a really old tutorial or book.

Modern JSP uses the JSTL and EL, not Java code in the page.

Chris Disilva
Greenhorn

Joined: Apr 29, 2012
Posts: 5
The tutorial is dated 12/14/11 since you are dying to know.
Chris Disilva
Greenhorn

Joined: Apr 29, 2012
Posts: 5
Can anyone answer the question without the put down of the tutorial I'm using?

Does anyone know what does the red squiggly lines mean?

The Eclipse IDE version I am using is the newest version Eclipse IDE for Java Developers

Thanks!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

Sorry, we don't care HOW recent the tutorial is. Scriptlets infringe on the Separation of Concerns afforded under Model/View/Controller (MVC). In more practical terms, they're royal pain in the rear to debug and maintain and they make reading the template HTML harder as well. We've moved beyond using JSPs as though they were ASPs these days. This kind of stuff works for quick-and-dirty, but J2EE is an expensive platform to set up and run, and if fast, cheap and sloppy is the driving criteria, I recommend something like PHP, instead. Saves time and effort all the way around. J2EE is for when security, scalability and rigour are worth the extra cost.

I cannot actually see anything wrong with your example, but scriptlets are also a strain on the IDE's parsers as the lexical scanner is having to pop back and forth between 2 wildly different syntax forms: HTML and Java code. On top of that, straight HTML isn't an entirely sane notation to begin with (which is why xhtml was invented). Top it all off with the fact that the Eclipse XML parsers never seem to be 100% trustworthy themselves and the net effect may be that you're simply getting a bogus error message.


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: red squiggly lines under scriptlets in Eclipse