-
Junior Member
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!
-
Contributing Member
Re: Compile files in struts
Make the class as public or keep it in d same package
-
Junior Member
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.
-
Contributing Member
Re: Compile files in struts
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules