This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes i'm getting the error missing return statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

i'm getting the error missing return statement

siva sankara rao

Joined: Nov 22, 2005
Posts: 3
import org.apache.struts.action.*;
import javax.servlet.http.*;
import java.sql.*;
//package one;

public class ContSaveAction extends Action
public ActionForward execute(ActionForm form,ActionMapping mapping,HttpServletRequest request,HttpServletResponse response) throws Exception
ContSaveForm cf=(ContSaveForm)form;
String contcode,contname;


//ResultSet rs;
Connection con=DriverManager.getConnection("jdbc racle:thin:@localhost:wsoft","user","pass");
Statement stmt=con.createStatement();

int b=0;
b=stmt.executeUpdate("insert into RWS_CONTAMINATION_TBL values('"+contcode+"','"+contname+"')");
return mapping.findForward("loaded");

}catch(Exception e)
System.out.println("Exception due to:"+e);

return mapping.findForward("error"); */
I agree. Here's the link:
subject: i'm getting the error missing return statement
It's not a secret anymore!