• Post Reply Bookmark Topic Watch Topic
  • New Topic

;jsp:scriptlet doesnt wotk with ;

 
Manzar Zaidi
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<jsp:scriptlet> for (int i=0 ; i<dataSize ; i++) { </jsp:scriptlet>

As I write this in Netbeans it shows me an error that the jsp:scriptlet construct is unterminated and highlights the second ; in red.

If I replace the <jsp:scriptlets> with the traditional <% it doesnt show any errors.
rest of code doesnt have any issues, I checked that all tags are closed.

Does the <jsp:scriptlet> not work with ; or has issues with the for constructs ?

Please guide me .
[ July 20, 2005: Message edited by: John Cage ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could be an error in the Netbeans lexical processing, or perhaps you're getting tripped up by the rigors of strict XML notation.

Why on earth are you writing JSPs using the XML syntax? That's primarily intended as an intermediate format for JSP containers or for JSPs that are seriialized from DOM representations. It's not really well suited to hand coding.

A recent relevant discussion.
[ July 20, 2005: Message edited by: Bear Bibeault ]
 
Manzar Zaidi
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I intended to enforce XML notaion on the projects later, so I wanted to use XML syntax wherever I can. Yes I understand it would be easy to use the forEach tags too.
Thanks for linking me to the old topic.

I posted it here to see if any of you Gurus know of any problems with it, which I dont.

As I dont see any problem with the code so far, I think its something to do with the NetBeans IDE .. (thankfully)
I am still making a JSP page that will call the fragment having this code to verify the functionality.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I intended to enforce XML notaion on the projects later, so I wanted to use XML syntax


You're going to make other people use the JSP XML syntax? Why? As I said, it's not intended for use when hand-coding pages.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!