• 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

"String literal is not properely closed by a double quote" error.

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Eclipse highlighted the portion in red with the error. I seriously can't find what is the issue with the double quotes. Any help is appreciated .
 
Sheriff
Posts: 5555
326
IntelliJ IDE Python Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The compiler is being pretty clear about the problem. You have an open ended String literal.

I'd suggest backing off on the complexity of this line and start at the simplest code that works (compiles) and add little bits incrementally. So start with the simplest code that works:

Does it compile? Good. Then add a little bit

Does it compile? Good. Then some more

Does it compile? Good. Now add your input param with the single quotes

Still compiling? Good. Now continue to work like this to add in the rest of the input params you need. Chances are you won't see this compiler error again.

As an aside. It's pretty likely you would be brought up on this by other Ranchers too but a JSP is no place to be dealing with sql ResultSets. ResultSets are a convenience provided by the Java JDBC library for marshalling data out of a database and you should process the data out of them into your own objects and close them as soon as possible. JSP's are a presentation technology, so we should not be dealing with Database access technologies within them. The context is all wrong.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic