Session problems on wls6.1
We have two domains with an identical application but one can pass out login
credential through the session without any problems and the other just
cannot retrieve the reference from the session. Both have the same session
settings. Can any one point me a direction to look at? Thank you.
Jack Shieh
We found out what the problem was. Turned out the domain name we used on the
client side didn't match the one on the host, and therefore the session is
recreated for every request.
"Jack Shieh" <[email protected]> wrote in message
news:41e5acba$1@mail...
We have two domains with an identical application but one can pass out
login credential through the session without any problems and the other
just cannot retrieve the reference from the session. Both have the same
session settings. Can any one point me a direction to look at? Thank you.
Jack Shieh
Similar Messages
-
Java Session problem while sending mail(using javamail) using Pl/SQL
Hello ...
i am using Java stored procedure to send mail. but i'm getting java session problem. means only once i can execute that procedure
pls any help.props.put("smtp.gmail.com",host);I doubt javamail recognizes the 'smtp.gmail.com' property. I think it expects 'mail.host'. Of course since it cannot find a specified howt it assumes by default localhost
Please format your code when you post the next time, there is a nice 'code' button above the post area.
Mike -
Session problem in jsp application
I face a session problem. I setting everything in a session and when pass back to a main page, the value is not display in the screen. But after refresh the value will display in the screen and this kind of problem only come out very few time and i dun knw how to solve this...
Anyone here can give me some idea and suggestion or the way to solve this kind of problem!!!define "2 different clients"
1) You have 2 different PCs and it's using the same session ID for both? I doubt this. I think the server is advanced enough not to use give a session ID that's already been created.
2) You have 1 PC and are using IE or Netscape and using File > New Window to open a new window and connect again. This you can't fix without using only URL rewriting to manage session, because the different windows will share the same session cookies. -
ShutDown problem in wls6.0
Hi
we are using wls6.0 sp1 on a unix machine. when trying to stop the server by the command
java weblogic.Admin -url <url> -username system -password <password> SHUTDOWN
we get the following exception even if the server is running, and are not able to stop the server from a different session.
Exception in thread "main" java.lang.ClassCastException: Expected RemoteException, RuntimeException, or Error but received: 'class java.rmi.ConnectException'
at weblogic.common.T3Client.sendRecv(T3Client.java:724)
at weblogic.common.AdminServicesImpl.shut(AdminServicesImpl.java:97)
at weblogic.Admin.main(Admin.java:425)
Can anyone give a pointer to the problem.
Thanx
AmitGenerally use kill -9 against the pid.
Peace,
Cameron Purdy
Tangosol Inc.
Tangosol Coherence: Clustered Coherent Cache for J2EE
Information at http://www.tangosol.com/
"Amit Chopra" <[email protected]> wrote in message
news:3c3b22b6$[email protected]..
Hi
we are using wls6.0 sp1 on a unix machine. when trying to stop the serverby the command
java weblogic.Admin -url <url> -username system -password <password>SHUTDOWN
>
we get the following exception even if the server is running, and are notable to stop the server from a different session.
>
Exception in thread "main" java.lang.ClassCastException: ExpectedRemoteException, RuntimeException, or Error but received: 'class
java.rmi.ConnectException'
at weblogic.common.T3Client.sendRecv(T3Client.java:724)
atweblogic.common.AdminServicesImpl.shut(AdminServicesImpl.java:97)
at weblogic.Admin.main(Admin.java:425)
Can anyone give a pointer to the problem.
Thanx
Amit -
Downloading problems in wls6.0
Hi all,
I'm having problems downloading wls 6.0. I've done a http download and even
though the file size is 45mb, I get only 8Mb after 30 minutes of downloading.
THen when I double click on the executable weblogic600sp1_win it just zips through
and nothing happenss. I look at the windows NT server task manager and there is
a process in memory weblogic600sp1_ Then it stays there for ages and nothing happens..
I would really like to check out the latest features of wls6.0. Any help would
be gratefully accepted..
Thanks in advance,
Surlu.Generally use kill -9 against the pid.
Peace,
Cameron Purdy
Tangosol Inc.
Tangosol Coherence: Clustered Coherent Cache for J2EE
Information at http://www.tangosol.com/
"Amit Chopra" <[email protected]> wrote in message
news:3c3b22b6$[email protected]..
Hi
we are using wls6.0 sp1 on a unix machine. when trying to stop the serverby the command
java weblogic.Admin -url <url> -username system -password <password>SHUTDOWN
>
we get the following exception even if the server is running, and are notable to stop the server from a different session.
>
Exception in thread "main" java.lang.ClassCastException: ExpectedRemoteException, RuntimeException, or Error but received: 'class
java.rmi.ConnectException'
at weblogic.common.T3Client.sendRecv(T3Client.java:724)
atweblogic.common.AdminServicesImpl.shut(AdminServicesImpl.java:97)
at weblogic.Admin.main(Admin.java:425)
Can anyone give a pointer to the problem.
Thanx
Amit -
Session problem in a new window created by window.open()
hello,
I have a drugsearch.jsp page, I sessioned an durgCollection object on this jsp page using session.setAttribute("drugCollection",drugCollection);
there is a link on this jsp which will call a javascript to open a new window .
here is the javascript to open another new window:
function openReportWindow()
window.open("/drug/Report.jsp","report", "toolbar,scrollbars,width=800,height=800,left=100,top=10");
but in the Report.jsp, I won't be able to get the same session object as in the calling jsp ( drugsearch.jsp) by calling session.getAttribute("drugCollection").
if I change the link on drugsearch.jsp to link to the Report.jsp directly instead of opening a new window, then I can get the same session object from the Report.jsp.
what's the problem? can someone give me an advice?
thanksA session is assosiated with one client(browser).
when you open a new browser, a new session is created. In order to have common place for both the browsers, try storing the data in the 'Servlet Context' -
We have an application developed in Jdev 10.1.3.4 (JSP, Struts, ADF BC) and running on OAS. Now we have a big problem with session, hope somebody can help with some ideas.
We set session time to 45 min in the web.xml. The problem is that sometimes some user work on a page with form,for instance performing some edit activity. If he/she leave the page open inactive for more than 45 minutes and come back from lunch, press the ’save’ button, the application would then commit the change to the wrong row in database, most probably the top row in the View Object(VO) instance. This is because the application module actually does a rollback when session expires, it loses all user data.(e.g. row currency in VO instance).
To avoid saving wrong data to the wrong place, we implemented a session Filter(see att. Below: ApplicationSessionExpiryFilter.java) to catch session time-out and forward request to an error page alerting user that their session has expired due to long time of inactivity. The Filter works as it should but it gives another problem. If user already has one of our application page open for very long time and open another page in a new browser (e.g. click a link from an email), he/she will get session-expire error immediately in the new browser. I guess it is because the session in the first browser already expires and the newly opened the browser shares the same session with the first one. That is how browsers works, we can do nothing about it.
But our users are of course not very happy about getting the session errors in a newly opened browser. So we tried implementing a heartbeat funtion in AJAX(see att. Below: Heartheat.html and Template.jsp) to keep the session alive until the page is closed. Basically what we do is adding an invisible div tag in every jsp page and invoke AJAX funtion to periodically update the div tag with a small html page. In this way, a request is being sent to the server every 5 minutes thus the session should be kept alive until the page/browser is closed.
It sounds to us like a very logical solution but it doesn’t work very properly. We sometimes still get the session error page immediately after opening a new page while we have another page open for long time.
Could anyone please help to look at our Filter and heatbeat funtion? Is there anything wrong with our Filter or the heartbeat? Why does the session still expire before we close the page?
All we do here is to try to avoid the initial probelm with saving data after session and the application module expires. If anyone has a better solution to this problem, we would very much like to try. Appreciate if anyone can share some ideas!
Thanks in advance!
*1. ApplicationSessionExpiryFilter.java*
public class ApplicationSessionExpiryFilter implements Filter {
private FilterConfig _filterConfig = null;
public void init(FilterConfig filterConfig) throws ServletException {
_filterConfig = filterConfig;
public void destroy() {
_filterConfig = null;
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest)request;
boolean sessionInvalid = false;
if(httpRequest.getRequestedSessionId() != null) {
if(!httpRequest.isRequestedSessionIdValid()) {
if (!httpRequest.getRequestURI().endsWith("sessionExpired.do")) {
sessionInvalid = true;
if (sessionInvalid) {
((HttpServletResponse) response).sendRedirect(_filterConfig.getInitParameter("SessionTimeoutRedirect"));
else {
chain.doFilter(request, response);
*2. Heartheat.html* (A small html page to be invoked by template.jsp periodically)
<html>
<head>
<META Http-Equiv="Cache-Control" Content="no-cache, must-revalidate">
<META Http-Equiv="Pragma" Content="no-cache">
<META Http-Equiv="Expires" Content="Expires: Mon, 26 Jul 1997 05:00:00 GMT">
</head>
<body>
heartbeat to keep session alive!
</body>
</html>
*3. Template.jsp* (Template page to be extended by all jsp pages, invoke heart.html every 5 min)
<Html>
<body>
<div id="heartbeat" style="display:none">
</div>
<script type="text/javascript" language="javascript">
new Ajax.PeriodicalUpdater('heartbeat','jsp/template/heartbeat.html',{ method: 'post', frequency: 300, decay: 1 }); // update heartbeat.html every 300 sec(5min)
</script>
</body></html>Hi Shay,
Reviewing ADFContex methods it seems that this object shouldn't be accessible from BC. Example:
public static ADFContext initADFContext(java.lang.Object context,
java.lang.Object session,
java.lang.Object request,
java.lang.Object response)
Initializes the ADFContext for the environment of the specified context.
Parameters:
context - the ServletContext or PortletContext of the current execution environment.
session - the HttpSession or PortletSession of the current execution environment. OPTIONAL.
request - the HttpServletRequest or PortletRequest of the current execution environment. OPTIONAL.
response - the HttpServletResponse or PortletResponse of the current execution environment. OPTIONAL.
Returns:
the ADFContext that was current when init was invoked. Should be passed back to resetADFContext after the block requiring the ADFContext has completed.Kuba -
Urgent: Sessions problem pls help me
Hi all,
Its already late to post this problem.pls help me urgently.
I have a servlet & two jsp's. first i request servlet, it processes something and forwards request to my first jsp. In that jsp on a button click, i'm displaying a new popup by calling showModalDialog. this dialog gets data from the same servlet but it forwards to my second jsp.(second jsp can be seen in dialog)
Now if i submit form from my second(dialog) jsp, the servlet reports that session has expired. I tried a lot but invain. any one who helps me is appreciated well by all of our forum.
waiting 4 u r reply,It could be that you have cookies turned off and you're not using URL Rewriting.
In J2EE, the first time your browser makes a request to the server, the server responds and appends a SESSION_ID parameter to the request as well as storing a cookie with the SESSION_ID.
The second time your browser makes a request, the server checks for the cookie. If it doesn't exist it checks for the parameter. If neither exist the server assumes its the first time your browser has made a request and behaves as describe in the previous paragraph.
In your case when you submit the form if you have disabled cookies and the action attribute doesn't have the SESSION_ID paramter appended to the url, the browser will assume it's a first request. The user will not be logged in, hence your session has expired error.
To fix this you need to encode the URL in your JSP. You can use the struts html:rewrite tag or the HttpServletReponse.encodeURL method, or if you're using JSP 2.0 the JSTL c:url tag. -
Session problems in tomcat 5.0.28
Even I shutdown the tomcat 5.0.28 server the session variable is still existing and it is showing the old values. What I have to do to disable the old values? Is it the problem with tomcat 5.0.28 or with JSP coding!
Tomcat serializes sessions to the hard drive when it shutsdown. If you don't want this you have three choices:
1: you can disable this functionality in the server.xml. Check the documentation.
2: you could just delete the session.ser file when you shut down tomcat. This file is under work/standalone/{webapp name}
3: you could close and re-open the browser so that the old jsessionid will not be sent and a new session will be created. The old session will eventually time out.
The third option is probably the easiest. -
Hi, i am facing a problem of the Object set into a session not being visible to the others pages. what did i done wrongly?
here is the code:
in login.jsp (currently hardcode cos i haven recieve that part):
<%@page import="fantasy.team.*,java.util.Vector" session="true"%>
<%
Team t = new Team("Kacheek FC");
session.setAttribute("team",t);
if( session.getAttribute("team") ==null){
out.write("how come null");
}else{
out.write("not null");
%>
Select
//End of coding
not null will be printed
Following code belong to selectPlayer.jsp:
if( session.getAttribute("team") == null){
out.write("i am null"); }else{
out.write("i am not null");
i am null is printed
what is wrong with my coding?
thanks.i do a
if(session.isNew())
out.write("New");
and the result is new.
meaning that my session is invalidate.
that explain my value from "gone" rite?
how to solve this?
thanks. -
Session Problems(ConcurrentModificationException)
Hi,
I am facing some problems with session here.
I get a java.util.ConcurrentModificationException whenever i try to empty the shopping cart.
Could somebody pls kindly advise?
Thanks in advance
below is the code:
<% String item = request.getParameter("itemName");
if(item != null && item.equals("emptyCart")) {
java.util.Enumeration attributeNames = session.getAttributeNames();
while(attributeNames.hasMoreElements()) {
String attributeName = (String)attributeNames.nextElement();
session.removeAttribute(attributeName);
} else if(item != null) {
String attributeName = item + "CD";
session.setAttribute(attributeName, item);
%>Similar qus answered int his forum ..
refer
http://forum.java.sun.com/thread.jsp?thread=244532&forum=45&message=897268 -
Hi,
I have a PHP site that uses frames. The frameset loads
another site (both on
the
same server) in the lower frame window. Every time the page
changes in the
lower frame the session id changes, how can I stop this
happening?
Thanks for your helpThanks for the instructions, but now I'm wondering that this isn't even my problem. My problem is extremely strange. Let me explain...
I'm building a website called Project Squared. As of right now, we're using SSL certificates (maybe this has something to do with the problem). Anyway, I try to login with my correct user information, and it works. But then, if I just close the Safari window without actually exiting Safari, if I open a new window and try to login again, I have to enter either incorrect information, or no information at all, to login. I can only login with correct information again if I exit Safari completely. Is this common, or do you know a fix? Thanks a lot. -
JSP Session problem in HTML frames????
Hi everybody;
I have a problem with session I think. My index page is created with 4 diffrent jsp's in 4 diffrent frames.After a while lets say 15 minutes when my session is expired.When I click one of my button ..The frames which linked with that button is show Http 500 error page.When I refreshes the web page they all gone.(and my web page goes normal again)
I want to ask you how can I handle this problem.How can I solve this error page showing and stop showing that error page instead of in each frame,to refresh the index page again??
Thanks for your consideration.....The first step is to decide whether 15 minutes is a suitable timeout for sessions.
If it isn't then simply increase it in web.xml. You may also decide that session persistence is worth enabling (if your Servlet container supports it).
If it's not then your pages will need to handle a null (or at least new) session slightly more elegantly. You're probably just getting a null pointer exception because something your pages is relying on is missing (a session attribute of some sort). Sometimes it's sufficient just to redirect the topmost window to the index page - not the greatest user experience in the world but at least consistent.
Hope this helps. -
Session problem in one out of two jsp
Dear java guru's
I have got jsp page A.jsp.User select few option and this jsp calls
B.servlet this takes user input and pass to
C.bean which returns vector to B.servlet
This servlet put vector in session and dispatch to new jsp
D.jsp which calls
E.jsp in it for Image generation.
This E.jsp retrieve vector from session and generate a image and reurn to D.jsp
Now my problem is that session in B.servlet and D.jsp are same but a new session in created in E.jsp so image is null as it could get data from vector which is null.
I put System.out.println(session.getId()) in each servlet and jsp so to get thier ID's.
This is working fine in my system with Tomcat 3.2 but on web the new session is created for E.jsp
I am calling E.jsp like this
<img src=<%=response.encodeURL("/iscap/report/jspChart.jsp")%> alt="generation image" width="400" height="350" border="1">
I am making page session=true in each jsp and also puttting request.getSession(false);
but still E.jsp is getting new session.I tried eliminating each one and made all combination that could be possible but not effect.
How Can I solve this problem on the web where I have to load this?
Do I have to make setting in context .
payal sharmaHi,
If you have been using jspChart v 1.00 :
As shown in the modified , attached PPT :
I will be displaying a bar chart. The length of bar chart is obatined from Sybase database. This chart should be dynamically created depending on the value on
the database and x -axis is exponential.
This will be displayed on a HTML page.
1. I want to know whether,the values can be obtained the values from Sybase database ?
If so, what are the changes.
2. can you tell me the steps to install and run the jspchart v 1.00 on Jrun or any server please.
Any thing else, I need to install like SAX , JCLARK. I am getting errors in this. PL HELP.
3. Is it possible to plot "Exponential values" in the Y-axis. like 0 - 100- 1000 - 10000 - 100000
and the length of the Bar should automaticall be coloured till that Point as shown in the Power point attached.
If not, any suggestions to use any other software.
Thanks in advance.
[email protected] -
Sessions problem when deploying to AS 10g (10.1.2.0.2)
Hello,
I have a very simple Web Application where I have isolated an issue I have found. The application works fine when executed in JDeveloper 10g (10.1.2.2) but it does not work when deployed in the AS 10g (10.1.2.0.2). My Platform is Windows XP Professional x64.
The application has been created in JDeveloper (New >> Web Project) and contains:
- a simple jsp page (main.jsp) displaying a dummy message,
- a simple filter class (authFilter.java) which only has the following code in the doFilter method:
HttpServletRequest hreq = (HttpServletRequest)request;
System.out.println("*** session id = " + hreq.getSession().getId());
System.out.println("*** requested session id = " + hreq.getRequestedSessionId());
- a web deployment descriptor (web.xml) where the reference to the filter has been added:
<filter>
<filter-name>Filter1</filter-name>
<filter-class>myfilters.authFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Filter1</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
When running this inside JDeveloper, the output is the following:
08/12/09 17:54:03 *** session id = ac1663b9231c2936edded7df423f9161c223ee0d4246
08/12/09 17:54:03 *** requested session id = null
08/12/09 17:54:08 *** session id = ac1663b9231c2936edded7df423f9161c223ee0d4246
08/12/09 17:54:08 *** requested session id = ac1663b9231c2936edded7df423f9161c223ee0d4246
08/12/09 17:54:10 *** session id = ac1663b9231c2936edded7df423f9161c223ee0d4246
08/12/09 17:54:10 *** requested session id = ac1663b9231c2936edded7df423f9161c223ee0d4246
Each time I reload the page in the browser I get two messages where the session id and the requested session id are equal and the same.
However, when running the application inside the AS, the output is the following (taken from the opmn/logs/OC4J~my_component~default_island~1):
08/12/09 17:56:58 *** session id = ac16322030d6da9410e6348449449a4cf1f0e65956cf
08/12/09 17:56:58 *** requested session id = null
08/12/09 17:57:01 *** session id = ac16322030d6bc42fa22332e41818aa6ece1fd371361
08/12/09 17:57:01 *** requested session id = null
08/12/09 17:57:02 *** session id = ac16322030d60895af4c8cc44aef9ff6e6e3b3fd2e04
08/12/09 17:57:02 *** requested session id = null
That is, each time the page is reloaded, a new session is created.
This problem is actually blocking me since I would like to use the session to store some data used for authentication in the filter (dynamic credentials). As a new session is being created for each access, the data stored in the session is lost and users cannot log on the application.
Thank you in advance,
Jorge.
Edited by: Jorge Pacios on 10-dic-2008 0:31
Platform information added.It couldn't be such difficult.
I have the jar's, the drivers in, the jdbc url connection as
url="jdbc:oracle:thin:[USERNAME/PASSWORD]@IP:PORT:SID"/>
Also I can connect via sqlplus with this string conn.
The main error I get is
"Cannot lookup jdbc datasource.
The process domain was unable to lookup the TX datasource "jdbc/BPELServerDataSource"."
Maybe you are looking for
-
About combing two array into one
Hi all, I post a questiona bout converting an array of integer into char (byte) array and I got a solution already http://forums.ni.com/t5/LabVIEW/how-to-display-char-code-properly/m-p/2596087#M780368 However, I enouther another problem while deali
-
My hard drive went and when i got my computer back from being fixed my itunes had been deleted, so i re installed it however my ipad wont connect to the itunes as its not registered to this itune, also all my songs arent on here what do i do?
-
Hi, I am having one requirement, In my report i need to give cost centre in selection screen(select-options). Based on that i need to fetch WOGBTR from COEP table. eg : cost center i need to give like this imagine select-options : s_kostl for csks-ko
-
Creating a Bracket Shape in Keynote
I use the bracket shapes all the time in Power Point and can't seem to find one in Keynote. Anyone know of such a shape?
-
Crystal in Win 2008 64 with Oracle
I'm using windows 2008 64 with Oracle client 64 VS 2008, what kind of connection i can use to connect to oracle? I tried to use oracle OLE DB but it doesn't work, it returns only 1 column of data. I tried to use Microsoft OLE DB for oracle and i'm ge