Results 1 to 4 of 4
  1. #1
    SunnyNanda is offline Member
    Join Date
    Oct 2014
    Posts
    2
    Rep Power
    0

    Lightbulb Redirect to login.xhtml Page from java code

    0 down vote favorite


    I am trying to redirect to login.xhtml which in flow folder through java code using JSF and Spring Web-flow.
    Redirect to login.xhtml Page from java code-capture.png


    Using below code: - It redirect to below path but not login.xhtml.

    ExternalContext ec = FacesContext.getCurrentInstance().getExternalConte xt(); ec.redirect(ec.getRequestContextPath() + "/beas/login");

    Error on browser - The page isn't redirecting properly

    tried NavigationHandler but it also unable to handle the redirect state

    NavigationHandler navigationHandler = facesContext.getApplication().getNavigationHandler (); // navigationHandler.handleNavigation(facesContext,nu ll,"/login?faces-redirect=true");


    Friends Please Help
    Attached Thumbnails Attached Thumbnails Redirect to login.xhtml Page from java code-capture.png   Redirect to login.xhtml Page from java code-capture.png  
    Last edited by SunnyNanda; 10-06-2014 at 01:19 PM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    25

    Default Re: Redirect to login.xhtml Page from java code

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    SunnyNanda is offline Member
    Join Date
    Oct 2014
    Posts
    2
    Rep Power
    0

    Default Re: Redirect to login.xhtml Page from java code

    Quote Originally Posted by DarrylBurke View Post


    Pls tell the meaning of this reply !!

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    25

    Default Re: Redirect to login.xhtml Page from java code

    Quote Originally Posted by SunnyNanda View Post
    Pls tell the meaning of this reply !!
    Click here

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. create login page and how to java application
    By srinivas2939 in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 12-06-2011, 06:30 PM
  2. Java - Swing - LOGIN Page
    By jim in forum AWT / Swing
    Replies: 2
    Last Post: 10-10-2011, 09:29 AM
  3. extract text from xhtml page using jdom
    By nijil in forum New To Java
    Replies: 7
    Last Post: 02-23-2010, 07:50 PM
  4. Java Login Page
    By turkuaz07 in forum Advanced Java
    Replies: 1
    Last Post: 03-14-2009, 09:18 PM
  5. redirect page within a java applet
    By paul in forum Java Applets
    Replies: 1
    Last Post: 08-07-2007, 05:11 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •