• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 13690
  • Last Modified:

Struts: ServletException: No action config found for the specified url.

I'm new in to Struts 1.3.8 I have very simple exmaple to work on, please check out the attachment
everything seems ok but when I click on below link in JSP
 <html:link action="/studentInfo.do" >Student Info</html:link>
I get the errr exception
Could you please check out the attachment which is included my configuration and let me know where I'm making mistake ? Thanks

javax.servlet.ServletException: No action config found for the specified url.
root cause
org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.

  • 2
  • 2
1 Solution
arkhlsAuthor Commented:
hi arkhls,

you not defined the action class for mapping studentInfo.do
make entry like this
                  <action path="/studentInfo.do"  type="ca.school.frontend.actions.StudentInfoAction">
                        <forward name="success" path="./student_info.jsp" />

arkhlsAuthor Commented:
Does not need that , that's very simple forward from 1 page to another howvere I fixed that the reason was my path is /StudentInfo.do I guess strusts by defult adds "  .do "  follow bt path that we put ! I did not underestand why but if I put /studentInfo then is working but /StudentInfo.do it's not
You are right if we call the actions by using standard struts tags eg. <html:link>,<html:form> than it automatically calls the ActionServlet defined in web.xml.

if you want to call action class outside these tags eg from javascript then you have to call using /actionpath.do .
document.forms[0].action ='/relhs/actionpath.do'; document.forms[0].submit();
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now