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

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

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

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
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 …
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.

688 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