File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Getting the following Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Getting the following Exception" Watch "Getting the following Exception" New topic

Getting the following Exception

yerra reddy gatla

Joined: Apr 25, 2006
Posts: 25
HTTP Status 500 - No action instance for path /vendorSearch could be created


type Status report

message No action instance for path /vendorSearch could be created

description The server encountered an internal error (No action instance for path /vendorSearch could be created) that prevented it from fulfilling this request.


Apache Tomcat/5.0.28

I am giving action in javascript.

Can anybody please tell me what might be the problem..

Thanks in advance

jayanandan thiagarajan

Joined: Apr 27, 2006
Posts: 21
two things you have to check.
first thing :
check whether u use the normal html form action or struts form action.Coz,normal action dont do the extension of .do or .xx as u mentioned in the web.xml.
second thing :
check it in the struts-config.xml action-mappings.Whether u put the path and type correctly.
Otherwise give me details of ur form code.Really the error should be very minor .
I faced this probs alerady.
yerra reddy gatla

Joined: Apr 25, 2006
Posts: 25
Hi Friend

My jsp code looks like...
<form name="form1" method="post">
<input type="button" name="searchButton" value="Search" onKlick="isEmail(this)" >
<input disabled size=9 name="addButton" type="button" value="Add" onKlick="addvalidation(this)">
<input disabled size=9 name="updateButton" type="button" value="Update" onKlick="addvalidation(this)" >


and in JavaScript file


function isEmail(button) {

document.forms[0].action = 'vendor'+ button.value +'.do';
alert("invalid email");

In Struts-config.xml
<form-bean name="vendorform" type="com.vj.VendorFormBean"/>
<action name="vendorform" path="/vendorSearch" input="VendorForm.jsp" scope="session" type="com.vj.action.VendorAction">
<forward name="success" path="/VendorForm.jsp"/>
<action name="vendorform" path="/vendorAdd" input="VendorForm.jsp" scope="session" type="com.vj.action.NewVendorAction">
<forward name="success" path="/VendorForm.jsp"/>
<action name="vendorform" path="/vendorUpdate" input="VendorForm.jsp" scope="session" type="com.vj.action.OldVendorAction">
<forward name="success" path="/VendorForm.jsp"/>

Actually Just please read my actual task and suggest me.

Please read patiently..

I have a JSP page in which I am searching for a record for the given emailid. For this,I have a search button. When user press SEARCH button by entering the emailid, It should call the javascript and do clientside validation for email.After validation, If a record exists with the given mailid, I am REGENERATING the same form again by displaying the corresponding record values in the textboxes below(name,phoneno,location etc). otherwise I have to give a new form.

After displaying the existing record for given mailid, I have to allow user to UPDATE or DELETE the record.. here I have to call javascript for UPDATE button..

If no record with the given(searching) mailid, I have to give a new form and the user can fill the form and ADD the record. Here I have to call Javascript again for the ADD button..

For this Iam trying to do write different action class for SEARCH,ADD,UPDATE buttons..I know there is other option DISPATCH ACTION,but with dispatch action,I think I can not call javascript.

After getting suggetions from JavaRanch friends I decided to write different action class for each button I have.

The thing is I completed the same task with general Jsp,servlet(web) application

Now I have to do it in struts..

can you please tell me Is this procedure correct? if it is OK tell me what might be the problem??

Thanks in advance for you suggestion

yerra reddy gatla

Joined: Apr 25, 2006
Posts: 25
Hi Friends,

can anybody please give the solution for the above question?

Any help would be greatly appreciated....

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
There may be a problem with your com.vj.action.VendorAction class. Verify that:

1-It Extends org.apache.struts.action.Action
2-It has a public, no-args constructor
3-It has an execute() method with the proper signature
4-The class file for it exists in WEB-INF/classes

Consultant, Sima Solutions
I agree. Here's the link:
subject: Getting the following Exception
It's not a secret anymore!