Results 1 to 4 of 4

Thread: Compile files in struts

  1. #1
    Junior Member
    Join Date
    Dec 2007
    Answers
    1

    Compile files in struts

    This is the example program in struts complete reference:

    whenever i tried to compile the java files it couldn't access the classes from the other files for example:

    package com.jerry.minihr;

    import java.util.ArrayList;

    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;

    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionForward;

    public final class SearchAction extends Action
    {
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)throws Exception
    {
    EmployeeSearchService service=new EmployeeSearchService();

    ArrayList results;

    SearchForm searchForm =(SearchForm) form;

    The error says that it cannot resolve "EmployeeSearchService" and "SearchForm" eventhough it exists as separate file.help!


  2. #2
    Contributing Member
    Join Date
    Dec 2009
    Answers
    34

    Re: Compile files in struts

    Make the class as public or keep it in d same package


  3. #3

    Re: Compile files in struts

    Hi Friend,

    Please clarify

    "EmployeeSearchService" and "SearchForm" are in same package ie com.jerry.minihr

    or in different package.

    I think it is in differnet package. if it is in different package, then import that package also.


  4. #4
    Contributing Member
    Join Date
    Dec 2009
    Answers
    34

    Re: Compile files in struts

    any other idea


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact