Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSF
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JSF
Navigation from JSF page to Non JSF page
Abiodun Adisa
Ranch Hand
Posts: 495
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am writing an application and I want the page to be navigated from a
JSF
page to an external Page (non-JSF) whenever the user clicks a command Button.Like when a user clicks the command button the page navigates to
http://www.mypage.com
Vassili Vladimir
Ranch Hand
Posts: 1585
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
Do the following:
FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); HttpServletResponse response = (HttpServletResponse)externalContext.getResponse(); try { response.sendRedirect( "The Resource You Want To Redirect To ..." ); } catch ( IOException ioException ) { ioException.printStackTrace(); }
I hope that this helps ...
Best of luck ...
Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Roberto Badaro
Greenhorn
Posts: 3
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi.
You must use "responseComplete()" to terminate phaseListener execution:
response.sendRedirect("The Resource You Want To Redirect To ..."); FacesContext.getCurrentInstance().responseComplete();
See more detail in method's javadoc.
-----------------------<br />Roberto Badaro<br />MG/Brasil
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Opening a url at Runtime
IllegalStateException on page load
Resetting UIViewRoot
Tomcat and SSL
myfaces-impl-1.1.3 instantiates the request scope bean
More...