Updating username and password via JDBC
Hello,
Curious has anyone developed sample code that would do the following.
1. Using getConnection one passes in a username and passsword.
2. Let's say the the DB password passed is wrong but I want to update the users old password with the new password I just passed?
Anyone have samples that might do this. ie. gets a return of bad password, reconnects as admin DB user, updates person's password, reconnects as orgianal username and password that previously failed?
Thanks,
BP
Hi,
you can also validate an FND login using the FND_WEB_SEC.validate_login package if it's easier.
Brenden
Similar Messages
-
How do you change the old Apple ID username and password to the updated username and password in order to get updated apps from the app store?
cbkitche wrote:
How do you change the old Apple ID username and password to the updated username and password in order to get updated apps from the app store?
Do you mean you kept the same account but you only updated your AppleID?
Just log out and log back in with new ID.
Note that the AppleID is embedded into the item at purchase and cannot be changed.
However, when you change your AppleID, it will link the old account name to the new account name so you will not have any problems updating apps using the new AppleID. -
Passing the username and password via report link
How can I pass the username and password via the reprt link?
thanks all.
Ahmad EsbitaHi,
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 -
Does Apple TV work with wifi that requires you to enter a username and password via the web?
The wifi service is a public hot spot that is provided by my cable company (Comcast/Xfinity) for its customers. It requires you to enter your user name and password via a website prior to using it. Is there a way to make this work with Apple TV?
Any help would be greatly appreciated.Welcome to the Apple Community.
There is no web browser on the Apple TV, you cannot directly use a wifi connection that requires a log in this way. you may wish to look at Internet sharing with a notebook. -
Validate Oracle Apps Username and Password via ADF?
Hello. I'm trying to verify a persons user id and password in ADF 11g. I snagged the FND classes to be able to do this, and am calling it as follows:
AppsContext ac = new AppsContext("/home/workspace/idev.dbc");
boolean loginStatusCode = ac.getSessionManager().validateLogin(userName, password);
if(loginStatusCode == true)
return "success";
else
return "failure";
This works in the Application Module tester, and works as a standalone program. However, when I run it in weblogic I get a class cast exception (this can be fixed by removing the ojdbc5 & 6 files in the lib folder and replacing them with the ojdbc14 jar) Unfortunately, it fixes that problem but then all the ADF stuff breaks.
Has anyone used Oracles apps security for logging in a user? Or, is there a way to have Weblogic use the ojdbc14.jar for a singular deployment? Here's the class cast I get:
oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.IllegalAccessError, msg=tried to access class oracle.jdbc.driver.OraclePreparedStatement from class oracle.apps.fnd.common.ProfileCache
Thanks in advance.Hi,
you can also validate an FND login using the FND_WEB_SEC.validate_login package if it's easier.
Brenden -
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,
MujahidHi 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 -
How to logon to the Career Center using you SCN username and password
We all know how painful it is to have to create yet another username and password for a site, well for the Career Center you don't have to. We are working to have single sign on between SCN and the Career Center but until that time or if you navigate directly to the Career Center site you can log on using your SCN username and password via OpenID. Here is how.
First, ensure you have set an OpenID username in your SCN profile.
Then go to the Career Center http://scncareercenter.jobtarget.com and click
"Access Your Job Seeker Account" for job seekers OR
"Access Your Employer Account" for employers
At the bottom of the login box, besides "Have an OpenID?" click on the "Sign In" link
In the box type
http://openid.sap.com/your_open_id_name_from_your_SCN_profile
and click Login.
You will be taken to another page on SCN requesting you to login (if you haven't already) and finally approve the JobTarget OpenId login request.
Viola, you are then brought to your personal account on the Career Center. If this is your first time use, you may need to fill out some necessary pieces for the Career Center account profile.
Update 24.08.09: We are having some intermittent OpenID issues, will update the post when it is resolved
Cheers
KuhanThat's really good news!
Now we have additional link to suggest newbie or job seeker in ABAP
P.S. Can you please amend in Forum Rules of Engagement with this information to let the others know?
Cheers -
Username and password with Access and JDBC application
Hello all,
I have written an application which accesses a MS Access database. I have created a dialog which asks the user for a username and password. I then include the username and password to connect to the database. I have created groups and users in the Access database and have given each user different privaleges. However, when I run my application, any user can get any privelage. I am missing something. Thanks in advance.// ConnectToDatabase.java
// Copyleft (c) 2001 RatKing
// ��������������������������������Java Bean
// E-mail: [email protected]
// This can use in JSP or Java Application or Applet
// AFTER you have setup the ODBC source in Windoz.
package rat;
import java.sql.*;
import java.util.*;
public class ConnectToDatabase{
private String driverClass = "sun.jdbc.odbc.JdbcOdbcDriver"; // JDBC-ODBC Bridge Driver
private String dbURL = "jdbc:odbc:yourdbname"; // the name of your ODBC Source's Database
private String userName = "yourname"; // user ID
private String password = "yourpassword"; // user password
private Connection connection = null; // Connection to the Database
private Statement statement = null; // Statement object
public ConnectToDatabase () {
// ������������������
public Connection getConnection() throws ClassNotFoundException, SQLException {
if(connection != null) {
return connection;
Class.forName(driverClass);
connection = DriverManager.getConnection(dbURL, userName, password);
return connection;
} // getConnection()
public void closeConnection() throws SQLException {
if (connection != null) {
// Makes all changes made since the previous commit/rollback permanent
// and releases any database locks currently held by this Connection object.
if (!connection.getAutoCommit())
connection.commit();
closeStatement();
connection.close();
connection = null;
} // closeConnection()
* If not connected to database...connect to database, create a statement,
* and, return the Statement.
protected void createStatement() throws SQLException, Exception {
if(statement == null) {
Connection connection = getConnection();
statement = connection.createStatement();
* This method executes a statement and returns true or false. Any type
* of Statement may be executed by this command.
public boolean execute(String sqlString) throws SQLException, Exception {
if(statement == null){
createStatement();
boolean returnValue = statement.execute(sqlString);
return returnValue;
* This method executes the statement and returns a ResultSet from
* execution of the query. Only a SELECT Statemet is applicable here.
public ResultSet executeQuery(String sqlString) throws SQLException, Exception {
if(statement == null){
createStatement();
ResultSet rs = statement.executeQuery(sqlString);
return rs;
* This method executes update statements and returns a count of
* the updates. Only a INSERTS, DELETES, and UPDATES are applicable here.
* In addition, SQL statements that return nothing such as SQL DDL statements
* can be executed.
public int executeUpdate(String sqlString) throws SQLException, Exception {
if(statement == null){
createStatement();
int returnValue = statement.executeUpdate(sqlString);
return returnValue;
* This method closes the Statement.
public void closeStatement() throws SQLException {
if(statement != null){
statement.close();
statement = null;
* If it is not connected to database, connect to database and
* create a statement and returns the Statement
* @param scrollType should be ResultSet.TYPE_FORWARD_ONLY
* or ResultSet.TYPE_SCROLL_INSENSITIVE
* or ResultSet.TYPE_SCROLL_SENSITIVE
* @param updateType should be ResultSet.CONCUR_READ_ONLY or
* ResultSet.CONCUR_UPDATABLE ;
protected Statement getStatement(int scrollType, int updateType)
throws SQLException, Exception {
Connection connection = getConnection();
// for cloudscape to work with scrollable resultsets, the autocommit
// should be false.
connection.setAutoCommit(false);
Statement statement = connection.createStatement(scrollType,
updateType);
return statement;
* If it is not connected to database, connect to database and
* create a preparestatement and returns the Statement
* @param sqlString queryString to make a statement
* @param scrollType should be ResultSet.TYPE_FORWARD_ONLY
* or ResultSet.TYPE_SCROLL_INSENSITIVE
* or ResultSet.TYPE_SCROLL_SENSITIVE
* @param updateType should be ResultSet.CONCUR_READ_ONLY or
* ResultSet.CONCUR_UPDATABLE ;
protected PreparedStatement getStatement(String sqlString,
int scrollType,
int updateType) throws SQLException,
Exception {
Connection connection = getConnection();
// for cloudscape to work with scrollable resultsets, the autocommit
// should be false.
connection.setAutoCommit(false);
PreparedStatement preparedStatement =
connection.prepareStatement(sqlString, scrollType, updateType);
return preparedStatement;
* this method executes the statement and resuts the resultSet due to
* execution of Statement.
* only SELECT Statemet is applied here.
public ResultSet executeQueryScrollInsensitiveReadOnly(String sqlString,
Vector values) throws SQLException, Exception {
PreparedStatement preparedStatement = getStatement(sqlString,
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
for (int i = 1; i <= values.size(); i++) {
preparedStatement.setObject(i, values.elementAt(i - 1));
// Execute a SQL statement that returns a single ResultSet.
ResultSet rs = preparedStatement.executeQuery();
return rs;
* this method executes the statement and resuts the resultSet due to
* execution of Statement. only SELECT Statemet is applied here.
public ResultSet executeQueryScrollInsensitiveReadOnly(String sqlString)
throws SQLException, Exception {
Statement statement = getStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
// Execute a SQL statement that returns a single ResultSet.
ResultSet rs = statement.executeQuery(sqlString);
return rs;
* this method executes the statement and returns the resultSet due to execution
* of Statement. only SELECT Statemet is applied here.
public ResultSet executeQueryScrollForwardOnly(String sqlString,
Vector values) throws SQLException, Exception {
PreparedStatement preparedStatement = getStatement(sqlString,
ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
for (int i = 1; i <= values.size(); i++) {
preparedStatement.setObject(i, values.elementAt(i - 1));
// Execute a SQL statement that returns a single ResultSet.
ResultSet rs = preparedStatement.executeQuery();
return rs;
* this method executes the statement and returns the resultSet due to
* execution of Statement. only SELECT Statemet is applied here.
public ResultSet executeQueryScrollForwardOnly(String sqlString)
throws SQLException, Exception {
Statement statement = getStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY);
// Execute a SQL statement that returns a single ResultSet.
ResultSet rs = statement.executeQuery(sqlString);
return rs;
* Method executeQueryScrollSensitiveReadOnly
* @param sqlString String
* @param values Vector
* @return ResultSet returns ResultSet due to statement execution
* @throws Exception
* @throws SQLException
* @see
public ResultSet executeQueryScrollSensitiveReadOnly(String sqlString,
Vector values) throws SQLException, Exception {
PreparedStatement preparedStatement = getStatement(sqlString,
ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
for (int i = 1; i <= values.size(); i++) {
preparedStatement.setObject(i, values.elementAt(i - 1));
// Execute a SQL statement that returns a single ResultSet.
ResultSet rs = preparedStatement.executeQuery();
return rs;
* Method executeQueryScrollSensitiveReadOnly
* @param sqlString
* @return
* @throws Exception
* @throws SQLException
* @see
public ResultSet executeQueryScrollSensitiveReadOnly(String sqlString) throws SQLException, Exception {
Statement statement = getStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY);
// Execute a SQL statement that returns a single ResultSet.
ResultSet rs = statement.executeQuery(sqlString);
return rs;
//////////////Other things maybe useful ///////////////////
# Refer to Appendix A for more info on configuring the JDBC
# driver via setting of the DRIVER_CLASS and DATABASE_URL properties
#JDBC Driver Class
# for ODBC Driver:
#DRIVER_CLASS=sun.jdbc.odbc.JdbcOdbcDriver
# for Oracle Driver
#DRIVER_CLASS=jdbc.oracle.driver.OracleDriver
# for CloudScape Driver equipped with J2EE reference implementation
#DRIVER_CLASS=RmiJdbc.RJDriver
# for CloudScape Driver equipped with BEA Weblogic Server
DRIVER_CLASS=COM.cloudscape.core.JDBCDriver
#Database URL
# for ODBC URL
#DATABASE_URL=jdbc:odbc:tShirts
# for Oracle URL
#DATABASE_URL=jdbc:oracle:thin:@localhost:1521:ORCL
# for URL with CloudScape equipped with J2EE reference implementation
#DATABASE_URL=jdbc:rmi:jdbc:cloudscape:beeshirtsdb
# for URL with CloudScape equipped with BEA Weblogic Server
DATABASE_URL=jdbc:cloudscape:D:\\weblogic\\eval\\cloudscape\\beeshirts
#UserName to connect to database
UserName=TSHIRTS
#Password to connect to database
Password=TSHIRTS
#otherParameters
SUB_PROPERTIES=
#SQL Query
SQL_QUERY_STATEMENT = SELECT * FROM TSHIRTS.CUSTOMER
#SQL Update , if you run this program please change the id 129 to different value each time
SQL_UPDATE_STATEMENT = INSERT INTO TSHIRTS.CUSTOMER VALUES ('129','Sam','Cheng','S','123 Sam St.', 'C3','Baltimore','MD','20222','4104444444' ,'[email protected]')
#Join STATEMENT
SQL_QUERY_STATEMENT_JOIN = SELECT TSHIRTS.CUSTOMER.*, TSHIRTS.ORDERS.* FROM TSHIRTS.CUSTOMER, TSHIRTS.ORDERS WHERE CUSTOMER.CUSTOMER_ID = ORDERS.CUSTOMER_ID_FK
#OUTER JOIN for ORACLE
#SQL_QUERY_STATEMENT_OUTER_JOIN = SELECT CUSTOMER.* FROM TSHIRTS.CUSTOMER,STATE WHERE CUSTOMER.STATE(+) = STATE.CODE(+)
#OUTER JOIN for MSACCESS
#SQL_QUERY_STATEMENT_OUTER_JOIN = SELECT C.* , S.* FROM CUSTOMER C OUTER JOIN STATE S on C.STATE = S.CODE
#OUTER JOIN for MSACCESS and Cloudscape
SQL_QUERY_STATEMENT_OUTER_JOIN = SELECT C.* , S.* FROM TSHIRTS.CUSTOMER C LEFT OUTER JOIN TSHIRTS.STATE S on C.STATE = S.CODE
#SQL Statement with Like for MSACCESS
#SQL_QUERY_STATEMENT_WITH_LIKE = SELECT CUSTOMER.* FROM CUSTOMER WHERE CUSTOMER.FIRST_NAME LIKE \'*R*\'
#SQL Statement with Like for ORACLE and Cloudscape
SQL_QUERY_STATEMENT_WITH_LIKE = SELECT * FROM TSHIRTS.CUSTOMER WHERE FIRST_NAME LIKE '%R%'
#Prepared QUERY Statement
PREPARED_SQL_QUERY_STATEMENT = SELECT * FROM TSHIRTS.CUSTOMER WHERE FIRST_NAME = ?
PREPARED_SQL_QUERY_STATEMENT_VALUES = Roy
#Prepared Insert
PREPARED_SQL_INSERT_STATEMENT = INSERT INTO TSHIRTS.CUSTOMER VALUES(?,?,?,?,?,?,?,?,?,?,?)
PREPARED_SQL_INSERT_STATEMENT_VALUES =130,John,Hiller,Miller,125 S St.,C6,Baltimore,MD,20100,4104444444,[email protected]
#Prepared Update
PREPARED_SQL_UPDATE_STATEMENT = UPDATE TSHIRTS.STATE SET STATE_NAME = 'California' WHERE CODE = ?
PREPARED_SQL_UPDATE_STATEMENT_VALUES =CA
#Data base schema name
SCHEMA_NAME =TSHIRTS -
I have to log onto my companies wifi by first going thru a log on page that equires a username and password. before i updated to ios 6. it worked fine now it just goes to the login page and when i hit enter it doesnt do anything just stays stuck on that page. however the phone will log onto a regular wifi router that doesnt require any kind of username or password. any ideas on how to fix it. i have tried everything including reseting all network settings.
1. Settings>General>Reset>Reset Network Settings
or
2. Use "Forget This Network" -
new iphone. (someone else put in their username and password. so i had lots of apps that i had to eliminate but do NOT wish to compromise the contact list) time for me to update the iphone. downloaded itunes onto pc. plugged in iphone and waiting for prompt to show phone. pc thinks it is the camera. how do i get itunes/pc to recognize iphone ? then, how do i backup contacts and proceed before updating iphone?
This forum is for questions from those managing sites on iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. You'll be most likely to get help with this issue if you ask in the general iTunes or iPhone forums.
Regards. -
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.
ThanksWith 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 -
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?
-
I can't update my apps in my iPad because it asks me to sign in to an outdated id which is different to my current Apple ID
Apps are always tied to the ID that was used to purchase them. If you bought the apps with old username and password, you have to continue to use them to update the apps.
If you changed the username because you got a new email address, sign out of your old ID in Settings>iTunes and App Store. Tap the old ID and sign out then sign in with the new/changed ID. -
Script Updater to change username and password
Can the script updater change the username and password for a bunch of test? I tried using the Global search and replace but it was not able to find the string. Please help?
If the password is stored in the test it's self you can find it by opening the test file xxx.mom and preform there a search and replace.
Perhaps it's better to connect the password to a variable by connecting it to a databank source. So the password is stored only once. Saves a lot of maintainance.
-Theo -
How do I pass username and password to the Citrix client via netlet
I have managed to call a Citrix managed application from the portal via netlet (via InitialProgram within citrix_start.html) - thankyou William Geurts.
How do I use the Portal's single sign-on functionality to pass the username and password through to Citrix via netlet?Hi,
This can be done by writing a small application that will pull session/user info from Portal and then pass it on to another app as needed.
Thanks,
Raj_indts
Developer Technical Support
Sun Microsystems
http://www.sun.com/developers/support
Maybe you are looking for
-
Development environment for SharePoint 2013
Hi, We have requirement for one of the project. Team size would be approximately 30 resources. Development would be entirely for SharePoint 2013 Intranet solution. this will be OOTB Intranet application. We will be developing InfoPath forms and Ninte
-
Query on iphone 5 service in India
Hi All, I am planning to buy unlocked version of iphone 5 from US through authorized store and will be using the same in India. However, since Apple talks about providing the 1 year warranty, would like to know if anything happens to my iphone, will
-
In an implemented flexfield i dont want to see the context field in the descriptive flexfield pop-up window instead of that my segments must select automatically when i choose values in the reference field which is in the same block please do respond
-
I did not get a warning that v4 would not run on Mac X v 10.4.11 As a result when I replaced my v3.6 with v4 it would not boot up and I got an error message that it would not run on my system. Now I have lost all my book marks and references that wer
-
How to initialize a field-symbols?
I have field-symbols structure <wa1>, <wa2>. 1. Supposed <wa1> has been assined value already, how can I copy content of <wa1> to <wa2>? 2. How to initialize <wa2>? Thanks!