Servlet cant perform sql after second button click
Hi there, I need some guidance on my servlet.
Does anyone expert in iterator part of built in package of java libary List?
List dataList = new ArrayList();
Code :
Iterator itr;
for(itr=data.iterator();itr.hasNext();)
Actually I m able to perform first query with data display..but when I click on other button..it cant proceed servlet and it gv me blank page.
Servlet.java
Code :
String sql="select * from a natural left join b" +
"natural left crecord natural left join dwhere jobid="+jobid+
"order by recordid";
stmt = conn.createStatement();
stmt.executeQuery(sql);
rs=stmt.getResultSet();
List dataList = new ArrayList();
while(rs.next())
{
dataList.add(rs.getInt("xxx"));
}
p/s: my form sure ok just dunno why cant read my parameter
Re: Servlet cant perform sql after second button click
I bet your query is wrong.
Re: Servlet cant perform sql after second button click
sorry typo...impossible wrong i m able to run at netbean
Code :
String sql="select * from a natural left join b" +
"natural left join c natural left join d where jobid="+jobid+
"order by recordid";
Re: Servlet cant perform sql after second button click
Yeah now you may run it. First not even possible whatever it was typo or....
Compile your servlet class again and put in the path....
I think you are loosing cursor when you perform some other event. YOu know writing explicit cursor in sql?
Re: Servlet cant perform sql after second button click
erm sorry could u guide me?i m newbie in servlet..
Re: Servlet cant perform sql after second button click
You are using APACHE?
If yes, again compile your servlet, copy it's .CLASS file from the folder where netbeans has created project folder and in APACHE directory place it inside classes folder.
Re: Servlet cant perform sql after second button click
Re: Servlet cant perform sql after second button click
Then do as i told you to do.
Re: Servlet cant perform sql after second button click
sorry where is servlet.CLASS located?
Re: Servlet cant perform sql after second button click
Re: Servlet cant perform sql after second button click
Problem solved. thanks to those respondants.Erm the problem is due to join tables and parameter passing..