Hi gueys,
I am converting servlets to jsp.Actually in servlets
we will define class and methods.In case of JSP we
won't define classes,in that case how to call a method
in JSP. I got the error msg as ......
c:\j2sdkee1.2\repository\RICH-S\web\ganrt\_0005cRegister_0002ejspRegister_jsp_0.java:390:
Statement expected.
public String validateStr(int
length,String str)
^
c:\j2sdkee1.2\repository\RICH-S\web\ganrt\_0005cRegister_0002ejspRegister_jsp_0.java:404:
Class or interface declaration expected.
}catch (Exception ex) {
My code is like this:
-----------------------
int retValue=
custQuery.insertCustomer(intCustId,validateStr(30,firstname),validateStr(30,lastname),validateStr(8,sex),validateStr(10,age),validateStr(30,income),validateStr(30,profession),validateStr(30,education),validateStr(10,familysize),validateStr(2,country),validateStr(50,company),validateStr(50,jobtitle),validateStr(80,officemailaddress),validateStr(50,officemailaddress1),validateStr(30,officecity),validateStr(30,officestate),validateStr(20,officeZip),validateStr(10,officeAreacode),validateStr(20,officephoneno),validateStr(20,officefax),validateStr(80,officeEmailaddress),validateStr(80,Homemailaddress),validateStr(50,Homemailaddress1),validateStr(30,Homecity),validateStr(30,Homestate),validateStr(20,HomeZip),validateStr(10,HomeAreacode),validateStr(20,Homephoneno),validateStr(20,Homefax),validateStr(80,HomeEmailaddress),validateStr(80,personalhomepage),validateStr(4,noofvisits),validateStr(32,lastvisit),validateStr(50,ipaddress),validateStr(50,browser),dateofregistration,emailsent,v!
alidateStr(1,inactivate),validateStr(1,load),dateloaded,validateStr(10,birthyear));
public String validateStr(int length,String str)
{
if(str!=null)
{
if(str.length()>length)
{
System.out.println("Wrong Entry"+str);
return "0";
}
else return str;
}
else
return "0";
}
This method i had called so many times like this..But
it is giving error as....
So pls help me in this....
Waiting for your solution.....
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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