
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 19 in the jsp file: /index.jsp
Generated servlet error:
C:\Users\Welcome\.netbeans\5.5\apache-tomcat-5.5.17_base\work\Catalina\localhost\yep.jsp\org\apache\jsp\index_jsp.java:142: cannot find symbol
symbol : method nextline()
location: class java.util.Scanner
inp=sn.nextline();
^
1 error
public void inputstate(int s[][],int s2[][]) throws IOException
{
Scanner sn = new Scanner(System.in);
Scanner so = new Scanner(System.in);
char [][] s1 = new char[4][4];
String inp;
int i,j,k,len,lenf,rn;
//Random r = new Random(10);
for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
{
s1[j][i]=0;
}
}
writer.println("Enter password:");
inp=sn.nextline();
len=inp.length();
lenf=16-len;
for(i=len;i<16;i++)
{
//rn=r.nextInt();
inp= new StringBuffer(inp).insert(i," ").toString();
}
for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
{
s1[j][i]=inp.charAt((i*4)+j);
s[j][i]=s1[j][i];
s2[j][i]=s1[j][i];
}
}
for(i=0;i<4;i++)
{
writer.println();
for(j=0;j<4;j++)
{
writer.println(s1[i][j]+" ");
}
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.