jsp

35 pts.
Tags:
JDK 1.6
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

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following