• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

red squiggly lines under scriptlets in Eclipse

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to ask IDE questions in the IEDs forum. I have moved this post there for you.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The tutorial is dated 12/14/11 since you are dying to know.
 
Chris Disilva
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Select all of your code, press backspace and CTRL+Z to roll back the changes. It works.
 
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic