aspose file tools*
The moose likes Struts and the fly likes Reg : missing resource 'Vista' in key method map Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Reg : missing resource Watch "Reg : missing resource New topic
Author

Reg : missing resource 'Vista' in key method map

Barry Van
Greenhorn

Joined: Oct 23, 2008
Posts: 22
Hi all,
Anybody solve this issue please.

Error 500--Internal Server Error
javax.servlet.ServletException: Action[/managePersonalData] missing resource 'Save' in key method map
at org.apache.struts.actions.LookupDispatchAction.getLookupMapName(Ljavax.servlet.http.HttpServletRequest;Ljava.lang.String;Lorg.apache.struts.action.ActionMapping;)Ljava.lang.String;(LookupDispatchAction.java:240)
at org.apache.struts.actions.LookupDispatchAction.getMethodName(Lorg.apache.struts.action.ActionMapping;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Ljava.lang.String;)Ljava.lang.String;(LookupDispatchAction.java:281)
at org.apache.struts.actions.LookupDispatchAction.execute(Lorg.apache.struts.action.ActionMapping;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Lorg.apache.struts.action.ActionForward;(LookupDispatchAction.java:158)
at org.apache.struts.action.RequestProcessor.processActionPerform(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Lorg.apache.struts.action.Action;Lorg.apache.struts.action.ActionForm;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(RequestProcessor.java:419)
at com.eurodyn.cvo.web.CVORequestProcessor.processActionPerform(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Lorg.apache.struts.action.Action;Lorg.apache.struts.action.ActionForm;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(CVORequestProcessor.java:55)
at org.apache.struts.action.RequestProcessor.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(RequestProcessor.java:224)
at com.eurodyn.cvo.web.CVORequestProcessor.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(CVORequestProcessor.java:49)
at org.apache.struts.action.ActionServlet.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(Optimized Method)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(Optimized Method)
at weblogic.servlet.internal.TailFilter.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Ljavax.servlet.FilterChain;)V(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(FilterChainImpl.java:27)
at com.eurodyn.euresportal.web.filter.HibernateSessionFilter.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Ljavax.servlet.FilterChain;)V(HibernateSessionFilter.java:41)
at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(FilterChainImpl.java:27)
at org.ajaxanywhere.AAFilter.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Ljavax.servlet.FilterChain;)V(AAFilter.java:41)
at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6724)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(Optimized Method)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

"Vista"?

Anyway, it looks like you're looking up the "save" method and there isn't one.
Barry Van
Greenhorn

Joined: Oct 23, 2008
Posts: 22
yes, its a Save method only.
please any one give me answer.

my Code :

jsp page :

<html:submit styleClass="CVO_btn" property="dispatch">
<bean:message key="cvo.button.jobseeker.personalData.save"/>
</html:submit>

ActionClass :

public Map getKeyMethodMap() {
Map map = new HashMap();
map.put("cvo.button.jobseeker.personalData.save","savePersonalData");
map.put("action.viewPersonalData", "viewPersonalData");
logger.info("map\t"+map.get("cvo.button.jobseeker.personalData.save"));
return map;
}

Struts-config.xml :

<action name="jobseekerPersonalDataForm"
path="/managePersonalData"
scope="request"
parameter="dispatch"
validate="false"
roles="jobseeker"
type="com.eurodyn.cvo.web.actions.PersonalDataAction">
<forward name="viewPersonalData" path="/managePersonalData.do?dispatch=viewPersonalData"/>
</action>

Note : working in all languages but except spanish language is not working in that screen only. And working(save method) other screens in spanish language.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I've never used I18Nized keys, but here you're using the message key as the map key, but setting the parameter to the message resource of the key, not the key itself--so the map is expecting just the key. As far as I can tell you're setting the dispatch parameter to the resource, not the key.
Barry Van
Greenhorn

Joined: Oct 23, 2008
Posts: 22
this is from property file:

cvo.button.jobseeker.personalData.save=Save
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I understand that.

But the map is created with the key:

"cvo.button.jobseeker.personalData.save" => "savePersonalData"

When you submit the form the parameter being sent is "Save".

"Save" does not have an entry in the map.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reg : missing resource 'Vista' in key method map