• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

No configuration found for the specified action

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I get the following message "No configuration found for the specified action : 'doLogin' in namespace: '/actions'" when I try to submit login.jsp page containing username and password as input fields and submit button.

login.jsp:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="Rational Application Developer">
</head>
<body>
<s:form action="doLogin">
<tr>
<td colspan="2">
Login
</td>

</tr>

<tr>
<td colspan="2">
<s:actionerror />
<s:fielderror />
</td>
</tr>

<s:textfield name="username" label="Login name"/>
<s assword name="password" label="Password"/>
<s:submit value="Login" align="center"/>

</s:form>

</body>
</html>

struts.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>

<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />

<!-- Add packages here -->
<package name="actions" namespace="/" extends="struts-default">

<action name="doLogin" class="actions.Login">
<result name="input">/actions/login.jsp</result>
<result name="error">/actions/login.jsp</result>
<result>/actions/loginsuccess.jsp</result>
</action>
</package>

</struts>

Also the struts.xml files is directly under WEB-INF/classes folder.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try
<s:form action="doLogin.action">

may be this helps.
 
R Pa
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I get the following message:
No configuration found for the specified action: 'doLogin.action' in namespace: '/actions'.
for
<s:form action="doLogin.action">
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


<action name="doLogin" class="actions.Login">
<result name="input">/actions/login.jsp</result>
<result name="error">/actions/login.jsp</result>
<result>/actions/loginsuccess.jsp</result>
</action>



Is your "login.jsp" and "loginsuccess.jsp" located inside a folder named "actions"?
 
R Pa
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes.Both the jsps are in the actions folder
 
Sudarshan Chakrabarty
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


<!-- Add packages here -->
<package name="actions" namespace="/" extends="struts-default">
..
</package>



Try removing the " namespace="/" " attribute
i.e.
<package name="actions" extends="struts-default">
..
</package>
 
R Pa
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
still doesnt work...
 
Sudarshan Chakrabarty
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, it's working for me.
Which web server are you using? Try removing your explorer as well as server cache and see. It should work.
 
R Pa
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now I'm not getting any error/warning messages in the console but still the action class is not getting invoked..and I get 404 error.
I'm using websphere...
 
Sudarshan Chakrabarty
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Now I'm not getting any error/warning messages in the console but still the action class is not getting invoked..and I get 404 error.


Well, your server is unable to find your jsp's.
It seems your jsp pages are not in the right folder.
Can you tell us the folder structure ?
 
R Pa
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the folder structure:

test1/src-contains java source files.
test1/WebContent/actions-contains jsps
test1/WEB-INF/classes-contains the struts-xml
 
Sudarshan Chakrabarty
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your folder structure looks ok. Are you able to get the initial page "login.jsp" atleast ?
 
R Pa
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'm able to get the initial login page.
only after I click on the submit button all problems happen....
 
Sudarshan Chakrabarty
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which version of Struts are you using?
 
R Pa
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
struts-2.0.11.2
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try by puttiing your struts.xml in src folder also...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic