Loosing session variables in tom cat web app

Hi,
I have a very strange problem. I keep loosing session state when I open a JSP from another one.
The funny part is that it only happens when I access my application from outside my LAN. when I test my application from a client located inside my LAN I have no problems. It raeds session variables with no problems. When I teste t from outside my LAN where the server is located it looses my session variables. i acts as if it has timed out.
Can you help me with this? The Tom Cat version I`m using is 4.1.27 and the JDK is 1.3.1.
Many thanks,
Rui Silva

travis is right. You should make sure you always pass all your URLs through the String response.encodeURL(String) method. Some users may not be able to accept cookies, others may intentionally turn them off. If you want you app to work in all cases, then your URLs need to be encoded.
This counts for URLs as part of links, form actions, javascript submissions, etc...

Similar Messages

  • Tom Cat Web Server/Apache Web Server

    Hi,
    I am new to Servlet, JSP and webserver. I would like to install a webserver to run my JSP. Could anyone tell me where can I download TomCat or Apache, what else should I download along with the web server and where to get documentation on how to setup/configure the web server so that I can start testing my JSP, servlet?
    which one, Tomcat or Apache is easier to use and setup? I am new here, so I need only the basic stuffs and the one thats is easy to setup. Thank you very much.
    Luke

    Originally posted by Luke ():It is no really big deal configuring Tomcat to run simple JSPs and servlets. Make sure you include the classpath to the jdbc classes you4ll be using. If you plan to use Business Components, web beans and other Oracle classes, you4ll have to carefully find the packages you need (see JDeveloper help in this topic), and create sort of a deployment environment in the server that hosts your Tomcat. Copy all the packages you need, like jbo, beans, etc. and include all in the Tomcat's startup script classpath, that way, you won4t have much problems. Once you have your Tomcat environment set up right, you can deploy all your JSPs, Servlets and beans to it, and it runs very stable and fast.
    null

  • Delivering serialized session or logon token to external web app?

    Hello,
    I have the following situation, the user logs into SAP BO 4.0 Launch pad application, he needs to start our external web application and therefore we created an hyperlink. The application opens in a new tab, that's running fine. Our application uses BO SDK to provide some functionality (browse user SAP folders, reports or so), and therefore we need to log in into the current user session.
    Is there any way to deliver either the serialized session or logon token to external application? Are there any internal variables to be used? Or should I use totally different approach? 
    There would be a workaround by delivering just the current BO user name to the external app, and than using a separate (administrators) login to fetch only the current user's data. But this I guess is not the right way to do the job.
    Any help is greatly appreciated

    Hi Martin,
    I am facing same situation than you and I also considered using the trusted authentication until I reads following statement in java docs
    To enable trusted authentication on a client machine, create a text file named TrustedPrincipal.conf on the client machine and add the following text:
    SharedSecret=<secret>
    where <secret> is the trusted authentication shared secret configured in BusinessObjects Enterprise.
    So, if the external web app may be launched from any user this would mean having to install this file in all BI LaunchPad desktop computers. It isn´t? This does not sound very elegant. Is this what you did?
    Thanks

  • Printing a Web Report Using Firefox Results in Lost Session Variables

    Post Author: AVXFlyer
    CA Forum: .NET
    I'm  having a problem with Firefox users printing a Crystal Report from a web site. 
    The first page of the web site collects information to be used in the report generation, for example, start date, end date, type of report etc.  These are all various text boxes, drop down lists, radio buttons and check boxes.  When the user clicks to show the report, everything works fine and the first page of the report will display. The code behind this page takes care of saving al the session variables into hidden fields on the page so the settings will be accessible when the user clicks to view the next page of the report.
    On clicking to view the next page of the report, everything is still fine and the process works beautifully and I've had no problems. 
    A new problem has surfaced during the printing of these reports.  Users who use IE6.0 or IE 7.0 do not have a problem, however, users who use Firefox do have a problem.
    It seems that the print dialog which appears as part of the the Crystal web control manages to 'lose" the variables which were present on the calling page.  It only does this with the Firefox browser.  Calls on postback to retrieve the variables from the hidden fields result in 0's or empty strings ("").
    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init .... ....  If Me.IsPostBack = False Then ... ...        strDiscontinuedOnly = Request.Form.Item("ddlInvStatus")             If strDiscontinuedOnly = Nothing Then                 isDiscontinuedOnly = False             Else                 Select Case strDiscontinuedOnly                     Case 0 'All Inventory                         isDiscontinuedOnly = False                     Case 1 'Discontinued Inventory                         isDiscontinuedOnly = True                     Case 2 'Active Inventory                         isDiscontinuedOnly = False                 End Select             End If Else 'Postback is true             intRequestedReport = Request.Form.Item("fldReportID")             strDiscontinuedOnly = Request.Form.Item("fldInvDiscItemsOnly")             isDiscontinuedOnly = Request.Form.Item("fldInvDiscItemsOnly") ... ... end if

    Can't explain it, but here are a few tests;
    1) Try to print a saved data report
    2) Try to print a report that is not using parameters
    3) Try a different printer driver as "default"
    4) Enable the option "Dissociate Formatting Page Size and Printer Paper Size" on the report
    5) What format do you export to?
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Event ID: 1280 Server 2012 RDS - web app fail on second session host

    Hello there
    Topography
    SBS 2011 (domain controller)
    Two VM’s:
    VM1 – All RDS rolls: RD Gateway , Connection broker, Licensing and RD access installed and acting as a session host with an active collection for RD web apps. A CA trusted certificate is installed.
    VM2 – Session host with a second collection for RD web apps
    Problem
    I have a single app installed on both session hosts (the apps require their own servers). Both appear on the RDWeb site available for use.  I can run the app hosted on VM1 no problem, but when I try to open the second app hosted on VM2 I get
    two issues:
    An error is returned
    “Your computer can’t connect to the remote computer because the Remote Desktop Gateway server address and the certificate subject name do not match. Contact your network administrator for assistance".
    When viewing the certificate, it actually shows the CA cert installed on the
    SBS server for RWW, not the cert on VM1. This has me puzzled
    Secondly on VM 2, I get
    Event ID: 1280 Warning Microsoft Windows TerminalServcies-session broker client
    Remote Desktop Services failed to join the Connection Broker on server sever-vm1.local.
    Error: Current async message was dropped by async dispatcher, because there is a new message which will override the current one.
    When I run the app internally it seems to load but then disappears.
    Some further config info if it is relevant:
    I have port 4043 (443 used) as the only port directed to the gateway
    Am I missing something simple? DNS? Port forwarding issue on the router?  Its my first deployment of this nature with RDS 2012
    Regards
    MIS5000

    Hi,
    Thank you for posting in Windows Server Forum.
    Firstly please check the RDP version you are using. I suggest you to update to RDP 8.1 for better feature and functionality. Now other thing verify that you have the RD Gateway certificate name matches the external FQDN of the RD Gateway Server. Also please
    check that certificate is added under local computer\personal store and must be signed by trusted root authority. 
    Please check below article for more detail.
    TS Gateway Certificates Part III: Connection Time Issues related to TS Gateway Certificates
    http://blogs.msdn.com/b/rds/archive/2008/12/18/ts-gateway-certificates-part-iii-connection-time-issues-related-to-ts-gateway-certificates.aspx
    In regards to resolve other issue (Event ID 1280), identify and fix any connectivity problems between the RD Session Host server and the RD Connection Broker by doing the following:
    • Check network connectivity to the RD Connection Broker.
    • Start the Remote Desktop Connection Broker service. 
    • Add the RD Session Host server to the Session Broker Computers group.
    More information.
    Event ID 1280 — RD Connection Broker Communication
    http://technet.microsoft.com/en-us/library/ee890889(v=ws.10).aspx
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support

  • Distributed sessions for multiple web-apps in a single App. Server (v.8.1)

    I have 3 applications on App. Server 8.1 (running on JDK 1.5)
    App-A handles login
    App-B and App-C are functions that are accessible after login is validated.
    It works fine with App. Server 6.5 (JDK 1.3)
    But the distributed session cannot be shared in App. Server 8.1 (JDK 1.5)
    So App-A handles sign on and stores the user's Login Name on the session.
    App-B and App-C read the user's login name from the session object and grant access to different modules.
    1. Starting App-A and perform login
    2. Starting App-B from App-A (it is linked there)
    3. Starting App-C from App-A (it is linked there)
    In step 1, a new session is created for the user, an attribute ("LoginName") is put in the session - ie. using HttpSession.setAttribute()
    In step 2, the program checks for attribute "LoginName" from the session object - ie. using HttpSession.getAttribute()
    If not found, redirect to login; if found, then continue with App-B
    In step 3, same as in step 2 above.
    It works fine with App. Server 6.5 but problem occurs in step 2 and 3.
    web.xml of App-A, App-B and App-C:
    <i>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>App-A</display-name>
         <distributable/>
    </i>
    sun-web.xml of App-A, App-B and App-C
    <i>
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd">
    <sun-web-app>
    <session-config>
    <session-manager persistence-type="memory">
    <manager-properties>
    <property name="persistenceFrequency" value="web-method"/>
    </manager-properties>
    <store-properties>
    <property name="persistenceScope" value="session"/>
    </store-properties>
    </session-manager>
    </session-config>
    </i>

    Distributed sessions has nothing to do with different web applications. The concept is about distributing load for the same application between several appserver instances running on the same box(different jvm) or on some other box in the network.
    What you used with iAS 6.5 is not available in 8.1 because sharing sessions between web apps is forbidden by the servlet spec. You should consider repackaging your apps. into a single web app. or using other way of signing/verifying user identity(check Sun Access Manager for example).
    Have a look at this thread as well: http://swforum.sun.com/jive/thread.jspa?threadID=100931

  • Web session variables in Begin_SQL

    Is it possible to access web session variables using @variable (or any other means) from within a Begin_SQL?  In particular, we want the end-user's IP address (not the IP address of the BO server).

    Magesh,
    Are you using OC4J ? In OC4J, by default http sessions are store in memory and not in DB and you cannot use pl/sql to cleanup the sessions.
    You can set the session timeout parameter in the web.xml to cleanup sessions.
    regards
    Debu

  • Session persistence across web apps

    Hi,
    I am working on a project where we have two web applications deployed in single enterprise application. I want the session object to be shared across the web applications.
    Does weblogic had any mechanism to allow for the session object to be shared across the multiple Servlet contexts inside a single enterprise application?
    I am using Weblogic 8.1
    Thanks,
    Anil

    Session data is not shared between web applications. User data is definantly important to share between applications. The single-sign-on security option is an example of this. But that's kindof a black box. If you use single-sign-on, then simply getting the remote user from the request in your servlet can be used as a key to get user data from your persistance layer (ejb's or jdbc or even jms).
    If you don't want to use single-sign-on, you can use a filter. There's some url prestidigitation, also, but otherwise this approach is pretty simple:
    1. Protect access to all of your web-app's urls with some naming convention /webappname/secure*. However, don't use these urls in any web page. All servlets and jsps you use should map names beginning with "secure".
    2. Filter all access to your webapp (this is a new feature in servlet spec 2.3). Within the filter, use the session id as a key to find out if the user is already login to any other web application. You will need a stateless session bean to do this. The doFilter would be something like this:
    SecurityBean securitybean = Utilities.getSecurityBean();
    HttpSession session = request.getSession(true);
    if (session.getAttribute("myuserdata") == null){
    UserData userdata = securitybean.getUserdata(sessionid);
    if(userdata != null)
    session.setAttribute("myuserdata",userdata);
    ... now forward the request to the "secure*" url in the filter. If the user was logged in with the slsb securitybean, then your web app will have all of your user data. If the user is not logged in by the securitybean, then the login prompt established in your web.xml will pop-up.
    The only extra work is to have a slsb securitybean. This can use the RoleManager in oc4j or it can use the jaas implementation in oc4j to log the user in, using the sessionid to get the username.
    The shared="true" attribute should be used for all application in the *-web-site.xml, so that the sessionid's are the same.
    regards,
    the elephantwalker
    www.elephantwalker.com

  • App store got stucked when i am trying to download talking tom cat.what  i have to do now.i bought this today morning..

    app store got stucked when i am trying to download talking tom cat.what  i have to do now.i bought this today morning..

    Try resetting the iPOd. Nothing will be lost.
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.

  • Unable to run Web App for the 2nd Time

    Hi,
    I am using Weblogic 8.1 sp5 as my deploying platform. Using the official tutorials, I am able to export my JSC2 web app into a WAR file that is deployable on my Weblogic server.
    Upon running the application, it works perfectly. However, upon closing my browser and then restarting the browser, running the web app again yields exceptions, please refer to the bottom.
    What am I doing wrong? I am suspecting the web-app wasn't detroyed properly when another instances of it is started...
    Please advise.
    Adams
    Error 500--Internal Server Error
    com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(Ljavax/faces/context/FacesContext;)V(ViewHandlerImpl.java:601)
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(ViewHandlerImpl.java:316)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(Ljavax/faces/context/FacesContext;)V(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(Ljavax/faces/event/PhaseId;Lcom/sun/faces/lifecycle/Phase;Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.render(Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FacesServlet.java:198)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.TailFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27)
         at com.sun.rave.web.ui.util.UploadFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(UploadFilter.java:194)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(RequestDispatcherImpl.java:326)
         at weblogic.servlet.jsp.PageContextImpl.forward(Ljava/lang/String;)V(PageContextImpl.java:150)
         at jsp_servlet.__jscreator_index._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(__jscreator_index.java:122)
         at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:348)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(WebAppServletContext.java:6985)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(WebAppServletContext.java:3892)
         at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic/kernel/ExecuteThread;)V(ServletRequestImpl.java:2766)
         at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:183)
         at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)
    Caused by: java.lang.RuntimeException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(Lcom/sun/data/provider/RowKey;)V(CachedRowSetDataProvider.java:343)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(I)Z(CachedRowSetDataProvider.java:300)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount()I(CachedRowSetDataProvider.java:624)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:806)
         at com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:429)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowCount()I(TableRowGroup.java:749)
         at com.sun.rave.web.ui.component.Table.getRowCount()I(Table.java:307)
         at com.sun.rave.web.ui.component.Table.getTableActionsTop()Ljavax/faces/component/UIComponent;(Table.java:539)
         at com.sun.rave.web.ui.renderer.TableRenderer.renderActionsTop(Ljavax/faces/context/FacesContext;Lcom/sun/rave/web/ui/component/Table;Ljavax/faces/context/ResponseWriter;)V(TableRenderer.java:257)
         at com.sun.rave.web.ui.renderer.TableRenderer.encodeBegin(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(TableRenderer.java:124)
         at javax.faces.component.UIComponentBase.encodeBegin(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:683)
         at com.sun.rave.web.ui.component.Table.encodeBegin(Ljavax/faces/context/FacesContext;)V(Table.java:811)
         at com.sun.rave.web.ui.util.RenderingUtilities.renderComponent(Ljavax/faces/component/UIComponent;Ljavax/faces/context/FacesContext;)V(RenderingUtilities.java:78)
         at com.sun.rave.web.ui.renderer.AbstractRenderer.encodeChildren(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(AbstractRenderer.java:194)
         at javax.faces.component.UIComponentBase.encodeChildren(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:701)
         at javax.faces.webapp.UIComponentTag.encodeChildren()V(UIComponentTag.java:607)
         at javax.faces.webapp.UIComponentTag.doEndTag()I(UIComponentTag.java:544)
         at jsp_servlet.__vesselsmovements._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(__vesselsmovements.java:1060)
         at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:348)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(RequestDispatcherImpl.java:328)
         at com.sun.faces.context.ExternalContextImpl.dispatch(Ljava/lang/String;)V(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(ViewHandlerImpl.java:130)
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(ViewHandlerImpl.java:311)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(Ljavax/faces/context/FacesContext;)V(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(Ljavax/faces/event/PhaseId;Lcom/sun/faces/lifecycle/Phase;Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.render(Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FacesServlet.java:198)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
    Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
         at com.microsoft.jdbc.base.BaseExceptions.createException(Ljava/lang/String;Ljava/lang/String;)Ljava/sql/SQLException;(Unknown Source)
         at com.microsoft.jdbc.base.BaseExceptions.getException(ILjava/lang/String;)Ljava/sql/SQLException;(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.validateParameters(Lcom/microsoft/jdbc/base/BaseParameters;)V(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.validateParameters()V(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.preImplExecute()V(Unknown Source)
         at com.microsoft.jdbc.base.BaseStatement.commonExecute()V(Unknown Source)
         at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal()Ljava/sql/ResultSet;(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery()Ljava/sql/ResultSet;(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery()Ljava/sql/ResultSet;(PreparedStatement.java:124)
         at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(Ljavax/sql/RowSetInternal;)V(CachedRowSetXReader.java:193)
         at com.sun.sql.rowset.CachedRowSetXImpl.execute(Ljava/sql/Connection;)V(CachedRowSetXImpl.java:950)
         at com.sun.sql.rowset.CachedRowSetXImpl.execute()V(CachedRowSetXImpl.java:1410)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute()V(CachedRowSetDataProvider.java:1219)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(Lcom/sun/data/provider/RowKey;)V(CachedRowSetDataProvider.java:329)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(I)Z(CachedRowSetDataProvider.java:300)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount()I(CachedRowSetDataProvider.java:624)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:806)
         at com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:429)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowCount()I(TableRowGroup.java:749)
         at com.sun.rave.web.ui.component.Table.getRowCount()I(Table.java:307)
         at com.sun.rave.web.ui.component.Table.getTableActionsTop()Ljavax/faces/component/UIComponent;(Table.java:539)
         at com.sun.rave.web.ui.renderer.TableRenderer.renderActionsTop(Ljavax/faces/context/FacesContext;Lcom/sun/rave/web/ui/component/Table;Ljavax/faces/context/ResponseWriter;)V(TableRenderer.java:257)
         at com.sun.rave.web.ui.renderer.TableRenderer.encodeBegin(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(TableRenderer.java:124)
         at javax.faces.component.UIComponentBase.encodeBegin(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:683)
         at com.sun.rave.web.ui.component.Table.encodeBegin(Ljavax/faces/context/FacesContext;)V(Table.java:811)
         at com.sun.rave.web.ui.util.RenderingUtilities.renderComponent(Ljavax/faces/component/UIComponent;Ljavax/faces/context/FacesContext;)V(RenderingUtilities.java:78)
         at com.sun.rave.web.ui.renderer.AbstractRenderer.encodeChildren(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(AbstractRenderer.java:194)
         at javax.faces.component.UIComponentBase.encodeChildren(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:701)
         at javax.faces.webapp.UIComponentTag.encodeChildren()V(UIComponentTag.java:607)
         at javax.faces.webapp.UIComponentTag.doEndTag()I(UIComponentTag.java:544)
         at jsp_servlet.__vesselsmovements._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(__vesselsmovements.java:1060)
         at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(JspBase.java:33)

    Well, I have solve this problem myself.. apparently, I used static variables to initalise the app. Changing the static variables to session variables solved the problems.

  • Session variables dropping

    I've been having this problem for a long time so I thought
    I'd post again and maybe get a hit this time.
    We run off windows cfmx 7.x now fully patched, prior to that
    we were on cfmx 6.x. We use session management only. Many times on
    a new page hit the user loses about half of their session variables
    up to all of them. Typically we have them test on the same machine
    using different browsers. 99% of the time switching from IE to
    firefox solves the problem, most of the users have had IE 6.x.
    I experienced this problem myself for about 4 months time and
    I could reproduce it daily when neccessary by simply opening a new
    window to our application and the session information would persist
    to the new window but the parent window would receive a new cfid
    and lose all session information. New windows aren't the only
    issue, we see a lot of lost session variables in one click, same
    window, functionality. I've had hooks in place to test if the
    domain was different on page hits removing the www or something but
    so far have not found anything there. Each time a new CFID is being
    issued and they are losing the original. We attempted to put CFID's
    in the URL at all times but that leads to other issues and didn't
    solve the problem for us anyhow.
    This has been a serious issue for awhile and browsing these
    forums I see others are experiencing it to some extent too. I'm
    wondiner if anyone has any tips or can confirm the CF Admin/app.cfc
    setup you use if you're not seeing any problems like this.

    right... response.sendRedirect(). sendRedirect works by sending a repsonse to the browser with a location header. The browser sees that header and makes a new, separate request to the new location. It's no different then typing the location in the location bar in the browser or clicking a link.
    But that doesn't matter. If you have 2 web applications (aka 2 servlet contexts) on the server, they are not going to share sessions between them. So the first page is working off one session in one context with some ID. Then the redirect sends it to another page in a different context. That session ID is not valid in that 2nd context, so a new session is created like it was a first time user. And if you redirect back, you may not get the same session for the first context, unless the session ID cookie defines the path as well (I'm not sure offhand).
    The "application" object is the servlet context, specifically a javax.servlet.ServletContext object (or implementation of the interface, technically). Nothing is shared between contexts.
    Now, you can always share things in one way or another. Store things in a database or in files. Use a messaging system like SOAP or JMS. Maybe the server allows for contexts to access each other (they aren't shared in that case, just that you can get a named context and read what's stored in it).
    Or don't have your separate contexts, use subdirectories in the same context.

  • Session variables being lost in IE7

    has anyone else experienced, heard of, or solved this issue?
    I have a web app thats been running fine for 5+ years and using session variables (i'm currently using CF8).
    When a user goes from page to page the session is carried with them so i know their login info. However, recently some users (and not all) have complained that after logging in fine (meaning the sessions variables are created) and go to another page off of the main one only to get a timeout issue. I've compared everything from IE settings to server settings, etc. but found no differences. It's like once they navigate to another page in the app the sessions are not carried to the next page.
    My timeout code is written so that if the session variables that are created at login are not present the message will show.
    Some users had to revert back to IE6 and it worked fine. Is there something they did wrong with ther IE update or is there some sort of server hot fix for this?
    Hope someone can help... i'm baffled.

    That forum you posted is definitely my issue! However it still is unresolved and the users have yet to pinpoint the cause (just like me). I too firmly believe its due to an IE7 upgrade b/c that is when this happens.
    I've checked out the user cookies. I used this script and put it on my server and had the user try it:
    http://www.bennadel.com/blog/730-Testing-ColdFusion-Session-Cookie-Acceptance.htm
    The cookies are passing over to the next pages fine (this script showed a success on the user machines). But ye the sessions are lost in my app. the CFID and CFTOKEN are changing when the user clicks to go to another page after login.
    In fact I have the CF8 server monitor up and running and when someone logs in I can see the their session info under the MEMORY USAGE --> Sessions by memory usage.
    I'm finding that users with this issue can log in fine but the session never gets registered with the server?!? Their CFID and CFTOKEN is not showing as an active session and when they click to another page their CFID is always different than their original?
    Any thoughts?

  • Problem in session variables

    hi ,
    Is it not correct to assume that ones we close the browser the session losts and all the session variables also?
    Actually i have design an authentication page which takes userid and password from user and supply this to servlet which after authentication sets a variable "validity" in session to true.
    And in every other jsp page first i m checking this variableis true or not if not then i m redirecting it to authentication page with this tag
    <jsp:forward page="authentication.jsp" />
    now if i have authenticated correctly and close browser and try to access other pages directly then browser allows me to access any page and infact when i print "validity" variable from session then it prints true. That means even after closing the browsing session remains.
    I tried to print session id then after opening a new browser it is showing the same browser.
    In web.xml file i have mentioned the session time to 60 minutes . Is it because of this?. If it then how these standard sites sun, yahoo maintains session time out as well as browser dependent session.
    Right now what i have to do is before setting the variable i have reset the variable to null. But wher shud i reset the validity variable . in destroy method?
    manish

    Your problem is not due to session time out in the xml
    file.
    I think whenever you close your browser the session
    does not exists.
    Remember to invalidate the session while logging off.
    It should workThat is not true. The session will exist for as long as the session timout option is set. Although invalidating the session at logoff is a good idea, there is no real method to force people to log off when the leave your site/close the browser.
    There are a couple of possibilities why the session would still be used after a browser is closed, although normal behavior is to create a new one. The main reason is because the cookie on the browser that maintains the jsessionid is not destroyed. This often occurs in browsers like NS 7 with a "quick-load" app running in the taskbar area (next to the clock). These little parts of the application never close, and hold on to browser cache and cookies, so as to make it quicker to open and surf.
    How do you ge around this? I do not know, except perhaps by preventing the session from using cookies for tracking...

  • Purchased ColdFusion 10: Having problem with session variables

    My Dept. has just bought CF10 and I'm finally updating my existing web app to CF10 from CF8. My First Problem with CF10 is using session variables.
    When using the lower version of CF (since CF 4 to 8) I have never had any problem setting up session variables and getting or using these variables in other pages after a successful login but with CF 10 it seems setting session variables and using them in other pages are a major problems. I'm not sure where have I done wrong in the codes.
    First I'm setting the session in my Application.cfc This way:
    <cfcomponent displayname="Application" output="true">
      <cfset THIS.Name ="MyNewApp"/>
      <cfset THIS.ApplicationTimeout = CreateTimeSpan(0,0,20,0) />
      <cfset THIS.SessionManagement ="YES"/>
      <cfset THIS.SessionTimeout = CreateTimeSpan( 0, 0, 20, 0 ) />
      <cfset THIS.SetClientCookies = false />
    <cffunction name="OnApplicationStart" access="public" returntype="boolean" output="false">
    <cfset application.Main_DSN = "TESTDB">
    <cfreturn true />
    </cffunction>
    <cffunction name="onApplicationEnd" output="false">
          <cfargument name="applicationScope" required="true">
        </cffunction>
    <cffunction name="OnSessionStart" access="public" returntype="void" output="false" hint="Fires when user session initializes.">
    <cfset session.loggedin = "NO">
    <cfset session.username = "">
    <cfset session.userrights = "">
    <cfset session.usergroup = "">
    </cffunction>
    </cfcomponent>
    After login, user is validated and set values to those session.variables:
    ........user validation codes here......................
    <cfif mylogin NEQ true>
          <cflocation url="/login/login.cfm">
          <cfabort
    <cfelse>
          <cfset session.loggedin="Yes">
          <cfset session.username="#Trim(Form.username)#">
         <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
         <cfset session.userrights = qUserRights><!--- it's a query --->
        <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
            <cfloop query="qUserGroup">
               <cfset session.usergroup = user_group>
               <cfbreak>
            </cfloop>
        <!--- ****************** ???????????????????????????????????????????????????????????????????????????
        When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
        But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
        So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
       <cfdump var="#session.loggedin#">
       <cfdump var="#session.username#">
       <cfdump var="#session.userright#">
       <cfdump var="#session.usergroup#">
    </cfif>
    In index.cfm, Before Login I got:
    session.loggedin = NO
    session.username = ["empty string"]
    session.userrights = ["empty string"]
    session.usergroup = ["empty string"]
    After a successful Login:
    session.loggedin = NO
    session.username = ["empty string"]
    session.userrights = ["empty string"]
    session.usergroup = ["empty string"]
    Have I done something wrong? These codes work on CF8. Please help.
    I need to mentioned:
    CF10 is in Linux and my web app is under https not http. But these session variables should be shared bentween http and https because some older application are still in http.

    On which page is the following code?
    After login, user is validated and set values to those session.variables:
    ........user validation codes here......................
    <cfif mylogin NEQ true>
          <cflocation url="/login/login.cfm">
          <cfabort
    <cfelse>
          <cfset session.loggedin="Yes">
          <cfset session.username="#Trim(Form.username)#">
         <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
         <cfset session.userrights = qUserRights><!--- it's a query --->
        <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
            <cfloop query="qUserGroup">
               <cfset session.usergroup = user_group>
               <cfbreak>
            </cfloop>
        <!--- ****************** ???????????????????????????????????????????????????????????????????????????
        When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
        But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
        So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
       <cfdump var="#session.loggedin#">
       <cfdump var="#session.username#">
       <cfdump var="#session.userright#">
       <cfdump var="#session.usergroup#">
    </cfif>

  • How long does a session variable live?

    I have a logon servlet that sets a session variable (validated) and then I reference that variable from various JSP pages. Does the timeout timer start when I last hit the logon servlet or should the session remain persistent as long as the browser is active up until the engine timeout is reached for the zone? I'm using Apache 1.3 with JServ (Oracle 9iAS R2) so unfortunately setMaxInactiveInterval does not work.

    There are timeout settings that can be set, check web.xml documentation for this and this can also be set in the App Server(at least for WAS). You also have to be concerned about how much memeory too and I know WAS has settings concerning session timeouts and memory.
    HTH,
    J.Clancey

Maybe you are looking for