35 pts.
 jsp
<HTML>
<HEAD>
<!-- Example2 -->
<TITLE> JSP loop</TITLE>  </HEAD>  <BODY>
<font face=verdana color=darkblue>
JSP loop
<BR> <BR>
<%!
public String writeThis(int x)
{
            String myText="";
            for (int i = 1; i < x; i++ )
                       myText = myText +  "<font size=" i " color=darkred face=verdana>VisualBuilder JSP Tutorial</font><br>" ;
            return myText;
}
%>
[Br style="font-family: Verdana; font-size: 12px;" /> This is a loop example from the

[Br style="font-family: Verdana; font-size: 12px;" /> <br> <%= writeThis(8) %>  </font> </BODY>  </HTML>

hai i have few doubts regarding jsp i find it difficult while learning please help me .

1- how the above code work 

2 - how to execute it ? 



Software/Hardware used:
software jdk 1.6
ASKED: March 9, 2012  6:00 PM
UPDATED: April 4, 2012  7:57 AM

Answer Wiki:
JSP is language for dynamic scripting.HTML is static page.If you want include the dynamic content in the html page, then you can use jsp. Above example <% %> is a java scriplets. inside <% %> has dynamic content.while executing server convert the dynamic statement into servet class.You need to web server to execute the jsp page. I am working in AS400 platform.Shared my answer based on theortical knowledge.
Last Wiki Answer Submitted:  April 4, 2012  7:57 am  by  Emime   15 pts.
All Answer Wiki Contributors:  Emime   15 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _