Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
    Bookmark Topic Watch Topic
  • New Topic

i'm getting the error missing return statement

siva sankara rao
Posts: 3
  • Mark post as helpful
  • send pies
  • Report post to moderator
i'm getting bello error where is the mistake in this
missing return statement

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"); */
    Bookmark Topic Watch Topic
  • New Topic