jsp: Start tag Option not closed error

Posted on 2010-11-11
Last Modified: 2012-05-10
I have a file by name 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>
Question by:prsubject
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Author Comment

ID: 34114886
It says start tag option not closed

LVL 27

Expert Comment

ID: 34117570
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?
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 34118473
<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>
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 34118480
inc --- > importing mutltiple file
LVL 27

Accepted Solution

mrcoffee365 earned 500 total points
ID: 34119844
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.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I   ajax html table  rows? 20 88
netstat -ano | find "8000" and taskkill /f /pid 2984 3 112
eclipse buid path vs tomcat lib path 10 46
java imports not found 4 68
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question