File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Problem in implementing AvtionMapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem in implementing AvtionMapping" Watch "Problem in implementing AvtionMapping" New topic

Problem in implementing AvtionMapping

Anil Mundra

Joined: Nov 14, 2008
Posts: 21
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............!
I agree. Here's the link:
subject: Problem in implementing AvtionMapping
It's not a secret anymore!