• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL-C using c:choose problem

 
Prasad Tirumareddi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I am using jstl1.1 and i want to use the choose .

I am doing this
<c:choose>
<c:when test="true"> I am from true </c:choose>
<c therwise> I am from False </c therwise>
</c:choose>

I am using Jdeveloper 10g 10.1.3 Developer Preview Version relase and
running it from the embedded OC4J server.

When i run it i get the following error .....

500 Internal Server Error

javax.servlet.jsp.JspTagException: Illegal use of <when>-style tag without <choose> as its direct parent
at org.apache.taglibs.standard.tag.common.core.WhenTagSupport.doStartTag(WhenTagSupport.java:94)
at _cTest_2e_jsp._jspService(cTest.jsp:26)
[/cTest.jsp]
at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:343)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:543)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:441)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:61)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:672)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:378)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:869)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.HttpRequestHandler.run(HttpRequestHandler.java:288)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].server.http.HttpRequestHandler.run(HttpRequestHandler.java:120)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:299)
at java.lang.Thread.run(Thread.java:534)



Does anyone faced this problem.
Your help is greatly appreciated.


Thanks in advance,
Prasad.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at your tag matching carefully.
 
Prasad Tirumareddi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using it exactly like this. The tags are matched perfectly.

<c:choose>
<c:when test="${selectedIndex == 1}">
I am 1
</c:when>
<c therwise>
i am rest
</c therwise>
</c:choose>

But i am getting the same error posted above.

Can anyone help me in this.

Thanks,
Prasad.
 
Eugene Lucash
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try another jsp / servlet container. your example seems to be correct
 
Prasad Tirumareddi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have tested with Tomcat and it runs. When i do the same with OC4J it shows me the error. What could be the problem. We have to deploy the applcation in OC4j . How can i comeover this problem.


Thanks,
Prasad.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic