• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem Using c:if

 
RGupta
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did u close ur c:if tag?
 
RGupta
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try to remove the space in "< c:if" ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic