First I Would say Nper should be a bean withing it's own .java file.
Second you have a property that is trying to be another instance of the same class. I don't know what you are trying to do there.
Third you method getPeriod() is returning an instance of the same class.
(I think points 2 & 3 just mean you need to lookup how to use constructors)
Finaly you are trying to create an object outside of the %> tags, which means you are just printing out HTML. What you probably want to do is create a new Nper class, and then call some function on it to print out the value from it as HTML
Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
You don't need to (and can't) declare a class inside a JSP. The container you're using will convert your JSP into a JavaServlet class for you.
If you have no experience in Java, I recommend following a few tutorials before delving into servlets and JSP. The "First Cup Of Java" tutorial on http://java.sun.com is very good.
Once you've done that, take a look at http://pdf.coreservlets.com. It's a great book and can be download for free in PDF form. There is also a second edition to the book that is more current (you'll have to buy that one).
On the surface, JSP looks a lot like ASP or PHP but there are some very important differences that can get you into trouble if you don't understand them. Threading, is number one. Learning servlets first, makes the underlying concepts behind JSP much easier to understand. [ June 29, 2005: Message edited by: Ben Souther ]