File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Problem Using c:if Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem Using c:if" Watch "Problem Using c:if" New topic
Author

Problem Using c:if

RGupta
Greenhorn

Joined: Jun 05, 2006
Posts: 11
I am using <c:if> tag inside <option> html tag. It gives me the error
weblogic.servlet.jsp.JspException: (line 27): Non-matching extension tags

thats probably because i am nsting c:if inside <option> tag.
But that problem only comes when i use weblogic otherwise it works very fine with tomcat.
Can anyone please help me on this?

Thanks
Rahul


Rahul
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

I don' think this has any relation with the <option> tag.
How did you declared the jstl library in your file ? (<%@ taglib... )

Could you also post your "if" tag ?
[ June 05, 2006: Message edited by: Satou kurinosuke ]

[My Blog]
All roads lead to JavaRanch
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
did u close ur c:if tag?


MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
RGupta
Greenhorn

Joined: Jun 05, 2006
Posts: 11
I have declared all the taglibs in one jsp and included that jsp on each page.
Description goes like this
<%@ taglib prefix="c" uri="/core" %>
<%@ taglib prefix="fmt" uri="/fmt" %>
<%@ taglib prefix="spring" uri="/spring" %>
<%@ taglib prefix="emars" uri="/emars" %>
<%@ taglib prefix="authz" uri="/authz" %>

The tag is properly closed.
RGupta
Greenhorn

Joined: Jun 05, 2006
Posts: 11
The actual line that is creating the error is like:-

<input type="checkbox" name="<rahulut value='${status.expression}'/>" value='true'id='userac' < c:if test="${status.value == 'true'}" > checked </c:if>/>
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Did you try to remove the space in "< c:if" ?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

techyraul, I hope you'll solve your problem,
but please change your name according to the naming policy :
http://www.javaranch.com/name.jsp

Thank you
RGupta
Greenhorn

Joined: Jun 05, 2006
Posts: 11
That works perfectly fine. Space was creating the problem. But how can it be that the same code was working fine with tomcat?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

RahulTech, sorry to insist but the naming policy states :
with a first and last name, and maybe more, separated by spaces.
;)

But how can it be that the same code was working fine with tomcat?

Tomcat is less strict than Weblogic ? I don't know. Writing xml properly is good habit anyway ;)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61772
    
  67

"RahulTech", Satou was not joking regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

Be aware that accounts with invalid display names are removed.

bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem Using c:if