• 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.
      org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
      org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.
      org.apache.struts.chain.commands.AbstractSelectAction.execute(AbstractSelectAction.java:71)

0
arkhls
Asked:
arkhls
  • 2
  • 2
1 Solution
 
arkhlsAuthor Commented:
0
 
vik_senCommented:
hi arkhls,

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

0
 
arkhlsAuthor Commented:
vik_sen:
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
0
 
vik_senCommented:
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 .
like
document.forms[0].action ='/relhs/actionpath.do'; document.forms[0].submit();
0
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