Redirect to login JSP form in case user hits restricted area

 

hi
          create a template jsp so that all the other jsps are created from that
          template,in the template
          check if the user is logged in or not and redirect accordingly.
          u can do this by 2 ways ,check for the userid in the session object or in
          the bean whose scope is session
          Hope this Helps
          Parag B.Bhagwat
          John Greene <[email protected]> wrote in message
          news:[email protected]...
          >
          > Hi --
          >
          > This may be of some help to people:
          >
          > http://www.weblogic.com/docs45/examples/security/formauth/index.html
          >
          >
          >
          > Robert Patrick wrote:
          > >
          > > Here is some example code of how to create a JSP that extends a servlet
          class...
          > >
          > > Hope this helps,
          > > Robert
          > >
          > > Stephen Earl wrote:
          > >
          > > > Hi,
          > > >
          > > > With jhtml you can use the extends tag to "tell" the compiler what
          class
          > > > your resulting servlet extends. I've used this method to implement
          site
          > > > wide authentication and authorization. I don't know if this
          capability
          > > > exists in Weblogic's JSP implementation.
          > > >
          > > > This is a question for Weblogic... will you ever release the source
          code for
          > > > your JSP compiler??? Think Jakarta... think GNU... this would help a
          lot
          > > > of people.
          > > >
          > > > Steve...
          > > >
          >
          >
          > Take care,
          >
          > -jg
          >
          > John Greene BEA WebXpress
          > Developer Relations Engineer 550 California Street, 10th floor
          > 415.364.4559 San Francisco, CA 94104-1006
          > mailto:[email protected] http://weblogic.beasys.com
          

Similar Messages

  • Writing Login.jsp and authenticating a user who have stored in MySql DB

    Hi Friends,
    My project requirement is: Need to write a login page must send the request to servlet is the user and password avail in mysql db, if yes servlet should forward the home page else error message. Tools i need to use is IDE=eclipse, Server = tomcat, database = MySql
    Here is source:
    pls tell me where i m wrong.
    Login.jsp
    <%@ page language="java" %>
    <html>
    <head>
    <title>Login Page</title>
    <script language = "Javascript">
    function Validate(){
    var user=document.frm.user
    var pass=document.frm.pass
    if ((user.value==null)||(user.value=="")){
    alert("Please Enter user name")
    user.focus()
    return false
    if ((pass.value==null)||(pass.value=="")){
    alert("Please Enter password")
    pass.focus()
    return false
    return true
    </script>
    </head>
    <body>
    <h1>Login
    <br>
    </h1>
    <form name="frm" action="/LoginAuthentication" method="Post" onSubmit="return Validate()" >
    Name:
    <input type="text" name="user" value=""/><br>
    Password:<input type="password" name="pass" value=""/><br>
    <br>
    <input type="submit" value="Login" />
    <input type="reset" value="forgot Password" />
    </form>
    </body>
    </html>
    Servlet Code:
    LoginAuthentication.java
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.ServletContext;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.util.List;
    import java.util.ArrayList;
    public class LoginAuthentication extends HttpServlet{
    private ServletConfig config;
    public void init(ServletConfig config)
    throws ServletException{
    this.config=config;
    //public void init() {
    // Normally you would load the prices from a database.
    //ServletContext ctx = getServletContext();
    // RequestDispatcher dispatcher = ctx.getRequestDispatcher("/HomePage.jsp");
    //dispatcher.forward(req, res);
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException,IOException{
    PrintWriter out = response.getWriter();
    String connectionURL = "jdbc:mysql://127.0.0.1/SRAT";
    //String connectionURL = "jdbc:mysql://192.168.10.59/SRAT";
    //127.0.0.1
    //http://localhost:3306/mysql
    Connection connection=null;
    ResultSet rs;
    String userName=new String("");
    String passwrd=new String("");
    response.setContentType("text/html");
    try {
    // Load the database driver
    Class.forName("com.mysql.jdbc.Driver");
    // Get a Connection to the database
    connection = DriverManager.getConnection(connectionURL, "admin", "admin");
    //Add the data into the database
    String sql = "select user,password from login";
    Statement s = connection.createStatement();
    s.executeQuery (sql);
    rs = s.getResultSet();
    while (rs.next ()){
    userName=rs.getString("user");
    passwrd=rs.getString("password");
    rs.close ();
    s.close ();
    }catch(Exception e){
    System.out.println("Exception is ;"+e);
    if(userName.equals(request.getParameter("user"))
    && passwrd.equals(request.getParameter("pass"))){
    out.println("WELCOME "+userName);
    else{
    out.println("Please enter correct username and password");
    out.println("<a href='Login.jsp'><br>Login again</a>");
    Deployment Descriptor for TOMCAT
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>
    SRAT</display-name>
    <welcome-file-list>
    <welcome-file>login.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
    <servlet-name>LoginAuthentication</servlet-name>
    <servlet-class>LoginAuthentication</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>LoginAuthentication</servlet-name>
    <url-pattern>/LoginAuthentication</url-pattern>
    </servlet-mapping>
    </web-app>
    PLS HELP ME.
    S. Udaya Chandrika

    I too have used the same code but its giving the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Wrapper cannot find servlet class Validation or a class it depends on
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         java.lang.Thread.run(Unknown Source)
    root cause
    java.lang.ClassNotFoundException: Validation
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         java.lang.Thread.run(Unknown Source)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
    Apache Tomcat/6.0.18
    Please some one help??

  • Is it possible to manually setup a Folder Redirection Policy on SBS 2008 for one user? Also are you able to set up folder redirection on a different server than you have SBS 2008 on?

    I have a SBS 2008 DC I would like to be able to change the Folder Redirection to a different server.  I also would like to be able to test with one user.  I read on the forums that it is best to use the wizards for SBS2008.  The only problem
    I have with using the wizards is that I am unable to test and I am also unable to use a network share for my redirection location.  

    Hi,
    I am sure you would get some help from :
    http://blogs.technet.com/b/sbs/archive/2010/10/08/folder-redirection-in-small-business-server-2008.aspx
    https://social.technet.microsoft.com/Forums/en-US/448583ca-471e-4a0c-9d26-aa9181e73962/folder-redirection-changing-location?forum=smallbusinessserver
    User setting can be found:
    Windows SBS Console > Shared Folders and Web Sites > Shared Folders - in Tasks panel click on Redirect folders for user accounts to the server.
    Under Folder Names Select folder(s) you want to redirect (e.g. Documents).
    Under User Accounts select accounts you want to have folders redirected.
    Click OK
    Binu Kumar - MCP, MCITP, MCTS , MBA - IT , Director Aarbin Technology Pvt Ltd - Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Weblogic 10 jaas and login.jsp and web.xml/weblogic.xml security constaints

    Hello,
    I struggled through and got the examples.security.jaas.SampleCallbackHandler.java and examples.common.utils.ExampleUtils.java/ExampleConstants.java into eclipse where they compile. A bean I made can call SambleCallbackHandler like such:
    mybean.logmein(username,password,url). I can then do a mybean.getStatus() or even a mybean.returnCode(). It does seem to correctly identlify that it is authenticating me (I see in stdout logs that it shows success or failures. The problem I have is I do not know how to apply this weblogic and web.xml/weblogic.xml so that if authentication works it redirects me to the page requiring the authentication. In web.xml I have the following set up:
    <security-role>
         <role-name>Admins</role-name>
    </security-role>
    <login-config>
         <auth-method>FORM</auth-method>
         <realm-name>default</realm-name>
         <form-login-config>
              <form-login-page>/login.jsp</form-login-page>
              <form-error-page>/badlogin.html</form-error-page>
         </form-login-config>
    </login-config>
    <security-constraint>
         <web-resource-collection>
              <web-resource-name>empower</web-resource-name>
              <description>These pages are only accessible by authorized users.</description>
              <url-pattern>/admin/*</url-pattern>
              <http-method>GET</http-method>
              <http-method>POST</http-method>
         </web-resource-collection>
    <auth-constraint>
    <description>These are the roles who have access</description>
    <role-name>Administrators</role-name>
    </auth-constraint>
         <user-data-constraint>
         <description>This is how the user data must be transmitted</description>
         <transport-guarantee>NONE</transport-guarantee>
         </user-data-constraint>
    </security-constraint>
    My weblogic.xml has:
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
    <wls:security-role-assignment>
    <wls:role-name>Admins</wls:role-name>
    <wls:principal-name>Administrators</wls:principal-name>
    <wls:principal-name>dashap</wls:principal-name>
    </wls:security-role-assignment>
    </wls:weblogic-web-app>
    With this set up, if I try to go to a page in /admin folder in my application, it correctly pops up the login page. The jaas in the bean is doing a loginContext.login(), which I thought does authentication too, but it never goes back to the /admin page I was going to that needed the authentication. With jaas, can I not use the web.xml FORM security option? Do I Need to use j_security in the login.jsp's form's action= option and j_username and j_password for the input type names? How do I use j_username/j_password things if I am using jaas? I could just ignore using the web.xml security stuff and put something in the pages that need authentication, but it would be easier if I could use jaas with the security featurs without doing all that. Note that my code above is using a realm called default just because that was what was in the example I got from the web. Does that need to be something else?

    Hi John,
    I would like magic of course. However, in this case I want something special: my authentication provider uses special means and contents of headers, cookies and service from external identity management systems to determine the user's identity.
    I do not want the application to present the login dialog! I want to derive the identity and the fact that the user is logged in from whatever the authentication provider returns in terms of Subject.
    Ideally, the flow is something like:
    - user accesses an unprotected resource - resource is shown, no interaction with authentication provider
    - user presses a link or button that takes him/her to a protected resource
    - the authentication provider is contacted to work with the identity asserter to establish the identity of the current user and create a subject object for this user
    - the application can access the subject and principals
    - ADF Security recognizes the identity and the roles (based on the principals) and coordinates access based on this.
    the authentication method is client certificate. presumably this prompts WebLogic/OPS to use an identity asserter to work with custom headers and cookies ("... when you configure a web application to use CLIENT-CERT authentication. In this case, WebLogic can perform identity assertion based on values from request headers and cookies. If the header name or cookie name matches the active token type for the provider, the value is passed to the provider."). No login form should be presented to the user, as all information required to perform the authentication is already available.
    I am trying to understand what I must do to have the ADF application adopt the subject set by the authentication provider - if anything?!
    If you more ideas to share - I would love to hear them.
    best regards,
    Lucas

  • Strange behavior with login.jsp

    I have the following security setup in web.xml for a portal web app.
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Everything</web-resource-name>
    <description>The portal is accessible to all valid AD users.</description>
    <url-pattern>/</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
    <description>x<description>
    <role-name>xUsers</role-name>
    </auth-constraint>
    <user-data-constraint>
    <description>This is how the user data must be transmitted.</description>
    <transport-guarantee>NONE</transport-guarantee>
    <!-- <transport-guarantee>CONFIDENTIAL</transport-guarantee> -->
    </user-data-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
    <form-login-page>/login.jsp</form-login-page>
    <form-error-page>/error.jsp</form-error-page>
    </form-login-config>
    </login-config>
    I have an apache proxy pointing at the web application, and the proxy is set up
    to perform BASIC authentication on users attempting to access the web resource.
    My problem is that when I attempt to access a resource of the web app through
    the apache proxy, I get the following error upon the expected redirect to login.jsp
    before login.jsp actually loads at all (I have println statements as the first
    lines of the jsp):
    An error has occurred:
    Cannot get new user profile because com.bea.p13n.usermgmt.profile.ProfileNotFoundException:
    user1
    caused by: : com.bea.p13n.usermgmt.profile.ProfileNotFoundException: user1
    In this scenario user1 is the username from apache's basic authentication. Why
    would weblogic attempt to interpret the basic auth http headers in the first place,
    let alone attempt to load the user profile for the defined user?

    We have had a case opened with BEA for weeks now, they so far have only been able
    to tell us that it is a Weblogic server issue. We escalated it to a production
    issue, hopefully some more info to come soon.
    Mark Bowne <[email protected]> wrote:
    I am having the similar problem and have you been able to resolve your
    issue?
    Mark

  • Issue in applying SSL selectively to Login JSP Page--Session getting lost.

    Hi,
    I am facing some issues with SSL configuration on my web site running on tomcat 5.5. I am using jdk 1.5 and form based authentication with JAAS framework.
    The SSL configuration is working perfectly when applied to complete web site, but starts giving problem when applied selectively to some JSP pages. At present I am trying to apply SSL just on the login page.
    When the login screen loads up, the URL in the browser has a protocol "*https*", as expected, but it doesn't gets changed to "*http*" once the user has successfully logged in. Why is the automatic change from https to http not ocurring?
    Also I want to know which is the default page, tomcat will direct the logged in user to, once successfully authenticated using form based login; Is there any way to change this default page to some other page. It looks like that tomcat automatically directs to index.html , once the user has been successfully authenticated, but I am not so sure. My index.html page is having 4 frames; the source of these frames are different JSP pages, which are not under SSL.
    My aim is to apply SSL just on login.jsp so that password doesn't travel in clear text. Once the user is authenticated he should see index.html and the address bar's URL should change it's protocol from https to http.
    Please, find below the code in my web.xml
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>CWA Application</web-resource-name>
    <url-pattern>/about.jsp</url-pattern>
    <url-pattern>/admin_listds.jsp</url-pattern>
    <http-method>DELETE</http-method>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    <http-method>PUT</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>*</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    <security-constraint>
    <web-resource-collection>
    <url-pattern>/*login.jsp*</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>*</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>CWA Application</realm-name>
    <form-login-config>
    <form-login-page>/login.jsp</form-login-page>
    <form-error-page>/login.jsp?error=true</form-error-page>
    </form-login-config>
    </login-config>
    <welcome-file-list>
    <welcome-file>login.jsp</welcome-file>
    </welcome-file-list>
    My login. jsp has below code:
    <form name="login" method="POST" action='<%= response.encodeURL(*"j_security_check*") %>' >
    <tr>
    <td width="100%">
    <table width="260" border="0" cellspacing="0" cellpadding="1">
    <tr>
    <td align="left" valign="top" rowspan="4"><img src="images/space.gif" width="15" height="5"></td>
    <td align="right" class="login-user" nowrap ><p>User name: </p></td>
    <td align="left" valign="top"><input maxLength="64" name="j_username" size="20"></td>
    </tr>
    <tr>
    <td align="right" nowrap class="login-user"><p>Password: </p>
    </td>
    <td align="left" valign="top">
    <input maxLength=\"64\" tabindex="2" type="password" name="j_password" size="20">
    </td>
    </tr>
    </form>
    The entries in my server.xml are following:
    <Connector port="8080" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
    maxThreads="150" scheme="https" secure="true"
    keystoreFile="${java.home}\lib\security\cacerts" keystorePass="changeit"
    clientAuth="false" sslProtocol="TLS" />
    I have gone through the http://forums.sun.com/thread.jspa?threadID=197150 and tried implementing it; The filter as explained in the thread does gets called but the session values are still lost.
    Please note I am using javascript to go from secure "https" to "http" once the user has successfully logged in The javascript code is as below:
    top.location.href="http://localhost:8080/qtv/index.html." ;
    If I use response.sendRedirect("http://localhost:8080/qtv/index.html") for going to non-secure mode, the index.html page does not gets loaded properly. (Please note that my index.html is made of *4 frames*, as explained earlier. This is a legacy code and frames can't be removed).
    The reason for index.html not getting loaded properly is that the Address bar URL does NOT change its URL and protocol from https (https://localhost:8443/qtv/index.html ) to "*http*" (http://localhost:8080/qtv/index.html) when esponse.sendRedirect() is used ;this is the default behaviour of response.sendRedirect(). And because the protocol in address bar is https, index.html is not able to load the other JSP's in it's frames because of cross-frame-scripting security issues (The other JSP's to be loaded in frames are are NOT secure as discussed earlier).
    Please let know if any way out.
    Thanks,
    Masaai

    Hi
    try to set the maximum interval between requests
    eg:
    session.setMaxInactiveInterval(6000);
    vis

  • How to "encapsulate" a data from a text field in a JSP form

    Hi. I'm trying to make a user's registration jsp page and I'm not sure how I could get the data from a JSP form from the user and store that into some variable that I could later pass to a query to modify the database. I've been using a JavaBean, but I get null values for all the fields of the jsp page. That's logical, since I cannot find a method that will read the user's input and store that into some variable. In my JavaBean, I have get and set methods that will return a String for each of the form fields such as first name and email. The set method will have in a String as a parameter to set that field value (whichever field it is) to the value of the input parameter, but I don't know if there is a method or a way to read and store the values entered by the user into the jsp form. This is a code snippet of the jsp form:
    <TR><TD>First Name: </TD>
    <TD><INPUT TYPE="TEXT" NAME="fname"
                   VALUE="<%= newUser.getFirstName() %>"></TD></TR>
    Here, the getFirstName() method simply returns the value of a String value related to the user's first name, which is initialized as null in the JavaBean. newUser is the name of the JavaBean that I'm using.
    Any suggestions? Thanks.

    haha...nevermind this question also guys...I found out that I could use the request.getParameter("some_String") method with my JavaBean to read and store data entered by the user in a text field.

  • SUN IDM 8.1 - /user/login.jsp

    Hi
    Can anyone pls let me know from where is the Login button and the Forgot Password? link is coming from in the /idm/user/login.jsp ?
    The reason i want to know is because i want to add additional login when the user press the Login button or cliks the Forgot Password? link.
    Secondly. I willl like to know <jsp:useBean id="form" scope="page" class="com.waveset.ui.web.common.LoginForm"/> from where i can see all the methods in the LoginForm class.
    Thanks

    I don't think you can edit the login . as they are generated by class files.
    but another thing to explore might be the user/altlogin.jsp & user/altloginHandler.jsp

  • How come the form in the JSP page does not work if user hits "ENTER"

    When I use the following code for loginpage.jsp
    If the user hits ENTER on the keyboard it just displays the same form with nothing in the username box.
    It works if the user clicks the button.
    <HTML>
    <BODY>
    <%
    String submit = request.getParameter("submit");
    if(submit == null){
    %>
    <FORM METHOD=POST ACTION=loginpage.jsp>
    Please enter your username: <INPUT TYPE=TEXT NAME=username SIZE=20>
    <INPUT TYPE=SUBMIT NAME=submit VALUE='Go!'>
    </FORM>
    <%
    else {
    String user = request.getParameter("username");
    if(user == null) {
    // display same page
    } else {
    // foward to next page
    %>
    </BODY>
    </HTML>

    I adjusted my code but it still does nto work when hitting the ENTER keyboard button.
    <HTML>
    <BODY onload="document.form1.left.focus();">
    <%
    String submit = request.getParameter("submit");
    if(submit == null){
    %>
    <FORM METHOD=POST ACTION=loginpage.jsp>
    Please enter your username: <INPUT TYPE=TEXT NAME=username SIZE=20>
    <INPUT TYPE="button" name="left" value="LEFT" onlick="alert(this.name)">
    <INPUT TYPE="button" NAME="right" VALUE="RIGHT" onclick="alert(this.name)">
    </FORM>
    <%
    else {
    String user = request.getParameter("username");
    if(user == null) {
    // display same page
    } else {
    // foward to next page
    %>
    </BODY>
    </HTML>
    If I do this
    <FORM METHOD=POST ACTION=nextpage.jsp>
    And use ENTER keyboard button it works, but not when I have ACTION to teh same page.
    Why is that?
    Is this JSP related or HTML? I thought JSP had something to do with it since it's JSP file.

  • Custom Help Message Text on user/login.jsp

    Hello,
    I am trying to get some custom text to appear in the help box associated with the user/login.jsp page. I did some digging around in the docs and looked at the includes/helpServer.jsp file. I found the <$WSHOME>/help/html/help/en_US/com/waveset/msgcat/help/user/login-help.html file.
    I replaced this file with our own custom version. I can not get our custom version to load. The old version still continues to load. I cleared out all the cache options I could find in the debug pages, then rebooted the server. Still no luck. Does anyone know how I can change the contents of this help message?
    Thanks,
    Jim

    Here's a solution that works too. Application server is: Tomcat 5.0.28. Identity Manger 7.0 Running on a Windows 2003 server and a SQL Server dbms.
    This is not the ideal solution because upgrades (i.e. new releases from Sun) will over write the changes.
    This example over writes the HELP button content on the End User Menu.
    This approach should work for all App servers however the folder structure will vary.
    1. Stop Tomcat
    2. Clear cache. (i.e. delete the localhost folder and its contents found in C:\tomcat\work\Catalina\localhost).
    3. Create the following folder structure C:\com\waveset\msgcat\help\user
    4. Copy the original html file from: C:\tomcat\webapps\wavex\help\html\help\en_US\com\waveset\msgcat\help\user to C:\com\waveset\msgcat\help\user. In this example main-help.html is the file being copied.
    5. Make your changes to C:\com\waveset\msgcat\help\user\main-help.html
    6. Open C:\tomcat\webapps\wavex\WEB-INF\lib\idm.jar with WinZip and add file C:\com\waveset\msgcat\help\user\main-help.html.
    7. Close WinZip
    7b. If you want you can check your results.
    7c. Open C:\tomcat\webapps\wavex\WEB-INF\lib\idm.jar using WinZip.
    7d. Find main-help.html and open it using your favorite web browser to see if your changes have been included.
    7e. Hope it worked for you.
    8. Start Tomcat
    9. Test Change
    9a. Log into Identity Manger's end user interface.
    9b. Click the HELP button to see your changes.
    Good Luck.

  • I'm working on JSP that allows the user in this case to add a new restauran

    I'm working on JSP that allows the user in this case to add a new restaurant to the database. I have 2 database tables, one being RestaurantTable and containing the columns:
    Id (Restaurant Id) type: int (primary key)
    Name (Restaurant Name) type: varchar
    Address (Restaurant Address) type: varchar
    PhoneNumber (Restaurant Phone Number) type: varchar
    Category (Type of Restaurant) type: varchar
    and the other being Rank and containing the columns:
    Value (Restaurant rank number) type: float
    Id (Restaurant Id same as in the RestaurantTable) type: varchar
    Since all of my restaurants which are already in the database have ideas, if a user were to add a restaurant I want my JSP to give it the next Id that follows. For that I have created a SQL sequence which is rest_id_seq.
    There error I'm getting is : Invalid column type
    I understand that the value for Id must be an integer because that is what I defined it as when I created my table, but I don't understand anyother way to do it then to put the sequence in as it's value.
    I'm really confused as to what to do. Any help would be appreciated. Thanks
    I'll post again with my code

    Ok I really don't get why I can't post my code on here, I've been trying over and over again. I cut and paste my code and put it between  and I hit the post button and the page does nothing.

  • How to change the behaviour of the Cancel-Button of SSO-Login-Page (Forms)?

    Hi Folks,
    we use SSO-Login to authenticate users using Forms. How do I change the URL which is opened when a user clicks on the cancel button on the SSO Login page?
    In the formsweg.cfg file there is a parameter named ssoCancelUrl, but if I define it, it doesn't work anyway. Seems like it has something to do with ssoDynamicResourceCreate, but I don't exactly understand what.
    Can't I simply change the URL which is opened (globally), when a user hits the cancel button on any SSO-Loginpage.
    Thanks in advance.
    Regards.

    Exactly this does not work! Please watch my settings:
    Global Setting in formsweb.cfg
    # Single Sign-On OID configuration parameter: indicates whether we allow
    # dynamic resource creation if the resource is not yet created in the OID.
    ssoDynamicResourceCreate=false
    # Single Sign-On parameter: URL to redirect to if ssoDynamicResourceCreate=false
    ssoErrorUrl=
    # Single Sign-On parameter: Cancel URL for the dynamic resource creation DAS page.
    ssoCancelUrl=
    # Single Sign-On parameter: indicates whether the url is protected in which
    # case mod_osso will be given control for authentication or continue in
    # the FormsServlet if not. It is false by default. Set it to true in an
    # application-specific section to enable Single Sign-On for that application.
    ssoMode=false
    App-Specific settings in formsweb.cfg
    [proz]
    envFile=proz.env
    form=proz.fmx
    title=proz
    separateFrame=true
    width=1280
    height=960
    ssoMode=true
    ssoDynamicResourceCreate=false
    ssoCancelURL=http://machinename:port/zugangsportal/
    otherparams=useSDI=yes P_SERVER_URL=machinename:port P_REP_SERVERNAME=machinename_proz ZP_TARGET_ID=%ZP_TARGET_ID%
    When I now access http://machinename:port/forms/frmservlet?config=proz I got redirected to the SSO-Login-Page but the Cancel-Button still links to Middletier Home. Why?
    Regards.

  • How do I add a user form that a user won't be logged in to use?

    Hey,
    I need to produce a form to be available to idm users that allows them to register for an account but have come across a few problems.
    I have amended the idm user interface login page to contain a link to a jsp called Account Registration. I want this page to be accessable by users that aren't logged in. The sample form inside the user folder customEdit.jsp is the suggested jsp to use if you want to make your own user pages isn't appropriate in this case as it requires the user to be logged to view it.
    I have tried copying continueLogin.jsp (as this is a jsp a user doesnt need to be logged in to see) but can't seem to amend it well enough to stop it complaining about login params and lots of other stuff.
    Has anyone else made a simliar jsp and idm form?
    Or can anyone be kind enogu to help me out on this issue?

    Just copy over the font. It will be in /Library/Fonts or in ~/Library/Fonts. Copy it on a stick or use Airdrop between your two computers. You can also use Font Book (A built in application - use Spotlight (the looking glass in the upper right) to find it) to find the font if you don't know how to make the hidden library folders show up. Find the font in it. Select it and do a "export fonts" from the File menu. Export to your desktop. Put the exported folder on a stick or transfer using Airdrop and on the other machine open Font book and do a "Add Fonts" from the file menu.

  • Adf security with upper case user results in 500-internal server error

    Hello
    JDev 11.1.1.0.2, Integrated WLS
    I'v set up ADF security as explained in the documentation.
    The only difference being that the role test-all has been removed.
    I have one user 'paul' with a password of 'password'
    I have one application role 'myrole'
    'paul' is a member of 'myrole'
    I have one unbounded task flow with one view (view1).
    Via the janz-data.xml 'View1' has been granted to 'myrole' (view action)
    When running View1 I get the login.html page which is correct.
    The fun starts when playing around with the user/password.
    If I login with 'paul' and 'password' view1 is display, this is correct
    If I login with an unknown user or an incorrect password Windows Explorer 7 shows a generic HTTP 403 error page and not the error.html
    If I login with 'PAUL' and 'password' (or Paul, or any mixed cased version of Paul with the correct password) I get the following stack trace :
    oracle.adf.controller.security.AuthorizationException: ADFC-0619: Echec de la vérification des autorisations : '/view1.jspx' 'VIEW'.
         at oracle.adf.controller.internal.security.AuthorizationEnforcer.handleFailure(AuthorizationEnforcer.java:145)
         at oracle.adf.controller.internal.security.AuthorizationEnforcer.checkPermission(AuthorizationEnforcer.java:124)
         at oracle.adfinternal.controller.state.ControllerState.initializeUrl(ControllerState.java:639)
         at oracle.adfinternal.controller.state.ControllerState.synchronizeStatePart2(ControllerState.java:449)
         at oracle.adfinternal.controller.application.SyncNavigationStateListener.afterPhase(SyncNavigationStateListener.java:44)
         at oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.afterPhase(ADFLifecycleImpl.java:529)
         at oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchAfterEvent(LifecycleImpl.java:118)
         at oracle.adfinternal.controller.lifecycle.LifecycleImpl.dispatchAfterPagePhaseEvent(LifecycleImpl.java:166)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.dispatchAfterPagePhaseEvent(ADFPhaseListener.java:122)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:68)
         at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:51)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:354)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:175)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:181)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:279)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:239)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:196)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:139)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:85)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:257)
         at oracle.security.jps.wls.JpsWlsSubjectResolver.runJaasMode(JpsWlsSubjectResolver.java:250)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:100)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:65)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    The questions are :
    - Why do I get the generic HTTP 403 error instead of the error.html (its not the end of the world but I would like to understand) ?
    - Why do I get the error 500 if the case of the username is incorrect but the password is correct ?
    Best Regards
    Paul

    Nope nothing in there that looks out of place...
    Here's the contents of the web.xml file ..
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
    <description>Empty web.xml file for Web Application</description>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <description>If this parameter is true, there will be an automatic check of the modification date of your JSPs, and saved state will be discarded when JSP's change. It will also automatically check if your skinning css files have changed without you having to restart the server. This makes development easier, but adds overhead. For this reason this parameter should be set to false when your application is deployed.</description>
    <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <description>Whether the 'Generated by...' comment at the bottom of ADF Faces HTML pages should contain version number information.</description>
    <param-name>oracle.adf.view.rich.versionString.HIDDEN</param-name>
    <param-value>false</param-value>
    </context-param>
    <filter>
    <filter-name>JpsFilter</filter-name>
    <filter-class>oracle.security.jps.ee.http.JpsFilter</filter-class>
    <init-param>
    <param-name>enable.anonymous</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>remove.anonymous.role</param-name>
    <param-value>false</param-value>
    </init-param>
    <init-param>
    <param-name>addAllRoles</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>jaas.mode</param-name>
    <param-value>doasprivileged</param-value>
    </init-param>
    </filter>
    <filter>
    <filter-name>trinidad</filter-name>
    <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
    </filter>
    <filter>
    <filter-name>adfBindings</filter-name>
    <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>JpsFilter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>
    <filter-mapping>
    <filter-name>trinidad</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>adfAuthentication</servlet-name>
    <servlet-class>oracle.adf.share.security.authentication.AuthenticationServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/afr/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>adfAuthentication</servlet-name>
    <url-pattern>/adfAuthentication/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>adfAuthentication</web-resource-name>
    <url-pattern>/adfAuthentication</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>valid-users</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
    <form-login-page>/login.html</form-login-page>
    <form-error-page>/error.html</form-error-page>
    </form-login-config>
    </login-config>
    <security-role>
    <role-name>valid-users</role-name>
    </security-role>
    </web-app>
    Regards
    Paul

  • Invoke-WebRequest with JSP forms

    Hi everyone,
    I am a newbie with PowerShell struggling to write a script that posts information to a JSP Web application.
    My script should be divided in two parts : 
    ########### The first should authenticate to the admin page (the form bellow)
    <form name="loginoath" id="loginoath" action="../servlet/UserRequestServlet" method="post" autocomplete="off">
    <input type="hidden" name="action"
        value="auth">
    <input type="hidden" name="authtype" id="authtype"
        value="oath">
    <input type="hidden" name="authformat"
        value="pwd">
    <input type="hidden" name="opensess"
        value="true">
    <input type="hidden" name="version"
        value="3.0">
    <input type="hidden" name="forwardtype"
        value="relativeurl">
    <input type="hidden" name="successurl" value="/adminportal/index.jsp">
    <input type="hidden" name="errorurl" value="/adminportal/login_oath.jsp">
        <tr valign="middle" class="display_row" id='authoption'>
            <td class="form_label">
                <span class="help_spot" onMouseOver="loadHelp('Select\x20\x3Cb\x3EPassword\x3C\x2Fb\x3E\x20to\x20log\x20in\x20with\x20your\x20user\x20ID\x20and\x20password\x20only.\x3Cbr\x3E\x3Cbr\x3ESelect\x20\x3Cb\x3EOTP\x3C\x2Fb\x3E\x20to\x20log\x20in\x20with\x20your\x20user\x20ID,\x20password,\x20and\x20a\x20one\x2Dtime\x20password\x20\x28OTP\x29\x20generated\x20from\x20your\x20device.')">
                    Authenticate by:
                </span>
            </td>
            <td class="form_field_cell">
                <input type="radio" name="authByOTP" id="authByOTP" value="yes" checked onclick="onChangeAuth()"> OTP&nbsp;
                <input type="radio" name="authByOTP" id="authByOTP" value="no"  onclick="onChangeAuth()" > Password&nbsp;
            </td>
        </tr>
        <tr valign="middle">
            <td class="form_label">
            <span class="help_spot" onMouseOver="loadHelp('Enter\x20the\x20user\x20ID\x20that\x20you\x20want\x20to\x20log\x20in\x20with.\x3Cbr\x3E\x3Cbr\x3EThe\x20user\x20ID\x20is\x20a\x20unique\x20alphanumeric\x20string\x20that\x20identifies\x20a\x20user.\x20It\x20is\x20assigned\x20when\x20the\x20user\x20record\x20is\x20created.')">
            User ID:</span>
            </td>
            <td>
                <input type="text" name="j_username" id="j_username" size="20" maxlength="50" tabindex="1" class="form_field">
            </td>
        </tr>
        <tr valign="middle">
            <td class="form_label">
            <span class="help_spot" onMouseOver="loadHelp('Enter\x20the\x20password\x20for\x20your\x20login\x20user\x20ID.\x3Cbr\x3E\x3Cbr\x3EThe\x20password\x20is\x20a\x20private\x20character\x20string\x20that\x20verifies\x20the\x20user\x20ID.\x20After\x20login,\x20this\x20password\x20can\x20be\x20changed.')">
            Password:</span>
            </td>
            <td>
                <input type="password" name="j_pin" id="j_pin" size="20" maxlength="50" tabindex="2" class="form_field">
            </td>
        </tr>
        <tr valign="middle" id="otp_section">
            <td class="form_label">
            <span class="help_spot" onMouseOver="loadHelp('Generate\x20a\x20one\x2Dtime\x20password\x20\x28OTP\x29\x20with\x20the\x20device\x20you\x20are\x20using\x20for\x20login,\x20and\x20enter\x20the\x20value\x20in\x20the\x20field.\x20Connected\x20devices\x20generate\x20and\x20enter\x20the\x20OTP\x20value\x20automatically\x20when\x20you\x20click\x20\x3Cb\x3EGet\x20OTP\x3C\x2Fb\x3E.\x3Cbr\x3E\x3Cbr\x3EConsult\x20your\x20device\x20documentation\x20for\x20instructions\x20on\x20how\x20to\x20generate\x20an\x20OTP.')">
            OTP:</span>
            </td>
            <td>
                <input type="text" name="j_password" id="j_password" size="20" maxlength="50" tabindex="3" class="form_field">
                <a href="javascript:gemalto.otpplugin.getOTPsAndPANForCustomButton();" class="form_button" onMouseOver="loadHelp('Click\x20this\x20button\x20to\x20generate\x20and\x20enter\x20the\x20one\x2Dtime\x20password\x20\x28OTP\x29\x20value\x20automatically\x20with\x20your\x20connected\x20device.\x3Cbr\x3E\x3Cbr\x3EBe\x20sure\x20that\x20your\x20device\x20is\x20plugged\x20in\x20and\x20connected\x20to\x20your\x20computer\x20before\x20trying\x20to\x20generate\x20the\x20OTP.')"/>Get
    OTP</a>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div class="form_separator"><img src="../img/spacer.gif"
                width="1" height="1"></div>
            </td>
        </tr>
        <tr valign="middle">
            <td colspan="2" align="center">
            <input type="submit" tabindex="4" id="login_button" name="submit" value="LOGIN" class="form_button" onMouseOver="loadHelp('When\x20you\x20have\x20entered\x20information\x20in\x20all\x20fields,\x20click\x20this\x20button\x20to\x20authenticate\x20your\x20user\x20ID\x20and\x20log\x20in\x20to\x20the\x20Customer\x20Care\x20Portal.')"
    onClick="return checkFields();">
            </td>
        </tr>
      </form>
    ########### The second should fill the form with new information and validate them (the form bellow)
    <form name="userform" action="user_migrate.jsp" method="POST" autocomplete="off">
        <tr>
            <td colspan="2" class="form_text" align="left">
                Fields marked with an asterisk <font color='red'><big>*</big></font> are required.
            </td>
        </tr>
        <tr valign="middle">
            <td class="form_label"><font color="red"><big>*</big></font>
            <span class="help_spot" onMouseOver="loadHelp('User\x20ID\x20field.\x20The\x20User\x20ID\x20is\x20a\x20unique\x20alphanumeric\x20string\x20chosen\x20to\x20identify\x20a\x20user.')">
            User ID:</span>
            </td>
            <td>
                <input type="text" name="userid" value="" size="26" class="form_field">
            </td>
        </tr>
           <tr id="pwdguideline">
                <td class="form_label"> &nbsp;</td>
            <td class="form_text" align="left">
                A valid password is case-sensitive and must: <br>&nbsp;-&nbsp; consists of 6 characters or more<br>&nbsp;-&nbsp; include at least 1 alphabetic character<br>&nbsp;-&nbsp;
    include at least 1 numeric character<br>&nbsp;-&nbsp; not include white space<br>
            </td>
        </tr>
            <input type="hidden" name="password" value=""/>
        <tr>
            <td class="form_label"><font color="red"><big>*</big></font>
            <span class="help_spot" onMouseOver="loadHelp('First\x20security\x20answer\x20field.\x20The\x20security\x20answers\x20are\x20answers\x20to\x20personal\x20questions\x20used\x20to\x20validate\x20a\x20user\x5C\x27s\x20identity\x20in\x20case\x20the\x20user\x20loses\x20his\x20or\x20her\x20password.')">
            What is your mother's maiden name?:</span>
            </td>
             <td>
                <input type="text" name="answer1" value="" size="26" class="form_field">
            </td>        
        </tr>
        <tr>
        <td class="form_label"><font color="red"><big>*</big></font>
            <span class="help_spot" onMouseOver="loadHelp('Second\x20security\x20answer\x20field.\x20The\x20security\x20answers\x20are\x20answers\x20to\x20personal\x20questions\x20used\x20to\x20validate\x20a\x20user\x5C\x27s\x20identity\x20in\x20case\x20the\x20user\x20loses\x20his\x20or\x20her\x20password.')">
            What is your date of birth?:<br>(yyyy-mm-dd)</span>
            </td>
             <td>
                <input type="text" name="answer2" value="" size="26" class="form_field">
            </td>  
        </tr>   
        <tr>
        <td class="form_label"><font color="red"><big>*</big></font>
            <span class="help_spot" onMouseOver="loadHelp('Role\x20field.\x20Refers\x20to\x20the\x20role\x20associated\x20with\x20the\x20user.\x20A\x20role\x20is\x20identified\x20by\x20its\x20unique\x20role\x20name\x20and\x20defines\x20what\x20functions\x20are\x20available\x20to\x20its\x20associated\x20users.')">
            Role:</span>
            </td>
              <td class="form_text">
                <select name="rolename" class="form_select" single>
                   <option value="Admin" >Admin</option>
                   <option value="Agent" >Agent</option>
                   <option value="Default" selected>Default</option>
                   <option value="Support" >Support</option>
                 </select>
                </td>
             </tr>
        <tr>
            <td class="form_label">
            <span class="help_spot"
                  onMouseOver="loadHelp('Sends\x20the\x20user\x20an\x20email\x20with\x20a\x20link\x20to\x20download\x20the\x20selected\x20application.\x20Email\x20must\x20be\x20filled\x20and\x20a\x20separate\x20mail\x20will\x20be\x20sent\x20per\x20application\x20selected.')">
            Initiate Token registration:</span>
            </td>
            <td class="form_field_cell">
                &nbsp;&nbsp;
                <input type="checkbox" name="initMobileapptokenReg" value="true" class="form_field_cell" >
                IDProve 300 Mobile
                &nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div class="form_separator"><img src="../img/spacer.gif"
                width="1" height="1"></div>
            </td>
        </tr>
        <tr valign="middle">
            <td colspan="2" align="center">
            <input type="submit" name="submituserform" value="MIGRATE" class="form_button" onMouseOver="loadHelp('Create\x20a\x20new\x20record.')" onClick="return validateForm()"
    >
            <input type="Reset" name="resetuserform" value="START OVER" class="form_button" onMouseOver="loadHelp('Reset\x20the\x20form.')">   
            </td>
        </tr>
        <input type="hidden" name="posting" value="true">
    </form>
    ############ Here is my Powershell Script
    [System.Net.ServicePointManager]::CheckCertificateRevocationList = $false;
    [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true; };
    Add-Type @"
      using System.Net;
      using System.Security.Cryptography.X509Certificates;
      public class TrustAllCertsPolicy : ICertificatePolicy {
         public bool CheckValidationResult(
          ServicePoint srvPoint, X509Certificate certificate,
          WebRequest request, int certificateProblem) {
          return true;
    [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
    [System.Net.ServicePointManager]::CheckCertificateRevocationList = $false;
    [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true; };
    # Authentication
    $url1 = 'https://localhost/login.jsp'
    $param1 = @{ authByOTP='no'; j_username='test'; j_pin='test' }
    Invoke-WebRequest -Uri $url1 -SessionVariable CurrentSession -Method Post -Body $param1 -ContentType "text/xml"
    # Registration
    $AccountName ="test2"
    $Reponse1 ="replyOne"
    $Reponse2 = "replyTwo"
    $Role ="Default"
    $IDProve ="False"
    $Post = "MIGRATE"
    $url2 = 'https://localhost/registration.jsp'
    $parametre2 = @{ userid=$AccountName; answer1=$Reponse1; answer2=$Reponse2; rolename=$Role;               'initMobileapptokenReg'=$IDProve; submituserform=$Post; }
    Invoke-WebRequest -Uri $url2 -SessionVariable CurrentSession -Method Post -Body $parametre2 -ContentType "text/xml"
    When I run it, I get this status
    StatusCode        : 200
    StatusDescription : OK
    Content           :
    But nothing happens when I check the result.
    I will be grateful if someone can help. Thanks in advance.
    Regards,
    Louban.

    Hi Louban,
    To run the cmdlet "Invoke-WebRequest" with .jsp file, the script is for your reference:
    # variables for the script
    $YellowLevel = 14
    $RedLevel = 7
    $SleepHours = 1
    # change window title
    $Host.UI.RawUI.WindowTitle = "QAS DB Expiry Checker"
    # loop indefinitely
    while($true){
    #get web page
    $Page = (Invoke-WebRequest "http://qaswebserver.rcmtech.co.uk:8080/proweb/test.jsp").Content # look for text on web page using regular expression
    if($Page -match "[0-9]+ days"){
    # get matching text string from full web page text
    $FullText = (Select-String -InputObject $Page -Pattern "[0-9]+ days").Matches.Value
    Write-Host (get-date),"QAS remaining: $FullText - " -NoNewline
    # get just the number of days
    $DaysString = (Select-String -InputObject $FullText -Pattern "[0-9]+").Matches.Value
    # convert number of days to integer to allow numeric matching operations, e.g. "greater than"
    $DaysInteger = [convert]::ToInt16($DaysString)
    # interrogate the number of days and set status based on what its value is
    switch($DaysInteger){
    {$_ -gt $YellowLevel} {
    Write-Host "Green" -ForegroundColor Green
    {($_ -le $YellowLevel) -and ($_ -gt $RedLevel)} {
    Write-Host "Yellow" -ForegroundColor Yellow
    {$_ -le $RedLevel} {
    Write-Host "Red" -ForegroundColor Red
    } else {
    # page did not contain expected text
    Write-Host "Error with page" -ForegroundColor Yellow
    # wait for specified time
    Start-Sleep -Seconds ($SleepHours * 60 * 60)
    Refer to:
    PowerShell: QuickAddress Pro data expiry checker
    If there is anything else regarding this matter, please feel free to post back.
    Best Regards,
    Anna Wang

Maybe you are looking for

  • Since Ios 7 Update of my iPhone 5 I can not log into any WLAN any more - who can help to solve this major problem

    Hi all, I updated my iPhone 5 recently to IOS 7 - Since then I do not get any access to my home WLAN / WIFI with the iphone 5. At same time the iphone 3S and IPAD 1 of my wife (both IOS 5.x) still work fine in our homes WLAN / WIFI. Who can help to g

  • Project File Reload SCC Integratio​n

    Hello, We have LabVIEW integrated with our source control system, using SCC. When we make a change to the project file, e.g. add a VI, this checks the project file out and applies the change. On occasion we get the message "The file <project file> ha

  • Two different languages in one report

    Hi All , I have a requirement , where i need to show content in Invoice in two language English and Arabic simulataneously.Its not like one invoice in English and other in Arabic.I am fine with numbers being shown in English. e.g : Name of the Comapn

  • Need information about Portege 2000

    Hi I have portege 2000 it's nice and pretty notebook I have a problem: I need serial number or parts number of hard drive caddy and hdd adaptor anybody can help me?

  • How do I uninstall Bridge CS6?

    Unfortunately I have to use Photoshop and DreamWeaver.  I don't want to have to be saddled with anything else.  How do I remove Bridge CS6 without affecting the two applications I actually have to use? Kind regards, Paul.