Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in implementing AvtionMapping

Anil Mundra
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my struts application i am using action mapping which code is:


import org.apache.struts.action.ActionMapping;
public class LoginActionMapping extends ActionMapping {

protected boolean loginrequired = false;

public LoginActionMapping() {

public boolean isLoginrequired() {
return loginrequired;

public void setLoginrequired(boolean loginrequired) {
this.loginrequired = loginrequired;


***************the code in web.xml*****************************8

***************Tho code in strutsconfig.xml*************************
<action path="/Upload" type="" name="uploadForm" scope="request" validate="true" input="/Upload.jsp">
<set-property property="loginRequired" value="true" />
<forward name="success" path="/FacultyHome.jsp" />
<forward name="failure" path="/Upload.jsp" />
When i run this application then i get the error that MESSAGE RESOURCE NOT FOUND UNDER MESSAGE RESOURCE KEY

BUT if i remove this line from my strutsconfig.xml
<set-property property="loginRequired" value="true" />
then it is working.

I want that only after login a person can use upload action
Please help me.
Thanks in advance............!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic