| Author |
XML equivalent tags!!
|
Manjunath Subramanian
Ranch Hand
Joined: Jul 18, 2001
Posts: 236
|
|
Hello All, Determine the output of the following two pieces of code... 1)Case 1: Using xml equvalent tags ********************************** <jsp:scriptlet> if(true == false){ </jsp:scriptlet> <jsp:forward page="/MyJsp/1.jsp"/> <jsp:scriptlet> } else { </jsp:scriptlet> <jsp:forward page="/MyJsp/2.jsp"/> <jsp:scriptlet> } </jsp:scriptlet> 1.jsp and 2.jsp just print of their respective file names in html ************************************************* 2)Case 2:Using JSP syntax ************************* <% if(true == false){ %> <jsp:forward page="/MyJsp/1.jsp"/> <% } else { %> <jsp:forward page="/MyJsp/2.jsp"/> <% } %> ************************************************ Case 1 using xml equiv is directing me to 1.jsp and Case 2 is directing me to 2.jsp!! Am i doing something terribly wrong here or is it a bug!! Thanks, Manjunath
|
 |
Carl Trusiak
Sheriff
Joined: Jun 13, 2000
Posts: 3340
|
|
In case 1 you have neglected to include the root element so, the JSP parser ignores your tags as unidentified HTML tags. Change 1 to Retry it. [ January 31, 2002: Message edited by: Carl Trusiak ]
|
I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
|
 |
Madhav Lakkapragada
Ranch Hand
Joined: Jun 03, 2000
Posts: 5040
|
|
Case 1 using xml equiv is directing me to 1.jsp and Case 2 is directing me to 2.jsp!! Am i doing something terribly wrong here or is it a bug!! doing something terribly wrong here!!! - satya
|
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
|
 |
Manjunath Subramanian
Ranch Hand
Joined: Jul 18, 2001
Posts: 236
|
|
Thanks Carl and thanks once again satya..
|
 |
 |
|
|
subject: XML equivalent tags!!
|
|
|