?
Solved

jsp: Start tag Option not closed error

Posted on 2010-11-11
5
Medium Priority
?
914 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
[X]
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
5 Comments
 

Author Comment

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

0
 
LVL 27

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 27

Accepted Solution

by:
mrcoffee365 earned 2000 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

Use Filtering Commands to Process Files in Linux

Learn how to manipulate data with the help of various filtering commands such as `cat`, `fmt`, `pr`, and others in Linux.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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…
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.
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

777 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