url:
http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls

On 1/17/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> Jeff
>
> can you update wiki page, if udos hint is successful ?
>
> -Matthias
>
> On 1/17/06, Udo Schnurpfeil <[EMAIL PROTECTED]> wrote:
> > Hi Jeff,
> >
> > please try to map the NonFacesRequestServlet like:
> >
> >   <servlet-mapping>
> >     <servlet-name>NonFacesRequestServlet</servlet-name>
> >     <url-pattern>/NonFacesRequestServlet</url-pattern>
> >   </servlet-mapping>
> >
> > And use the external URL:
> >
> > http://localhost:8080/ebusiness/faces/NonFacesRequestServlet?id=1
> >
> > By the way: Which ServletContainer? Version?
> >
> > Hope that helps
> >
> > Udo
> >
> > Jeffrey Porter wrote:
> > > I'm still really stuck over this.
> > >
> > > Has anyone any ideas why I, when I click on a commandButton, get 404
> > > Error & no call is made to the code behind the commandButton. This only
> > > occurs on the page when it is displayed via the NonFacesRequestServlet
> > > and not when I get to the page from another action.
> > >
> > > I have the following settings.
> > >
> > > The web.xml contains...
> > >     <servlet-mapping>
> > >         <servlet-name>Faces Servlet</servlet-name>
> > >         <url-pattern>/faces/*</url-pattern>
> > >     </servlet-mapping>
> > >     <servlet-mapping>
> > >         <servlet-name>Faces Servlet</servlet-name>
> > >         <url-pattern>*.jsf</url-pattern>
> > >     </servlet-mapping>
> > >
> > > The URL I request is..
> > > http://localhost:8080/ebusiness/faces/view/task?id=1
> > >
> > > /view/ is mapped to my NonFacesRequestServlet
> > >
> > > The NonFacesRequestServlet sets the following..
> > > UIViewRoot view = viewHandler.createView(facesContext, "/jsp/view.jsp");
> > > navigationHandler.handleNavigation(facesContext, null,
> > > "showExistingNCM");
> > >
> > > The faces-config.xml contains...
> > >   <navigation-rule>
> > >     <from-view-id>/jsp/view.jsp</from-view-id>
> > >     <navigation-case>
> > >       <from-outcome>showExistingNCM</from-outcome>
> > >       <to-view-id>/jsp/theNCM.jsp</to-view-id>
> > >     </navigation-case>
> > >   </navigation-rule>
> > >
> > > The commandButton that's clicked is...
> > > <h:commandButton immediate="true"  value="Cancel"
> > > action="#{managerDocument.abortSaveNCM }"/>
> > >
> > > The code called is (or not called in this case, since I never hit the
> > > break point on it)...
> > >     public String abortSaveNCM() {
> > >         //insert any bus logic here
> > >         return ("abort");
> > >     }
> > >
> > > The faces-config.xml contains for the page that is displayed...
> > >   <navigation-rule>
> > >     <from-view-id>/jsp/theNCM.jsp</from-view-id>
> > >     <navigation-case>
> > >       <from-outcome>abort</from-outcome>
> > >       <to-view-id>/jsp/taskList.jsp</to-view-id>
> > >       <redirect/>
> > >     </navigation-case>
> > >   </navigation-rule>
> > >
> > > The URL shown after I click the commandButton...
> > > http://localhost:8080/ebusiness/view/task/jsp/theNCM.jsp
> > > HTML:      HTTP Status 404 - /view/task/jsp/theNCM.jsp
> > >
> > > A screen shot of the page I get from the sevlet...
> > > http://www.porter.eu.com/jeff/1a.JPG
> > >
> > > A screen shot of the page I get when I click the "cancel" commandButton
> > > http://www.porter.eu.com/jeff/2a.JPG
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Simon Kitching [mailto:[EMAIL PROTECTED]
> > > Sent: 13 January 2006 06:01
> > > To: MyFaces Discussion
> > > Subject: Re: How can I redirect from a servlet to a JSF page (that
> > > isbacked by a bean)?
> > >
> > > Hi Mike,
> > >
> > > I've gathered the info posted so far and created this page:
> > >   http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls
> > >
> > > Anyone who actually gets this working, please review the wiki page and
> > > make any necessary corrections/enhancements!
> > >
> > > Cheers,
> > >
> > > Simon
> > >
> > > Corrections or enhancements
> > > On Wed, 2006-01-11 at 13:50 -0500, Mike Kienenberger wrote:
> > >
> > >> If nothing else, this question has been asked enough times that
> > >> someone who's using it or has ideas how to solve it should write up a
> > >> wiki page on the topic :)
> > >>
> > >> On 1/11/06, Volker Weber <[EMAIL PROTECTED]> wrote:
> > >>
> > >>> Hi Jeffrey,
> > >>>
> > >>> you are in the situation to serve a Non-Faces Request to a Faces
> > >>> Response as described in the jsf 1.1 spec in section 2.1.1.
> > >>>
> > >>> Take a look at tobagos NonFacesRequestServlet [1] how this situation
> > >>> could handled.
> > >>>
> > >>> I don't know if there is somthing like this in tomahawk, could be a
> > >>> candidate for commons.jar.
> > >>>
> > >>> Regards,
> > >>>   Volker
> > >>>
> > >>> [1]:
> > >>>
> > >>>
> > > http://svn.apache.org/viewcvs.cgi/incubator/tobago/trunk/tobago-core/src
> > > /main/java/org/apache/myfaces/tobago/servlet/NonFacesRequestServlet.java
> > > ?view=markup
> > >
> > >>> Jeffrey Porter wrote:
> > >>>
> > >>>> Hello all.
> > >>>>
> > >>>>
> > >>>>
> > >>>> I have the situation where I want to send a URL out in an email
> > >>>>
> > > for a
> > >
> > >>>> person to click on, so that they can then see a page in my system.
> > >>>>
> > >>>>
> > >>>>
> > >>>> Normally I'd have a backing servlet that takes the parameters in
> > >>>>
> > > and
> > >
> > >>>> redirects to the page I want the user to view.
> > >>>>
> > >>>> But since I'm using myfaces, I don't know how to redirect to a JSF
> > >>>>
> > > page.
> > >
> > >>>>
> > >>>> In this case I'm at a complete loss to where I should start.
> > >>>>
> > >>>>
> > >>>>
> > >>>> Can some one please prod me in the correct direction.
> > >>>>
> > >>>>
> > >>>>
> > >>>> Thanks
> > >>>>
> > >>>> Jeff
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>> --
> > >>> Don't answer to From: address!
> > >>> Mail to this account are droped if not recieved via mailinglist.
> > >>> To contact me direct create the mail address by
> > >>> concatenating my forename to my senders domain.
> > >>>
> > >>>
> > >
> > >
> > >
> >
> >
>
>
> --
> Matthias Wessendorf
> Zülpicher Wall 12, 239
> 50674 Köln
> http://www.wessendorf.net
> mwessendorf-at-gmail-dot-com
>


--
Matthias Wessendorf
Zülpicher Wall 12, 239
50674 Köln
http://www.wessendorf.net
mwessendorf-at-gmail-dot-com

Reply via email to