Solved

jsp: Start tag Option not closed error

Posted on 2010-11-11
5
876 Views
Last Modified: 2012-05-10
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
Comment
Question by:prsubject
  • 2
  • 2
5 Comments
 

Author Comment

by:prsubject
ID: 34114886
It says start tag option not closed

0
 
LVL 26

Expert Comment

by:mrcoffee365
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?
0
 
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>
0
 
LVL 20

Expert Comment

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

Accepted Solution

by:
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.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
JKS to store upstart data 2 66
Fix45 challenge 15 87
sumHeights2  challenge 7 76
bitbucket vs gitbucket 3 32
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now