Your req should be expanded to request. Also parseInt should start with a
lowercase p.
I got the following code to work.
<%@ page language="java" %>
<HTML>
<TITLE>
</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<P>
<%
try
{
int j=Integer.parseInt(request.getParameter("numtimes"));
for(int i=0;i<j;i++)
out.println("helloworld");
}
catch(NullPointerException e)
{
out.println(e);
}
%>
</P>
</BODY>
</HTML>
-----Original Message-----
From: Dean Sheppard [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 18, 2000 2:30 PM
To: [EMAIL PROTECTED]
Subject: Re: error in compilling
The int j= line is missing a ')' at the end.
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of sumit shah
Sent: Friday, August 18, 2000 2:09 PM
To: [EMAIL PROTECTED]
Subject: Re: error in compilling
well here is one of the source codes. I tried many simple ones and if i
dont involve and request.getParameter in my code then it definetly works.
otherwise i think it depends on my servers mood.
thanks and please help.
<%@ page language="java" %>
<HTML>
<HEAD>
<TITLE>
</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<P>
<%
try
{
int j=Integer.ParseInt(request.getParameter("numtimes");
for(int i=0;i<j;i++)
out.println("helloworld");
}
catch(NullPointerException e)
{
out.println(e);
}
%>
</P>
</BODY>
</HTML>
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets