You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Helmut Swaczinna <my...@wlp-systems.de> on 2008/12/09 12:47:29 UTC
[Tobago] Problem with NonFacesRequestServlet
Hi,
I just tried to use the NonFacesRequestServlet but I got a problem I can't
solve. The servlet is
called and the initial page is displayed as expexted. But when I execute an
action on the page
the URL is prepended with the servlet name and cannot be resolved:
This is the initial URL wich calls the NonFacesRequestServlet
http://localhost:8080/MyWebapp/OpenMediaRequest.jsf?titel=abc
When I execute an action the URL is
http://localhost:8080/MyWebapp/OpenMediaRequest.jsf/edit.xml;jsessionid=59135BB960B04D4B759D5ECFAB6074FA
This is my web.xml
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xml</param-value>
</context-param>
<servlet>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet>
<servlet-name>OpenMediaRequestServlet</servlet-name>
<servlet-class>de.wlps.ndr.workflow.beitragsid.webapp.web.OpenMediaRequestServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
and my faces-config.xml
<navigation-rule>
<navigation-case>
<from-outcome>edit</from-outcome>
<to-view-id>/edit.xml</to-view-id>
</navigation-case>
</navigation-rule>
This is the NonFacesRequestServlet
public class OpenMediaRequestServlet extends NonFacesRequestServlet {
private static final Log LOG =
LogFactory.getLog(OpenMediaRequestServlet.class);
public String invokeApplication(FacesContext facesContext) {
String titel =
(String)facesContext.getExternalContext().getRequestParameterMap().get("titel");
LOG.info("invokeApplication: titel='" + titel + "'");
return "edit";
}
}
Did I something wrong? I don't think so. I'm using Tobago 1.013. Please
help!
Regards
Helmut