Shailesh,
I had a whole set of questions written down before I saw the REAL problem.
Prepare yourself, it's one of those "DUH!" answers because it was a simple
typing mistake. You listed your action like this:
Your forwards should use PATH, not TYPE. There is no java class
"/admin.jsp" so OF COURSE your application server CAN'T instantiate it: it's
a path, not a class!
You still need to fix your SECOND major problem: Your execute() method
signature is wrong. You listed it as:
public ActionForward execute(ActionMapping map,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res)
throws IOException, ServletException
^^
There is no action.execute() method with that signature. So, fixing your
forwards would likely result in YOUR version of action.execute() NEVER
running. It would probably default to a blank page since the plain
action.execute() method that Struts calls returns nothing. The one
signature for execute() that you can use for v1.2 (your struts-config.xml
lists you as using v1.2) is:
public ActionForward execute(ActionMapping mapping,
ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse
response)
throws java.lang.Exception
Technically, there is another action.execute() signature BUT it isn't
invoked from a webapp.
Good luck!
Regards,
David
-Original Message-
From: shailesh agarwal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 08, 2005 6:47 AM
To: Struts Users Mailing List
Subject: Re: AW: No action instance for path /Admin could be created
Yes, It extends org.apache.struts.Action class.
I am putting files that I have used:
struts-config.xml
http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";>
AdminAction class is with in classes/shailesh
package shailesh;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import java.io.*;
import javax.servlet.ServletException;
class AdminAction extends org.apache.struts.action.Action {
String target=null;
public ActionForward execute(ActionMapping map,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res)
throws IOException, ServletException{
target="x";
return(map.findForward(target));
}
}
Shailesh Agarwal
-
How much free photo storage do you get? Store your friends n family photos
for FREE with Yahoo! Photos.
http://in.photos.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]