• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 992
  • Last Modified:

jsp: Start tag Option not closed error

I have a file by name daterange.inc( Dont know what this inc is. This is a code written in 2001) . I am getting an error at the following line
       
 <OPTION <%= range.equalsIgnoreCase(" ") ? "selected" : "" %> > </OPTION>
0
prsubject
Asked:
prsubject
  • 2
  • 2
1 Solution
 
prsubjectAuthor Commented:
It says start tag option not closed

0
 
mrcoffee365Commented:
Odd.  I tested it and didn't get an error.  You could try putting parens around the statement, so that it looks like this:
<OPTION <%= (range.equalsIgnoreCase(" ") ? "selected" : "") %> > </OPTION>

But as I said, it worked for me.  Are you sure that this is the specific line that is getting the error?  Maybe it's a line near this one?
0
 
Sathish David Kumar NCommented:
<OPTION ><%= range.equalsIgnoreCase(" ") ? "selected" : "" %>"  </OPTION>
ur mistake is
option must have vyour directly assgin value in option tag  

or u can do like this
<option value=""></option>
0
 
Sathish David Kumar NCommented:
inc --- > importing mutltiple file
0
 
mrcoffee365Commented:
dravidnsr - I think you must not have tested the line.  It's not an error.  The option tag can have an empty value, especially in this case where it is the empty value option.

prsubject - are you looking at the code in MyEclipse?  There was a bug with the HTML validator where tags with anything non-html in them -- the JSP code in this case -- would get that error.  Unfortunately, if the HTML validator has not been fixed, the only way to not see this error in MyEclipse is to turn off the HTML validator.  You might see the same error message for tags which have Javascript commands in them.

The .inc extension is not important -- the file isn't being imported, it is being included as text.  It is an extension that the original developer gave the file.  No other point, except that for a while, people were putting .inc for "include" in file extensions if the files were being included.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now