Automatic "j_security_check" form login submission question

I've been using J2EE 1.4 declarative security with no problems.
It works great. I define the security constraints to the server and
when the relevant pages are hit the login.jsp page gets invoked
where users can login. I happen to be using Tomcat 5 right now, but again it all works fine.
But now I have to receive http User Login requests from a non-java server and automatically log the user in if they were logged in on the prior server since I support the same User-Ids/Passwords.
My question is simple and may only be an HTML trick. On the login page code specifically for users where I already have their User-Id and Password how do I auto-submit the form without requiring user's to press the "submit" button? For this type of user where I know the UserID and Password I will not have any displayed HTML since the user does not have to do anything. For traditional manual login, I always used the following format with the submit button, but again, now I want to bypass the JSP/JSTL/HTML display and submit automatically (using code) instead of requiring the user to press the submit button.
<form method="POST" action="j_security_check" >
<input type="text" name="j_username" size="8" maxlength="8" />
<input type="password" name="j_password" value="FMTPPSWD" size="8" maxlength="8" />
<input type="submit" value=" Login " />
</form>
Help!
I've already orchestrated the solution in my login.jsp configuration to separate between the JSP Display page supporting manual login (using jsp:forward) and non-display auto-login. So my question is only how do I submit a form programatically without using the submit button?
Thanks.

For the benefit of others here is the JSP/JSTL & javascript solution.
This allowed me to create an automated login and use declarative security ...
The following code requires param.UserID and param.PassWord to be set before it is executed...
<form name="AutoLogin" method="POST" action="j_security_check" >     
<input type="hidden" name="j_username" value="<%= request.getParameter("UserID") %>" size="8" maxlength="8" />
<input type="hidden" name="j_password" value="<%= request.getParameter("PassWord") %>" size="8" maxlength="8" />
</form>
<script type="text/javascript" language="JavaScript">
document.AutoLogin.submit();
</script>

Similar Messages

  • How do I get an encrypted dmg on a network share to automatically mount at login?

    I need to mount an encrypted dmg that is stored on an SMB share to automatically mount at login.  I've got the SMB share to mount at login as a "Login Item," but I can't get the encrypted dmg to mount.
    A related question:
    I've got a shell script that mounts my encrypted image, copies data using rsync, and then unmounts the encrypted image.  I tried automating this using a cronjob, but cronjobs are nut run as $USER.  Since the cronjob isn't run as $USER, the cronjob does not have access to the $USER's keychain and cannot authenticate to the encrypted dmg.  Any tips on getting either of these to work?

    I don't use SMB so I'm not sure whether this will work, but try it. Open a TextEdit window and type something like this:
    smb://user:password@server/path-to-file
    Make the obvious substitutions in the text, then select it and drag it to the Desktop. You should get a bookmark file. Double-click it to test. If it works, you can rename the file and put it anywhere you like. Add it to your login items.
    If the above doesn't work, try again with "cifs" in place of "smb".
    The "user:password@" part may not be necessary if the password is in your keychain.

  • How to use form-login in iPlanet?

    Hi guys:
    I tried to use J2EE form-based login feature to trigger user authentication,
    but I can only specify the login page and the login error page, so how to
    redirector the location after user login successful?
    Thanks

    You need to try to reach a page/servlet/pattern that is protected. Then the j_security_check action in your form-login page will be populated with the relevant parameters. You will be presented with a login page when you try to access the servlet, then you will be redirected to the appropriate protected resource.

  • HT204088 Please help login security questiona

    Hi I have an security question which I have not done before so that I could not download my iTunes download

    First I followed the instruction from the following website to setup the driver. http://www.deitel.com/books/simplyJava1/simplyjava1_AccessDatabaseInstructions.pdf
    Then I added the following REALM to my App2.xml
       <Realm  className="org.apache.catalina.realm.JDBCRealm"
              driverName="sun.jdbc.odbc.JdbcOdbcDriver"
           connectionURL="jdbc:odbc:DATABASE"
               userTable="user" userNameCol="usr" userCredCol="pswrd"
           userRoleTable="role" roleNameCol="role" />Here is what i have in my web.xml
        <security-constraint>
          <display-name>Security Constraint</display-name>
          <web-resource-collection>
             <web-resource-name>Protected</web-resource-name>
             <url-pattern>/*</url-pattern>
             <http-method>GET</http-method>
             <http-method>POST</http-method>
          </web-resource-collection>
          <auth-constraint>
             <!-- Anyone with one of the listed roles may access this area -->
             <role-name>Manager</role-name>
          </auth-constraint>
        </security-constraint>
        <!-- Default login configuration uses form-based authentication -->
        <login-config>
          <auth-method>FORM</auth-method>
          <realm-name>Form-Based Authentication</realm-name>
          <form-login-config>
            <form-login-page>/login.jsp</form-login-page>
            <form-error-page>/error.jsp</form-error-page>
          </form-login-config>
        </login-config>
        <!-- Security roles referenced by this web application -->
        <security-role>
           <role-name>Manager</role-name>
        </security-role>

  • Hi! I have a Creative suite Design Standard 9 Adobe program and I am attempting to make a wizzard form that can be made into an entry form for a competition. So I need to 1. Make the form into a question and answer form that Participants may fill out. 2.

    Hi! I have a Creative suite Design Standard 9 Adobe program and I am attempting to make a wizzard form that can be made into an entry form for a competition. So I need to 1. Make the form into a question and answer form that Participants may fill out. 2. make it possible for them to download it via a link on our website 3. make it possible for them to save the info they have written into the form and mail it to the mail we have supplied in the entry form and 4. make it possible for them to put in a jpg. as part of the entry for and lastly 5. make it possible for us to copy paste the document and use it on other platforms. How do I do this - is it at all possible with adobe?

    Those requirements are go way beyond what PDF forms can do and are meant for, some of them would require involving other programs or are mutually exclusive and contradictory. You are wasting your time even thinking about doing this as an "offline" PDF form. Simply sign up for an online forms/ survey service like FormsCentral or Surveymonkey.
    Mylenium

  • How to CORRECTLY do a form Login and get a cookie in return???

    Hi,
    I am a relatively new developer and this is actualy my first post ever. I ussually find everything i need in other posts but for some reason this time i have been miserably unsuccessful and am close to pulling my hair out.
    I am trying to login to a website using some sort of form login so that it returns a cookie that i can than use to download files or access pages.
    Now here is the actual html of the website:
    <form name="login" action="https://www.website.com.au/login/login_action.cfm" method="post">
    <div class="username">
    <input name="contact_username" type="text" size="16" maxlength="60" />
    </div>
    <div class="password">
    <input name="contact_password" type="password" size="16" maxlength="60" />
    </div>
    <div class="login">
    <img id="li" src="/corporate/images/login_up.gif" alt="Login Button" onMouseOut="MM_swapImgRestore();"
    onMouseOver="MM_swapImage('li','','/corporate/images/login_over.gif',1);" onclick="check_submit();" />
    </div>
    </form>
    Could some one PLEEEEEASE let me know the code that i could use to successfuly login and return a cookie.
    I have already created the code the uses the cookie to access pages. (I got the cookie from login normally using web browser).
    So now i just need to know how i can login and get a cookie returned to the above form????
    PLEASE PLEASE HELP.
    Thanks in advanced :)

    1) I'm wondering how this all applies to Java. What Java code have you tried and has failed here? Are you talking about Java or Javascript? JSP?
    2) Please don't cross-post this in multiple forums. That only pisses us off and will guarantee you less help than if you didn't do this. Imagine a volunteer giving of his free time to help someone, spending say an hour or more trying to come up with a solution, then finding after posting that the solution was already given in a cross-post, and you'll know why this is very much frowned upon in these forums. Choose one thread to be the active thread, and then put a note in the other thread directing posters to the active thread (if you really want help that is).

  • How to generate the primary key item automatically in form region?.

    Hi,
    The primary key item is generated automatically in report region.I already give the pl/sql function for generating of primary key.but I want to generate the primary key value automatically in form region only?.how to do this?.Pls help me..
    Thanks and Regards.

    One of the guidelines when selecting column for a primary key is:
    Choose a column whose data values are never changed. A primary key value is only used to identify a row in the table, and its data should never be used for any other purpose. Therefore, primary key values should rarely or never be changed.
    Cheers!

  • Forms login security

    Hi Friends,
    How do I make our 3rd party appl forms login more secure?
    Currently, the appl program uses a primitive database authentication method
    by providing the username and password of the database in clear text inside
    a .ini file. Changing the database user and password will be useless due to
    password being exposed literally. Users of the application are registered in a table in the database with the password of the user exposed in clear text. An administrator or anybody with database access will be able see a user's password in clear text thus user authentication is compromised.
    Can I change the username to point to the database username and not a table?
    Can I incrypt the password table entry itself?
    Can I incrypt the .ini file so as not to show literal passwords?
    Can I use the form to get the userid/passwd from LDAP active directory server?
    Please help ....thanks a lot

    Are you sure that this is a Forms application and no JAVA-program ?
    It seems that a JAVA programmer tried some forms development :p
    The application may need some redesign.
    My suggestion :
    - the schema owner (database user holding the table objects) creates database
    roles implementing reader roles, insert role update roles and so on
    - each user will be created as a database user
    - grant the required role(s) to the user, but dont set those roles as default_role
    (ALTER USER xy DEFAULT_ROLE CONNECT, ...;
    - rebuild the login procedure authenticating now against the database account
    and not against the password in the application user-table
    - let the user password expire whilst using the existing user-table (implement a password expiration date) or use the database account for that
    - after successful login issue : DBMS_SESSION.SET_ROLE(...); for each
    role of the user, the created session has now the roles enabled
    - database roles should be password protected...
    If this is too much effort, it is possible to encrypt the table entries using oracle's Obfuscation Packages (depends on RDBMS-version).
    If your are using Oracle Forms > 6i :
    In addition to that all above it is possible at least to authentify against the Oracle Portal (not sure if this works against a different OID)...
    Message was edited by:
    user434854

  • CFDiv - clearing the form after submission

    I am using cfdiv with a data entry form and on submission writes the values to a db,  works great, but, how can I clear the form after submission?
    reloading the page loads it in the cfdiv.
    TIA
    Jbird

    To where are you submitting this form?  Also, are you submitting as a get or a post?

  • ADF form login vs. press enter

    I use the default ADF form login, however, it requires a mouse click, and not responding to the "press enter/return". Any idea?
    Thanks,

    Thanks, Frank. I actually used a custom LoginPage.jspx, NOT the default HTML form login:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document title="Form Login" id="d1">
    <af:form id="f1">
    <af:message id="m1"/>
    <af:panelBox text="Login" id="pb1"
    inlineStyle="width:300px; height:200.0px;">
    <af:panelFormLayout id="pfl1">
    <f:facet name="footer">
    <af:panelBorderLayout id="pbl1"
    inlineStyle="height:20.0px; "
    styleClass="AFStretchWidth">
    <f:facet name="start">
    <af:commandButton text="Login" id="cb1"
    action="#{loginBean.doLogin}"/>
    </f:facet>
    </af:panelBorderLayout>
    </f:facet>
    <af:inputText label="User Name" id="it1" required="true"
    value="#{loginBean.username}"/>
    <af:inputText label="Password" id="it2" required="true"
    secret="true"
    value="#{loginBean.password}"/>
    </af:panelFormLayout>
    </af:panelBox>
    <f:facet name="toolbar"/>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • How to Close InfoPath Form After Submission When Two Buttons Exist?

    I have an browser-enabled InfoPath 2010 form that has two views and a submit button on each view. The form would correctly submit and close the form using one button on the form until the second button was added. After adding the submit button on a second
    view, the second button submitted/closed but the behavior on the first view changed so that the form no longer closes after submission. I’ve researched this and have not yet found a solution to allow closing the form after submission for one of the buttons.
    Things I’ve tried:
     - I’ve attempted creating multiple submit data connections for the different buttons
     - Specifying different Submit Options
     - Try closing the form with the code
     - Add another button to the non-closing view
     - Add duplicate Rule actions to "Close this form: No Prompt"
    Settings:
    Button rules:
     - Submit using data connection: SharePoint Library Submit
     - Close this form: No Prompt
    Button Properties:
     - Action > Rules and Custom Code
    The form Submit Options:
     - Send form to a single destination (a form library)
     - Choose a data connection for submit (SharePoint library submit)
     - Advanced > After Submit: Close the form
    Advanced form options:
     - Filler Features: all items unchecked (not allowing Save, etc.)
     - E-Mail Attachments: uncheck Enable InfoPath e-mail form functionality for this form template
    Resources:
    When considering programmatically submitting and closing the form, I understand from this article that the Rules run before code and I can’t close the InfoPath form programmatically by writing code behind a button that has a rule set on it:
    http://www.bizsupportonline.net/blog/2009/01/how-to-programmatically-run-code-close-infopath-web-form/
    Discussion of creating a custom Save and Submit buttons for InfoPath browser forms:
    http://markhaverty.com/sharepoint/custom-save-and-submit-buttons-for-infopath-browser-forms/

    what if you need to switch views? 
    I have the same problem in a similar situation.  I created a test button to narrow down the cause.  the button submits data & closes the form fine.  however when I add a rule to switch views before the submit & close rule, it
    breaks.  Submit still works but it no longer closes the form.  If I disable the switch-view rule, then it closes fine. 
    I tried added another rule to switch back to the main view but that didn't help. 
    switching views is an integral part of the workflow b/c I want to email the alternate view upon approval & then close the form.  So removing that rule is not a good answer unfortunately. 

  • FORMS d2k interview questions

    Hi All,
    Please provide me links or files regarding interview questions on Oracle FORMS 10g from basics to advance level so
    the my complete forms development is revised in form of Q and As.
    Thanks
    ANSHUL ,INDIA

    1. Open a browser on PC that has internet access
    2. Go to www.google.com or www.google.co.in or any other search engine of your choice
    3. Enter key words "oracle forms 10g interview questions and answers" , without the quotes
    4. Go through the links displayed
    Regards,

  • Forms 6i interview questions

    If any body have forms 6i interview questions pl
    mail me at [email protected]

    The following book has a couple chapters of interview questions divided into "Beginner" and "Advanced:"
    Oracle Developer Advanced Forms and Reports.
    Koletzke, Peter and Dorsey, Paul.
    Oracle Press: Osborne/McGraw-Hill. (ISBN: 0-07-212048-7)
    MH

  • I want to get all the user name form LOGIN table ... how help me ?

    hi all
    I have table in MS Access databse called Login with two coulmn (User, Password),
    I want to get all the User Name in a string[] called USER,
    (LIKE USER = {"AA","BB","CC",........"zz"};)
    can anybody send me the code to get the USERNAMES form Login Table, i tried lots of way but bad luck
    so plz someone send me a code.
    Thanx
    Regards
    Satinder

    I made something like this as He pasted the the code above and u know this works for me atleast thanx
    kind regards
    satinderjit
    String User[] = new String[1000];
    try
    //Load Driver
    Class.forName(driver);
    // Make Connection
    connection=DriverManager.getConnection(url,user,password);
    // Create Statement
    statement = connection.createStatement();
    sql = "SELECT User FROM Login" ;
    // Create Resultset
    rs = statement.executeQuery(sql);
    int j=0;
    while(rs.next())
    User[j]= rs.getString("User");
    j=j+1;
    for(int i=0 ;i<J;i++)
    Form.C_Manager.addItem(User);
    statement.close();
    //rs.close();
    connection.close();
    catch(ClassNotFoundException cnfex) {
    //show message
    JOptionPane.showMessageDialog((Component) null,
    "Failed to load driver..."+
    "\n"+cnfex.getMessage(),
    "Error...",
    JOptionPane.ERROR_MESSAGE);
    catch(SQLException sqlex){
    //show message
    JOptionPane.showMessageDialog((Component) null,
    "Unable to connect to Database..."+
    "\n"+sqlex.getMessage(),
    "Error...",
    JOptionPane.ERROR_MESSAGE);
    catch(ArrayIndexOutOfBoundsException e){
    //show message
    JOptionPane.showMessageDialog((Component) null,
    "Unable to Load User Name..."+
    "\n"+e.getMessage(),
    "Error...",
    JOptionPane.ERROR_MESSAGE);

  • OS 3.0, VPN, Automatic Wf-Fi Login Issue?

    Hi everyone.
    I'm having a problem since my upgrade to OS 3.0. Previously, I could connect to the Wi-Fi network at my office and then initiate a VPN connection (which our IT department requires for all wireless connections as a security feature) and all worked well. Since the OS 3.0 upgrade, however, I am having problems. When I attempt to connect to the wireless network, a browser window opens that says something about login at the top. The page shown is the page on our company domain to download the Windows VPN client )in other words, there is nothing to log into). If I cancel out of this browser window I am disconnected from the wireless network without the opportunity to initiate the VPN connection that is required for access. I suspect this has something to do with the new Automatic Wi-Fi login feature. Unfortunately, I don't see any way to turn that off to get back to what was working in OS 2.1. Any ideas? Any help would be greatly appreciated.
    Bruce

    I have the same problem. Here are some related threads:
    VPN-related WiFi problem
    http://discussions.apple.com/thread.jspa?threadID=2047927
    OS3 WLAN Hotspot automated login prevents HTTP Authentication in PIX server
    http://discussions.apple.com/thread.jspa?threadID=2044951
    The last one features an entry by "Ric Getter" with a rough workaround that seems to have helped a couple of people. I havn't been able to try it out yet.
    Good luck.

Maybe you are looking for

  • Cleared Items Interest Calculation on Customers

    Hi, Following is the Requirement. On 01.04.08 1. Creating a Credit Memo in FB75.                    Misc Deposit A/c Dr..                               To Customer A/c 2. Clearing Customer in f-31                    Customer A/c -Dr ..               

  • HP Officejet Pro L7580 All-In-One printer with Windows 8

    I have the HP Officejet Pro L7580 All-In-One printer and want to use it with my new laptop that has Windows 8, but it won't accept the Starter CD (Windows 2000, XP, Vista).  Where can I get a free download to use with Windows 8?  I can print, but cur

  • Issue with Characters (tilde, accent and more)

    Hello all, Im triyng to do and export / import Export system: AIX 4.x, Oracle, 8.1.7 Import system RedHat 5, Oracle 10.0.2 After trying a lot with different character sets, setting and unsetting nls_lang in the target system i still having problems.

  • I'm attepmting to upgrade my Mother's iphone4 to the ios7.4

    and I can't get past the 'connect to iTunes' screen with the picture of the cable and music notes. I've reset the phone and done the 'restore' settings and still can't get past the 'connect to iTunes' screen. Can anyone help please??????

  • SOST and SOSC items link to crmd_orderadm_h/ crmd_orderadm_h

    Hi I need to check if my items (Shopping Cart, PO, PR) are already queued for sending in SOST. I need to know where to find the Object ID of the item to match with the Object No. in SOST or SOSC. I can use GUID as well. Does anyone know?