aspose file tools*
The moose likes Struts and the fly likes Struts2.2.3 problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2.2.3 problem" Watch "Struts2.2.3 problem" New topic
Author

Struts2.2.3 problem

francis varkey
Ranch Hand

Joined: Sep 13, 2005
Posts: 169
Hi,
I am using struts-2.2.3 . I have two jsps and one action.

1) login.jsp
<s:form id="loginForm" name="loginForm" action="/General/LoginManagementAction" method="post">
</s:form>
2) success.jsp

3) com.test.general.action.LoginManagementAction.java (Action class)

4) struts.xml

<struts>
<package name="General" extends="struts-default" namespace="/General">
<action name="LoginManagementAction" class="com.test.general.action.LoginManagementAction">
<result name="success">/pages/test/success.jsp</result>
</action>
</package>
</struts>

5) web.xml

<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<welcome-file-list>
<welcome-file>/pages/general/login.jsp</welcome-file>
</welcome-file-list>


Now I am getting following warning

Jun 15, 2011 9:37:21 AM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: No configuration found for the specified action: '/General/LoginManagementAction' in namespace: '//pages/general'. Form action defaulting to 'action' attribute's literal value.
Jun 15, 2011 9:37:21 AM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: No configuration found for the specified action: '/General/LoginManagementAction' in namespace: '//pages/general'. Form action defaulting to 'action' attribute's literal value.



Papier Jungo
Greenhorn

Joined: Aug 19, 2011
Posts: 1
The "general" in the welcome file list sould prolly start with upper case
Orton K Randy
Ranch Hand

Joined: Aug 12, 2011
Posts: 41

You've been here too long not to learn coding your snippets. Ok, I'd like to see your folder structure, particularly that of struts.xml. Does it reside in the classpath of your webapp? See here for more details.


Coderanch, best ever forum on the net. Hands down.
Jesus Mireles
Ranch Hand

Joined: Mar 10, 2010
Posts: 122

Your problem is how you defined your form.

Instead of using action="/General/LoginManagementAction"

Set two attributes

action="LoginManagementAction"
namespace="/General"

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2.2.3 problem