Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

jstl: choose, when, otherwise, and jsp:include

843836Apr 10 2005 — edited Apr 10 2005
Have a problem, hope someone can help, because it seems like there's nothing to troubleshoot, yet I have trouble.

A page named islands.jsp can receive params that tell which include to display. For example, if it was sent "islands.jsp?islandName=pr", it should display an include for Puerto Rico.
The code for islands.jsp looks like this:

<c:choose>
<c:when test="${param.islandName == 'pr'}">
<jsp:include page="/components/advPR.jsp" flush="true" />
</c:when>
<c:when test="${param.islandName == 'jamaica'}">
<jsp:include page="/components/advJAMAICA.jsp" flush="true" />
</c:when>
<c:otherwise>
<h1>Application Logic Problem Detected!</h1>
</c:otherwise>
</c:choose>

WHY is it that when it receives a url like "islands.jsp?islandName=pr", it prints out "Application Logic Problem Detected!" in an html h1 header? As usual, I wouldn't be asking this if it didn't already WORK correctly on my local machine, but when I upload to the public web server, no dice. Thanks in advance for any help,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 8 2005
Added on Apr 10 2005
6 comments
420 views