Session.invalidate works on tomcat but not in WebSphere Server

I'm trying to figure out a .jsp written by another developer in WS Studio.
The page does this:
session = request.getSession(false);
session.setMaxInactiveInterval(5);
then almost immediately, does this:
session.invalidate();
In Tomcat, I get the "session already invalidated" error message I would expect. However, In WS Server, the rest on the page loads, and I can continue to interact with the application. I'm using IE 6.0, sp2.
The "session.setMaxInactiveInterval(5);" call seems to have no effect in either container; al least, the application never times out.
The most important thing for my purposes is to be able to invalidate the session in websphere. How can I fix this? Thanks!

duffymo wrote:
Is the machine that you ran this simple java class on the same one where you're >deploying the web app?Same machine where my sql connections bug. I just copypasted it into a file in tomcat5.5/webapps directory and then compiled it and used it from there. I used it from command line.
duffymo wrote:
how well do you know jsps, tomcat, and web apps? sure it's deployed properly? if you >put in a simple jsp and invoked it via tomcat, would you be able to do it?Dont know jsps well. :) Essentially my jspservlet thingie works normally on my computer through my tomcat and on other computers which have netbeans etc... It compiles .war file and ive copied that .war file to the target server's tomcat webapps directory, then when I access the website of my jspservlet tomcat unpacks it and shows my jsp pages normally if they have no sql components. So at least jsp pages are working... :)
"minor modifications"? sure those are right? you wouldn't be the first programmer to fool >themselves by saying "it's the same code - except for X."
try you "minor modifications" on the command line, too.First I used with main on command line, then removed main etc... and included it into my project.

Similar Messages

  • Works in Tomcat but not in iPlanet Web server

    I have a servlet which first generates a form which has one input field, when user fills in the text field and submits the form it is posted to same servlet. The posted data is processed and redirected to another servlet. Everything works fine on Tomcat3.2 but fails to work on iPlanet web server and throws HTTP Error 500.
    Can someone help me with this? What might be the problem?

    Don't know whey it worked in Tomcat and not in iPlanet, but the reason is because I missed '/' in getRequestDispatcher() methoc
    public RequestDispatcher getRequestDispatcher(java.lang.String path)
    The pathname must begin with a "/" and is interpreted as relative to the current context root.

  • Berkeley Xml 2.4.13 works on Tomcat but not on Glassfish

    I recently upgraded my web app to using the latest version of Berkeley Xml from 2.3. The old version worked fine on both glassfish and tomcat java servers.
    When I upgraded and made the necessary modifications to my app I could not get it to work on glassfish but had no problems on tomcat.
    This error happens in the beginning of start up when I call the XmlManager constructor. I am clueless as to what it is because I can not recreate it on anything else but glassfish v2. I even created a new project and played around with some options.
    Here is part of the stack trace:
    DB errno:0
    The log message is null.
    com.sleepycat.dbxml.XmlException: Uncaught exception from C++ API, errcode = INTERNAL_ERROR
    at com.sleepycat.dbxml.dbxml_javaJNI.new_XmlManager(Native Method)
    at com.sleepycat.dbxml.XmlManager.<init>(XmlManager.java:56)
    For now I am going to just use tomcat, but I would really like to know what is going on for both peace of mind and because I like some of the features of glassfish.
    Not sure if this matters but I am deploying the web app through netbeans 6 for both glassfish and tomcat.
    Thanks in advance for any help.

    I don't think it is a library path problem. The java.library.path shows the right values. I did have it working fine on the previous version of berkeley xml. I did have a version mismatch problem but I deleted the other database. I did have problems uninstalling the old database and I had to do it manually (the uninstall was hanging). Maybe I didn't clean it up correctly. My confusion is if I didn't clean it up correctly why does it work on everything else but glassfish.
    Thanks for your help.

  • TSQL working in 2008 but not in SQL Server 2014

    Hello,
    We recently have been asked to move from SQL Server 2008 to SQL Server 2014. We are trying to run parallel tests and one of our queries that was working perfectly in 2008 is not working in 2014.
    One of the filter on the our query(from 2008) is we convert a varchar field to date and compare it to anotehr calulated filed ("convert(date,Quick_Data_Start_Date) <= convert(date,(Year_ID_to_Use + '-' + Month_ID_to_Use + '-01'))").
    This worked fine in 2008 but when i try to do similar operation in 2014 it returns no result.
    For testing purposes, instead of converting the field to date format, i manully converted the actual value i.e. instead of using "convert(date,Quick_Data_Start_Date)" when i use "convert(date,'8/1/2014')" the code works fine.
    The field "Quick_Data_Start_Date" comes from a pivot query.
    When i create a temporary table for the pivot query and use the temporary table in  my code and then convert the field on fly the code works fine again.
    Seems like the T sql is not able to convert the field from varchar to date on the fly when coming from a different query. We have tried changing the compatbility level to 100 as well and it still would not work.
    Any suggestions and comments will be really helpful. Thanks.
    Regards,
    GM

    Hello, here is my overall review:
    The query is not optimized … agreed!  But that’s not the issue.
    There are a number of indexes that could be created, a number of minor calculations or evaluation criteria that could be improved to make the query more efficient … again – AGREED.
    The query “as is” runs in just under a minute (on SQL 2008 machine with less memory and slower hard drives).  Adding the indexes would take more time to add than they would save.
    NONE of that should make the query NOT WORK.  These deficiencies might make it run more slowly, but should not cause the query to return no results.
    “order by” shouldn’t make any difference because the query plan isn’t assuming or using any special order
    The main table (~10 M rows) is using a clustered index scan (not efficient, but not the point)
    The Time dimension table is using a non-clustered index seek (so the index is sorted but the data in the table is NOT physically sorted that way)
    The pivot subquery is using clustered index scan (it’s only 6 rows, so who cares)
    Once again, the order by might make it less efficient, but shouldn’t make it fail.  We get no errors or warnings – it just returns no rows.
    Because the query DOES return results when we 
    Either dump the Pivot query result into a #temp table(single row) and use the #temp table instead of the pivot query in the big SQL or  
    The “input” tables are limited to X rows but DOES NOT when the inputs have more rows
            This strongly suggests a memory issue.
    The server has 64 GB of RAM, but this probably isn’t enough to hold millions of rows and calculations.
    Can we turn on some traces to see what’s happening to the data in the query?  How and what are we looking for?
    Once the memory capacity is exceeded, SQL should be pushing these results to a temporary table (either in the local database or the tempdb).  Can we test to see if that is happening? 
    How?
    Is there a permissions issue?
    I have successfully done large copies outside of SQL (copied 300+ GB file from one location to another) that had to use the disk instead of just memory … means the disk write operation
    isn’t restricted from my user account.
    I can also confirm that the account that runs the SQL Service (“Network Service” account) has full permissions to the drives and paths where the mdf and ldf files are stored (including
    master and temp).
    If this doesn’t work, our upgrade is basically frozen and cannot proceed.  I’m really out of ideas … anything?

  • Workshop App Works on Admin but Not On Managed Server

    Hi all, I have a very simple test Workshop App that works fine on an Admin server
    but not on a Managed Server. I have all the JMS and JDBC resources that the apps
    need, the console does not complain, they deploy fine, but for some reason I get
    exceptions when deployed to the Managed server but works fine on the Admin server.
    What's the difference between both servers? I start one with startWebLogic.cmd
    and the other one with startManageWebLogic.cmd in the same domain directory. The
    only resource that I have not been able to target to the managed server is WSStoreForwardInternalJMSServercgServer
    which I have no idea what it is or if it matters. Some portions of the app works
    when deployed to the managed server so I know it has deployed fine and some simple
    pages compile and work fine but when using certain JAR files in the lib directory
    I get weird exceptions on the managed server and not on the Admin server.
    I'd appreciate any help.
    Thanks, Jose

    Hi all, I have a very simple test Workshop App that works fine on an Admin server
    but not on a Managed Server. I have all the JMS and JDBC resources that the apps
    need, the console does not complain, they deploy fine, but for some reason I get
    exceptions when deployed to the Managed server but works fine on the Admin server.
    What's the difference between both servers? I start one with startWebLogic.cmd
    and the other one with startManageWebLogic.cmd in the same domain directory. The
    only resource that I have not been able to target to the managed server is WSStoreForwardInternalJMSServercgServer
    which I have no idea what it is or if it matters. Some portions of the app works
    when deployed to the managed server so I know it has deployed fine and some simple
    pages compile and work fine but when using certain JAR files in the lib directory
    I get weird exceptions on the managed server and not on the Admin server.
    I'd appreciate any help.
    Thanks, Jose

  • Jsp works in my tomcat but not in school server

    Using netbeans 5.5.1 and it has tomcat 5.5.17. My jsp page works fine when I use it on my computer but when I copy it to my school server(tomcat 5.5) it bugs when trying to contact oracle jdbc database.
    Whats wrong?
    Gives this error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Exception in JSP: /index.jsp:35
    32:
    33:
    34:
    35: <%=db.opentables()%>
    36:
    37:
    38:
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
    root cause
    java.security.AccessControlException: access denied (java.net.SocketPermission [MY HOSTNAME HERE] resolve)
         java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         java.security.AccessController.checkPermission(AccessController.java:427)
         java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         java.lang.SecurityManager.checkConnect(SecurityManager.java:1031)
         java.net.InetAddress.getAllByName0(InetAddress.java:1117)
         java.net.InetAddress.getAllByName0(InetAddress.java:1098)
         java.net.InetAddress.getAllByName(InetAddress.java:1061)
         java.net.InetAddress.getByName(InetAddress.java:958)
         java.net.InetSocketAddress.<init>(InetSocketAddress.java:124)
         java.net.Socket.<init>(Socket.java:179)
         oracle.net.nt.TcpNTAdapter.connect(Unknown Source)
         oracle.net.nt.ConnOption.connect(Unknown Source)
         oracle.net.nt.ConnStrategy.execute(Unknown Source)
         oracle.net.resolver.AddrResolution.resolveAndExecute(Unknown Source)
         oracle.net.ns.NSProtocol.establishConnection(Unknown Source)
         oracle.net.ns.NSProtocol.connect(Unknown Source)
         oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java:1764)
         oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:215)
         oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:371)
         oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:551)
         oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:351)
         java.sql.DriverManager.getConnection(DriverManager.java:525)
         java.sql.DriverManager.getConnection(DriverManager.java:171)
         MYCLASS.Database.opentables(Database.java:131)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:86)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
    Apache Tomcat/5.5
    Edited by: panupanu on Dec 13, 2007 6:04 AM

    duffymo wrote:
    Is the machine that you ran this simple java class on the same one where you're >deploying the web app?Same machine where my sql connections bug. I just copypasted it into a file in tomcat5.5/webapps directory and then compiled it and used it from there. I used it from command line.
    duffymo wrote:
    how well do you know jsps, tomcat, and web apps? sure it's deployed properly? if you >put in a simple jsp and invoked it via tomcat, would you be able to do it?Dont know jsps well. :) Essentially my jspservlet thingie works normally on my computer through my tomcat and on other computers which have netbeans etc... It compiles .war file and ive copied that .war file to the target server's tomcat webapps directory, then when I access the website of my jspservlet tomcat unpacks it and shows my jsp pages normally if they have no sql components. So at least jsp pages are working... :)
    "minor modifications"? sure those are right? you wouldn't be the first programmer to fool >themselves by saying "it's the same code - except for X."
    try you "minor modifications" on the command line, too.First I used with main on command line, then removed main etc... and included it into my project.

  • Spry Widget Slideshow Basic works on local but not on remote server

    I have tried everything imaginable and I can't make this slideshow work from the remote server.  I get the massages:
    SpryPanelSet.js requires SpryWidget.js!
    SpryFadingPanels.js requires SpryPanelSet.js!
    SpryImageSlideShow.js requires SpryWidget.js!
    SpryPanAndZoomPlugin.js requires SpryImageSlideShow.js!
    Also the opening page has a preloader image that doesn't show up until the page is saved to my cache.
    Here is the link to my website:
    www.warpd.ca
    Sylvie

    When I compare your:
    http://www.warpd.ca/SpryAssets/SpryWidget.js
    to this one:
    http://labs.adobe.com/technologies/spry/ui/includes/SpryWidget.js
    I do not see the same file. Try uploading the correct file and check again.
    Xav

  • Custom F4 help in a BSP application working in Mozilla but not in IE

    Hi,
    I have created a custom F4 help in a BSP application.
    It is working in Mozilla but not in IE. I tried enabling javascript as well but still it is not working.
    Can someone please suggest a possible solution for this?

    Hi,
    See simmilar discussion in thread /thread/1883519 [original link is broken]
    I think this may be helpful for you.
    Thanks,
    Chandra

  • Why does the counter work in MAX, but not Labview?

    Please help, I have been away from Labview for over 3 months, and I am quite rusty....
    Last year, I successfully configured NI9401 to measure period (seconds) by counting the rising edges of my sensor signal.  Since then, I have aquired a new PC, and loaded all my software into it, including the Labview VI's that successfully worked on the old computer.
    I can see the digital signal using MAX and the test panel for the NI9401, so, I know my wiring and my TTL signal is OK, but, when I try to run the attached VI, nothing happens except the error below..  How do I tell this VI to look for the signal on MOD3/CTR0 and channel 14?
    Thanks. I am sure it is a small adjustment...this worked fine a few months ago...not sure what is wrong now.
    Thanks,
    Dave
    Solved!
    Go to Solution.
    Attachments:
    continuously measure period buffered_singlechannel_forum_feb_23_2012.vi ‏20 KB

    OK, now.  Resolved the issue. The vi is fine, but, some shaky wires were identified...worked in MAX but not in the vi.  Now that the connections have been tightened up, it works for both.  Sorry for the inconvenience.
    Dave

  • Works on emulators but not on mobile devices

    Hello,
    My project works on emulators but not on mobile devices (no image and on Samsung it says "unsupported file").
    Please help, I don't know what to do. My configurations: MIDP 2.1, CLDC 1.1.
    Thanks in advance.
    Edited by: Vitali.pom on Oct 27, 2011 12:01 PM

    Edit: I succeeded to solve it accidentally. I did the following: Sign the jar in Netbeans, clean and build, the jar didn't work, I wiped out the .ks from the jar and clean and build again. Now it worked.
    Edited by: Vitali.pom on Oct 30, 2011 1:28 AM

  • Wifi works at home but not when away from home

    My Wifi works at home but not when away from home, what is wrong?  I thought with a phone plan I didn't need to have a wifi connection.

    You either need WiFi or Cellular (or both). If you have neither, you can't connect to the internet.
    Most people use WiFi at home and Cellular while away from home, or connect to public WiFi networks where there are some.

  • Can't FaceTime anymore?  iPad states wifi connected and iPhone 4 states not connected?  I have wireless in my home? Not sure what happened.  Password works for iPad but not on phone?

    iPhone won't connect to wifi.  iPad is connected.  Password working on iPad but not on phone.  Can't upload software update of IOS 7.1 because phone not connecting to wifi?

    Connect iPhone to computer and open iTunes.  You will be prompted to update to iOS 7.0.  Keep your phone connected until the update is finished.

  • My apple id works on itunes but not on my ipod touch, what gives ?

    my apple id works on itunes but not on my ipod touch, what gives ?

    What are you trying to do on the iPod?
    Have you went to Settings>Store and sign out and then sign back in?

  • Album Art works for most, but not all

    I was reading previous forums on the subject, but no clear answer was given..
    The album art shows up fine in itunes and my library and works for most of my music on my ipod, but how come some album's art does appear? I have it set manually and select 'Get Info' then 'Artwork' and add it from there, then drag in the finished product to my ipod. I've been doing that and it works fine for most of the albums, but every so often, the album art will not appear on my ipod. Am I doing something wrong? I take them all from the same source (amazon.com) but it makes no sense to me how some randomly don't appear.
    I tried deleting the artwork and re-adding it, but nothing happened again. If you could answer why it works for most but not all or how I can get the album art to appear for the ones it will not by re-doing something, it would be appreciated. thanks.

    I encountered the same problem in the beginning. When I compared the size of the original images, the working ones seemed to be smaller in general, so I reduced the size of all covers I intended to upload on the pod to 300x300 pixels.
    This seemed to work - for 2 days. I bought the pod on friday, had pictures on sunday, but on Monday (after the first time the pod was fully discharged) none were left left.
    So I ended searching this forum for related problems...
    And decided to join my problem to this entry.

  • How to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?

    how to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?
    == This happened ==
    Every time Firefox opened
    == Always

    Check with your web mail service provider for help with that issue.

Maybe you are looking for