How user can change password @ jsp page

[att1.html]
          

Try http://dev2dev.bea.com/codelibrary/code/pwchange.jsp
          It is for 8.1, but it can be a good starting point
          <[email protected]> wrote in message news:[email protected]..
          How i can develop a jsp page that let user change their login password that stored in reaml residered at WebLogic 7.0 srever.
          Thanks in advance.
          [att1.html]
          

Similar Messages

  • How I can open a jsp page in readonly mode

    Hi, I have a problem in JSP. I want to open a jsp page in read only mode. How I can do this?

    Can you explain what you mean by "open a jsp page in read only mode"? open the jsp file in an editor in read only mode? load the jsp page only once all by the server? tell web client that the response will never change?

  • How i can change password my apple id. if i forgot my questions

    i need to change password my apple id but i forgot my answers of the questions

    Security questions:
    https://discussions.apple.com/docs/DOC-4551
    http://support.apple.com/kb/HT5312
    This is also useful:
    http://www.macworld.co.uk/ipad-iphone/news/?newsid=3463233&olo=email
    If you don’t know your security questions, phone Apple (using the number listed here:  http://support.apple.com/kb/HE57  ) and ask for the Account Security Team.

  • Command #user can change there own password (inside script..without passwd)

    HI,
    I have prepared one script, from which user can change there own password across all the nodes he wants.But problem is script is not working because the following command is not working
    echo -e "$oldPassword\n$newPassword" | passwd
    i have tried to run it manually but it is showing the folowing error....
    [testuser@xxxxxx01 ~]$ echo -e test\ntest123|passwd
    Changing password for user testuser.
    Changing password for testuser
    (current) UNIX password: passwd: Authentication token manipulation error
    [testuser@xxxxxxx01 ~]$
    any idea how to resolve this , or is there any other command where user can change their own password (inside a script).
    Regards,
    Ani

    When you change the password and are not root user, the passwd utility will ask for the current (old) password. You have specified a wrong old password, plus the utility will ask for confirmation of the new password.
    <pre>
    $ passwd
    Changing password for user dude.
    Changing password for dude.
    (current) UNIX password: asdfasdf
    passwd: Authentication token manipulation error
    $ passwd
    Changing password for user dude.
    Changing password for dude.
    (current) UNIX password: correct_password
    New password: How_will_1_ever_remember
    Retype new password: How_will_1_ever_remember
    passwd: all authentication tokens updated successfully.
    $ old_pwd='How_will_1_ever_remember'
    $ new_pwd='My_secret_passord_1'
    $ echo -e "$old_pwd\n$new_pwd\n$new_pwd" | passwd
    Changing password for user dude.
    Changing password for dude.
    (current) UNIX password: New password: Retype new password: passwd: all authentication tokens updated successfully.
    </pre>
    Edited by: Dude on Sep 25, 2012 4:36 PM

  • HT4623 I can't install software Update for iOS 7.1.1. for iPad because I was forgot my password. How I can change my password?

    I can't install software Update for iOS 7.1.1. for iPad because I was forgot my password. How I can change my password?

    These are user to user forums. Apple does not participate here and does not respond to posts. For the record, since the iPad 2 supports iOS 8 any attempt to update the iPad 2 will result in an update to 8.1. Apple only supports updating to the latest version of the operating system that the device supports.

  • How to Restrict users to change password

    Hi All,
     I would like to restrict user to change password only defined number of times in a day, Is it possible to do it through group policies.
    Please note i am already aware of "Minimum Password age" feature, however i do not want to use it as the minimum value that i can set here is 1 day. I would like to restrict users based on password reset threshold e.g. User can reset his password
    in a day only twice or thrice.
    Thanx & Regards,
    Wasim Parkar

    If you want to limit the user to have his/her password changed for a specific number of time every day, I have to say
    NO thats not possible. PSO's as other mentioned,can be used to have different password policies. Maybe you can set the msDS-MinimumPasswordAge
    to 00:04:00:00 which is equal to 4 hours. It means every 4 hours a user will be able to change his/her password. So in each day a user can change the password 6 times, since a day is 24 hours.
    Do not forget a day start from 00:00 AM up to 11:59 PM. So in a 9 to 5 job, a user may change the password 2-3 times.
    Hope it helps.
    Mahdi Tehrani Loves Powershell
    Please kindly click on Propose As Answer or to mark this post as
    and helpfull to other poeple.

  • How We Can Change Page Size During Report Run Time

    Hello !
    How We Can Change Page Size During Report Run Time .
    How can we stop to change the column name when we amend a sql in report data model.
    Thanks !
    null

    hello sohail
    1. question - i'm afraid this cannot be done ... bit in report 6 and newer you have posibility to divide your report in 3 parts (former header, body, trailor) and each part can have diferent page siz, orientation , ...
    2. question - best is give each column in your statements in one report diferent alias. when you have to chnge something, alias will remain same ...
    try this: select 1 as fist_column, 1 as second_column from dual
    hope this helsp

  • How I can change the ID user

    How I can change the ID user & Pass

    on your iphone settings - app store - apple id - logout
    on the web look at the link
    http://support.apple.com/kb/he37

  • How i can change to standard user, an admin user

    Hi,
    How I can change to standard user an admin user, if the check box can not be unchecked.
    I have opened the lock to allow for future changes.
    I have more than one admin user.
    As root user, I can't do it.
    Thanks.

    Hi,
    I have, but looks the same, unable to change.
    I finally decided to create a new standard user and delete this.
    Thanks for the support.

  • How can WLS use JSP pages in a Web Application witth just a JRE [Web Application, WAR, JSP, weblogic.jsp.pageCheckSeconds and JRE]

              How can WLS use JSP pages in a Web Application (either a .war file or a war directory structure) without a java compiler?
              I suspect either the JSP specification is flawed (i.e. it doesn't take account of servers using just a JRE), or BEA's implementation is broken.
              Production servers do not have a JDK installed. They only have a JRE. Therfore a java compiler is not present on the machine that the Web Application is deployed onto.
              On the development machine, when the server is requested to load the JSP it creates a tmpwar directory within the Web Application directory structure. This is then included in the resultant .war file thus:
              D:\war>jar -tf gmi.war
              META-INF/
              META-INF/MANIFEST.MF
              gmiService.jsp
              WEB-INF/
              WEB-INF/classes/
              WEB-INF/classes/com/
              WEB-INF/classes/com/bt/
              WEB-INF/classes/com/bt/gmi/
              WEB-INF/classes/com/bt/gmi/gmiService.class
              WEB-INF/getList.xsl
              WEB-INF/getListByConnection.xsl
              WEB-INF/getListByDistrict.xsl
              WEB-INF/getListByDistrictConnection.xsl
              WEB-INF/lib/
              WEB-INF/source/
              WEB-INF/source/build.bat
              WEB-INF/source/gmiService.java
              WEB-INF/web.xml
              WEB-INF/weblogic.xml
              tmpwar/
              tmpwar/jsp_servlet/
              tmpwar/jsp_servlet/_gmiservice.class
              tmpwar/jsp_servlet/_gmiservice.java
              When deployed on the production server with the web.xml file set to use the following values (note XML stripped):
              weblogic.jsp.pageCheckSeconds
              -1
              weblogic.jsp.precompile
              false
              weblogic.jsp.compileCommand
              javac
              weblogic.jsp.verbose
              true
              weblogic.jsp.packagePrefix
              jsp_servlet
              weblogic.jsp.keepgenerated
              false
              And in the weblogic.properties file:
              weblogic.httpd.webApp.gmi=war/gmi
              I've also tried with the .war file, but that insists on creating another tmpwar directory outside of the .war file.
              Then, although I have set pageCheckSeconds to -1 (don't check and don't recompile) ter production server still attempts to recompile the JSP's:
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param verbose initialized to: true
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param packagePrefix initialized to: jsp_servlet
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param compileCommand initialized to: javac
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param srcCompiler initialized to weblogic.jspc
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param superclass initialized to null
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param workingDir initialized to: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param pageCheckSeconds initialized to: -1
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: initialization complete
              Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java file: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java
              Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java failed: Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/javac/Main
              java.io.IOException: Compiler failed executable.exec([Ljava.lang.String;[javac, -classpath, /opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:/opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4boot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudscape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/weblogic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib/weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses:/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer/weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/wls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, -d, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java])
              at java.lang.Throwable.fillInStackTrace(Native Method)
              at java.lang.Throwable.fillInStackTrace(Compiled Code)
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Exception.<init>(Compiled Code)
              at java.io.IOException.<init>(Compiled Code)
              at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
              at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
              at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:187)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:118)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:142)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:744)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:692)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:251)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              at weblogic.kernel.ExecuteThread.run(Compiled Code)
              

    The default Java compiler from sun lives in the tools.jar that comes with
              the JDK. Just add that to your set of JARs which are deployed in production
              and you should be fine. No need to install the full JDK - just make the
              tools.jar available to WebLogic.
              Regards
              James
              James Strachan
              =============
              email: [email protected]
              web: http://www.metastuff.com
              "Martin Webb" <[email protected]> wrote in message
              news:[email protected]...
              >
              > How can WLS use JSP pages in a Web Application (either a .war file or a
              war directory structure) without a java compiler?
              >
              > I suspect either the JSP specification is flawed (i.e. it doesn't take
              account of servers using just a JRE), or BEA's implementation is broken.
              >
              > Production servers do not have a JDK installed. They only have a JRE.
              Therfore a java compiler is not present on the machine that the Web
              Application is deployed onto.
              >
              > On the development machine, when the server is requested to load the JSP
              it creates a tmpwar directory within the Web Application directory
              structure. This is then included in the resultant .war file thus:
              >
              > D:\war>jar -tf gmi.war
              > META-INF/
              > META-INF/MANIFEST.MF
              > gmiService.jsp
              > WEB-INF/
              > WEB-INF/classes/
              > WEB-INF/classes/com/
              > WEB-INF/classes/com/bt/
              > WEB-INF/classes/com/bt/gmi/
              > WEB-INF/classes/com/bt/gmi/gmiService.class
              > WEB-INF/getList.xsl
              > WEB-INF/getListByConnection.xsl
              > WEB-INF/getListByDistrict.xsl
              > WEB-INF/getListByDistrictConnection.xsl
              > WEB-INF/lib/
              > WEB-INF/source/
              > WEB-INF/source/build.bat
              > WEB-INF/source/gmiService.java
              > WEB-INF/web.xml
              > WEB-INF/weblogic.xml
              > tmpwar/
              > tmpwar/jsp_servlet/
              > tmpwar/jsp_servlet/_gmiservice.class
              > tmpwar/jsp_servlet/_gmiservice.java
              >
              > When deployed on the production server with the web.xml file set to use
              the following values (note XML stripped):
              >
              > weblogic.jsp.pageCheckSeconds
              > -1
              >
              > weblogic.jsp.precompile
              > false
              >
              > weblogic.jsp.compileCommand
              > javac
              >
              > weblogic.jsp.verbose
              > true
              >
              > weblogic.jsp.packagePrefix
              > jsp_servlet
              >
              > weblogic.jsp.keepgenerated
              > false
              >
              >
              > And in the weblogic.properties file:
              >
              > weblogic.httpd.webApp.gmi=war/gmi
              >
              > I've also tried with the .war file, but that insists on creating another
              tmpwar directory outside of the .war file.
              >
              >
              > Then, although I have set pageCheckSeconds to -1 (don't check and don't
              recompile) ter production server still attempts to recompile the JSP's:
              >
              >
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              verbose initialized to: true
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              packagePrefix initialized to: jsp_servlet
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              compileCommand initialized to: javac
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              srcCompiler initialized to weblogic.jspc
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              superclass initialized to null
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              workingDir initialized to:
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              pageCheckSeconds initialized to: -1
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp:
              initialization complete
              > Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java
              file:
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java
              > Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java failed: Exception in thread "main" java.lang.NoClassDefFoundError:
              sun/tools/javac/Main
              >
              > java.io.IOException: Compiler failed
              executable.exec([Ljava.lang.String;[javac, -classpath,
              /opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:
              /opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4bo
              ot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudsc
              ape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/web
              logic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/
              5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib
              /weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses
              :/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer
              /weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/w
              ls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiSe
              rver/weblogic/war/gmi/_tmp_war, -d,
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war,
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java])
              > at java.lang.Throwable.fillInStackTrace(Native Method)
              > at java.lang.Throwable.fillInStackTrace(Compiled Code)
              > at java.lang.Throwable.<init>(Compiled Code)
              > at java.lang.Exception.<init>(Compiled Code)
              > at java.io.IOException.<init>(Compiled Code)
              > at
              weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
              > at
              weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
              > at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
              > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              > at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
              7)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :118)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :142)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:744)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:692)
              > at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager.java:251)
              > at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              > at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              > at weblogic.kernel.ExecuteThread.run(Compiled Code)
              >
              >
              >
              

  • Please tell me how i can get to the page that let's me change my printer from computer to printer to

    please explain how I can get to the page that will let me change my printer to the wireless system instead of computer to printer I had to use the hardwire way to use my print shop, but now I would like it to be a wireless system  cannot find the page to let me change it back please help

    Usually the HP Printer software/driver folder in the Start Menu has the option to switch to wireless from usb.
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • How to set "User cannot change password" on W2K accounts.

    Hi gurus,
    I need to set (from create user form) "User cannot change password" on W2K accounts.
    I was expected that some value of userAccountControl attribute on AD could do the job, but I realized that it is not so (look also to http://forum.java.sun.com/thread.jspa?threadID=593193&messageID=3108889).
    Thanks for any suggestion.

    Yeah thats right, I have implemented the same using nTSecurityDescriptor attribute

  • TMG 2010 publishing Exchange 2010 OWA cannot change password if user must change password at first logon is set

    Hi,
     I have an odd issue whereby if I set "user must change password" on an AD account, the end user cannot logon, they're simply taken back to the OWA login page as if their password is incorrect.
    My setup is as follows:
    outer TMG -- uses a listener for email.contoso.com and is configured for no authentication.This uses a publishing rule to publish the inner TMG server. This server is not a domain member.
    inner TMG - uses a listener for email.contoso.com and is configured for NLTM\kerberos negotiation with forms authentication (Windows Active Directory). This server is a domain member and use a publishing rule to publish the internal CAS. Allow users to change
    password is selected in the publishing rules.
    Exchange 2010 SP1 - uses integrated windows and basic authentication. Has the appropriate registry key configured to allow users to change their AD password on first logon.
    I've registered an snp for "http/email.contoso.com mailserver-dc1", all SSL certificates being used are valid and my configuration used to allow users to login and change their password with "user must change password on first login"
    set in AD.
    If I launch a web browser on an internal server and point it to email.contoso.com I'm immediately presented with a generic Windows authentication request (similar to what's seen in ADFS) rather than the standard OWA page. No matter what I do, I cannot login
    and change my password using the correct URL. However if I point my browser at
    http://192.168.4.10/owa I'm prompted to login and I can change my password using the sam credentials.
    The only recent changes made are:
    - Disabling SSL 3.0 and enabling TLS  (http://www.isaserver.org/articles-tutorials/configuration-security/improving-ssl-security-forefront-threat-management-gateway-tmg-2010-published-web-sites.html)
    - Replacing the TMG listener certificates so that they now use SHA2 rather than SHA2 (certificates are trusted on each TMG server)
    Looking on the outer TMG and the DC logs I can see schannel errors which I believe are related to the problem. TMG monitoring also shows "Failed connection attempt: 1907 The user'spassword must be changed before logging on for the first time"
    I've checked that my inner TMG and DC are using the same certificate for server authentication and gone through this guide:
    http://blogs.technet.com/b/keithab/archive/2012/02/29/setting-up-and-troubleshooting-ldaps-authentication-in-forefront-tmg-2010.aspx
    If I try to use ldp.exe on the inner TMG, I get the error in the pic below
    Thanks
    IT Support/Everything

    Hi,
    You could try to analyze the TMG tracing and try the troubleshoot steps in the blog below.
    TMG 2010 – FBA, troubleshooting the change password feature 
    http://blogs.technet.com/b/isablog/archive/2012/05/07/tmg-2010-fba-troubleshooting-the-change-password-feature.aspx
    Best Regards,
    Joyce

  • How to disable change password in finder while connecting to a network computer?

    Hi folks,
    I'd like to disable the Change Password option that shows when I want to connect into a network computer:
    - Both users (client and server) are already running with parental controls set to "prevent(s) the user from changing their password in the Users & Groups preference pane".
    Thanks in advance.

    Hi,
    I am also facing the same issue and I am not able to su to root user as the password is expired. and the user I am currently logged in does not have permission to change the root password. I just want to know how I can change the root password now? I am connected to my SPARC Solaris 10 T1000 server through hyperterminal.
    The worst thing is that, I do not have IP to the server through which I can try ssh to the server and change the password. Please let me know the solution if you know.
    Thanks in advance.

  • How to use class in JSP page ? In java works in JSP not...

    Hello developers,
    I need check if URL exists.. i use this code in java.. it works fine..
    import java.net.*;
    import java.io.*;
    public class Check {
    public static void main(String s[]) {
        System.out.println(exists("http://www.google.com"));
        System.out.println(exists("http://www.thisURLdoesntexis.com"));
    static boolean exists(String URLName){
      try {
        HttpURLConnection.setFollowRedirects(false);
        // note : you may also need
        //        HttpURLConnection.setInstanceFollowRedirects(false)
        HttpURLConnection con =
           (HttpURLConnection) new URL(URLName).openConnection();
        con.setRequestMethod("HEAD");
        return (con.getResponseCode() == HttpURLConnection.HTTP_OK);
      catch (Exception e) {
           e.printStackTrace();
           return false;
    }in java all works fine.. it shows
    TRUE
    FALSE
    but i have no idea how can i implement this java code to my check.jsp page..
    i tried something like this..
    <%@ page import="java.io.*" %>
    <%@ page import ="java.net.*" %>
    <BODY>
    <%
    static boolean exists(String URLName){
      try {
        HttpURLConnection.setFollowRedirects(false);
        // note : you may also need
        //        HttpURLConnection.setInstanceFollowRedirects(false)
        HttpURLConnection con =
           (HttpURLConnection) new URL(URLName).openConnection();
        con.setRequestMethod("HEAD");
        return (con.getResponseCode() == HttpURLConnection.HTTP_OK);
      catch (Exception e) {
           e.printStackTrace();
           return false;
    String a="http://www.google.com";
    %>
    <%= exists(a)%>and i want to see in my jsp page the result.. it means that JSP page shows
    TRUE
    Thanks in advance,

    Hi there,
    One solution is to use JavaBeans and call the methods for the JavaBean from the JSP page.
    Suppose you have a JavaBean called TestConnectionBean as follows:
    package test22;
    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.io.IOException;
      Set the testUrl before checking if connection exists.
    public class TestConnectionBean {
        String testUrl;
        boolean connectionExists;
        public TestConnectionBean() {
        public String getTestUrl() {
            return testUrl;
        public void setTestUrl(String testUrl) {
            this.testUrl = testUrl;
        public boolean getConnectionExists() throws IOException, MalformedURLException {
            HttpURLConnection.setFollowRedirects(false);
            // note : you may also need
            //        HttpURLConnection.setInstanceFollowRedirects(false)
            HttpURLConnection con = null;
            con = (HttpURLConnection) new URL(this.testUrl).openConnection();
            con.setRequestMethod("HEAD");
            return (con.getResponseCode() == HttpURLConnection.HTTP_OK);
        public void setConnectionExists(boolean connectionExists) {
            this.connectionExists = connectionExists;
    }Then you can create a JSP page like this:
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <html>
      <head><title></title></head>
      <body>
      <jsp:useBean id="testConnectionBean" class="test22.TestConnectionBean"/>
      <jsp:setProperty name="testConnectionBean" property="testUrl" value="http://www.google.com" />
      <br/><br/>
      Does the connection exist for http://www.google.com : <jsp:getProperty name="testConnectionBean" property="connectionExists"/>
      <br/><br/>
      <jsp:setProperty name="testConnectionBean" property="testUrl" value="http://www.thisURLdoesntexis.com" />
      <br/><br/>
      <%-- The following will give an exception : java.net.UnknownHostException: www.thisURLdoesntexis.com since the URL doesn't exist. 
      --%>
      <%--
      Does the connection exist for http://www.thisURLdoesntexis.com : <jsp:getProperty name="testConnectionBean" property="connectionExists"/>
      --%>
      </body>
    </html>The output you see looks like:
    Does the connection exist for http://www.google.com : true
    I think it is better to handle the exceptions in the JavaBean itself, so now yyou can change the method signature of getConnectionExists , remove all exceptions from method signature but handle them with a try/catch inside the method itself.

Maybe you are looking for

  • Error during installation phase when upgrading  from oracle 10 to 11g

    hi, We have going to upgrade oracle 10.2.0.4 to 11.2.0.3 in SAP ECC 6.4(DB:oracle, OS:AIX6.1). By mistake I run RUNINSTALLER from wrong path oracle/stage/11203 <dump folder>/database instead of SAP folder.it gives some error message during installati

  • Help using one path to cut/trim another

    I haven't done much work in Illustrator, and I'm currently using CS4.  I'm trying to figure out how to do something simple, and AI is so counter-intuitive that I'm about to rip my hair out. This is all that I'm trying to do: I have two lines intersec

  • ISSUE WITH BRIDGE AIR-BR1410A

    I have two Air-Bridges 1.8 miles which when the two bridges was lined up and these are the best values ​​obtained after several tests Values ​​are: BR-1410A (root)     BR-1410A (non-root) -58 dbi                            -60dbi 54 M                

  • Performing SQL in JSP okay for clustering?

    I'm running on WLS 8.1 SP2. I've a JSP which is part of my main post login page. There're some SQL logics there. Would this be a problem to cluster replication & failover?

  • IDVD quits unexpectedly when launched

    Brand new iMac which for some reason will not allow me to launch iDVD without 'quitting' The report error details something along the lines of 'library not loaded' 'image not found' Would be grateful of a fix for this problem