set the user in session vars
Hi all
I'm trying to define a few variables of session.user. * when the user connects and it works a bit. When a user first connects it works fine, but if the session expires and the user connects again, then it does not work. The user should logout manulay in order to make it work again. I use j2ee session management.
I also tried to make the user session, located in the onSessionStart, but that did not work. Here is my code:
< cffunction name = "OnRequestStart" >
< name cfargument = "request" required = "true" / >
< IsDefined ("URL.logout") cfif >
< cflogout >
< cflocation url = "" / index.cfm "addtoken ="no">"
< / cfif >
< cflogin >
< cfif NOT IsDefined ("cflogin") >
< cfinclude template = "loginform.cfm" >
< cfabort >
< cfelse >
< cfif cflogin.name IS "" OR cflogin.password "" > "".
< cfoutput >
< h2 > you must enter text in the fields of the user name and the password. < / h2 >
< / cfoutput >
< cfinclude template = "loginform.cfm" >
< cfabort >
< cfelse >
< name cfquery = "loginQuery" dataSource = "#Application.DNS #" >
SELECT the ID user, UserLevel, news, calendar, site, marketing, account, users
USERS
WHERE
UserID = ' #cflogin.name # '.
AND password = ' #cflogin.password # '.
< / cfquery >
< cfif QNE loginQuery.UserLevel "" > "".
< cfloginuser name = "" #cflogin.name # "password =" #cflogin.password # "roles =" #loginQuery.UserLevel # ">"
< cfscript >
session. User.News = loginQuery.news;
session. User.Calendar = loginQuery.calendar;
session. User.Account = loginQuery.account;
session. User.site = loginQuery.site;
session. User.marketing = loginQuery.marketing;
session. User.Users = loginQuery.users;
< / cfscript >
< cfelse >
< cfoutput >
< H2 > your login information is invalid. < br >
Please try again < / H2 >
< / cfoutput >
< cfinclude template = "loginform.cfm" >
< cfabort >
< / cfif >
< / cfif >
< / cfif >
< / cflogin >
< / cffunction >
And that's when they try to connect, or if the session expires while they visit another page?
Tags: ColdFusion
Similar Questions
-
How to set the user name and password when you use the class for SOCKS5 Proxy?
Hi all
I use the proxy class for SOCKS5, so need to set the user name and password, I can't find where I put the value. If the API support.
Thanks in advance!Exactly how to repeat the question five times ater, we told you the answer would erase anything? A: this isn't. This irritates just the hell out of people. Irritating the hell of those who's trying to help you is not rational behavior either.
I have no idea on the support of third-party for transmission by proxy via NIO.
-
How to set the user account stops after 2 minutes of inactivity
I want to turn off my computer after a few minutes of inactivity and go back to my screen to the user. How do I get the XP.
Hello
You can install a power on the computer management and configure the setting below. See the link for the procedure: power management set up Windows XP: http://windows.microsoft.com/en-US/windows-xp/help/setup/configure-power-management
-
Scoreloop, set the user login
Hello everyone;
I want to change the display/user login / drive on the server Scoreloop and I used this code:
SC_User_h user = SC_Session_GetUser(session); SC_Error_t err = SC_User_SetLogin(user, "MyLogin"); err = SC_UserController_UpdateUser(userController);
but it has not changed on the server, although the error value is '0' which means OK.
Thank you in advance.
Hello, William;
When I called 'SC_User_SetLogin' function inside the callback function it wasn't working, but when I called him in the same function as I asked the user, then it works like this:
SC_Error_t rc = SC_Client_CreateUserController (customer, userController, RequestUserCompletionCallback, app);
RC = SC_UserController_LoadUser (userController);
The SC_User_h user = SC_UserController_GetUser (userController);
RC = SC_User_SetLogin (user, "my name");
RC = SC_UserController_UpdateUser (userController);In any case, I noticed that the application is connected to the game application that is installed on your device BlackBerry 10
who, from there, the user can update his profile name and connect as will.
-
Hi all
Please let me know how to set the number of days inactive before the user name is disabled
We use 11.1.1.3 and tried to define the type of EA, I received the error message
Set the properties of the server failed
Error: 1051513 set the number of inactive days before a user is disabled through Essbase is not supported in Shared Services security mode
Thank you
AlainI don't think you can set idle days when shared with the native Security Services using, you'll need to consider using an external directory as MSAD to achieve.
See you soon
John
http://John-Goodwin.blogspot.com/ -
How to set the user who accesses the repository
Hello
I know that we can create the user and group in the tools-> Security. And if this user is belongs to the Administrators group, it can access RPD and some change...
Can we create group or user that accesses the RPD in some cases (as mentioned in the HELP, A could access the repository every Monday and Wednesday, B can access the repository Saturday and Sunday) and how to define the privilege...
Thank you
AnneHi Anne,.
Add the user to the administrator group inorder to access the RPD, no choice.
Rgds
DpKaPublished by: Dpka on October 19, 2011 10:51
-
Affect the value of the cookie of session var?
Hi all
How is - a assign a cookie value to a variable of javasript session?
Thank you
RichardGHi Michael,
I had trouble settting/get cookies on my pc for development in the CF and was trying to get arouind using JS.
The problem turned out to be be ZoneAlarm blocks cookies by CF. I couldn't even set Client variables because they are dependent on cookie! It took me forever to figure this. Sigh. A waste of time this as frustrating.
Thank you very much for your kind reply, I really appreciate it,
Richard -
I got the mail to set the user name and password
I have the new version of Thunderbird and can not get signed in. I asked for new passwords and the new username, but have not received the e-mail.
Thunderbird is the client software of e-mail running on your computer. Thunderbird has nothing to do with the administration of the details of your email account. 'S done it with your email provider. If you use the form to reset password on this support forum to try to reset the password for your e-mail account, you're wasting your time.
This forum and your email account with your email provider are two different things. Most e-mail providers have a password reset link on their page for help by e-mail. -
Hi, I'm stuck with a scenario where I have to use apex login username and pass to my sql report specifications.
Can someone help me with this...
Thus, for example John connected with user name: John
I should be able to pass this user name for all my books...
Thank you
Nihar NarlaHello
Interesting. Can you reproduce this on apex.oracle.com ?
Kind regards
Jari
-----
My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai -
[ADF, JDev12.1.3] How/where to set the session timeout
Hallo,
After a few minutes of inactivity, the browser displays a message to inform that the session is not more active and only OK been must be clicked to refresh the page.
If a dialog box "btf" has been opened on the left, it becomes...
I would like to know what is the right place/method to set a deadline.
If possible I would like that when the timeout checks, the application performs a redirect to a page I like (for example the login page).
The application of ADF Essentials and is deployed to the GlassFish application server.
My concern is... what should happen to the open operation / pending when the time-out occurs?
For example, the user is modifying an af:table but it has not clicked validate or cancel...
Thank you
Federico
I would like to know what is the right place/method to set a deadline.
For java web applications, you can set the session timeout in the web.xml file. (this is the global settings associated with all sessions)
If you wish, you can set the timeout of session by program (and this is related only to the current http session).
If possible I would like that when the timeout checks, the application performs a redirect to a page I like (for example the login page).
http://fortunefusionminds.blogspot.com/2014/04/how-to-redirect-to-custom-page-whenever.html
ADF: Session expires management redirect to login page | Bungbutan
ADF developers World: Detection and handling of user session expiry
My concern is... what should happen to the open operation / pending when the time-out occurs?
Well, session is destroyed, it will destroy all instances of AM and do rollback.
Dario
-
If the profile: will be changed, don't needs the user to set password.
Hi people,
just have some confusion bit, I have a profile user is changed, it will set the user password? Please notify
Kind regards.
just have some confusion bit, I have a profile user is changed, it will set the user password? Please notify
# Evolution of the profile of the user is different from the re-setting the password. When you change a user password reset profile depends on password_ * attributes to a new profile. The profile is a set of attributes that apply to the user. You can find different profile password_ * attributes to.
http://docs.Oracle.com/CD/E11882_01/server.112/e41084/statements_6010.htm#SQLRF01310
HTH,
Pradeep
-
How to recover files from a server without displaying the path of the user
Hi all
A business unit asked me if it is possible to use OBIEE as a distribution tool for one of their pdf monthly reports they generate for our company.
There are about 500 reports per month and each report will be visible by the business as it relates to.
Given, there is no real "bulk upload" solution for OBIEE (yet?), I thought that it would be possible to set up a batch to load the files on the server in a folder that is visible for weblogic.
From there on, I created an analysis that generates dynamically a html link that uses the date value out of a prompt of date and the unit value of the user's session variables.
Once they have clicked on the link, it opens their report date... HOWEVER, the information in the URL are very clear and for everything, even half of the tech users, a simple change of business unit in the URL, will provide another report (big no no).
Any suggestions on this one?
I am happy to re look at my entire solution, but I thought maybe an action link or GO the URL could be used?
Thanks in advance,
Adam
Last spring could do you something like...
Instead of naming your files/folders as the business unit, could scramble the unit name or number based on some number of seeds or the formula? I assumed it would be easier if he were a unit number cases that has been used in the name of the file. If your batch file downloads and makes a formula on the unit number business to make the somewhat random file name.
OBIEE then uses the same formula, when generating the link
They will have to understand the formula to find code from another unit. Looks like that would be enough for what you're trying to reach.
-
dynamic action sets the value of the element, but not save to DB on submit
I'm working on a page where the value of several to show only the page elements are defined using a dynamic Action. They are set when the user selects a value in a list of selection (and is based on the value of the selection list). Dynamic action is triggered on a list selection change event and then runs the real action "set the value. The selection list displays the names of sales representative. The three fields dynamically filled are the org structure (that is, their chain management).
For the action to set the value, I use a defined Type of SQL statement:
Select VP, DIR, MGR
of SALES_ORG where SSR =: P20_SSR
In the affected elements, I have fixed Type of selection to the 'item (s)"and the value of the Item (s) for 'P20_GVP, P20_DIR, P20_MGR.
Dynamic action works fine for the display of the page (that is, when I select a sales representative in the selection list dynamic action properly updated only display value fields three). This page is a form in which the user submits information relating to the rep. When the page is sent, all fields are filled in a new record of DB with the exception of three that were populated dynamically above. These fields get the values NULL.
When the dynamic action updates the values in the three fields is - it does not set the value of session? Why these fields don't are not taken into account in the submit other ideas > process Page?
I use 5 APEX with Chrome on Mac (Yosemite).
Thanks for the note. I didn't only display the items could not be used in this way. I think I'll take a different approach with the design; given that the org structure is in another table that I can simply refer to that by rep when necessary rather than saving the information uploaded to the page of the form. The reason why I have not fill the screen only the points of loading the page is because I don't know what the values should be until the user selects a sales representative in the selection list.
I'll change the design to one of the following:
1) change the display only items of standard text field. NOTE: if I make the text read-only field that causes other problems when loading (I get the message "violation of protection Session state").
OR
2) do not include org structure in the download folder and just refer to table org Rep when necessary.
Thank you!
Steve
-
How to set the binding on a LOV variable based on the value of the calling page
Here is the scenerio: Page is a login (username and password) page and their values are stored in a pod of support. On successful login page two is called (createRequest) based on
a view object 'Userequest '. One of the fields is EmpNo which is a selection on the element of choice ("EmpByMrgLOV" read only view Explorer that contain the variable bind "UserNameId"). I want only to be displayed in the LOV
employees who report to connected users. I tried different ways to set this parameter, but without success. It's my first attempt using JDeveloper and ADF and 4 days have already
was devoted to it. Can someone please tell me where and how to proceed? Be as detailed as possible. I use Jdeveloper 11.1.2.3.
Thank you.
Published by: spcornell on February 27, 2013 12:09If your still to know how to to this topic, here's an option. I hope this helps.
-----------------PART 1-----------------------------------------------------------------------------------
Override the default constructor as this.
lov instance will be created after the entry of the TF of the 2nd screen, so by LoggenInUser then will start,
and will be used to create the instance of lov uses this value as a bind variable.SerializableAttribute public class EmpByMrgLOVImpl extends EmpByMrgLOV {}
private String myusernameid ="";
/**
* This is the default constructor (do not remove).
*/public EmpByMrgLOVImpl() {}
Set usernameid here when built
get the usernameid of the bean class - btw the bean will be updated on the Taskflow method call before execution and now and set in constructor
FacesContext facesContext = FacesContext.getCurrentInstance ();
ELContext elContext = facesContext.getELContext ();
ExpressionFactory expressionFactory = facesContext.getApplication () .getExpressionFactory ();
ValueExpression exp = expressionFactory.createValueExpression (elContext, "#{mySOMEBean.LoggedInUser}", Object.class);
This.myusernameid = (String) exp.getValue (elContext); set the user to act as link var}
{} public void setmyusernameid (String myusernameid)
This.myusernameid = myusernameid;
}public String getmyusernameid() {}
Return myusernameid;
}}
-----------------PART 2--------------------
variable binding must Access EmpByMrgLOV VO using groovy as below
You EmpByMrgLOV YOUR query tab, add bind var as below:
Name = EmpSOMEUser (change to what your query)
Type = String
Value = ADF. Object.viewObject.myusernameid-----------------PART 3--------------------
Once you have created a method taskflow run between your fist and 2 nd page, add set / gets in the bean for the var as belowpublic MySOMEBean {}
private Stirng LoggedInUser ="";
{} public void someMethodCalledBeforeTFEntryintoSecoundScreen (String loggedinuser)
if(loggedinuser!=null)
setLoggedInUser (loggedinuser);
else {}
System.out.println ("not loggedin user");
setLoggedInUSer (null); This will result in a null btw pointer
}
}
public setLoggedInUSer {(String loggedinuser) {blah blah}}
public String getLoggedInUser() {blah blah}
}So part3 gets put first based on what you collect on your first page, then
part1 at lov construction that uses part3 for her time -
Setting the focus to textfield - cannot type
I'm trying to use a MouseEvent.CLICK event to set the focus to a TLFTextField and let the user type:
var textField:TLFTextField = menuField.getTextField ();
textField.stage.focus = textField;
textField.setSelection (0,0);
However, when this code executes, the cursor appears in the textfield, but the user cannot type. What can I do to fix this? A more detailed description below:
I am applying that has many fields, that the user must fill. The fields are generated dynamically and not always the same number, so I made a movieclip called now and wrote a class so he could manage the feature.
Now has two areas of text, which are TLFTextFields to the inside of the container MovieClips. The first region, lblFieldName, is the label of the field (for example "name:"). The second is the editable text area lblFieldValue the TLFTextFields are inside containers because I found if I tried to put the lblFieldNametext of now 's manufacturer, it would reset immediately (TextFields are apparently not intitialized until the manufacturer of their parent is over...)
The size and position of lblFieldValue is defined dynamically depending on the size of lblFieldName. The text in lblFieldValue begins in white until the user enters something. Unfortunately, regardless of the width of the textfield, if the text is empty the user select the textfield by clicking the left edge of it, which is completely unrealistic. My solution has been to add a mouse CLICK event to the set now and try to set the focus to the lblFieldValue TextField. But once again, when the previous code is running it places the cursor but does not allow the user to type. I don't know that I'm missing something simple. Any suggestions?
Problematic are tlf textfields. unless you have a good reason to use them, you must use classic text.
Maybe you are looking for
-
Yet Mini WT7-C-100 - how to boot from the boot of SD card
Hello guys, I have toshiba still wt7-c-100 mini with 10 GB hard drive. My question is how I can install Android x 86 on this tablet, because when I attach my micro sd card (witch has an image burned to 4.4x86 android) does not appear in the start men
-
If I delete an album or an event, it removes it from my i-pictures too?
If I delete an album or an event, it removes it from my i-photo library also. I have a Mac OS X, version 10.6.8. Thank you.
-
How to get into Backgammon after the message "General error"?
I'm registered, I chose the version computer game, standard, game, then display 'General error', 'try to reload. No way to reload that AFAIK. How can I make it work. I turned off blocking.
-
Outlook not to send and receive emails
I am facing a problem regarding outlook express. I installed a few days back and started working on it. But after a few days no sant massage and resive
-
Can'timport photos in the NAVE of Nikon d500 on sd card format. Message is: the files are not recognized by the raw format support in Lightroom. (66) can import Photos.