Hi,
The code for the HTML file goes like this:
File name is simpleJSP.html,
<HTML>
<HEAD>
<TITLE>Simple JSP Example</TITLE>
</HEAD>
<BODY>
<P>How many times?</P>
<FORM METHOD="GET" ACTION="jsp\num\simpleJSP.jsp">
<INPUT TYPE="text" SIZE="2" NAME="numtimes">
<INPUT TYPE="submit">
</FORM>
</BODY>
</HTML>
The code for the jsp file goes like this:
File name is simpleJSP.jsp,
<%@ page language="java" %>
<HTML>
<HEAD>
<TITLE>Simple JSP Example</TITLE>
</HEAD>
<BODY>
<P>
<%
int numTimes = Integer.parseInt(
request.getParameter("numtimes") );
for (int i=0; i < numTimes; i++){
%>
Hello, World!<BR>
<% }
%>
</P>
</BODY>
</HTML>
Thanks alot for helping.
Rene
> Hi,
>
> If you send your code, then we can have look at it.
>
> Cheers,
>
> Takuya
>
>
>
> -----Original Message-----
> From: rene solis [mailto:servantmaster@g...]
> Sent: Thursday, April 26, 2001 4:57 AM
> To: Pro_JavaServer_Pages
> Subject: [pro_jsp] JSP
>
>
> Hi,
> I'm trying to run a simple loop. I have an HTML file that calls a
> JSP file. In the HTML file I ask the user to enter the number of times,
> and then in the JSP file I process the loop the exact same way it's on
the
> book(Pro JSP), but it wont do the Java part of the file(The actual
loop).
> Please help!
>
> Rene
>