Inablility to retrieve values of session variables in irpt page
We currently are using xMII 11.5. We are having difficulty retrieving values assigned to our created session variables.
We have defined 2 users, each associated with session variables whose values differ by user. Each user is associated with a different irpt page which retrieves information based on the values passed by the session variables. Both pages return correct information in the grid using the as the param.1 value on the opening of the page.
On one page, we are able to retrieve the values of the session variables in Javascript by placing hidden fields on the document and using the document.getelementbyID("hiddenValue1").value. The other irpt will only bring back the name of the of the session variable in the curly braces, .
Both users are set up the same in System Security and Data Access. If we switch the pages opened for the user in the Portal Navigation, one page will return the values no matter which user and the other page will always bring back the session variable name in the braces. This makes us believe that it is not a problem with the user setup or the definition of the session variables.
Would anyone be able to help us understand what needs to be done to correct this issue?
Michelle,
Have you tried URL encoding your irpt pass through parameters in your Navigation link? Perhaps the commas and parenthesis are causing some issues ( http://help.sap.com/saphelp_xmii115/helpdata/en/Getting_Started/Template_Editor/Query_Construction.htm )
Just to clarify, the Role/User attributes defined in LHSecurity are truly session properties, and the session properties are shown by the PropertyAccessServlet results. Adding the name/value pairs to the URL are only a one-shot pass through to the ReportServlet that processes web pages with .irpt extenstions, so they don't actually set the session properties and are non-retentive beyond the one page. As you are presently doing with the navigation links, we typically recommend URL passthroughs for page to page activities and using the session itself for name/value pairs that you want to set once and use anywhere throughout your application.
document.APPLET.getPropertyValue(NAME); will also give you access to the session through javascript, but if you do a view...source in the browser after your TeamLeaderView web page has loaded you should see the results of the search/replace efforts of the ReportServlet, and the javascript you are using to get values out of hidden form field elements should simply reflect the text you see in the view source window.
If they work inside APPLET tags like you mentioned for Param.1 you could also use document.APPLET.getQueryObject().getParam(1); instead of the hidden form field elements, and remember that you have 32 params and if they are not used in the underlying query can provide a very nice place to 'catch' the results like you are are doing with hidden form field elements that could potentially get reset by a form button.
Regards,
Jeremy
Similar Messages
-
Get loggedin Session variables in Home Page
I got a members directory where u login.
1.How come they get killed when i refresh a page.
2.How do i get the loggedin session variable the home page.
so i know if current user is logged in.
The Application.cfc of the members is
<cfcomponent name="Application" displayname="Application
Component for the Login Security Tutorial" >
<cfset This.name = "NewLoveZoneAfrica">
<cfset This.applicationTimeout =
CreateTimeSpan(0,0,0,45)>
<cfset This.sessionManagement = "true">
<cfset This.sessionTimeout = CreateTimeSpan(0,0,0,30)>
<cfset This.clientManagement = "false">
<cfset This.loginstorage="session">
<cffunction name="onApplicationStart"
returntype="boolean" output="true">
<!--- Set up Application variables. Locking the
Application scope is not necessary in this method. --->
application starting
<cfset Application.configured = 1>
<cfset Application.datetimeConfigured = TimeFormat(Now(),
"hh:mm tt") & " " & DateFormat(Now(), "mm.dd.yyyy")>
<cfset Application.currentSessions = 0>
<!--- Begin Setting up request variables here. --->
<cfscript>
request.app = structNew();
Application.dsn = "LoveZoneAfrica";
Application.webRoot =
"#getPageContext().getRequest().getContextPath()#/NewLoveZoneAfrica/";
Application.machineRoot = "/NewLoveZoneAfrica/";
Application.cfcRoot = "NewLoveZoneAfrica.com";
Application.Domain = "NewLoveZoneAfrica.com";
factory=CreateObject("java","coldfusion.server.ServiceFactory");
sqlService = factory.getDataSourceService();
dsn = duplicate(sqlService.datasources[Application.dsn]);
if(dsn.driver eq "MSAccess" or dsn.driver eq "MSAccessJet"
or dsn.driver eq "ODBCSocket")
request.app.ucase = "ucase";
request.app.isAccess = true;
else
request.app.ucase = "ucase";
request.app.isAccess = false;
</cfscript>
<!--- End Setting up request variables here. --->
<cfreturn true>
</cffunction>
<cffunction name="onRequestStart" returntype="boolean"
output="true" >
<cfargument name="requestname" required=true/>
<cfif isDefined("form.j_username") and
isDefined("form.j_password")>
<!--- If either password or Username is empty go to
login--->
<cfif form.j_username is "" or form.j_password is "">
<cfinclude
template="#Application.webRoot#Login/Security/Login.cfm">
<cfabort>
</cfif>
<!--- First Check to see wether there is need to log out
user--->
<cfscript>
// create the Security object
Security =
createObject("component","#Application.cfcRoot#.security");
// store authenticate method of security object as roles
variable.
LogQry=Security.authenticate(form.j_username,form.j_password);
</cfscript>
<cfif LogQry.recordcount> <!--- User has
Successfully logged in #GetValidUser# --->
<cfloginuser name="#form.j_username#"
password="#form.j_password#" roles="#valuelist(LogQry.Role)#">
<!--- Update the LastLogin timestamp. --->
<cfscript>Update_LastLogin=Security.LastLogin(form.j_username);
</cfscript>
<cfset request.User.LoggedIn = "1">
<cfset request.User.Username = form.j_username>
<cfset request.User.LastLogin = LogQry.LastLogin_Date
>
<cfelse>
<!---Destroy request --->
<cflock scope="SESSION" throwontimeout="Yes" timeout="7"
type="EXCLUSIVE">
<cfset clearStruct = StructDelete(request, "User")>
</cflock>
<!---Destroy request --->
<cflock scope="SESSION" throwontimeout="Yes" timeout="7"
type="EXCLUSIVE">
<cfset clearStruct = StructDelete(SESSION, "User")>
</cflock>
</cfif>
<cfif NOT isDefined("request.User.LoggedIn")>
<cfset request.loginMessage ="Your Login Username or
Password is Invalid ">
<cfinclude
template="#Application.webRoot#Login/Security/Login.cfm">
<cfabort>
<cfelse>
<!--- If the login procedure is passed duplicate the
request structure into the Session scope. --->
<cflock scope="SESSION" throwontimeout="Yes"
timeout="107" type="EXCLUSIVE">
<cfset Session.User = Duplicate(request.User)>
</cflock>
<cflock name="lck_currentSessions" throwontimeout="Yes"
timeout="107" type="EXCLUSIVE">
<!---THIS has BE CHANgED : bEGIN- original COPY IS @ THE
FOOT --->
<!--- Copy identifying session information into the
Application scope. --->
<cfif NOT isDefined("Application.sessionData")>
<!--- Increment the number of current sessions. --->
<cfset Application.currentSessions =
Application.currentSessions + 1>
<cfset Application.sessionData = ArrayNew(1)>
<cfset Arraysize = 0>
<cfset Application.sessionData[Arraysize+1] =
form.j_username>
<CFELSE>
<!---check to see wether this "Username" appears in the
Application.sessionData.
If so, ignore. If no then append the name to the array so we
have a unique list of usernames--->
<cfset Arraysize = ArrayLen(Application.sessionData)>
<cfset Application.temp = ArrayNew(1)>
<cfif Arraysize>
<cfloop index = "LoopCount" from = "1" to =
"#Arraysize#">
<cfset #ArrayAppend(Application.temp,
Application.sessionData[LoopCount])#>
</cfloop>
<cfdump var="#Application.sessionData#" >
<cfset Isloggedin =
ListFind(ArrayToList(Application.temp), form.j_username)>
<cfif Isloggedin is 0>
<cfset Application.sessionData[Arraysize+1] =
form.j_username>
<!--- Increment the number of current sessions. --->
<cfset Application.currentSessions =
Application.currentSessions + 1>
</cfif>
<cfelse>
<!--- Increment the number of current sessions since twas
empty. --->
<cfset Application.currentSessions =
Application.currentSessions + 1>
<cfset Application.sessionData[Arraysize+1] =
form.j_username>
</cfif>
</cfif>
</cflock>
</cfif>
<cfelse>
<cfif not ListLast(CGI.SCRIPT_NAME, "/") EQ
"logout.cfm">
<!---Check wether the username appears on the list
Application.currentSessions is 0 --->
<cfif NOT isDefined("Session.User.LoggedIn") >
<cfinclude
template="#Application.webRoot#Login/Security/login.cfm">
<cfabort>
</cfif>
</cfif>
</cfif>
<!--- Check to see if a user is logged in on *every* cfm
page request. --->
<cfif not ListLast(CGI.SCRIPT_NAME, "/") EQ
"logout.cfm">
<cflock scope="SESSION" throwontimeout="Yes" timeout="7"
type="READONLY">
<cfif NOT isDefined("Session.User.LoggedIn")>
<cfinclude
template="#Application.webRoot#Login/Security/login.cfm">
<cfabort>
</cfif>
</cflock>
</cfif>
<cfreturn true>
</cffunction>
<cffunction name="onSessionEnd" returntype="void">
<cfargument name="SessionScope" required="true">
<cfargument name="ApplicationScope" required="true">
<cfset request.loginMessage="Nimeingia onSessionEnd">
<cflock name="lck_currentSessions" throwontimeout="Yes"
timeout="7" type="EXCLUSIVE">
<cfset sessionPosition =
ListFind(ArrayToList(arguments.ApplicationScope.sessionData),
arguments.SessionScope.sessionid)>
<cfif sessionPosition neq 0>
<cfset
ArrayDeleteAt(arguments.ApplicationScope.sessionData,
sessionPosition)>
<cfset arguments.ApplicationScope.currentSessions =
arguments.ApplicationScope.currentSessions - 1>
</cfif>
</cflock>
</cffunction>
<cffunction name="onSessionStart" returntype="void">
<cfset request.loginMessage="Nimeingia onSessionEnd">
</cffunction>
<cffunction name="onRequestEnd" returntype="void">
<!--- Write any code that needs to run when the page
request ends. This replaces onRequestEnd.cfm --->
</cffunction>
</cfcomponent>Answered my own quests
http://www.rewindlife.com/archives/000046.cfm -
Passing attribute value in session variable
Hi All
I need to store one field value from my SIM form as a session variable and pass them to the next page along with my session, using some jscript stuff or else. Does this make sense?
If it is possible or anyone have any prior experience please reply.
Thanks in advanceWe have tested a code-snippet that 'gets' attribute-values from the session:
<invoke name='getAttribute'>
<invoke name='getHttpSession'>
<ref>:display.state</ref>
</invoke>
<s>attribute_name</s>
</invoke>You can try 'setAttribute' in the similar way.
Thanks,
Adi -
Passing values to session variables from another application
Hi,
From an external application we are passing username and password for accessing the OBIEE Dashboard.In the url call we are passing NQUser and NQPassword. This is working fine.
To setup data level security we need to pass region id list also as request object. Then we can filter the tables by the value in the region id list for that user. If we use external table to pass the home_id list then the application is working fine by setting up row-wise init block. But we need request object from an external application to send the list. How can we accept the list from OBIEE RPD?
In the documentation it mentions about session variables - non system. But it requires an init block. How can we create a variable that accepts the values when user logins just like NQUser and NQPassword.
Please suggest.
Thanks.Try this ...
http://oraclebizint.wordpress.com/2007/07/30/customizing-obi-ee-%E2%80%93-go-url-parameters/
In this blog entry you'll find at the bottom ...
Hello, Can you please explain how to pass parameter values in the url. For example, I want to run an answers query and pass into the url something like this: &Region=West
Venkatakrishnan J Says:
August 22, 2007 at 7:36 am
Yes, this absolutely possible. You can get the details from the Web Services guide since it has all the necessary examples and more explanation. Thats why i did not include it in the blog. You can get it from page 213 of the Docs http://download.oracle.com/docs/cd/B40078_02/doc/bi.1013/b31766.pdf -
Using HttpHeader to set value for session variables
Hi,
We want to set values for 2 session variables (USER and ROLEID) using HttpHeader in obiee 11g. Has anyone tried this? How can we achieve this?
I found the below note on the forum for setting value for the USER session variable. how can we set the ROLEID session variable also? is it possible to set values for 2 variables?
for setting the USER session variable,
You should add this in $BI_HOME/bifoundation/web/display/authenticationschemas.xml:
<SchemaKeyVariable source="httpHeader" nameInSource="Proxy-Remote-User" forceValue="SSO"/>
<AuthenticationSchema name="SSO" displayName="Single Sign On" userID="IMPERSONATE" proxyUserID="NQ_SESSION.RUNAS" options="noLogoffUI noLogonUI">
<RequestVariable source="httpHeader" type="auth" nameInSource="Proxy-Remote-User" biVariableName="IMPERSONATE" options="required"/>
</AuthenticationSchema>
Please suggest.
Thanks.I think maybe your SnmpValue type or value is not corrent.
1.3.6.1.4.1.7064.201.1.200.100.0 is Enum control type
when I use
SnmpValue val = new SnmpString("0");
It doesn't work, but when I use
SnmpValue val = new SnmpInt(0);
It works. I think the JDMK should give some warning message when the type is not correct. :)
The code is following:
final SnmpVarBindList setList = new SnmpVarBindList(" set varbind list ");
SnmpOid oid = new SnmpOid("1.3.6.1.4.1.7064.201.1.200.100.0");
SnmpValue val = new SnmpInt(0);
SnmpVarBind valueBind = new SnmpVarBind(oid, val);
setList.addVarBind( valueBind );
SnmpRequest setRequest = session.snmpSetRequest(null, setList); -
Set session variables inside a page
Inside the page "form.cfm" I have this code:
<form name="report" action="pagestatistic.cfm"
method="post">
<INPUT name=ONE size=15 >
<INPUT name=TWO size=15 >
<input type="submit" value="Go ON">
</form>
I would like to set session variable: ONE and TWO, inside the
page: pagestatistic.cfm
IN that way when I will refresh the page "pagestatistic.cfm"
I will watch have the same results.
I added this code at the top of "pagestatistic.cfm" but it
doesn't work.
<CFSET session.ONE = #ONE#>
<CFSET session.TWO = #TWO#>
Could you tell me what goes wrong?
Thanks
CFWorkquote:
Originally posted by:
liquid One
When you say refresh the page, do you mean submit the form by
clicking on the submit button? Or are you filling out the input
boxes and hitting refresh?
I mean I clicked a link that links the same page:
pagestatistic.cfm
Then I would like to add to this link 2 get variables
pagestatistic.cfm?ColorPage=Green&Order=2 to change the
background color and the order of the results of the page. That it
is impossible because when i refresh the page it is doesn't work.
What do you suggest me to do?
Thanks,
CfWork -
Use of Session Variable in Dashboard Page XML
Hi All,
Can we use a Session variable in the Dashboard Page XML?
My Requirement is,
There are 1000+ users, each user will have access to same dashboard. But a different report in the same dashboard.
So we want to Save individual user reports in the location /users/LOGIN_NAME/Financials/ABC
and dynamically change the Dashboard Page XML, to accept Session Variable VALUEOF(NQ_SESSION.USER) in place of LOGIN_NAME.
So that for each user, they will see only their report.On the face of it, Session is ideal for this, however this is SharePoint and the obvious isn't always the best.
You'd need to do the calculation about memory usage and number of concurrent users to ensure it really is a viable option in Production.
If it isn't viable, or wouldn't scale to possible future usage what would you do? Then you need to ask if it's really necessary to move between pages? If the user needs to move through a dialog for example, that could be hosted on a single page which might
have different controls or sections made visible as the user progressed through the use case.
Passing data between pages in SharePoint is a lot more difficult than it should be. Sometimes it's best to stay put, and certainly safer than using Session if you're really not sure if Session will stop your solution from scaling.
Always remember, SharePoint might be hosted on ASP.NET but the design considerations are significantly different than if this were a pure ASP.NET application.
w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP -
Value in session but not on page
Hi All,
I'm using v3.1 and I can't seem to solve this riddle.
I have a Form Page that doesn't show the values of the page items as reflected in the session state after taking an unconditional branch back to itself ( in this case due to select list with submit to act as a list manager add event above a sql report as list manager display with extra details ). The lack of fetch process success message reveals that the problem is not due to re-fetching the data. So the result is upon returning to the page to refresh the display as a result of the select list change, all the items on the page get blanked out, but in session state popup indicates the contain the previously fetched/entered values. No joy on trying to search the forum for things like value in session not displayed. Can anyone shed light on this kind of problem or suggest how to better search the forum for questions like this?
Edited by: derek on Dec 24, 2008 2:41 PMDerek,
Please read the following from Anton Nielsen...
http://c2anton.blogspot.com/2008/12/oracle-application-express-apex-three.html
Let us know if you have questions after.
Regards,
Dan
http://danielmcghan.us
http://sourceforge.net/projects/tapigen -
How to store values in session variables for use later
I am trying to read user input from a form, lookup some values from a database,
store the combined data into session to retrieve later in the subsequent pages
in a pageflow application. Could someone guide me as to how exactly to do this?
The documentation doesn't seem to be of much help.
Thanks,
Krishna KKrishna,
If you will be using the data within the course of the same page flow
or nested page flows then you should store the data in the page flow
itself. Simply declaring variables in the .jpf will do this. The page
flow is stored in the session for you and it is deleted when the user
exits the page flow. This is good because it keeps down session size.
If you have data that you want to use across page flows then you will
need to store in the session or globalApp.
Here is a link to "Using Data Binding in Page Flows" it has an example
of storing data into the session and it goes into the pros and cons of
using each data binding scope.
http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/netui/guide/conDatabindingXScript.html
- john
Krishna Kuchibhotla wrote:
I am trying to read user input from a form, lookup some values from a database,
store the combined data into session to retrieve later in the subsequent pages
in a pageflow application. Could someone guide me as to how exactly to do this?
The documentation doesn't seem to be of much help.
Thanks,
Krishna K -
Server hangs and session variable value not maintained.
dear all,
this is exteremetly urgent. i upgraded my tomcat to 4.1.24.but i have problems running the same code which was working earlier, i get null in the value of session variable. and also get the following error
////////////////error got /////////////
Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext
.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
95)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22
3)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:619)
at java.lang.Thread.run(Thread.java:536)
///////////////end of error messsge ////////////
the code where i am getting this message is as follows
<%@ page session="true"%>
<HTML>
<HEAD><TITLE> LOGGED IN ok</TITLE> </HEAD>
<%@ page import="java.sql.*" %>
<%! // declaring variables
String s = "";
java.sql.ResultSet rs=null;
java.sql.Connection con;
java.sql.Statement stmt=null,stmt1=null;
String username = "";
String password = "";
String Ousername = "";
String Opassword = "";
String changepass="";
String usertype ="",useremail="",EmpName="";
%>
<body>
<%
try
//set session for max of 100 milliseconds
// session.setMaxInactiveInterval(10000);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = java.sql.DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};" +"DBQ=c:/vishal/HelpDesk.mdb;DriverID=22;READONLY=false","","");
stmt = con.createStatement();
s = "select * from LoginUser";
username = request.getParameter("LogonId"); //get this through prev. form
password = request.getParameter("txtPassword");
out.println(username + " " + password);
// make explicitly to lower case
username = username.toLowerCase();
rs = stmt.executeQuery(s);
while(rs.next())
//getting data from database
Ousername = rs.getString("EmpName");
Opassword = rs.getString("Password");
useremail = rs.getString("EmailId");
usertype = rs.getString("UserType");
if(Opassword.equals(password) && Ousername.equals(username)) //found match correct entry
changepass = request.getParameter("PasswordNew");
if(changepass != null)
stmt1 = con.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,java.sql.ResultSet.CONCUR_UPDATABLE);
s = "update LoginUser set Password = '" + changepass + "' where EmpName = '" + username +"'";
out.println(s);
stmt1.executeUpdate(s);
stmt1.close();
if(usertype.equals("User") == false)//ie admin
session.setAttribute("username",username);
************************this value not maintained *********************
session.setAttribute("useremail",useremail);
session.setAttribute("usertype",usertype);
************************this value not maintained *********************
//closing connections
%>
<jsp:forward page= "ComplaintType.jsp" />
<%
else //user
EmpName = username;
session.setAttribute("EmpName",EmpName);
session.setAttribute("useremail",useremail);
//closing connections
%>
<jsp:forward page="ComplaintCategory.jsp" />
<%
}//end if
}//while loop
//first closing connections then forwarding
%>
<jsp:forward page="InvalidLOGIN.jsp" />
<%
///rs.close();
////closing
//stmt.close();
// con.close();
}//try
catch(Exception ep)
out.println(ep);
System.exit(1);
%>
</BODY>
</HTML>hi all,
thanx a lot for your help,specially hari52
hari52 strangely enough the code started working,but
now i have another problem
after a while my server hangs or gets shutdown ,a
message is shown as
"java.exe has generated error and will be shutdown"
i know that more connections can be a prob. but i
make sure that connections r closed on each page,also
i am a newbie and do not have the time at present to
learn abt. connection pool ,can this problem be
solved easily?
it would be a great help again on your part,
thanx again,You remove the System.exit(1) line from the code inside the catch block
and try again. That's the reason tomcat getting down. System.exit(1) should not be used inside jsp. it will make the underlaying Servlet Engine to shutdown. -
Problem accessing session variables in JSP
Hi all,
i am retrieving the value of session variables in a JSP page. the session varibale
is set at the
server side. sometimes the jsp is able to retrieve the value and sometimes it
doesn't.
Thanks & Regards
Tarun
if getAttribute return null so there is no such session attribute,anyway
check your browser if cookies are enabled.
"Tarun Mangal" <[email protected]> wrote in message
news:400759e9$[email protected]..
>
> Hi all,
> i am retrieving the value of session variables in a JSP page. the session
varibale
> is set at the
> server side. sometimes the jsp is able to retrieve the value and sometimes
it
> doesn't.
>
> Thanks & Regards
> Tarun
-
Null value in Session vars and request.getParameter
We're migrating our application from iPlanet.
Under iPlanet, when we looped through a resultset and set the values to
session variables - it worked fine, even when a resultset value was null,
but in WebLogic, I get the following error:
java.lang.IllegalArgumentException: key/value is null
Is there anyway to "turn this off" so it behaves like iPlanet?
My second question is that we have many JSP's that check to see if a
parameter is null in javascript:
Here's the code:
function onLoad() {
document.form.elements[0].focus();
// Check to see if the user is coming from a shortcut
var imageName = "<%=request.getParameter("imageName")%>";
if (imageName == "null") {
selectTop("<%=select_image%>");
} else {
selectTop(imageName);
<% if (tableIndex == 2) { %>
loadShortcutIcon(13,100);
<% } %>
in iPlanet, when the parameter "imageName" is not in the URL, the javascript
variable gets set to "null" - but in WebLogic, it is set to a blank string -
"". Is there anyway to make this return null like iPlanet?
Thanks,
Matt
Hi,
the URL parameter is added just for the request to the page. When you press the command button then you issue a new request that does not have a URL parameter added. To work around this, you can use a PhaseListener that stores the URL request parameter in the session for later use
Frank -
Help Needed in checking session variable
In a sample site, I am calling a bounded task flow from an unbounded task flow. In the called taskflow the default activity is a router which checks the session variable, and the home page will be loaded only if the session variable is not null. If session variable is null router will lead to a page dispalying 'session expired'. But even after clearing the session if I copy pasted the previous url, the home page is loading. But when I call bounded taskflow from a bounded taskflow, it is working fine. Can anyone suggest any solution? Thanks in advance
Thanks for the reply. I'm using jdev 11.1.1.5.0.. I'm just trying with a sample example. I have a login page and when the user logins, the user name is stored in session. the loginpage view activity is in adfc config unbounded taskflow. The login credentials is validated in a backing bean and based on the return value, if the login is valid, a bounded taskflow 'hometaskflow' is called. In this bounded taskflow, the default activity is a router wchich checks the username stored in session. If the username is not null it will lead to the 'homepage' view. Else if it is null it will lead to a 'sessionexpired' view.
In the java class of login page I'm accessing the session variable as shown
public Username getSessionBean()
Username username =
(Username)resolveExpression("#{Username}");
return username;
public static Object resolveExpression(String expression)
FacesContext facesContext = FacesContext.getCurrentInstance();
Application app = facesContext.getApplication();
ExpressionFactory elFactory = app.getExpressionFactory();
ELContext elContext = facesContext.getELContext();
ValueExpression valueExp =
elFactory.createValueExpression(elContext, expression,
Object.class);
return valueExp.getValue(elContext);
On login button click the function being executed is as shown
public String onLoginClick() {
if(String.valueOf(itUserName.getValue()).equals("admin")
&& String.valueOf(itPassword.getValue()).equals("admin"))
Username username=getSessionBean();
username.setUsername(itUserName.getValue().toString());
return "success";
else {
return "invalid";
And to set username as null on logout, I used this function on logout click
public void clearSession()
Username username=getSessionBean();
username.setUsername(null);
The EL expression used to check the value of session variable is
#{sessionScope.Username.username==null} outcome is expired
#{sessionScope.Username.username!=null} outcome is active
This worked when I used in a bounded taskflow, which is being called from another bounded taskflow. But not working in this scenario... -
How do I insert a session variable into a record?
I can’t figure out how to insert the value passed by a
session variable into a record.
I have a form I want to use to insert a record. I pass
session variables to this page and want to insert one of them into
the record. The session information is:
session_start();
$_SESSION['usename'] = $_POST['username'];
$idvar = $_SESSION['id'];
$_SESSION[‘id’] is the user_id that I want to
insert into the record.
I know $idvar is getting to the page with the form because I
can echo it.
The insert code looks like this:
if ((isset($_POST["MM_insert"])) &&
($_POST["MM_insert"] == "register")) {
$insertSQL = sprintf("INSERT INTO h_genres (user_id,
username, contrib_to, Advertising, Annual_Reports, Leader_Content,
Member_Content, Brochures) VALUES (%s, %s, %s, %s, %s, %s, %s,
%s)",
GetSQLValueString($_POST['user_id'], "int"),
GetSQLValueString($_POST['username'], "text"),
GetSQLValueString($_POST['contrib_to'], "text"),
GetSQLValueString(isset($_POST['Advertising']) ? "true" :
"", "defined","'Y'","'N'"),
GetSQLValueString(isset($_POST['Annual_Reports']) ? "true" :
"", "defined","'Y'","'N'"),
GetSQLValueString(isset($_POST['Leader_Content']) ? "true" :
"", "defined","'Y'","'N'"),
GetSQLValueString(isset($_POST['Member_Content']) ? "true" :
"", "defined","'Y'","'N'"),
GetSQLValueString(isset($_POST['Brochures']) ? "true" : "",
"defined","'Y'","'N'"));
mysql_select_db($database_hauw, $hauw);
$Result1 = mysql_query($insertSQL, $hauw) or
die(mysql_error());
I have a hidden field for the user_id:
<input name="user_id" type="hidden" id="user_id" />
I think I need to get the value in $idvar into user_id but I
don’t know how.
Any help is appreciated.awsweb wrote:
> I have a hidden field for the user_id:
> <input name="user_id" type="hidden" id="user_id"
/>
>
> I think I need to get the value in $idvar into user_id
but I don?t know how.
<input name="user_id" type="hidden" id="user_id"
value="<?php echo
$idvar; ?>" />
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/ -
I want to use interaction between two reports in different dashboards, which do not share the same tables but the same values.
When clicking on column A values in Report A, I want to create action link with option to open Report B, presenting column B, which is filtered by value A.
I also want the prompts in Report B to present the value A, as it was selected by the user on Report A.
I thought about using GOURL in action link to specific URL. I manage to open Report B, but it is not filtered by A.
How can I transfer the value A in the URL? how should I add the value A into '&val1=XXX'?
I also want to transfer other prompt values (e.g. val2 of col2) from A to B. I set this prompt value to session variable, but how can I add it in the GOURL syntax of '&val2=XXX'?Hi,
Check those links might help you.
Integrating Oracle OBIEE Content using GO URL
How to set session variables using url variables | OBIEE Blog
OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
Thanks,
Satya
Maybe you are looking for
-
SharePoint Foundation 2013 - Treeview current navigation linking to wrong page
Good day, We are having issues with the OOTB tree view for SharePoint Foundation 2013. The client has a document library with a folder structure. Clicking on the first level folder (Private) navigates you to the wrong url, but when you navigate to on
-
Hi, In 11.1.1.5, did anyone succesfully use hierarchy navigation functions "IsDescendant" or "IsChild" in derived logical column mapped to OLAP dimension? What works for me: - "IsLeaf" function for both OLAP and relational db - "IsDescendant" / "IsCh
-
Increasing font size for received emails ?
Is there any way to increase the font size of emails/texts received on this device? My eyes have a hard time reading the standard size. Solved! Go to Solution.
-
Presenter 10 Changes Colors to slides in PowerPoint Deck upon Publication
Using Presenter 10 with PowerPoint 2007. When I preview PowerPoint slides in Presenter all looks great, color and builds are fine. When I publish the slides as SWF and/or HTML the fill colors and background colors change on many of my slides. The
-
New Clarity slider in 1.1
Wow! I shoot boats on water, so far with a 10D (God! I'm chomping at the bit for a 1D Mk III!!!) and the Canon 100-400 L. When I slid that puppy over to 100, the difference and improvement was incredible! It's like having had a headache for years, no