Supplying username and password to repository via code

Hi There,
Is there a way to supply the username and password to the webdav repository via code or in the address line? We have an ActiveX object accessing files and would like to avoid the repository prompting.
Thanks

With Script I can do it as follows.. See VerifyConnection
Option Explicit
Const iTimeOutInSecs = 60
Const ForWriting = 2
Rem ************** MAIN *****************
main
Wscript.quit
Sub Main
  Dim WShell, FileSystem
  Dim davControl
  Dim objArgs, targetPath, serverURL, username, password, rootFolder, filter
  Dim fileUploadList, result
  Dim folderList, filelist
  Dim status
  Dim spoolFile
  Set wShell     = WScript.CreateObject("WScript.Shell")
  Set fileSystem = WScript.CreateObject("Scripting.FileSystemObject")
  Set spoolFile = fileSystem.OpenTextFile("httpUploadLoad.log", ForWriting, True)
  Set objArgs = WScript.Arguments
  targetPath  = objArgs(0)
  serverUrl   = objArgs(1)
  username    = objArgs(2)
  password    = objArgs(3)
  rootFolder  = objArgs(4)
  If objArgs.length = 6 Then
    filter    = objArgs(5)
  Else
    filter = Empty
  End If
  Set fileUploadList = CreateObject("Msxml2.DOMDocument.4.0")
  fileUploadList.async = False
  result = fileUploadList.load(targetPath)
  If (result = False) Then
    MsgBox "Failure while loading or parsing file : " & targetPath,vbCritical
    Wscript.quit
  End If
  Set davControl = new DavControlClass
  davControl.setServer serverURL, username, password
  davControl.setSpoofile(spoolfile)
  status = verifyHttpConnection(davControl, username)
  Set folderList =  fileUploadList.documentElement.selectNodes("/Upload/directories/directory")
  createFolders davControl, rootFolder, folderList, username, password, filter
  Set fileList =  fileUploadList.documentElement.selectNodes("/Upload/files/file")
  uploadFiles davControl, rootFolder, fileList, username, password, filter
  spoolfile.close()
End Sub
Function verifyHttpConnection(davControl,username)
  Dim status, targetFolder
  targetFolder = "/home/" & username
  status = davControl.verifyConnection(targetFolder)
  verifyHttpConnection = status
End Function
Sub createFolders(davControl, rootFolder, folderList, username, password, filter)
  Dim i, targetFolder, targetFolderPath
  For i = 0 to folderList.length - 1
    Set targetFolder = folderList.item(i)
    targetFolderPath = rootFolder & targetFolder.text
    If IsNull(filter) or (InStr(targetFolder.text,filter) = 1) Then
      'wscript.echo "Making " & targetFolderPath
      davControl.makeDir targetFolderPath,true
    End If
  Next
End Sub
Sub uploadFiles(davControl, rootFolder, fileList, username, password, filter)
  Dim i, targetFile, targetFilename, localFilename
  For i = 0 to fileList.length - 1
    Set targetFile = fileList.item(i)
    targetFilename = rootFolder & targetFile.text
    localFilename = Right(replace(targetFile.text,"/","\"),Len(targetFile.text)-1)
    If IsNull(filter) or (InStr(targetFile.text,filter) = 1) Then
      'wscript.echo "Uploading " &localFilename & " as " & targetFilename
      davControl.uploadFile localFIlename, targetFileName, "FORCE"
    End If
  Next
End Sub
Class DavControlClass
  Private HTTPUser
  Private HTTPPassword
  Private HTTPServer
  Private installParameters
  Private windowsShell
  Private XMLHTTP_CLASS_ID
  Private HttpObject
  Private spoolFile
  Dim     folderStatusList
  Private Sub Class_Initialize()
    XMLHTTP_CLASS_ID = "Msxml2.XMLHTTP.6.0"
    Set HttpObject = CreateObject(XMLHTTP_CLASS_ID)
    folderStatusList = Empty
  End Sub  
  Public Sub setSpoofile(file)
    Set spoolFile = file
  End Sub
  Public Sub setParameters(wshell, params)
    Set installParameters = params
    Set windowsShell = wShell
    setServer params.getServerURL(), params.getUser(), params.getPassword()
  End Sub
  Public Sub setServer(serverURL,serverUser,serverPassword)
    HTTPServer   = serverURL
    HTTPUser     = serverUser
    HTTPPassword = serverPassword
  End Sub
  Public Function getServerURL
    getServerURL= HTTPServer
  End Function       
  Public Function verifyConnection(target)
    On Error Resume Next
    HttpObject.Open "HEAD", HTTPServer & target, false, HTTPUser, HTTPPassword
    If Err.Number <> 0 Then
      WScript.echo "verifyConnection() - Fatal Error encountered accessing : " & HTTPServer & target & ". Status (" & Hex(Err.number)  & ") " & Err.Description
      Wscript.quit         
    End If
    On Error GoTo 0 
    HttpObject.setRequestHeader "Content-type", "text/xml"
    HttpObject.setRequestHeader "Depth", "1"
    On Error Resume Next
    HttpObject.send ("")
    If Err.Number <> 0 Then
      WScript.echo "resetConnection() - Fatal Error encountered accessing : " & HTTPServer & target & ". Status (" & Hex(Err.number)  & ") " & Err.Description
      Wscript.quit         
    End If
    On Error GoTo 0 
    If HTTPObject.status <> 200 Then
      MsgBox "Unable to access " & getServerURL() & target & ". HTTP Status = " & HTTPObject.status & ". Please correct installParameters.xml and restart Installation",vbCritical
      Wscript.quit
    End If
    spoolfile.writeline "HTTP Successfully Connected to '" & getServerURL() & target
    verifyConnection = HTTPObject.status
  End Function
  Public Function uploadFile (local, remote, mode)
    Dim returnCode, rc
    returnCode = doHead(remote)
    If returnCode = 401 Then
      MsgBox "uploadFile() - Unauthorized (Status (" & returnCode & "). Unable to upload '" & local & "' into '" & remote & "'.  Please check installParameters.xml and log files.",vbCritical
      Wscript.quit         
    End If
    If returnCode = 200 Then
      If mode = "ERROR" Then
        MsgBox "uploadFile() - Installation Failed. Resource Exists : '" & remote & "'. Please check installParameters.xml and restart Installation",vbCritical
        Wscript.quit
      End If
      If mode = "SKIP" Then
        uploadFile = returnCode
        Exit Function
      End If
      If mode = "FORCE" Then
        rc = doDelete(remote)
      End If
    End If
    uploadFile = doPut (local, remote, null)
    If uploadFile = 500 Then
      MsgBox "UploadFile() - Upload Failed (Status (" & uploadFile & "). Unable to upload '" & local & "' into '" & remote & "'.  Retry in Progress.",vbCritical
      uploadFile = doPut (local, remote, null, user, password)
      If uploadFile = 500 Then
        MsgBox "UploadFile() -  Installation Failed (Status (" & uploadFile & "). Unable to upload '" & local & "' into '" & remote & "'.  Please check installParameters.xml and log files.",vbCritical
        Wscript.quit         
      End If
    End If
    If uploadFile = 401 Then
      MsgBox "UploadFile() - Unauthorized (Status (" & uploadFile & "). Unable to upload '" & local & "' into '" & remote & "'.  Please check installParameters.xml and log files.",vbCritical
      Wscript.quit         
    End If
  End Function
  Public Function makeDir(targetFolder,force)
    Dim Status, ParentFolder
    status = doHEAD(targetFolder)
    If not IsEmpty(folderStatusList) Then
      folderStatusList.add targetFolder, status
    End If
    If (status = 404 or status = 409) and force Then
      parentFolder = Mid(targetFolder,1,InStrRev(targetFolder,"/")-1)
      makeDir parentFolder,true
      status = doMKCOL(targetFolder)
    End If
    makeDir = status   
    If status = 401 Then
      MsgBox "doMKCOL() - Unauthorized (Status (" & status & "). Unable to create '" & targetFolder & "'.  Please check installParameters.xml and log files.",vbCritical
      Wscript.quit         
    End If
  End Function
  Public Function doHEAD(remote)
    ' Dim HttpObject
    ' Set HttpObject = CreateObject(XMLHTTP_CLASS_ID)
    ' HttpObject.Open "HEAD", HTTPServer & remote, false, user, password
    HttpObject.Open "HEAD", HTTPServer & remote, false
    HttpObject.setRequestHeader "Content-type", "text/xml"
    HttpObject.setRequestHeader "Depth", "1"
    On Error Resume Next
    HttpObject.send ("")
    If Err.Number <> 0 Then
      WScript.echo "doHEAD() - Fatal Error encountered accessing : " & HTTPServer & remote & ". Status (" & Hex(Err.number)  & ") " & Err.Description
      Wscript.quit         
    End If
    On Error GoTo 0 
    doHead = HttpObject.status
  End Function
  Public Function doPUT(local,remote,contentType)
    Dim tmStart
    Dim tmCurr
    Dim iTimeTaken
    Dim currentStatus
    Dim ado_stream
    Dim uploadCount, uploadStatus
    Set ado_stream = CreateObject("ADODB.Stream")
    ado_stream.Type = 1
    ado_stream.Open()
    On Error Resume Next
    ado_stream.LoadFromFile(local)
    If Err.Number <> 0 Then
      WScript.echo "doPUT() - Fatal Error encountered reading File : " & local & ". Status (" & Hex(Err.number)  & ") " & Err.Description
      Wscript.quit         
    End If
    On Error GoTo 0 
    HttpObject.Open "PUT", HTTPServer & remote, false
    If not IsNull(contentType) Then
      HttpObject.setRequestHeader "Content-type", contentType
    End If
    tmStart = Now
    On Error Resume Next
    HTTPObject.send(ado_stream.Read(-1))
    If Err.number <> 0 Then
      '  Unexpected errors can occur as a result of the HTTP request being passed to wrong database instance
      '  when multiple databases are using the same listener.
      WScript.echo "doPUT() - Fatal Error encountered uploading File : " & local & ". Status (" & Hex(Err.number)  & ") " & Err.Description
      WScript.quit
   Else
      currentStatus = HTTPObject.status
    End If
    On Error GoTo 0 
    uploadCount = 1
    uploadStatus = doHead(remote)
    Do While uploadStatus <> 200 and uploadCount < 6
      '  Unexpected errors can occur as a result of the HTTP request being passed to wrong database instance
      '  when multiple databases are using the same listener.
      spoolfile.writeline "Http Error encountered uploading " & local & " to " & HTTPServer & remote &". Status=" & currentStatus
      currentStatus = retryPUT(local,remote,contentType)
      uploadCount = uploadCount + 1
      uploadStatus = doHead(remote)
    Loop
    If uploadStatus = 200 Then
      tmCurr = Now
      spoolFile.writeLine "Uploaded File " & local & ". Elapsed Time = " & CInt(DateDiff("s", tmStart, tmCurr)) & " seconds."
    Else
      WScript.echo "doPUT - Fatal Error uploading file (" & HTTPServer & remote & ") : Status=" & HTTPObject.status
      WScript.quit
    End If
    doPut = currentStatus
    ado_stream.Close()
  End Function
  Public Function retryPUT(local,remote,contentType)
    Dim ado_stream
    Set ado_stream = CreateObject("ADODB.Stream")
    ado_stream.Type = 1
    ado_stream.Open()
    On Error Resume Next
    ado_stream.LoadFromFile(local)
    If Err.number <> 0 Then
      WScript.echo "doPUT() - Fatal Error encountered reading File : " & local & ". Status (" & Hex(Err.number)  & ") " & Err.Description
      Wscript.quit         
    End If
    On Error GoTo 0 
    HttpObject.Open "PUT", HTTPServer & remote, true
    If not IsNull(contentType) Then
      HttpObject.setRequestHeader "Content-type", contentType
    End If
    On Error Resume Next
    HTTPObject.send(ado_stream.Read(-1))
    If Err.Number <> 0 Then
      ado_stream.Close()
      WScript.echo "doPUT() - Fatal Error encountered sending File : " & local & " to " & HTTPServer & remote &". Status (" & Hex(Err.number)  & ") " & Err.Description & ". Retrying ...."
      Wscript.quit         
    Else   
      Do While HTTPObject.readyState <> 4
        WScript.Sleep(1000)
      Loop
    End If
    On Error GoTo 0 
    ado_stream.Close()
    retryPut =  HTTPObject.status         
  End Function
  Public Function doMKCOL(remote)
    ' wscript.echo "doMKCOL (" & HTTPServer & remote & ")"
    Dim currentStatus
    HttpObject.Open "MKCOL", HTTPServer & remote, false
    HttpObject.setRequestHeader "Content-type", "text/xml"
    On Error Resume Next
    HttpObject.send("")
    If Err.Number <> 0 Then
      WScript.echo "doMKCOL() - Fatal Error encountered making Folder : " & HTTPServer & remote &". Status (" & Hex(Err.number)  & ") " & Err.Description
      Wscript.quit         
    End If
    On Error GoTo 0 
    If  HTTPObject.status <> 201 Then
      WScript.echo "doMKCOL() - Fatal Error encountered making Folder : " & HTTPServer & remote &". Status (" & HTTPObject.status & ")."
      Wscript.quit         
    End If
    doMKCOL = HTTPObject.status
  End Function
  Public Function doDELETE(remote)
    HttpObject.Open "DELETE", HTTPServer & remote, false
    HttpObject.setRequestHeader "Content-type", "text/xml"
    On Error Resume Next
    HttpObject.send("")
    If Err.Number <> 0 Then
      WScript.echo "doMKCOL() - Fatal Error deleting : " & HTTPServer & remote &". Status (" & Hex(Err.number)  & ") " & Err.Description
      Wscript.quit         
    End If
    On Error GoTo 0 
    doDELETE = HTTPObject.status
    If HTTPObject.status <> 201  and HTTPObject.status <> 204 and HTTPObject.status <> 207 and HTTPObject.status <> 404 Then
      wscript.echo "doDELETE (" & HTTPServer & remote & ") : Status=" & HTTPObject.status
    End If
  End Function
End Class

Similar Messages

  • How to supply username and password for consuming webservice in BizTalk Adaptor?

    While I hit the web service directly , I am able get response from that service, it asked for username and password, after that it processed the request and gave expected output. I am trying to consume the same web service (https) from BizTalk orchestration
    ,  it created message type , port type, binding for me , all fine, but while sending message to the webservice , it throws error like this 
    <SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wd="urn:com.abc/bsvc">
    <faultcode>SOAP-ENV:Client.authenticationError</faultcode>
    <faultstring>invalid username or password</faultstring>
    </SOAP-ENV:Fault>
    I have given username and passoword in port level. I tried basic binding, I also tried wcf_basic binding , but no luck. These bindings were generated by wizard only, I Imported those bindings , ports got created, I just added username and password in the
    port level.
    How should I supply username and password in BizTalk to get this working ? Any inputs would be greatly appriciated
    Regards
    Vivek

    Hi,
    the way to resolve this is to write a Wcf Custom Behavior.
    Several people have blogged about this and Microsoft have written some articles:
    http://social.technet.microsoft.com/wiki/contents/articles/627.using-custom-behaviors-with-the-biztalk-wcf-adapters-part-2.aspx
    http://msdn.microsoft.com/en-us/library/cc952299(v=bts.10).aspx
    The articles are old so you need to verify they still apply.
    mark

  • Supplying Username and Password??

    Hi All,
    I took the report link with "Document Only" option, but when I run the URL the username and password screen appears.
    I need to supply the username and the password in the URL or by any other way.
    Regards,

    they are very different options and should both be described in the user guide.
    You can do either or you wouldn't do both. Setting up Single Sign-on is certainly
    something you have to look up - since also potentially applicaitons server specific.
    Enable and UNPROTECTD guest user account is done the following way:
    0) Create a folder under "Shared Folders" with the name "Guest" (or whatever)
    1) Go to the Admin tab
    2) Click on "Security Configuration"
    3) Check "Allow Guest Access"
    4) Enter as Guest Folder Name next to it: Guest (or whatever)
    5) Click Apply
    6) Restart BI Publisher application or applicaiton server

  • Username and password for SOAP sender call

    Hello,
    does anyone know how to provide the username and password to a SOAP sender call, e.g. XI receives the ws via soap and needs to know which userid and password to check. When you use a SOAP client they use basic authentication which sends the request first to XI and XI send a request back for password. This would work for an online app but not for ws from machine to machine. I read some docu about query strings but no where it has an example what to put either on the request URL, the adapter or the SOAP envelope. SOAP 1.1 seems to have left that open and IBM has an example using SOAP Header which did not work with XI.
    Thanks
    Stefan

    Hi,
    do you use the javax.xml.rpc.Call class? Because then
    you can supply username and password to the call via
    the addParameter method. I think I did that with XI 3.0
    and it worked. If you need more information please consult
    the javax.xml.rpc.Call javadoc.
    Best regards,
    Hermann

  • Annoyed by OTN username and password prompting

    Sorry it's really starting to annoy me that I always have to enter my OTN username and password between every browser session. Why can it not use a cockie or whatever to keep me logged in at least for the day. Or better, let me save the password in my keychain so that I only have to press the "Sign In" button when the login appears.
    Firefox has a built in "save password" option, which will supply username and password when accessing a particular web page. It works with sites like ebay and many other common sites, but for some reason it does not work with OTN. When accessing OTN it never prompts me if I want Firefox to remember the password. I'm not using private browsing and have no site in the save password exception list.
    I found an add-on named "Saved Password Editor". It allows to manually add username and password entries associated with a web site. But since almost any software calls home today I rather not use any 3rd party tool to deal with security sensitive information. I checked the tool and it did not call home, but who knows what happens later.
    Any other ideas?
    FWIW: firefox - How does browser know when to prompt user to save password? - Stack Overflow
    Maybe the problem is simply because the login uses "ossusername" instead of "username" in the login form.

    So what is the message? I have no particular objection to any solution that fixes the issue, beside installing 3rd party browser extensions.
    How about the following? Checking https://login.oracle.com/mysso/signon.jsp on http://web-sniffer.net  shows:
    Set-Cookie:    ORA_UCM_VER=; domain=.oracle.com; expires=Thu, 01-Jan-1970 01:00:00 GMT; path=/
    Unfortunately I cannot set my system date prior to 1970 to see what happens, but would the cookie allow me to login without the need to specify my username and password again until the cookie expires? Would that be a feasible option instead of enabling form autocomplete?
    Speaking of which, the OTN forum defines "Cache-Control: private, no-cache, no-store, must-revalidate". This setting disables browser caching. I found the browser's back button very useful in the past to be able to get back the content of the forum editor, for instance, when some error occurred submitting the response or when I accidentally opened another web page. This used to work in the previous forum.
    The editor's new recovery function so far has been rather confusing or completely useless for me. It does not help after being logged out without notice. It actually just happened and I received an "unexpected error" while posting this response, loosing all text. (Un)fortunately I'm used to either copy and paste the content before submitting or use my own text editor. But cutting and pasting has become a different story now after the forum upgrade with the buggy editor.
    Meanwhile I understand that OTN cannot fix the problems with the forum software, but perhaps the login could be improved.

  • Browser need proxy username and password

    this code works fine without a proxy, however i can figuer out how to get it to work when behind a proxy, i tried some different things to pass the proxy username and password(the commented out code) but those did work, can anyone help with this? cause im lost as to how to send the proxy credentials to get outside to the net
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class ReadServerFile extends JFrame {
    private JTextField enter;
    private JEditorPane contents;
    public ReadServerFile(){
    super ("Rage");
    System.getProperties().put("proxySet","true");
    System.getProperties().put("proxyPort","80");
    System.getProperties().put("proxyHost","90.8.0.5");
    //need to set the username and password
    //System.setProperty("http.proxyUser","sservices/proglab30");
    //System.setProperty("http.proxyPassword","proglab30");
    //Authenticator.setDefault(new Authenticator()
    // protected PasswordAuthentication getPasswordAuthentication()
    //   return new PasswordAuthentication("proglab30","proglab30".toCharArray());
    Container c = getContentPane();
    enter = new JTextField("http://www.google.com/");
    enter.addActionListener(new ActionListener()
    {public void actionPerformed (ActionEvent e)
    {getThePage(e.getActionCommand());}});
    c.add( enter, BorderLayout.NORTH);
    contents = new JEditorPane();
    contents.setEditable(false);
    contents.addHyperlinkListener(
    new HyperlinkListener(){
    public void hyperlinkUpdate(HyperlinkEvent e)
        if (e.getEventType()==
        HyperlinkEvent.EventType.ACTIVATED)
        getThePage(e.getURL().toString());}});
    c.add(new JScrollPane(contents), BorderLayout.CENTER);
    setSize(400,300);
    show();
    private void getThePage(String location)
    setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    try {
    contents.setPage(location);
    enter.setText(location);
    catch(IOException io)
      JOptionPane.showMessageDialog(this,"Error getting URL","Bad URL",JOptionPane.ERROR_MESSAGE);
    setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
    public static void main (String args[])
      ReadServerFile app= new ReadServerFile();
      app.addWindowListener(new WindowAdapter(){
        public void windowClosing(WindowEvent e)
          System.exit(0);
    }

    ray,
    Sounds like a permission problem.
    Try running these.
    ColdFusionDirectory\bin\connectors\Remove_ALL_connectors.bat
    ColdFusionDirectory\bin\connectors\IIS_connector.bat
    Ken Ford
    Adobe Community Expert
    Fordwebs, LLC
    http://www.fordwebs.com
    "RayBees" <[email protected]> wrote in message
    news:ek727f$bnq$[email protected]..
    > Greetings
    >
    > I have an interesting problem. When I browse certain
    section of my website
    > I
    > am asked to enter my username and password. When clicked
    "cancel" twice
    > the
    > person is let throught to the page. This seems to be
    related to the cfform
    > tage. If I remove the tag, I am no longer asked for the
    username and
    > password.
    > This happens in IE 6 and 7, Netscape 7.1 but not in
    Firefox 1.5 or Mozilla
    > 1.5.
    >
    > But here is where it gets really interesting, If I log
    onto the web
    > server,
    > every page asks for the username and password. Any
    thoughts?
    >
    > Thanks
    > Ray
    >
    > The Specs
    > CFMX 7.02
    > Windows 2003
    > IIS 6
    >

  • External apps in portal r showing username and password on address bar

    Hai all
    We r usign apps 11.5.3 and 9iAS 9.0.2.0.1.
    Portal 9.0.2.2.14a.
    I regesterd apps as External application to portal and supplied username and password fields.
    It is regestered succesfully and the external application link is working fine.
    When I fisttime accessed link it asked for username and password.
    I could logged in successfully to apps but the user name and pasword r appearing on the address bar of apps page.
    Even my.oracle which is configured bydefault during portal installation is showing user name and password on the addressbar.
    Is there a way to hide them from appearing in address bar.
    regards,
    sreenivas

    You can deploy the external application link for your oracle apps as a url item in a region. Enable the check box to open this url in a new browser window. Hide the toolbars for this new window using javascript. Hope this helps...

  • Verifying a username and password against SQLServer 2000 dbase via servlets

    Hello everyone,
    I sent a message earlier on. I'm really sorry if I sounded rude. Actually Im working on a school project an it involves a bank application. I have created a registration page that saves information in a database table already created on my computer. I have also created an HTML page in wihich registered users can log in. I am trying to verify the username and password against the database table tagged "Register Customer Information" but when I click on the login button, I get an SQL exception that says "invalid column count or syntax error". Please can anyone help me out? I would really be grateful. Thank you so much. The code for my servlet is this:
    * LoginConfirmationServlet.java
    * Created on January 24, 2007, 11:32 PM
    package org.me.RegisterCustomerInformation;
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * @author HP COMPAQ
    * @version
    public class LoginConfirmationServlet extends HttpServlet {
    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
    * @param request servlet request
    * @param response servlet response
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();
    String use=request.getParameter("usernname");
    String pas=request.getParameter("passwword");
    if((use!=null)&&(pas!=null))
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:MyDSN","sa","");
    ps=con.prepareStatement("select UserName,Password from RegisterCustomerInformation where UserName= ? and Password=?");
    rt=ps.executeQuery();
    while (rt.next())
    String u=rt.getString("UserName");
    String p=rt.getString("Password");
    if (use.equals(u)&&pas.equals(p))
    out.println("Welcome:"+use);
    else
    out.println("Your login information is incorrect.");
    out.println("Please check to ensure your username and password is entered correctly.");
    out.println("Thank you!");
    con.close();
    catch(Exception ex)
    out.println("Error:"+ ex.toString());
    /*out.println("<html>");
    out.println("<head>");
    out.println("<title>Servlet LoginConfirmationServlet</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Servlet LoginConfirmationServlet at " + request.getContextPath () + "</h1>");
    out.println("</body>");
    out.println("</html>");*/
    out.close();
    The html fields names are:"usernname" and "passwword" respectively. I'm making use of the POST method and the servlet name is LoginConfirmationServlet. Please I would really be grateful if any one can help me out. Ive not been able to run this for the past few days. Thanks.
    }

    You did not supply values to UserName and Password. You have created preparedStatement object with sql query with ? marks for UserName andPasssword. Assign the values what u got from the form using setProperty(int index) method of preparedStatement and try.

  • I am unable to connect to my RackSpace Windows Server via ARD. I have added a computer entering the ip address, username, and password but I can't establish a connection. I am missing a setting or to step that is different in ARD?

    I am unable to connect to my RackSpace Windows Server via ARD. I have added a computer entering the ip address, username, and password but I can't establish a connection. I am missing a setting or to step that is different in ARD?

    ARD only works with Windows computers if the Windows computer is running VNC server software.  Even then it can only control and observe.  Do you have this installed?

  • 4402 guest users authetication via Web (username and password)

    Hello Everyone,
    We have an issue with Wireless controller model 4402 loaded with 4.0.179.11. This box has stopped authenticating (Layer3 security Web Policy based local usernames and password) last night.
    Steps taken to resolve the issue:-
    1) Created local usernames and password via Web and tried using wireless through Guest ssid, when user enters this information web page loops back to authentication.
    2) Tried authenticating via another Laptop, had no luck.
    3) Changed WLAN SSID Guest from Layer3 security Web Policy to Layer2 Security, created Mac filter table for guest on the Controller. Guest was able to connect to the internet.
    We have not made any configuration change. As this issue affected all Users, we restarting the controller after which issue was resolved. As per my colleagues this has happened couple of times and every time restart fixes this issue.
    Please shed some light on this.
    Regards,
    Mujahid

    Hi Mujahid,
    Just to add a note to the great advice from Richard (5 points for your good work on many posts Richard!)
    Have a look at these bugs that I'm pretty sure we were hitting with this WLC Version as well;
    CSCsi91600 Bug Details
    Internet Explorer redirects to login page with webauth due to cache
    Symptom:
    Client using IE, and web authentication has passed authentication, Policy Manager is in a RUN state, and when the user clicks on the "home" button, or types in the address of their normal homepage, they are continually redirected to the web-auth page
    Conditions:
    Client using IE, and web authentication has passed authentication, Policy Manager is in a RUN state, and when the user clicks on the "home" button, or types in the address of their normal homepage, they are continually redirected to the web-auth page
    Workaround:
    Enable IE client to check for newer versions of stored pages on "every visit to the page" option instead of "automatically" (default).
    Tools -> Internet Options... -> Temporary Internet files -> Settings... -> Check for newer versions of stored pages: Every visit to the page.
    1st Found-In
    4.0(179.11)
    Fixed-In
    4.1(176.6)
    4.1(177.0)
    4.1(181.0)
    4.2(31.0)
    4.2(61.0)
    Related Bugs
    WLC Web-auth homepage leads back to reauth page if redirect URL is used
    In a web-auth deployment with or without guest anchoring. If the redirect url is populated, the users homepage will no longer be able to be reached. Whenever the user navigates back to his homepage it will show the reauth page and the user will no longer be able to reach their homepage. Homepage leads back to reauth page if redirect URL populated
    CSCse90894 Bug Details
    Internet Explorer redirects to login page with webauth due to cache
    Even after the commit of CSCse03666 - which added the following line to the
    default webauth HTML -
    IE 6 continues to redirect its home page back to the webauth login page.
    This is due to a known bug in IE.
    1st Found-In
    4.0(155.5)
    Fixed-In
    3.2(193.4)
    3.2(193.5)
    4.0(206.0)
    4.1(171.0)
    Hope this helps!
    Rob

  • You must supply a valid username and password in Hyp 11.1.1.3.0

    HI,
    We have successfully installed New version of Hyperion 11.1.1.3. Configuration is successfull. When running validation one error occurs.
    We are unable to log in workspace as we are required to 'supply a valid username and password'. We log in as admin/password but this is not working.
    When I change it is shared services console it does not solve this issue.
    Can you please advice of what shall be done to get over this?
    thank you
    lubos

    This is not the Hyperion/Essbase forum.

  • Passing the username and password via report link

    How can I pass the username and password via the reprt link?
    thanks all.
    Ahmad Esbita

    Hi,
    Jigar Oza
    Thanks for u r reply, i have tried with application integrator but there is a problem with usermapping.
    now what i have done is created HTTP System based on this system created URL iView,in application parameters username and password as MappedUser and MappedPassword every thing is working fine. user  logged in automatically when he logged into portal.
    there are tabs ,links in application .when i click on tabs or links it is assking to enter username and password of the application.
    did i do any thing wrong in creating HTTP system or URL iView,
    what are the necessary properties should be given.
    replys are highly appreciated.
    Regards
    K Naveen Kishore

  • Hi I bought an iPhone from my friend who forgot the username and password, and now my iPhone Aktyvyshn code and that it wants to register Forgot your password to her email, please guide me

    Hi I bought an iPhone from my friend who forgot the username and password, and now my iPhone Aktyvyshn code and that it wants to register Forgot your password to her email, please guide me

    You can NOT do so. Only the owner of the account used to lock the phone can remove it. Instructions for how to do so can be found within or linked from within the document I already linked to.
    Activation lock is an anti-theft feature designed to make the device useless to anyone other than the rightful owner.
    If your friend refuses to give your money back and can not or will not remove the activation lock, there is a fair possibility that the phone was not theirs to sell in the first place.

  • I forgot my Firefox Sync username and password but have the sync code. Will that allow me to recover my bookmarks? I don't have access to the original computer in sync.

    I forgot my Firefox Sync username and password but have the sync code. Will that allow me to recover my bookmarks? I don't have access to the original computer in sync.

    You need at least the email address that you used to create that account to reset the password.
    *https://services.mozilla.com/

  • [Deployment] How NOT to hard code the Database SID, Username, and Password

    Hi, I'm new in J2EE so be easy on me. :)
    How can I parameterize the database SID, username, and password in my J2EE application? So that anyone can change the SID, username, and password without the need to modify my code? I use Oracle 10g, ADF BC, JSF and JDeveloper 10.1.3.1.
    My friend said that I can use XML for this. But he didn't go to detail for doing this. Is it true? Is there any [or better alternative]?
    Any help or pointer to a simple tutorial would be fine.
    Thanks in advance.

    Hi -- this is quite easy to do with J2EE.
    In your application code, you declare "logical" references to resources (such as datasources, security roles, etc.) and use those in your application code so all it depends on is the logical name
    On the server where the application is deployed, "physical" resources are created that point to the actual resource -- in the case of a database, this would be the JDBC URL, username, password.
    At deployment time of the application, you then use the facilities of deployment tool to "map" the logical references in the application, to the physical references that exist on the server. So you connect the dots between your application needing something and the server providing the something. That way all the "details" are abstracted out of the your application code.
    I don't know how this works in ADF, BC4J, etc. but I presume that since they are based on standard/J2EE, it must be available somehow.
    I wrote something about this a while back using direct JDBC as an example:
    http://buttso.blogspot.com/2006/06/datasource-lookup-using-javacompenv.html
    -steve-

Maybe you are looking for

  • Bug report: Old threads showing up at the top of the list

    As a professional web developer I must say that these forums are a disgrace. I wouldn't dare sell such a product.

  • How can i get the last 2 months history?

    I want to get the call history of the last 2 months. Unfortunatelly iphone restore only the last 100 phone calls. Is there a way to retrive all phone calls from the last 2 months?

  • Clear items from the listview

    How can we clear all the items displayed on a list view (data set by an ObservableList) Is there a way to get the index of the last item posted on the listview from the Observable list? In that case, something like this could achieve that result: obs

  • Sustainability in the Vendor Master

    There is much discussion about [sustainability|http://www.sdn.sap.com/irj/bpx/sustainability] in the BPX community and in other sources.  Much of the discussion is about initiatives SAP has taken as a company to become more "Green" or white papers ab

  • Help! Safari tab lost

    hello. how do i show the tab toolbar on safari? coz i accidentally deleted it yesterday.. i tried hiding ang showing the toolbar nothing works. then i tried preferences, it still didn't show.. i cant even search or type anything coz there's no toolba