symbol not found

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sarsha
    New Member
    • Aug 2007
    • 1

    symbol not found

    hello m getting errors called symbol not found

    GetAction:java1 2:cannot find symbol
    symbol: class SampleForm
    location:class GetAction
    SampleForm sampleForm= (SampleForm)for m;
    ^

    GetAction:java1 2:cannot find symbol
    symbol: class SampleForm
    location:class GetAction
    SampleForm sampleForm= (SampleForm)for m;
    ^

    GetAction:java1 4:cannot find symbol
    symbol: variable SampleDAO
    location:class GetAction
    List listone=(List)S ampleDAO.getDat a();
    ^



    in the below code,

    import javax.servlet.h ttp.HttpServlet Request;
    import javax.servlet.h ttp.HttpServlet Response;
    import org.apache.stru ts.action.Actio nForm;
    import org.apache.stru ts.action.Actio nForward;
    import org.apache.stru ts.action.Actio nMapping;
    import java.util.*;
    import org.apache.stru ts.action.*;
    public class GetAction extends Action{
    public ActionForward execute(ActionM apping mapping,ActionF orm form,HttpServle tRequest request,
    HttpServletResp onse response)throws Exception{
    SampleForm sampleForm= (SampleForm)for m;
    try{
    List listone=(List)S ampleDAO.getDat a();
    sampleForm.set( "listone", listone);
    }
    catch(Exception exce){
    throw exce;
    }
    return mapping.findFor ward("inputthre e");
    }

    }
  • kestrel
    Recognized Expert Top Contributor
    • Jul 2006
    • 1071

    #2
    Welcome to The Scripts!
    Im going to move this to the Java forum. Have nice day!

    --
    Kestrel

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by sarsha
      hello m getting errors called symbol not found

      GetAction:java1 2:cannot find symbol
      symbol: class SampleForm
      location:class GetAction
      SampleForm sampleForm= (SampleForm)for m;
      ^

      GetAction:java1 2:cannot find symbol
      symbol: class SampleForm
      location:class GetAction
      SampleForm sampleForm= (SampleForm)for m;
      ^

      GetAction:java1 4:cannot find symbol
      symbol: variable SampleDAO
      location:class GetAction
      List listone=(List)S ampleDAO.getDat a();
      ^



      in the below code,

      import javax.servlet.h ttp.HttpServlet Request;
      import javax.servlet.h ttp.HttpServlet Response;
      import org.apache.stru ts.action.Actio nForm;
      import org.apache.stru ts.action.Actio nForward;
      import org.apache.stru ts.action.Actio nMapping;
      import java.util.*;
      import org.apache.stru ts.action.*;
      public class GetAction extends Action{
      public ActionForward execute(ActionM apping mapping,ActionF orm form,HttpServle tRequest request,
      HttpServletResp onse response)throws Exception{
      SampleForm sampleForm= (SampleForm)for m;
      try{
      List listone=(List)S ampleDAO.getDat a();
      sampleForm.set( "listone", listone);
      }
      catch(Exception exce){
      throw exce;
      }
      return mapping.findFor ward("inputthre e");
      }

      }
      Well, I don't see any definition of class SampleForm either, not an import that
      tells the compiler where to find the compiled form of it.

      kind regards,

      Jos

      Comment

      Working...