Michael,

thanks for your answer; 
You're right with Integer.parseInt(....) 
I realy read 2 good books of the Java-language, but I'm relatively knew
to programming with classes so I think it's normal that I stuck
sometimes on 'easy' things (I hope it's normal!).
Nevertheless, now it works & thanks a lot anybody who helped.
Peter

Michael Wentzel wrote:
> 
> > first thanks for your suggestion.
> > I try to start with setting and passing an index i f type integer.
> > When I want to get the parameter on the second page with #
> > int i;
> > i = parseInt(request.getParameter("index");
> > I get the message: method or class parseInt(java.lang.String)
> > not found
> > but I#m sure that it must be there, because it's in the
> > java.lang.Integer class and I thought java.lang.* must'nt be imported,
> > or?
> > Nevertheless I imported it but withthe same ending.
> > Any thoughts why I can't use this method parseInt?
> 
> First I would suggest picking up a good book on Java.  You really should
> be familiar with the core java api before messing too much with Tomcat.
> 
> To call a static method from a class, such as Integer.parseInt, you must
> not only import the class( btw, you do not have to import java.lang.*, it's
> an implicit import in java), but you have to give the compiler a namespace
> to lookup to method.  In other words,
> 
> int i = Integer.parseInt(strValue);
> 
> This way java allows for multiple classes to have methods with the same
> signature.
> 
> The only scope in which you could say just parseInt(strValue) is within the
> class java.lang.Integer or a class which extends java.lang.Integer.
> 
> I would highly suggest becoming very familiar with the basic java api and
> coding
> style because in the end you'll just get really confused if you don't
> understand
> the basics.
> 
> ---
> Michael Wentzel
> Software Developer
> Software As We Think - http://www.aswethink.com

Reply via email to