FacesContext.getCurrentInstance().getExternalContext().redirect("
http://www.google.com";);

?

On 6/21/07, Stéphane Poirier <[EMAIL PROTECTED]> wrote:
True, forgot the redirect... yet I still get an error :

javax.servlet.ServletException: Illegal view ID http://www.google.com. The
ID must begin with /
javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:210)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:167)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:140)
org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:93)

I'll see what I can do with ViewHandler.


On 6/21/07, Andrew Robinson <[EMAIL PROTECTED] > wrote:
> Did you have redirect set in the navigation rule (it is required)?
>
> Have a look at the NavigationHandlerImpl.java for the exact code to
> determine the behavior.
>
> On 6/21/07, Stéphane Poirier <[EMAIL PROTECTED]> wrote:
> > Full URL doesn't work, I just get a load of error (See bellow). The
ViewId
> > solution sounds like a great solution. BTW, what is the
> > ExternalContext.dispatch() doing?
> >
> > Thanks!
> >
> > (...)
> > 2007-06-21 11:14:47
> > org.apache.myfaces.trinidad.context.RenderingContext
attach
> > ATTENTION: Trying to attach RenderingContext to a thread that already
had
> > one.
> > (...And many, many more)
> >
> >     at javax.faces.webapp.FacesServlet.service
> > (FacesServlet.java:245)
> >     at
> >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> >     at
> >
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java
> > :206)
> >     at
> >
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
> >     at
> >
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
> >     at
> >
org.apache.catalina.core.ApplicationDispatcher.doForward
> > (ApplicationDispatcher.java:403)
> >     at
> >
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
> >     at
> >
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
> >      at
> >
org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
> >     at
> >
org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch
(FacesContextFactoryImpl.java
> > :259)
> >     at
> >
com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:439)
> >     at
> > com.sun.faces.application.ViewHandlerImpl.renderView
(ViewHandlerImpl.java:114)
> >     at
> >
org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView
> > (ViewHandlerImpl.java:182)
> >     at
> > com.sun.faces.lifecycle.RenderResponsePhase.execute
(RenderResponsePhase.java:106)
> >     at
> >
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
> >     at com.sun.faces.lifecycle.LifecycleImpl.render
> > (LifecycleImpl.java:144)
> >
> >
> >
> >
> > On 6/21/07, Andrew Robinson <[EMAIL PROTECTED]> wrote:
> > > I believe a full url (with the scheme) as a view ID will navigate to
that
> > page
> > >
> > > for example, use:
> > > http://somehost/somecontext/somepage.jsp
> > >
> > > If that doesn't work for you (having to put that in there), you may
> > > have to use a custom navigation handler or view handler and catch the
> > > external link and send a redirect from inside those components.
> > >
> > >
> > >
> > >
> > >
> > > On 6/21/07, Stéphane Poirier <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > I'm wondering if it's possible, using navigation-cases, to add
> > communication
> > > > between different JSF applications (or even from a JSF application
to a
> > > > non-JSF app)? I know an getExternalContext().redirect can be used
but if
> > > > there is a more standard and clean way to do this, I'd be glad to
know.
> > > >
> > > > Thanks in advance!
> > > >
> > >
> >
> >
>




--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org

Reply via email to