How to make login page navigate to last visited page?

Hi,
In our application, there are many public pages. In certain page, users need to login and then add or edit something. But login page will navigate to page 1 by default. Uses need to click some times to locate the last visited page.
I defined a new applicate item "LASTPAGE", and a new application process "setpage":
begin
if :APP_PAGE_ID!=101 then
select :APP_PAGE_ID into :LASTPAGE from dual;
else
select 1 into :LASTPAGE from dual;
end if;
end;
"setpage"'s process point is "On Load: Before Header(page template header)"
In login page 101, log in process is like following:
wwv_flow_custom_auth_std.login(
P_UNAME => :P101_USERNAME,
P_PASSWORD => :P101_PASSWORD,
P_SESSION_ID => v('APP_SESSION'),
P_FLOW_PAGE => :APP_ID||':'||:LASTPAGE
But the thing is it does not work. Log in page still go to page 1.
Best regards,
Qiang.
Message was edited by:
user535779

Hi Scott,
I would like to branch at the page that I am trying to get to from page 101.
Let say page 12 Requires Authentication
When I am not logged in , and I try to access Page 12 , I get branched to page 101 (login page).
Now , from page 101 , I would like to branch to the page I was trying to access , in this case Page 12
wwv_flow_custom_auth_std.login(
P_UNAME => :P101_USERNAME,
P_PASSWORD => :P101_PASSWORD,
P_SESSION_ID => v('APP_SESSION'),
P_FLOW_PAGE => :APP_ID||:APP_PAGE_ID
The problem is that APP_PAGE_ID contains 101 and not 12
Francis.

Similar Messages

  • How to make Login Page in ADF?

    Hi,
    Can anyone suggest me, how to make Login Page in ADF.
    I am new on ADF, is any sample code or application is there than it will be helpful for me.
    please reply its urgent.
    Thanks,
    Ramit Mathur

    HI,
    Jspx code
    <af:panelFormLayout id="pfl1" binding="#{loginBean.mainForm}">
    <f:facet name="footer"/>
    <af:inputText label="Username" id="it1"
    value="#{loginBean.username}"
    binding="#{loginBean.usernameId}"
    required="true"/>
    <af:inputText label="Password" id="it2" secret="true"
    value="#{loginBean.password}"
    binding="#{loginBean.passwordId}"
    required="true"/>
    <af:spacer width="1px" height="20px" id="s3"/>
    <af:panelGroupLayout id="pgl3">
    <af:commandButton text="Submit" id="cb1"
    action="#{loginBean.doLogin}"/>
    <af:spacer width="85px" height="1px" id="s4"/>
    <af:commandButton text="Cancel" id="cb2"
    action="#{loginBean.clearFields}"/>
    </af:panelGroupLayout>
    </af:panelFormLayout>
    BackingBean code
    public String doLogin() {
    String un = _username;
    String pw = _password;
    // byte[] pw = _password.getBytes();
    FacesContext ctx = FacesContext.getCurrentInstance();
    System.out.println("ctx" + ctx);
    HttpServletRequest request =
    (HttpServletRequest)ctx.getExternalContext().getRequest();
    CallbackHandler handler = new SimpleCallbackHandler(un, pw);
    System.out.println("Handler" + handler);
    try {
    Subject mySubject = Authentication.login(handler);
    System.out.println("mySubject" + mySubject);
    ServletAuthentication.runAs(mySubject, request);
    ServletAuthentication.generateNewSessionID(request);
    String loginUrl =
    "/adfAuthentication?success_url=/faces" + ctx.getViewRoot().getViewId();
    System.out.println("loginUrl---" + loginUrl);
    HttpServletResponse response =
    (HttpServletResponse)ctx.getExternalContext().getResponse();
    System.out.println("response---" + response);
    // loginUrl = "/adfAuthentication?success_url=/faces/WelcomeScreen1.jspx";
    sendForward(request, response, loginUrl);
    System.out.println("---" + response);
    } catch (FailedLoginException fle) {
    FacesMessage msg =
    new FacesMessage(FacesMessage.SEVERITY_ERROR, "Incorrect Username or Password",
    "An incorrect Username or Password" +
    " was specified");
    ctx.addMessage(null, msg);
    } catch (LoginException le) {
    reportUnexpectedLoginError("LoginException", le);
    return null;
    private void sendForward(HttpServletRequest request,
    HttpServletResponse response, String forwardUrl) {
    FacesContext ctx = FacesContext.getCurrentInstance();
    System.out.println("sendForward--ctx--" + ctx);
    RequestDispatcher dispatcher =
    request.getRequestDispatcher(forwardUrl);
    System.out.println("sendForward--dispatcher--" + dispatcher);
    try {
    dispatcher.forward(request, response);
    } catch (ServletException se) {
    reportUnexpectedLoginError("ServletException", se);
    } catch (IOException ie) {
    reportUnexpectedLoginError("IOException", ie);
    ctx.responseComplete();
    // 12.Implement a reportUnexpectedLoginError() method:
    private void reportUnexpectedLoginError(String errType, Exception e) {
    FacesMessage msg =
    new FacesMessage(FacesMessage.SEVERITY_ERROR, "Unexpected error during login ",
    "An incorrect Username or Password" +
    " was specified");
    FacesContext.getCurrentInstance().addMessage(null, msg);
    e.printStackTrace();
    }

  • How to make login page??

    hi expert ADF developer,
    I am using oracle ADF 11.1.2.2.0 (oracle Jdevelopr 11g release 2) in my job environment. There are 3000 users working as client level in our company. They have separated user Id. They can change their passwords.passwords which is handle by in database level.
    My main problem is how we can handle number of employees using Oracle ADF security configuration.
    second one is how user can change their passwords.
    Third is how number of employees going to terminate ,handle their Active/Inactive State.
    Fourth one is If we use this Oracle Security system ,project managers or project cordinator or Adminstrator level authenticator must need to deploy time to time war file, because of adding removing users in jazn-data.xml.
    hoping help from you.

    Duplicate :
    Oracle ADF Security Login page

  • How to disable login page in an application

    how to disable login page in an application

    Hi Alekh,
    To turn off authentication you must create and make current a No Login Authentication authentication scheme.
    or change Page / Security / Authentication as "Page is Public"
    Regards,
    Benz

  • How to make a page break in numbers

    The only way I found to make a new page in Numbers was to make new rows down to where the page would break, but it's only letting me add a few new rows to the new page.  I'd like to know how to make a page break without just adding rows.

    Hi Yellowbox,
    Still I'm not convinced, it gives you indeed some advantages but this page break is a great fault.
    All the company is working on Apple, we try even to keep Microsoft away but what when you make a quote of several pages and have to make your lay out at the end, it is a pain in your xxx to make it well.
    We cannot make different tables for each page nor I want to make it in Pages with a Numbers table.
    Secondly, what do you do when you get a Excell offer that you want to bring to Numbers.
    It opens well but again, you need to make all the page lay out afterwards!
    Thanks for yoru reply.
    It won't change my mind about Apple and Microsoft but for timing earning I won't changes all Excel offers to Numbers anymore. Even if I do not want, it would take me less time to work it out in Excel.
    Our own offers will remain in Numbers ...
    It is a pity but time is so important nowadays!
    Nice week-end.

  • How to make turning page with ibooks author?

    How to make turning page with ibooks author?

    This question has been answered on this thread
    https://discussions.apple.com/message/17981772#17981772#17981772
    Best regards.
    Alex

  • How to make a page header

    how to make a page header

    Lynn,
    Numbers 3 currently doesn't have page headers.
    However, there are some workarounds that can achieve the effect of having headers (though, for footers, you're limited to page number).  See this in Print Preview:
    You can set up extra Header Rows in your table and have them repeat on each printed page. The Table Name only shows on the first printed page, so you may want to uncheck Table Name before printing:
    See this thread for an example of how this workaround worked for one user.
    SG

  • How to make the phone's battery last longer ?

    Hi everyone,
    i am wondering if there is any difference when the battery is fully desharged thus the phone swithes off , and then you plug it into the power outlet to be charged.
    or if it is not fully decharged, and it has some one or two battery bars on the upper right corner of the display, and you set it to be charged, is there any signifficant difference between these two states ?
    is there any official or technical advice on "How to make the phone's battery last longer " ??
    thanks in advance.

    It depends on the battery.
    Charging the battery when there is some power in it is especially bad for NiMH batteries. The loss of power is called "memory effect" - battery "remembers" that it does not get fully utilized and over time starts supplying less power.
    But new Nokias come with Li-Ion or Li-Polymer and the effect on these being charged when there is still power in them is negligible. Especially for the Li-Polymer ones.
    See here about batteries and "memory effect":
    http://en.wikipedia.org/wiki/Battery_%28electricity%29#Life_of_rechargeable_batteries
    http://en.wikipedia.org/wiki/Memory_effect
    Here's more info on types of batteries:
    http://en.wikipedia.org/wiki/Li-Ion
    http://en.wikipedia.org/wiki/Lithium_polymer_cell
    Ericsson T10i -> Nokia 7110 -> Siemens C45, C55, M55, M65 -> Nokia 6131, N73, N82 -> HTC Wildfire, Desire HD -> Nokia Lumia 800 -> HTC Desire X -> Lumia 820 -> Sony Xperia SP -> Lumia 925 + Sennheiser CX 500
    If I've helped, use the Kudos button to thank

  • How to make a page reload

    Hi every body, and thank you for reading my post, here's the question I have
    Does anybody know how can I make a page reload???
    Thank's

    If you mean how to make the page reload when someone pushes a button or clicks an action component such as a hyperlink, then have that component's action method return null. To create the action method for a component, double click the component in the Visual Designer.
    To make the page reload after someone selects from a drop-down or list, or when the user changes the value in an input text field, right-click that component and choose Auto-Submit on Change.
    Chris

  • When the page will be load how to make the page blank in run time

    Dear
    when i will run the page the fields shoud come with blank Field.
    i want to make it in runtime.
    example- i have one page having employees data. but when i will run that page the data will not come only blank fields should come, after thar i will create.

    duplicate how to make the page blank field in runtime

  • How to create Login page in Jdev11.1.1.4

    Hi All,
    can anyone please share how to create Login Page in Jdev11.1.1.4
    TIA,
    Bob
    Edited by: Bob on Feb 18, 2011 12:40 AM

    Bob,
    [url http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/adding_security.htm#BABDEICH]The documentation tells you how.
    John

  • How to make the page expired when user click back

    how to make the page as expired when i click back button on the browser.
    i want a better way.
    actually i have a timer.when it reaches 00.00 then the expired page will be called automaticlly using location.href="expired.jsp" then if the user clicks back it should not show the previous page.this concept is applied with paging concept
    response.setheader is not working ...
    i have redirect when click back using
    <body onunload>....i call another page here.
    but it is not a good way.
    so pls help me to solve this problem
    using session or another good way

    Use this instead.
    Frame.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);

  • I installed ShopAtHome toolbar, now Yahoo has hijacked my new tab. How do I fix this to the last visited tabs?

    I installed ShopAtHome toolbar, now Yahoo has hijacked my new tab. How do I fix this to the last visited tabs?
    Multiple forums have addressed the fact that Yahoo is hijacking new tabs. I installed the ShopAtHome toolbar - which I love - but then I get Yahoo installed (mysteriously and uninvited).
    I would like the new tab to reset to its default of: either the panels of previous sites, or the blank page. The prior issues relating to netassistant do not work.
    Any help would be appreciated.

    Hi,
    You can try to right-click and '''Reset''' the key '''browser.newtab.url''' in [http://kb.mozillazine.org/About:config about:config] or '''Modify''' and enter '''about:blank'''.
    [http://kb.mozillazine.org/About:config_entries about:config Entries]
    The [https://services.addons.mozilla.org/en-US/firefox/discovery/addon/config-descriptions/ Config Descriptions] add-on adds helpful source comments in about:config.
    [https://support.mozilla.org/en-US/kb/new-tab-page-show-hide-and-customize-top-sites New tab page]
    If the issue returns, you can try to check/change the '''Options''' for ShopAtHome in Firefox '''Tools''' ('''Alt''' + '''T''') > '''Add-ons''' > '''Extensions''', or in the toolbat itself.
    [https://support.mozilla.org/en-US/kb/Using%20extensions%20with%20Firefox Using extensions]

  • How can I disable the "go to last visited slide" option in captivate?

      Can anybody  tell me how can I disable the "go to last visited slide" option in captivate so that every time when i launch my captivate file from a LMS, it WILL NOT go back to the last visited slide? I know that Lectora has a checkbox for this but i can't seem to find it in Captivate.

    Are you deploying on a LMS? In that case check the option 'Never Send Resum Data' in Preferences, Quiz, Reporting, LMS Customization Settings.
    If you are not deploying on LMS, check if Self-paced Learning is disabled in the TOC?
    Lilybiri

  • How to make Login in php and PHPMYSQL

    HI ALL ,,     
    i am new in dreamweaver .. so i  made an login page in dreamweaver Cs4 but it looks like it dosent  have what i want .. i want to write the usrname  after the user login "" when he enter the username and the password right then login form  disappear and show "" Welcome username "" and how many visits did he do"" also I want to make forget password and send mails from time to other and send him mail when the user register and so on so can  you please help me ... thanks
    thank you please I need this very much

    hi i know that i am not good in php
    But when i did what you told me in this link it appears that i didn't get it or there is something wrong
    this error shows to me ...
    Notice:  Undefined variable: row_getUserDetails in E:\wamp\www\......\H.L\j.\tagarob 1.php on line 52
    Notice:  Undefined variable: row_getUserDetails in E:\wamp\www\......\H.L\j.\tagarob 1.php on line 52
    Welcome,
    thank you
    kareem

Maybe you are looking for