Help with implementing a login page - ADF Faces & 10.1.3

I am having trouble getting a basic login page working and am hoping someone can help. I'd like to have a login page with username and password fields and a submit button. When submitted, I would like to authenticate the user and either send them to a second page if I find the username & password, or return them to the login page and display a global JSF message if I can't find the username/password info. Pretty standard stuff.
I've got an app module that contains a read-only view object, which has a custom method (in MyViewImpl.java) that checks the username & password against a database table and returns a boolean. I don't have an entity object since it's a read-only view.
I've tried 2 different approaches:
1) Binding the username and pw inputText fields to the parameters of my custom method, and binding the submit button to the custom method, all done by drag and drop from my data controls.
The problem with this approach is that I cannot figure out how to set the global message if the username/password combo is invalid. Once my method is invoked, it returns an "action" String and page navigation occurs (In this case, I have my custom method return a String instead of a boolean). If login fails, at what point do I set the global message?
2) Using a backing bean for my login page and binding the fields and the button to the bean, and setting the button's action to a method in the bean, which then calls my custom method. Finally, either set the message or navigate based on the boolean returned from my method.
This seems the better approach, since it keeps the navigation and error message in the ViewController. The problem here is that I can't figure out how to call my custom method from my backing bean. I've seen a few examples, including one using a managed property and calling the action binding's invoke() method, but haven't had any luck (see #51 on this page: http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html). The invoke() method does not return a value, so I cannot get the boolean value I need.
So, I'm apparently missing a piece (or two or three) of the puzzle here. Any guidance is most welcome! And I'm fine with changing any piece of this puzzle if there's a better way of accomplishing this.
Thanks,
Andy

Frank,
Thanks for your reply. I'm not sure if container managed authentication is a good fit or not for my current application, so I will have to look into the details of how it works. Thanks for the suggestion. Whether I use it or not, I will still need to authenticate against a database and not a flat file due to the fact that users may come and go and change passwords frequently, and my application will not be handling the management of that.
So, I would be still left with the task of accessing the ViewObject and navigating/displaying a message based on the results of that lookup. Fortunately, after slogging through my code and consulting the ADF documentation that is scattered throughout the Oracle website, I was able to get the login page working as I wanted (I found the "Accessing Bindings and Binding Containers from JSF Backing Beans" section of http://www.oracle.com/technology/products/jdev/tips/muench/1013eabinding/index.html to be especially helpful). I used the submit button's action to call a method in the backing bean that sent the username and password to my application module's custom authentication method. When I got the boolean result, I either returned a "success" action or set a global JSF message and returned "null".
Needless to say, I am looking forward to the ADF/JSF version of the Toystore application, along with some sort of comprehensive framework documentation.
Thanks,
Andy

Similar Messages

  • Help with Coldfusion 5 login page

    Hi
    I want to setup a login page for my company website. This is running in Coldfusion version 5(I know its very old version). I never worked with Coldfusion before. Is there any setting in Control panel that we can require user to login to view any of our contents? or do we have edit all the pages and redirect to a login page if thats a not registered user? Please advice me.
    I cant upgrade this server to new version,because this project contract is finishing end of this year.
    Thanks
    Ananth

    You want to search up the "Application.cfm" file.
    In ColdFusion this file is automatically included at the beginning of all .cfm files requested from the same directory or any sub-directroy that does not have another Application.cfm file.  It is a common place to put login logic and other code that needs to be executed with every ColdFusion request.
    You will also want to know about the <cfapplication ...> tag that is used to name an application and provide access to applicaiton and session state scopes so that a login state can be maintained from request to request.
    A great resource would be the ColdFusion documentation that has entire chapters compete with sample code on how to set up web site authentication:
    Using the Application Framework
    Application Security
    http://www.adobe.com/livedocs/coldfusion/5.0/

  • Need some help with: implement email notification on note board within a page layout (javascript)

    Dear all,
    I have a quite specific issue in which I'm in need of some guidance and help!
    Within our SharePoint I have created a custom page layout. This is a simple page to post some content (news) and a standard Note Board is implemented.
    Every time a news item is placed, this is done by our communication departement, this page with standard layout is placed as a page in a page library. When there are no comments on that particular item/subject I found a solution to replace the standard SharePoint_no_posts-text
    by placing a contenteditor web part in the Page Layout with a reference to a textfile with some javascript in it. This works perfectely.
    The only thing left is that I want to automatically send an email to the contact (which is defined when making the news item) everytime someone posts a new comment. Here is where I need some help!
    We don't really use mysites so I was wondering if someone could tell how I could do this by for example some code (javascript) which I can implement in the Page Layout.
    Can anyone help me?
    Thanks in advance,
    Gr Matt

    Try below code:
    function sendMail() {
    var link = 'mailto:?subject=insert subject line&body=';
    var curntLoc=window.location.href;
    link +=escape(curntLoc);
    window.location.href = link;
    // window.location.href = link;
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/9cfe7884-fc9e-4c7c-a44c-f740d2edcafc/sending-email-using-javascript-in-sharepoint-2010
    Also check below:
    http://spjsblog.com/2010/06/16/send-email-with-javascript-with-the-help-of-a-workflow-in-a-dedicated-send-email-list/

  • ADF 11g:Error When running login page: ADF security

    I am using Jdeveloper 11.1.1.2.0.Based on the following post
    http://blogs.oracle.com/fusionmiddlewarereallife/adf11gsecurity.html when I am running the application I am getting following error in web browser:-
    Error 403--Forbidden
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    +10.4.4 403 Forbidden+
    The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
    Steps to reproduce the error:-
    1) Unzip the lession6.zip file (http://blogs.oracle.com/fusionmiddlewarereallife/Lesson6.zip)
    2) Open application in your Jdeveloper and run the login.html page.
    3) In the login page,give user id as "James" and password as "welcome1"
    4) You will see above error.
    I have tested the above in Firefox 3.6.3 and IE7.*Please note that when you run the PublicPage.jspx, application works fine*. Its not working in the case when you are running the application using login.html
    I have checked the Adnrejus post on this error(http://andrejusb.blogspot.com/2009/12/solving-error-403-forbidden-in-adf.html), but weblogic.xml is generated with required entries.
    Can anyone help me in this please:-
    Thanks,
    Vikram

    Me too have tested the application by running the public page. Its working fine.
    But my hole point here is, why application is not moving to the PrivatePage.jspx from login page. Means why can't we directly run the login page and access the PrivatePage. Even when success_url is configured in web.xml
    <servlet>
    <servlet-name>adfAuthentication</servlet-name>
    <servlet-class>oracle.adf.share.security.authentication.AuthenticationServlet</servlet-class>
    <init-param>
    <param-name>success_url</param-name>
    <param-value>/faces/PrivatePage.jspx</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    Thanks again,
    Vikram

  • Need help on customizing a login page in APEX 3.0

    I am new to APEX 3.0 and I am trying to add another field to the standard login page. Basically, I would like to keep the username password field and add a PIN number and/or challenge question to the login 101 page. The user would enter a PIN # and/or response to a challenge question in addition to the username password and have it all processed to allow a login. In addition, if the user enters the correct PIN# and/or Challenge, I want to execute this code " EXECUTE IMMEDIATE DBMS_SESSION.SET_IDENTIFIER (':p101_client_id'). P_101_client_id being the item name I 've added to the login 101 page which should be initialized to the value entered as the PIN# Can anyone help me? Thanks!

    Thanks for your response. I have an FGAC policy defined on a particular table to allow/disallow access to the table data. The policy in place is similar to this function:
    BEGIN
    IF (SYS_CONTEXT('USERENV','OS_USER')='ODS-SV1\George Jucan' AND
    -- SYS_CONTEXT('USERENV','IP_ADDRESS')='192.168.0.2' AND
    SYS_CONTEXT('USERENV','SESSION_USER')='APPSVR' AND
    SYS_CONTEXT('USERENV','TERMINAL')='ODS-SV1')
    OR
    (SYS_CONTEXT('USERENV','SESSION_USER') = 'SHIP2004' AND
    SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER')='Administrator')
    THEN
         cond := ' CARD_NO IS NOT NULL';
    ELSE
         cond := ' CARD_NO IS NULL';
    END IF;
    RETURN (cond);
    END sec_predicate ;
    With this in place, I can not see the data I need for a report I have created. Which is expected behavior. What I want to do is upon logon to my APEX application add a third box i.e. PIN#, in addition to the standard username password and have this pin number processed as the SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER')='Administrator') ('Administrator' being the correct "PIN"). If I go through SQL Plus and I have the correct login information mentioned in the above function, I can issue the dbms_session procedure initialized to 'Administrator' and gain access to the data. I do not want every database session to have acces to this data only the person(s) that meet the FGAC predicate. If not then you can not view this data. Other data can be visible. I am not sure how to implement this so my APEX interface can make use of my FGAC policy. Can you have a restriction on a particular page and/or page item that requests a "PIN" before you are allowed to view the page and/or item? I hope this provides more detail.

  • Help with implementing two different programs

    I need help with a couple of Java programs that I downloaded. I hope someone can help me. They work great if they're on their own, but if they are both on the same page, the 2nd one works, and the 1st one stops working. I'm pretty new to Java, so I don't know how to debug it too well.. Here's the 1st program:
    Conveyor belt slideshow script-
    ? Dynamic Drive (www.dynamicdrive.com)
    For full source code, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com
    //Specify the slider's width (in pixels)
    var sliderwidth="250px"
    //Specify the slider's height
    var sliderheight="19px"
    //Specify the slider's slide speed (larger is faster 1-10)
    var slidespeed=2
    //configure background color:
    slidebgcolor=""
    //Specify the slider's images
    var leftrightslide=new Array()
    var finalslide=''
    leftrightslide[0]='<img src="images/movingwords.gif">'
    ////NO NEED TO EDIT BELOW THIS LINE////////////
    var copyspeed=slidespeed
    leftrightslide='<nobr>'+leftrightslide.join(" ")+'</nobr>'
    var iedom=document.all||document.getElementById
    if (iedom)
    //Next line edited for readability
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">
    '+leftrightslide+'</span>')
    var actualwidth=''
    var cross_slide, ns_slide
    function fillup(){
    if (iedom){
    cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
    cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
    cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
    actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
    cross_slide2.style.left=actualwidth+20+"px"
    else if (document.layers){
    ns_slide=document.ns_slidemenu.document.ns_slidemenu2
    ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
    ns_slide.document.write(leftrightslide)
    ns_slide.document.close()
    actualwidth=ns_slide.document.width
    ns_slide2.left=actualwidth+20
    ns_slide2.document.write(leftrightslide)
    ns_slide2.document.close()
    lefttime=setInterval("slideleft()",30)
    window.onload=fillup
    function slideleft(){
    if (iedom){
    if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
    cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
    else
    cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+30+"px"
    if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
    cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
    else
    cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+30+"px"
    else if (document.layers){
    if (ns_slide.left>(actualwidth*(-1)+8))
    ns_slide.left-=copyspeed
    else
    ns_slide.left=ns_slide2.left+actualwidth+30
    if (ns_slide2.left>(actualwidth*(-1)+8))
    ns_slide2.left-=copyspeed
    else
    ns_slide2.left=ns_slide.left+actualwidth+30
    if (iedom||document.layers){
    with (document){
    document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
    if (iedom){
    write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
    //Next line edited for readability
    write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';
    background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
    write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
    write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
    write('</div></div>')
    else if (document.layers){
    write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
    write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
    write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
    write('</ilayer>')
    document.write('</td></table>')
    }Here's the 2nd program:
    //Fade-in image slideshow- By Dynamic Drive
    //For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
    //This credit MUST stay intact for use
    var slideshow_width='305px' //SET IMAGE WIDTH
    var slideshow_height='152px' //SET IMAGE HEIGHT
    var pause=5000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
    var fadeimages=new Array()
    //SET IMAGE PATHS. Extend or contract array as needed
    fadeimages[0]="images/Computer Retail Store.jpg"
    fadeimages[1]="images/Computer S&S ad.jpg"
    fadeimages[2]="images/Computer S&S ad 2.jpg"
    fadeimages[3]="images/Phone S&S ad.jpg"
    ////NO need to edit beyond here/////////////
    var preloadedimages=new Array()
    for (p=0;p<fadeimages.length;p++){
    preloadedimages[p]=new Image()
    preloadedimages[p].src=fadeimages[p]
    var ie4=document.all
    var dom=document.getElementById
    if (ie4||dom)
    //Next line edited for readability
    document.write('<div style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hidden">
    <div  id="canvas0" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left:0;filter:
    alpha(opacity=10);-moz-opacity:10"></div><div id="canvas1" style="position:absolute;width:'+slideshow_width+';
    height:'+slideshow_height+';top:0;left:0;filter:
    alpha(opacity=10);-moz-opacity:10"></div></div>')
    else
    document.write('<img name="defaultslide" src="'+fadeimages[0]+'">')
    var curpos=10
    var degree=10
    var curcanvas="canvas0"
    var curimageindex=0
    var nextimageindex=1
    function fadepic(){
    if (curpos<100){
    curpos+=10
    if (tempobj.filters)
    tempobj.filters.alpha.opacity=curpos
    else if (tempobj.style.MozOpacity)
    tempobj.style.MozOpacity=curpos/100
    else{
    clearInterval(dropslide)
    nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
    tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
    tempobj.innerHTML='<img src="'+fadeimages[nextimageindex]+'">'
    nextimageindex=(nextimageindex<fadeimages.length-1)? nextimageindex+1 : 0
    setTimeout("rotateimage()",pause)
    function rotateimage(){
    if (ie4||dom){
    resetit(curcanvas)
    var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
    crossobj.style.zIndex++
    var temp='setInterval("fadepic()",50)'
    dropslide=eval(temp)
    curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
    else
    document.images.defaultslide.src=fadeimages[curimageindex]
    curimageindex=(curimageindex<fadeimages.length-1)? curimageindex+1 : 0
    function resetit(what){
    curpos=10
    var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
    if (crossobj.filters)
    crossobj.filters.alpha.opacity=curpos
    else if (crossobj.style.MozOpacity)
    crossobj.style.MozOpacity=curpos/100
    function startit(){
    var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
    crossobj.innerHTML='<img src="'+fadeimages[curimageindex]+'">'
    rotateimage()
    if (ie4||dom)
    window.onload=startit
    else
    setInterval("rotateimage()",pause)Like I said, if the 2nd program is put the same page with the 1st, the 1st program stops working. Any ideas? I would really like to implement both of these programs.

    The code you post is javascript, NOT java ! ... but either way, maybe the scripts have variables in conflict, so if you pack each piece of code in diferent functions and then you call the functions it may work.

  • Help in Changing the Login page

    Hi,
    I am new to this field.I have a requirement like follows " Need to remove the feature (forgot user id?) in both the admin and user login page.I have searched all the JSP's but with no result.Can someone help me in finding where can find these links so that i can remove them .
    Thanks in advance.

    Good news, the answer is very simple.
    In the System Configuration object, you will find the following piece of code:
    <Attribute name='disableForgotUserId'>
    <Boolean>false</Boolean>
    </Attribute>
    You have to modify more then one entry for User and Admin interface.
    To modify this object go to /idm/debug/, List Objects -> Configuration and fin System Configuration.

  • Can anyone help regarding the Admin Login page and Normal User Page.

    Hi Friends,
    I have worked on normal login page it has been worked well. But now i have to create the Admin login page. That means, I have written the code in the following way.
    public String userLogin_action() {
            // TODO: Process the button click action. Return value is a navigation
            // case name where null will return to the same page.
            com.sun.sql.rowset.CachedRowSetXImpl crs = new com.sun.sql.rowset.CachedRowSetXImpl();
            String Name =  getUserName().getText().toString();
            String password =  getUserPwd().getText().toString();
             try {
                crs.setDataSourceName("java:comp/env/jdbc/Employee");
                crs.setCommand("SELECT * FROM srni.UserTable");
                crs.setTableName("UserTable");
                crs.execute();
                crs.beforeFirst();
                while(crs.next()){
                info("Cursor is been moving");   
                boolean ok = crs.getBoolean("Admin");
                info("Value of ok:" + ok);
                String Username = (String) crs.getObject("UserName");
                info("Usernames are:" + Username + Name);         
                if(Username.equals(Name)&&(ok)){
                info("Login Successfull");
                java.util.Date Date = new java.util.Date();
                info(" Admin Logged on :" + Date);
                return "toUserPage";
                info("Login Failed or Admin doesn't exist");
            catch (Exception e) {
                error("Login Failed : " + e.getMessage());
            } finally {
                crs.close();
            return null;
        }You can see there that i have used the boolean type of value for verifying wheter the user is admin or not. If the admin type of column in database is true then it must allow the admin to certain page. Otherwise it must not redirect. So i have used this logic. When i am checking it is showing everything true,but it is not redirecting and it is saying that login failed. Please try the above code with a sample database table and verify it. You can see the output like this.
    Cursor is been moving
    Value of ok:true
    Usernames are: srinu srinu //here it must not go to next cursor,because srinu has been identified, but it is not behaving like that.
    Cursor is been moving
    Value of ok:false
    Usernames are: Chandu srinu
    Cursor is been moving
    Value of ok:false
    Usernames are: kirank srinu
    Login Failed or Admin doesn't exist The above output describes that it is moving the cursor from first row to the last row and checking all the usernames i n each row with the given username, and it is also checking wheter it is admin or not. Currently i have three rows so it is moving three times. It is retreiving every value correctly but in comparing it is not comparing. What to do.
    Please help me out from this problem.
    Thanking You in Advance.

    The buttons are all created using the same library object (but MC), except for the code you have in the revised file does not call on that for the con button.
    You have it calling on something with a linkage name of "con", which a quick check tells me doesn't exist--so it is undefined in the code when you try to use it.  I found this by using trace(newConBut._x); after its _x value was assigned, as I mentioned you should try.   So the first thing you want to do is change the following line from...
    var newConBut = _root.attachMovie("con", "conbut", _root.getNextHighestDepth());
    To
    var newConBut = _root.attachMovie("but", "conbut", _root.getNextHighestDepth());
    so that it uses the but MC that serves that purpose in the library.  Then you want to correct the _x assignment of the buttons to what I think you had earlier...
    newConBut._x = 650-newConBut._width;
    newRecBut._x = newConBut._x-newRecBut._width;
    Here is a picture of what those changes do (note, without the XML file I had to finagle things just to work, so the biutton labels aren't what they will be)...

  • Help with using a web page from disk after saved from web

    Hi, I almost forgot the little I learned about web page development, so, I'm a total noob when it comes to this and I need your help.
    I saved as a complete web page on my hard disk this web page but when I open it in Firefox or IE, it doesn't display as much as I need it. I'm mostly interested  in displaying the logo images as they appear on the original web page. The browsers just show them briefly when refreshing but hide them right away. I can see the image files downloaded to my hard drive and if I open the page in Dreamweaver it displays these images  in the preview pane but I can't make them show in the browsers. From Dreamweaver I saved the page as in the folder where the images are and this also updated the code with the relative image links but the browsers still don't show them.
    I will greatly appreciate your help with this.

    I'm sorry, but your post is very confusing
    I saved as a complete web page on my hard disk this web page
    Does this include site definitions?
    when I open it in Firefox or IE, it doesn't display as much as I need it.
    I dont know what this means...are there images that are not being displayed?  Is there styling that is not being rendered?
    . I'm mostly interested  in displaying the logo images as they appear on the original web page. The browsers just show them briefly when refreshing but hide them right away.
    Again, I dont know what this means?
    I can see the image files downloaded to my hard drive and if I open the page in Dreamweaver it displays these images  in the preview pane but I can't make them show in the browsers. From Dreamweaver I saved the page as in the folder where the images are and this also updated the code with the relative image links but the browsers still don't show them.I will greatly appreciate your help with this.
    Do you have a link to the page, and perhaps some explanation that is more clear as to what your issue is.
    Gary

  • Help with some java login code

    hey,
    I am a new member but used to visit the site regularly. I am undergoing a java project and I cannot seem to get my head around how to code when users log in, there name must appear at the top of each page they visit.
    User enters name into a text box. Do I use getter and setter methods? any bit of help would be of some advantage to me.
    Thanks for your time and I'll help with anyone else who is stuck.

    if JSP or servlet use Session...
    if you are using frame you have to consider... which frame is a top parent. that top frame will have the set and get method.. for you to set and retrieve the user name.. bear in mind that different object will have different user...
    so you have to play fair game ...hehehehe :-)

  • Need help with an "exit door" page

    My office has a page on our webserver that serves as an "exit door". It basically tells you when you're leaving our site (they do this because it's a gov't site, and thus rquired) and you have to click on a link to confirm that you want to leave.
    The way it works is that when you code a page with a link that needs an exit door, you prepend the url with "exit.cfm?link=" and then the URL. It works adequately on simple URLS that pass no parameters. Where it has a problem is when a URL has GET arguments like ?page=23&item=43.
    The original coder used URL.link, which of course only captures the first GET argument. As a work-around, we're required to edit the target URLS being passed to the exit door and replace things like &amp; and # with [amp], [pound], etc. Needless to say, this gets rather tedious, so I decided to have a look at that old exit door page to see what I could do with it.
    After playing around a bit, I achieved  a reasonable level of success by using the following:
    #xmlformat(ListDeleteAt(CGI.QUERY_STRING,1,"="))#
    This gives me a properly encoded full URL to use as a link on the exit door page. But there's one problem. If there's a link that contains an anchor (like foo.com#section1) it doesn't capture the anchor. The # and what's after it isn't being passed.
    I'm trying to figure out how to make this work.  Has anyone else here had to make an exit door, and if so, how did you do yours?

    Thanks mack.  I'm starting to think the answer to this is "it can't be done".  Which is probably why my predecessor was replacing &amp;s with [amp]s.
    What led me to try to change this was that I was trying to build a regex for Dreamweaver that changed things like &amp; and # to [amp] and [pound], but only when the URL began with the exit door page URL.  I was only able to get my regex to replace one occurance of an item per pass, which sort of defeated its purpose.  So I decided to change the exit door page instead.
    Maybe I'll go back to trying to get the regex to work.
    Ian, thanks for your help as well.

  • PLEASE HELP: Need some help with coding a next page button.

    so ok, in details, I'm trying to code a next page button and can't really figure out how and tried to look for them over the net but can't find the kind I am looking for. So ok, the kind of next page button I'm looking for is the kind where you have like << 1 2 3 4 5 ... (Next page button) >> not just a button where I need to hyperlink it to the next page url cuz I have like 35 pages to put... so I'm trying to figure it out yet no cigar so can someone please help me with this? Thanks!

    What I've seen done a lot (on forums with upwards of 1000 pages on some threads) is to add a "pagination" block of code that has:
    two or three pages before the current page
    two or three pages after the current page
    a drop down with ALL pages listed
    The "next" link or button is then just a copy  of the final link in the inline list.
    Something like this:
    <table>
    <tr>
    <td align="right" valign="bottom" nowrap="nowrap"><span class="gensmall"><b>Goto page <select name="generate_pagination" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }"><option value="forum-page-26.html" selected="selected">1</option><option value="forum-page-26-45.html">2</option><option value="forum-page-26-90.html">3</option><option value="forum-page-26-135.html">4</option><option value="forum-page-26-180.html">5</option><option value="forum-page-26-225.html">6</option><option value="forum-page-26-270.html">7</option><option value="forum-page-26-315.html">8</option><option value="forum-page-26-360.html">9</option><option value="forum-page-26-405.html">10</option><option value="forum-page-26-450.html">11</option><option value="forum-page-26-495.html">12</option><option value="forum-page-26-540.html">13</option><option value="forum-page-26-585.html">14</option><option value="forum-page-26-630.html">15</option><option value="forum-page-26-675.html">16</option><option value="forum-page-26-720.html">17</option><option value="forum-page-26-765.html">18</option><option value="forum-page-26-810.html">19</option><option value="forum-page-26-855.html">20</option><option value="forum-page-26-900.html">21</option><option value="forum-page-26-945.html">22</option><option value="forum-page-26-990.html">23</option><option value="forum-page-26-1035.html">24</option><option value="forum-page-26-1080.html">25</option><option value="forum-page-26-1125.html">26</option><option value="forum-page-26-1170.html">27</option><option value="forum-page-26-1215.html">28</option><option value="forum-page-26-1260.html">29</option><option value="forum-page-26-1305.html">30</option><option value="forum-page-26-1350.html">31</option><option value="forum-page-26-1395.html">32</option><option value="forum-page-26-1440.html">33</option><option value="forum-page-26-1485.html">34</option><option value="forum-page-26-1530.html">35</option><option value="forum-page-26-1575.html">36</option><option value="forum-page-26-1620.html">37</option><option value="forum-page-26-1665.html">38</option><option value="forum-page-26-1710.html">39</option><option value="forum-page-26-1755.html">40</option><option value="forum-page-26-1800.html">41</option><option value="forum-page-26-1845.html">42</option><option value="forum-page-26-1890.html">43</option><option value="forum-page-26-1935.html">44</option><option value="forum-page-26-1980.html">45</option><option value="forum-page-26-2025.html">46</option><option value="forum-page-26-2070.html">47</option><option value="forum-page-26-2115.html">48</option><option value="forum-page-26-2160.html">49</option><option value="forum-page-26-2205.html">50</option></select>  <b>1</b>, <a href="forum-page-26-45.html">2</a>, <a href="forum-page-26-90.html">3</a> ... <a href="forum-page-26-2250.html">51</a>, <a href="forum-page-26-2295.html">52</a>, <a href="forum-page-26-2340.html">53</a>  <a href="forum-page-26-45.html">Next</a></b></span></td>
    </tr>
    </table>

  • Help with JSP, session, login, JDBC.

    This is the template login.jsp file I have at the moment.
    <%@ page errorPage="errorPage.jsp" %>
    <%
      String login = (String)request.getParameter("loginname");
      if (login == null || login.equals("")) {
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN">
    <HEAD>
    <TITLE>Login Page</TITLE>
    <STYLE>
    <!--
    font.loginhead {
      font-family: Arial,Helvetica,sans-serif;
      font-size:12pt; font-weight: 600; color: #000000;
    font.loginform {
      font-family: Arial,Helvetica,sans-serif;
      font-size:10pt; font-weight: 600; color: #ffffff;
    -->
    </STYLE>
    </HEAD>
    <BODY>
    <jsp:include page="debug.jsp" flush="true" />
    <CENTER>
    <FONT CLASS="loginhead">
    LOGIN REQUIRED:
    </FONT>
    <BR>
    <FORM NAME="loginform" METHOD=post>
    <TABLE BGCOLOR=#990022 BORDER=0 CELLPADDING=5 CELLSPACING=0>
    <TR><TD ALIGN=right>
    <FONT CLASS="loginform">
    Login Name:
    </FONT>
    </TD><TD ALIGN=left>
    <FONT CLASS="loginform">
    <INPUT TYPE=text NAME="loginname" SIZE=10>
    </FONT>
    </TD></TR>
    <TR><TD ALIGN=right>
    <FONT CLASS="loginform">
    Password:
    </FONT>
    </TD><TD ALIGN=left>
    <FONT CLASS="loginform">
    <INPUT TYPE=password NAME="loginpassword" SIZE=10>
    </FONT>
    </TD></TR>
    <TR><TD COLSPAN=2 ALIGN=center>
    <FONT CLASS="loginform">
    <INPUT TYPE=SUBMIT VALUE="Login">
    </FONT>
    </TD></TR>
    </TABLE>
    </FORM>
    </CENTER>
    </BODY>
    </HTML>
    <%
      } else {
       Checking against database that username and password are correct.
        session.putValue("login", login);
        session.setMaxInactiveInterval(600);
        String loginpoint
           = (String)session.getValue("loginpoint");
        if (loginpoint == null) {
          StringBuffer defaultpoint = new StringBuffer();
          defaultpoint.append(request.getScheme())
                      .append("://")
                      .append(request.getServerName())
                      .append("/");
          loginpoint = defaultpoint.toString();
        } else {
          session.removeValue("loginpoint");
        response.sendRedirect(loginpoint); 
      }I know as much as how connect to the database, create a statement and check to see if the username and password are correct, I dont know how to actually take what the user has typed in and put it in an mysql query. I have an idea that maybe I can convert Login and Loginpassword to Strings but I don't know how to do this.
    This is how I plan to connect to the database above
    //here I need to have login and loginpasword in separate Strings so I can use them in a query.
    Connection connection;
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    connection = DriverManager.getConnection("jdbc:mysql://localhost/Users");
    Statement statement=connection.createStatement();
    String qry="select PassWord from customers where UserName='"+stringLogin+"'";
    ResultSet rs= statement.executeQuery(qry);In my login.jsp file above I don't understand the following code, and why it is needed. Can someone explain please.
    session.putValue("login", login);
        session.setMaxInactiveInterval(600);
        String loginpoint
           = (String)session.getValue("loginpoint");
        if (loginpoint == null) {
          StringBuffer defaultpoint = new StringBuffer();
          defaultpoint.append(request.getScheme())
                      .append("://")
                      .append(request.getServerName())
                      .append("/");
          loginpoint = defaultpoint.toString();
        } else {
          session.removeValue("loginpoint");
        response.sendRedirect(loginpoint); 
      }Hope you can understand what I'm trying to explain what my problems are.

    Im not sure what your exact question is. However, I can
    throw a few things out there.
    1) You need an action to handle the form request
    <FORM NAME="loginform" METHOD=post ACTION="login.jsp">2) Then get the username and password from the request
    String uname = (String)request.getParameter("loginname");
    String pass = (String)request.getParameter("loginpassword");3)Then you can just add them to the query string
    String qry="select PassWord from customers where UserName='"+uname+"'";4) Also check for valid password
    ResultSet rs= statement.executeQuery(qry);
    if(rs.next()) {
        String p = res.getString("PassWord");
             if (p.equals(pass)) {
                //valid user
                session.setAttribute("valid_user", "true");
                // now you can get valid_user from session at top of login.jsp
    }5) I cant find where loginpoint is set in the session, but the idea
    of the code below appears to be the logic of where to direct the user
    which I think would be dependent upon the validation of the user.
    session.putValue("login", login);
        session.setMaxInactiveInterval(600);
        String loginpoint
           = (String)session.getValue("loginpoint");
        if (loginpoint == null) {
          StringBuffer defaultpoint = new StringBuffer();
          defaultpoint.append(request.getScheme())
                      .append("://")
                      .append(request.getServerName())
                      .append("/");
          loginpoint = defaultpoint.toString();
        } else {
          session.removeValue("loginpoint");
        response.sendRedirect(loginpoint); 
      }You might try splitting the login into two pages to start out if you are having
    some difficulty.

  • Help with PowerBook G3 Login

    ok i was using it not 2 long ago and it restarted on me....i took my password off a few days before since i was only one who used it but now it wants me to put a password in i used all the old ones and nothin works and i try it without a password and just user name all it does is shake the only thing on the screen is Restart, Shut-Down, and Login....does any one know how 2 by-pass this step or how 2 just reset my entire hard drive im runnin Mac OS 10 i dont have my CD that came with the software anymore so is there anything else i can do someone please help me?

    Karen,
    Did you read this howto?
    http://www.oracle.com/technology/products/database/application_express/howtos/how_to_change_auth_method.html
    Create a function described in step 11 to query the table and if user info is good return true.
    Each page that requires a login change the security authentication to "page requires authentication".
    Each page that doesn't require a login change the security authentication to "page is public".

  • Need help with fitting text onto page

    I'm working on a website where I have a template with an
    editable region where I put all the main text for each page. I
    originally had it set up for scroll bars so when the text inside
    the cell of the editable region didn't fit, scroll bars would
    appear (I used overflow in the CSS). Now the client tells me they
    don't want scroll bars but want the text area to dynamically expand
    vertically to fit whatever amount of text. The problem is, when I
    try to put in a lot of text in the editable region, it breaks the
    table and the nav bar on the side gets all messed up. How can I
    have the text inside of a cell dynamically expand without affecting
    the rest of the table?
    Any help is greatly greatly appreciated, thanks in
    advance!

    > Here's the code...
    sorry, but again- please upload the page someplace.
    Don't attach it to a post, don't paste it in a post, upload
    the page
    someplace pls.
    I and many others are viewing this forum with a newsreader,
    not using the
    web forums at the adobe web page.
    The webforum-->NNTP newsgroup thingee has truncated your
    post. So i can't
    copy/paste it and use tools and sight read it. The code i see
    is incomplete.
    your post ends here for me:
    Advanced course (9-4) &#8212; $450<br>
    This course is for students already u
    Just upload the thing to some ftp account someplace pls.
    or if not possible, zip or rar the folder and send as an
    attachment to
    blu
    at
    formdude
    dot
    com
    pls don't email anything over 10megs.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

Maybe you are looking for

  • ABAP Logic in Transformations-Start or Field Routine ENHANCEMENT

    Hi Currently i am calculacting age of an employee in years and months using FM. Source Object (DOB) is DATS and Target object (age) is Char (6) My requirment is to show age in YY.MM If an employee age is 65Y,8M..then it shoud be displayed as 65.08. I

  • Tab navigation and clusters

    Is there a way to make tab-navigation skip highlighting the frame of a cluster and instead jump straight to the first control in the cluster? I do not understand why tab navigation highlights the cluster frame, there is nothing you can do with the cl

  • Update one table with the max value of another table

    CREATE TABLE [dbo].[General]( [a_id] int NOT NULL, [a_date] datetime NOT NULL, [c_date] datetime NULL) CREATE TABLE [dbo].[Specific]( [a_id] int NOT NULL, [a_date] datetime NOT NULL, [b_id] int NOT NULL, [d_date] datetime NULL) insert into General va

  • Waiting on Monitor

    Hi, I have so many threads waiting on monitor while I analyze the thread dump. Is that mean anything (number of the threads waiting on monitor is high) Thanks. --RJ                                                                                      

  • Group Chat not loading

    i made a new group chat on laptop but it wont load on mobile (i cant see it at all) tried redownloading the app, still doesnt work??