I get the input from the form.html, and I want to see the JSTL.jsp include the include.jspf(at bottom) with a difference sentence.But why I always get all the four <c:if> sentence?I want to see only one. My opinion is because the request and response in JSTLTest.java are only passed to JSTL.jsp, the include.jspf haven't gotten them, but why it show all the four choices(I think there should be none)? I will show a html,a Java code and a JSP with <jsp:include>,they are just for test:
The Java code:
And the JSTL.jsp is:
The include.jspf is, which has the problem with either <c:choose> or <c:if>:
Sorry,I should make it clearer: When I submit a name in the form.html,I want to show the difference sentences in the include.jspf which will be imported in the JSTL.jsp. For example,when I choose Kidd,it should only show the sentence "Now, this's Jason Kidd !" and others shouldn't appear. But in fact when I choose any one among the four choices ,the include.jspf always show all the four sentences in the order,as if there aren't <c:if>s any more. When I use <c:choose> .it's all the same. Why the <c:if> or <c:choose> didn't work,and furthermore based on the output they almost disappeared?
If you are showing your entire include.jsp I believe you need to either add the definition for the core taglib in that jsp (and name include.jsp rather than .jspf if it's going to be a jsp you can run) or alternatively use the include directive instead of the include action. The difference is whether it is code compiled into your JSTL.jsp or it's another jsp to execute and have the results of that execution included in the output page. [ November 24, 2006: Message edited by: Carol Enderlin ]
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss