Mario: I tested it, and the code seems to be ok. It prints it x times
I called it this way: http://localhost:8080/test/loop.jsp?numtimes=4 Check it out, it sould work. ----- Original Message ----- From: "Mario Bigras" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 03, 2001 5:13 PM Subject: Run Servlets correctly but not JSP > > > Hi > > I have installed Tomcat 3.1 on Windows 98SE. I am able to run Servlets but > it's with JSP that is my problem. > > I wrote an html form that take an int as input from the user and it's gonna > pass that int to the JSP which will write Hello world the number of time > specified by the user. It's in a loop. The problem is : it does not write it > multiple time. It only write one time --> it's like if it was not doing the > loop. I saw the class created (changed in Servlet) > > Here is the code of the JSP --> it's my first one > > <%@ page language="java" %> > <HTML> > <HEAD> > <TITLE>Exemple de JSP simple.</TITLE> > </HEAD> > <BODY> > <% int numTimes = Integer.parseInt(request.getParameter("numtimes")); > for(int i = 0; i < numTimes; i++) { > System.out.println("le numTimes = " + numTimes); > %> > Hello World > <% > } > %> > </BODY> > </HTML> > > When I run it I clearly see the right number (the user entered on the html > form) beside the ? in the adress bar. Am I missing something ?? > > HOULA OUP BARBATRUC > > > > > > _________________________________________________________________ > T�l�chargez MSN Explorer gratuitement � l'adresse > http://explorer.msn.fr/intl.asp >
