Javascript & JSP - prompt for user name
I want to prompt the user for their name at the beginning.
Then I want to save that value in the JSP session because eventually it will be saved along with a bunch of other information into a database table.
How can I get the JSP session attribute to save the user's input from a Javascript prompt?
Oh, so
the javascript part
name = prompt('USERNAME',' ');
Can't interact with JSP
<%
String user =
session.setAttribute("userName", user);
%>
That's what I want to know how does the
user = name
So I guess maybe a regular form would be better for what i need?
Similar Messages
-
WLAN network always prompts for user name and password...
Hi,
Everytime Airport detects the WLAN of my institution, it prompts "Authenticating to network" and I have to put in my user name and password. Is there any way to store this information (probably in the keychain) so that an automatic login to the WLAN [as in my home network] is possible? The problem is that I can not find any button like "save this password in the keychain" [you can only put in user name and password]. Is it possible that my institution prevents automatic login?
I also tried to create an item in the keychain directly - does not work.
CheersHi,
I agree in that there has to be a prompt for WLAN access. Otherwise just everyone could step by and use the access. But if I have to authenticate once, why should the institution prevent an automatic login for me in the future? Well, okay, if someone steals my notebook and knows my master password... hmm, so there is no way to locally (on my notebook) use some software that automatically puts in my user name and password so that I - maybe - only have to push the "Go/Enter/Access" button?
For example, some institutions use browsers to authenticate and 1Password, but also Safari natively, can automatically fill in the information.
Cheers -
Prompt for user name and password when opening an application like Internet Explorer
Hi
I often use Internet Explorer using "Run as different user". This is achieved by holding 'Shift' and right clicking the IE icon. This is the main reason why I use IE as my default browser is Chrome. Signing in as a different user
is helpful when troubleshooting/customising certain applications such as Dynamics CRM.
Is there away to force IE to always ask for credentials when I open it?
Marc Collins www.QGate.co.ukHi GTS-NJ
This was my first thought. The problem I found is it requires a particular user. I need to be flexible with the users I sign in with.
I may have the answer though. I have changed the security settings for trusted sites to always prompt for username and password. I have added my sites to trusted sites. Now when I browse to the site, it prompts me to sign in.
Marc Collins www.QGate.co.uk -
Office Documents prompting for user name and password
Hi,
We are using SharePoint 2010 and office documents are prompting for username and password when opened from SharePoint. we tried automatic logon setting in internet explorer and set the domain in trusted list
of sites but nothing solves the problem. Anyone please provide a solution.
Thanks,
techieHi Sharath,
I have the user id in backend system , it is not locked nor expired.
When I checked the certificate through STRUSTSSO2 validity is showing till 2027.
How I can make sure that there is not an issie with certificates???
Do we need to check something at protal side also?
What all are the steps required for the checking the certificates at backend & portal side.
There is no RFC defined from backend system to portal system in SM59 , I suppose we are using Bapi's for the same.
Do we need to perform some check in Visual Admin also like checking the JCO connections???
Regards,
Prashant -
Prompting for User name/Password after I close the document
Hi guys,
I have implemented FSDB repository. When I open a KM document and close it, I am prompted with the authentication window to enter username/password. When I enter correct username/password, it doesn't accept it. However when I close this authentication prompt, I have no issues continuing my portal session.
Please help guys.
Note: I am on EP6.0, SP15.
Regards,
DeepakHi Deepak,
I am using SPS15 and had similar issues with MS documents. We were receiving authentication prompts. We omitted the MS Docs from the HTTP compression and then applied this RegFix. For us it seemed like it was an update coming back to the folder where the documents are stored upon opening (for PPT's) and on open and close for DOCS. From what I read in the MS note with the regfix - it seems like updates to the MS folder stucture for the purposes of Sharpoint collaboration stuff.
Anyway,
<a href="http://SDN Blog on Disabling Secondary Authentication">https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2083</a>
<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;838028">MS K# Article</a>
I hope that this helps,
Judson -
Prompting for User name/Password after I close the KM document
Hi All,
When I open a KM document and close it, I am prompted with the authentication window to enter username/password. It was all fine. But for the past few days, I am getting the enter network password prompt. This happens only for word document. PPT and PDFs doesn't promt for password.
The weblog link in the thread https://www.sdn.sap.com/irj/sdn/thread?messageID=1965465#1965465 is not opening. Disabling sencondary authentication weblog is not available.
I am in NW04s EP 7.0 SP10
Can anyone please guide me to resolve this problem.?
Thanks & Regards,
SivaSiva,
Check out these links:
Note 549610 - Authentication window appears when opening/closing documents
https://service.sap.com/sap/support/notes/549610
Note 993579 - Authentication window when KM-documents opened by email-link
https://service.sap.com/sap/support/notes/993579
-jwise -
Prompt for user profile photos
Hi,
When we try to open any page in SharePoint with intranet users' pics in it, sometimes it prompts for user name and password and that to many times not once. So if I provide the username and password then it allows me to see the profile pics in the
page otherwise shows a "x" on the picture.
I want to know why this happens for some pics only not all?Hi ,
What do you mean intranet users' pics?
Does your MySite Host site have different FQDN from your SharePoint site?
Please check if adding MySite url in IE browser trusted sites zone could work.
If it still doesn't work, please check ULS log see if there is any related error for any clue when access the SharePoint page containing intranet users pics.
Thanks
Daniel Yang
TechNet Community Support -
ADF security - prompt for user id and password again on page forward
Hi,
I am working with ADF using JDeveloper 10.1.3 with Business Components and ADF Faces.
I have a Search page and a List page.
Both pages are based on the same view within the same application module.
The Search page is using the default Find and Execute Operations.
The Execute button has an action that navigate to the List screen.
faces-config.xml
<navigation-rule>
<from-view-id>/jspx/search.jspx</from-view-id>
<navigation-case>
<from-outcome>search</from-outcome>
<to-view-id>/jspx/list.jspx</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jspx/list.jspx</from-view-id>
<navigation-case>
<from-outcome>find</from-outcome>
<to-view-id>/jspx/search.jspx</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
Security (Roles and Users) is based on the jazn-data.xml and web.xml
URL Patterns for the pages have assigned to the role.
Login Configuration is HTTP Digest Authentication
<web-resource-collection>
<web-resource-name>APP_SUPPORT</web-resource-name>
<url-pattern>faces/jspx/search.jspx</url-pattern>
<url-pattern>faces/jspx/list.jspx</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>APP_SUPPORT</role-name>
</auth-constraint>
<login-config>
<auth-method>DIGEST</auth-method>
</login-config>
Everything is fine when running the application from JDeveloper,
but when the application is deployed to the server (OC4J),
After logging into the system, the Search page prompt for user id and password again
on click of the Execute button.
Have anyone experience this problem before?
Thanks for any help.
JimHi,
does the same thing happen if you change your protected resource from:
<web-resource-collection>
<web-resource-name>APP_SUPPORT</web-resource-name>
<url-pattern>faces/jspx/search.jspx</url-pattern>
<url-pattern>faces/jspx/list.jspx</url-pattern>
</web-resource-collection>to:
<web-resource-collection>
<web-resource-name>APP_SUPPORT</web-resource-name>
<url-pattern>/faces/jspx/*</url-pattern>
</web-resource-collection>Brenden -
How to Prompt for User/Pass Running Shell Script Remotely through ARD
So I finally got my Active Directory Script working! However, I realized that I'm not the only one going to be running this script and to have my user name and password in the script itself is beyond foolish. While I know it's possible just to have whoever's running the script to manually add their username and password, I'd prefer to have prompts to make things easier for the rest of my team.
Here's my current script. I've tested it on the machine I'm connecting to Active Directory and it works fine if you run it on the machine itself in terminal. However, I'm going to be doing this on about 150 machines and the whole point of the script is to do it remotely.
#! /bin/bash
MACNAME=$(scutil --get ComputerName)
read -p "User Name: " USER
read -p "Password for $USER: " PASS
dsconfigad -add "CORP.DOMAIN.NET" \
-username $USER \
-password $PASS \
-computer $MACNAME \
-mobile disable \
-mobileconfirm disable \
-localhome enable \
-useuncpath enable \
-shell /bin/bash \
-ou OU=Macs,CN=Computers,DC=corp,DC=DOMAIN,DC=net \
-force \
-localpassword "PASSWORD" \
-groups "GROUPS"
When I run the UNIX script through ARD to a machine, I get no prompts for USER or PASS. In fact, it gives me the following error "dsconfigad: Authentication server encountered an error while attempting the requested operation. (5202)" So it's not asking for a user name and password.
Is there any way to make a shell script prompt you for a User Name and Password when you're sending commands remotely through ARD? Or is there another way to do this?
Any suggestions would be greatly appreciated.
-rksBest solution is to create an account that is exclusive to binding machines. By doing this, you can embed the user name and password in the script. Heck, you can post it on your website. If the account is configured properly, it will only be able to create machine records in a defined container. If you are mixing Macs and PCs in your AD domain, I also recommend creating an isolated container for your Mac records. Now, the account has even less access rights as you can make it so it only has rights to the Mac container.
Otherwise, ARD does not prompt. You can play around with an expect script but the reality is that you are still embedding the credentials in the script so it really does not achieve what you want. ARD is not an interactive shell scripting tool. It is more a fire and forget.
Reid
Apple Consultants Network
Apple Professional Services
Author "Mavericks Server – Foundation Services" :: Exclusively available in Apple's iBooks Store -
Hi,
I have a customized SharePoint page that takes user input data, validate some of the data, then writes the data to a SharePoint list. If an exception occurs, it will write the error to the ULS.
All was working well in the test environments.
However, recently we noticed that in the QA environment, when it's trying to write to ULS, it causes another issue:
Insufficient SQL database permissions for user 'Name: NT AUTHORITY\IUSR SID: S-1-5-17 ImpersonationLevel: Impersonation' in database 'SP_F1_Config' on SQL Server instance 'SQL01'. Additional error information from SQL Server is included below. The EXECUTE
permission was denied on the object 'proc_putObjectTVP', database 'SP_F1_Config', schema 'dbo'.
I've traced through the code and found that it fails on the line:
SPDiagnosticsServiceBase.GetLocal<LoggerError>();
where LoggerError is the logger class inheritng SPDiagnosticsServiceBase
I have also googled around today, but the most positive solution provided
on this page was to manually modify SQL object permission, which I believe we should not do, and would not be supported by Microsoft.
So the questions are:
Why is AUTHORITY\IUSER used for SPDiagnosticsServiceBase.GetLocal()? Should that account actually be allowed to access SharePoint databases? (This is an intranet environment and using claim based/Windows authentication, no no anonymous access would be allowed
anyway).
I've checked the Application Pool account permissions in SQL, comparing the environment that works and the one that doesn't work, and the permissions/roles/schemas look identical on server and database level. Where else can I check?
On the environment that works, I logged on as SharePoint administrator, created a new SharePoint Visual Web Part solution in Visual Studio, just to test writing to ULS. Then I press F5 in Visual Studio to debug it. It also has the same problem.
It just seems like somehow the user's identity (or whatever the identity SharePoint required) was not passed to SPDiagnosticsServiceBase.
Any suggestions, or even better, solutions would be really really much appreciated!Hi,
Thanks for your sharing, it will be userful to the people who stuck with the same issue.
Best regards
Patrick Liang
TechNet Community Support -
Hi,
We are running a Mountain Lion Server with Open Directory / LDAPv3, as far as I can tell. My responsibility is to get my CentOS 6.3 box running Samba v. 3.5.10-125.el6 to authenticate users against the ML / OD box. I can ssh to the CentOS box OK and I can get Guest access to the Samba share to go OK too. Also, the OD passwords on the LDAP server are set to 'Open Directory' so I guess that means that they are encrypted and the Samba server is set to send encrypted passwords. But when a user tries to properly authenticate using either say via a Mac client Finder [Command-K], or smbclient, the Samba server will generate this message:
check_ntlm_password: Authentication for user ['name'] -> ['name'] FAILED with error NT_STATUS_LOGON_FAILURE
(I am blanking out the user name on purpose).
Of course there is more to the story, but those are the basics.
Here are the relevant parts of my smb.conf. FWIW, the CentOS / Samba box is called Jupiter.
Thank you,
NickZ
[smb.conf]
[global]
display charset = UTF-8
realm = SATURN.MCLEAN.HARVARD.EDU
netbios aliases = ANL
server string = Welcome To The Jupiter Samba Server Version 3.5.10-125.el6
interfaces = lo, em1
security = SERVER
update encrypted = Yes
password server = saturn.mclean.harvard.edu
smb passwd file = /var/lib/samba/private/secrets.tdb
passdb backend = ldapsam:ldap://saturn.mclean.harvard.edu
passwd program = /usr/bin/passwd %u
unix password sync = Yes
lanman auth = Yes
client NTLMv2 auth = Yes
client use spnego principal = Yes
kerberos method = system keytab
log level = 2
syslog = 3
log file = /var/log/samba/log.%m
max log size = 50
name resolve order = host lmhosts wins bcast
server signing = auto
preferred master = Auto
ldap admin dn = uid=DirAdmin,cn=users,dc=saturn,dc=mclean,dc=harvard,dc=edu
ldap group suffix = cn=groups
ldap passwd sync = yes
ldap suffix = dc=saturn,dc=mclean,dc=harvard,dc=edu
ldap ssl = no
ldap user suffix = cn=users
usershare allow guests = Yes
idmap backend = ldap:ldap://saturn.mclean.harvard.edu
idmap uid = 10000-20000
idmap gid = 30000-40000
cups options = raw
[homes]
comment = Home Directories
read only = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[anl]
comment = Main ANL Share
path = /anl
read only = No
guest ok = Yes
hide dot files = NoTurns out a printer driver installed on an XP (even W2K(?)) was (apparently?) flooding the OS X SMB server to the point of collapse. Uninstalling the "HP Tools" part of the driver cleared it up. The printer is an HP LJ1300. I had downloaded the full driver from HP.com. I don't know if any/all these conditions need to be matched, but: the printer was on the network using an HP print server JetDirect EX Plus, and the computer(s) in question were connecting directly to it (not via a print server). It's been too long ago, but there were always several errors in the System Log (Win XP Event Viewer) that correlated with the errors on the OS X server.
Proud to say that since that day (10+ months ago) I've not seen it happen again. whew. -
"catching" a prompt for user input and answering it through zenity?
I'm trying to write a script (or multiple scripts) that will allow me to use command-line only applications via user defined actions in my file manager without having to open a terminal. Now I realize this basic functionality is already available, but as it stands I am unable to respond to command-line prompts for user input without opening a terminal. Is it possible to write a shell script that would act as a wrapper and allow me to use zenity (or another popup program) to respond to such queries?
For example if I used a command-line program that prompted me for a password, could I "catch" that prompt with a shell script and answer it through another program, such as zenity?
Last edited by falconheart (2011-01-16 22:37:25)The easier way to do this is to collect the info with zenity first, then pass it on the command line. If the program insists on prompting, then you could try feeding it the info with redirection if it accepts it from stdin. For example
command < info.txt
where info.txt is a temp file created by your script which contains whatever you want entered into the prompts. This will work in some cases. -
How to prompt for user input in Forms
How do I prompt for user input in Forms?
I am writing a piece of code where the user may choose, by clicking either of three buttons on an alert, to have the system assign a value to a variable, to input a value or to do neither?
If the user chooses to input the value I want to update a set of database fields with the value.
I have thought about showing a view where the value may be entered into a field displayed on that view. The value will be assigned to the variable by the user clicking a command button. The question I have in this case though, is whether, after the command button is clicked, control will be passed back to the code that called the view in the first place?Desgordon,
This can be accomplished by displaying your message to the user using an Alert. I use 3 different Alerts (Note, Caution and Stop) in my forms and they are inherited from a central source file (such as an Object Library or a Template Form) so they can be used by all of my Forms. You can set the text of the Alert using the SET_ALERT_PROPERTY() built-in and capture what button the user presses with the SHOW_ALERT() built-in. Additionally, if you need more than one button to be displayed in an alert, you use the SET_ALERT_BUTTON_PROPERTY() built-in to rename the default button or to add up to a total of three buttons in the alert. Here's an example:
DECLARE
Alert_ID ALERT;
v_AlertType VARCHAR2(10) := 'CAUTION';
v_AlertTitle VARCHAR2(25);
v_AlertText VARCHAR2(150);
n_AlertButton NUMBER;
BEGIN
v_AlertTitle := 'Title of Alert';
v_AlertText := 'This is message to the user.';
/* Code leading up to the decision point. */
alert_id := FIND_ALERT(v_AlertType);
/* Note: I only set the Label of Button 2 because the default button 1 label is 'OK' */
SET_ALERT_BUTTON_PROPERTY(v_AlertType, ALERT_BUTTON2, LABEL, 'Cancel');
SET_ALERT_PROPERTY(Alert_ID, v_AlertTitle, v_AlertText);
n_AlertButton := SHOW_ALERT(Alert_ID);
/* Now I can test the value of n_AlertButton for 1 or 2 to find out what button the user selected. */
IF ( n_AlertButton = 1 ) THEN
/* Do something, because the user selected 'OK' */
ELSE
/* It is assumed at this point that the user selected 'CANCEL' */
/* Stop processing any further. */
RAISE form_trigger_error;
END IF;
END:Hope this helps.
Craig...
-- If my response or the response of another answers your question, please mark the response accordingly. Thanks! -
How to prompt for user input in PL/SQL
How do I prompt for user input in PL/SQL?
I am writing a piece of code where the user may choose, by clicking either of three buttons on an alert, to have the system assign a value to a variable, to input a value or to do neither?
If the user chooses to input the value I want to update a set of database fields with the value.
I have thought about showing a view where the value may be entered into a field displayed on that view. The value will be assigned to the variable by the user clicking a command button. The question I have in this case though, is whether, after the command button is clicked, control will be passed back to the code that called the view in the first place?
Edited by: desgordon on Sep 3, 2008 10:33 AMdesgordon wrote:
How do I prompt for user input in PL/SQL?
I am writing a piece of code where the user may choose, by clicking either of three buttons on an alert, to have the system assign a value to a variable, to input a value or to do neither?OK, you're doing that in Forms...
>
If the user chooses to input the value I want to update a set of database fields with the value.Write PL/SQL procedure for this purpose...
>
I have thought about showing a view where the value may be entered into a field displayed on that view. The value will be assigned to the variable by the user clicking a command button. The question I have in this case though, is whether, after the command button is clicked, control will be passed back to the code that called the view in the first place?Not clear what you mean with view?
But if you call your procedure in that button then yes 'control will be passed back to the code'...
Cheers!
Edited by: Faust on Sep 3, 2008 7:57 PM
Too slow... -
CR prompts for user credentials after refresh even though I'm using SSO
Hello Experts,
We have a problem with a customeru2019s project concerning Crystal Reportu2019s Single Sign On feature:
Even though weu2019re using SSO, Crystal Reports prompts for user credentials every time a refresh is performed manually in the browser.
We already checked SAP note [1214594 - How to avoid database login prompts when refreshing reports in Crystal Reports|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap%28bd1lbizjptawmq==%29/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313334333533393334%7D.do]. The note suggests using Microsoft Windows authentication (trusted connection or operating system authentication) u2013 unfortunately we cannot use this kind of authentication in our project.
Do you have any hint, idea or suggestions?
Thank you in advance!Hello,
What kind of Project are you developing? Search for Post Back in the SDK forum and Kbase system so you can keep the log on token active. Likely what is happening is the Token or connection times out after 20 minutes, which is IIS's default timeout. Using the postback method is one way of keeping the SSO connection active.
Thank you
Don
Maybe you are looking for
-
I was trying to install a coupon printer software from a website and it seems to be stuck. It has been installing it for hours. When I click on the installer and try to quit it won't let me. Any suggestions on how I can stop this?
-
V4 Print Drivers suddenly stopped working on Windows 8.1 machine on a Windows 2012 r2 Domain
Today one of our newly setup windows 8.1 machines stop printing to a Toshiba copier that was setup on a domain controller with the printers role installed. The Toshiba copier was setup using Microsoft default Toshiba PLC6 V4 printer driver. The com
-
Hi I am posting Bank Challan. I fill all details for bank. When i run it i gives me error: "Runtime error SAPSQL_ARRAY_INSERT_DUPREC has occured" Let me know what is the reason for the same. It shows the document generated. But that document is not p
-
We have a concept of a Persistent Staging Area (PSA) which functions very similar to a Type II SCD. There is a couple of minor exceptions. 1. No Surrogate Key (the key for the table is the Natural Key and a SCD Starting Time Stamp) 2. We keep a Previ
-
Fire fox 4 bata 12, on MS Windows XP SP3, Computer Dell Optiplex 780, Core2 Duo CPU E8400 @ 3 ghz with 3 gig ram. Down load an image or other file and a like more than randomly FireFox becomes unresponsive for varies lengthens of time and can't be ki