Redirecting to another url when seesion expires... or on closing browser wi

is it possible in servlet/jsp using tomcat to redirect to another URL so that i can delete my objects that are stored in ServletContext ?
i want to redirect when the session get expire or when a user close its window ..
is it possible using javascript ?
if any info Plz mail at gmail ..[email protected]

public class sessionManager implements HttpSessionListener {
     public void sessionCreated(HttpSessionEvent se) {
     public void sessionDestroyed(HttpSessionEvent se) {
In this class for the sessionDestroyed() function i want to write RequestDispatcher .. so that i can redirect or forward my request to another URL so that i can delete my object that r present in ServletContext.
because for requestDispatcher i need to implement HttpServlet
which overrides service method ( doGet()/doPost()).which receives HttpServletRequest/HttpServletResponse object ...
Plz let me know if possible .... the main thing is that i want to go to that particular URL for delting my objects
any Plz let me know

Similar Messages

  • Rdirect to another URL when session expires

    public class sessionManager implements HttpSessionListener {
         public void sessionCreated(HttpSessionEvent se) {
         public void sessionDestroyed(HttpSessionEvent se) {
    In this class for the sessionDestroyed() function i want to write RequestDispatcher .. so that i can redirect or forward my request to another URL so that i can delete my object that r present in ServletContext.
    because for requestDispatcher i need to implement HttpServlet
    which overrides service method ( doGet()/doPost()).which receives HttpServletRequest/HttpServletResponse object ...
    Plz let me know if possible .... the main thing is that i want to go to that particular URL for delting my objects
    any Plz let me know

    And if the session expires because the user closed the browser how are you going to redirect him? You can not use the requestDispatcher in the HttpSessionListener because the session will expire because it doesn' have a request.

  • How to hide the URL when redirecting to another URL?

    Hello9 @ all,
    I want to write an application, which has some LinkToUrls, which redirect the User to BW-templates. When the user executes the LinkToUrls, he should redirect to the BW Templates, but must not see the URL in his browsers addressbar. He still should see the URL of the Web Dynpro Application. How could I solve this problem??
    Thank you in advance!!
    Mehmet

    Hello Maksim,
    I´ve tried this code inside a action of a LinktoAction but it does not work?
    public void onActionopenUrl(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionopenUrl(ServerEvent)
        String urlToTreeApp = wdContext.currentURLSElement().getKAP();
         final String formattedStr = "<HTML>" +"<HEAD>" +"</HEAD>" +"<FRAMESET ROWS="*" width="100%">" +"<FRAME SRC="" + "www.google.de" + "" MARGINWIDTH="0" MARGINHEIGHT="0" NORESIZE FRAMEBORDER="0" BORDER="0" SCROLLING="NO">" +"</FRAMESET>" +"</HTML>";
         try {
              final IWDCachedWebResource resource = WDWebResource.getPublicCachedWebResource
                        formattedStr.getBytes("UTF-8"),
                        WDWebResourceType.HTML,
                        WDScopeType.CLIENTSESSION_SCOPE,
                        wdComponentAPI.getDeployableObjectPart(),
                        "FrameResource"
              try {
                   wdThis.wdGetWd_menueInterfaceViewController().wdFirePlugExit(resource.getAbsoluteURL());
              } catch (WDURLException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
         } catch (UnsupportedEncodingException e) {
              e.printStackTrace();
        //@@end

  • Redirect to another website when I share my Network

    Hi,
    When I am with my friends, I often share my network for they can connect to my 4G.
    But I have not an unlimited data. So, when they go on Youtube for exemple, I wish they are redirected to an another website.
    I have thinked to modify the hosts file in /etc/hosts but it is not working.
    How can I do that ?
    Thanks

    It won't work. You just have to pay your wireless carrier for tethering.

  • One website is redirected to another url and they keep switching back and forth

    When I try to open a particular site (nwherald.com), Firefox automatically switches between that url and m.nwherald.com. When loading, the two jump back and forth. This doesn't happen with any other url, and I can open nwherald.com just fine in IE. What gives. It's not much of a newspaper, but it's all we have.

    Did this problem occur recently with Firefox? The link runs fine for me; do you have any Firewall rules or antivirus settings that may block links?
    It is strange that it is trying to force you to a mobile site, and then back to a desktop version. Would you happen to have Flash disabled? I am wondering if the site is detecting a missing plugin and trying to bring you to a more compatible version.
    When you go to the site, you can check if the Web Console shows any errors:
    * Tools (or [[Image: New Fx Menu]] > Developer/Web Developer > Web Console
    If it is redirecting too quickly, you can temporarily disable redirects:
    * Tools (or [[Image: New Fx Menu]]) > Options > Advanced > General
    * Check "Warn me when sites try to reload or redirect the page"
    Also I doubt this is related to your problem, but I notice you have two versions of Adobe PDF Plug-ins:
    * Adobe PDF Plug-In For Firefox and Netscape 11.0.9
    * Adobe PDF Plug-In For Firefox and Netscape 11.0.8
    Having multiple versions of the same plugin can cause problems as well.

  • No redirection to different url upon http connections limit exceeded

    Hi,
    As of Standalone OC4j 10.1.2, if you want messages to be redirected to a different URL when the maximum connections limit is reached, you would include the HTTP redirect URL to max-http-connections tag inside server.xml.
    <max-http-connections max-connections-queue-timeout="120" socket-backlog="50"
    value="100">http://optional.redirect.url/page.jsp</max-http-connections>
    I have a standalone OC4j 10.1.3, and would like to be able to redirect to different URL when maximum connections limit is reached but the above max-http-connections does not work and I am not redirected to different URL when maximum connectionns limit is reached. I read user guide of OC4j 10.1.3 and there is no mentioning of max-http-connections at all. In there, they talk about limiting concurrency via http thread pool but there is no discussion as to the mechanism of redirecting users to a different URL where I can display a user friendly message to say "Server is busy, please try again later..." instead of browser display a message "Page cannot be displayed"..
    Please advice,
    Thanks

    Any thoughts on above issue ? please help.
    thanks
    Sam

  • I have Kaspersky anti-virus for mac. The extension Kaspersky URL Advison 8.0.6 causes Firefox to hang when visiting secure websites, especially when the secure site redirects to another site.

    Kaspersky URL Advisor 8.0.6 causes Firefox 9.0.1 to hang when visiting secure websites and will not allow a redirect to another site. banking sites, facebook, auctionsniper, all these are affected.

    Please also contact Kaspersky Tech support and Forum and let them know the issue, if its really a bug, they will fix it through patch via database update
    * https://my.kaspersky.com/en/support/helpdesk
    * http://forum.kaspersky.com/index.php?showforum=117

  • I'm getting this message: "Firefox prevented this page from automatically redirecting to another page." but unchecking the box for "warn me when websites try to redirect or reload the page" has not helped. I'm using Firefox 3.6.3 on Mac OS 10.6.3. M'aidez

    Can't load Google Calendar. I'm getting this message: "Firefox prevented this page from automatically redirecting to another page" but unchecking the box for "Warn me when websites try to redirect or reload the page" has not helped. I'm using Firefox 3.6.3 on Mac OS 10.6.3. It's not reported as a generalised problem in Dashboard. Google Calendar opens and works fine on my 12" PowerBook G4, but this is a recent problem on my G5 13" MacBook Pro. Mayday!
    == URL of affected sites ==
    https://www.google.com/accounts/ServiceLogin?service=cl&passive=1209600&continue=http%3A%2F%2Fwww.google.com%2Fcalendar%2Frender%3Ftab%3Dmc%26pli%3D1&followup=http%3A%2F%2Fwww.google.com%2Fcalendar

    No I'm not using NoScript, but I'm pleased to report that the problem got resolved by deleting the original bookmark, logging in again, opening Google calendar, then bookmarking it again.

  • How can I eliminate the toolbar that comes up every time I swith websights and says Firefox prevented this page from automatically redirecting to another page and when nothing comes up I have to hit ALLOW and most of the time it screws me up

    I am running OS10 on a MAC and every time I go too another web site (most of the time) a new tool bar pops up that says " Firefox prevented this page from automatically redirecting to another page" and on the other end I must hit the button ALLOW because it is usually screwing me up and Iwant to disable it or use another browser

    Options > Advanced > General, un-check "Warn me when web sites try to redirect or reload the page"
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • When I click on a link in an email I get the following message at the top of the screen: "Firefox prevented this page from automatically redirecting to another page...[Allow]. How can I stop this?

    When I click on a link in an email using gmail in the Mozilla brower, I get the following message at the top of the screen:
    "Firefox prevented this page from automatically redirecting to another page...[Allow].
    How can I stop this?

    # Press Alt+T
    # Select Options
    # Select Advanced Panel
    # Select General Tab
    # You will see option "Warn me when websites try to redirect or reload page"
    # Uncheck it as given in the screenshot.
    <img src=http://dl.dropbox.com/u/7456129/Firefox/advancedgeneraltab.jpg width=600px height=600px>
    ''<hr>Note: If anyone's reply has solved your problem, then please mark that reply as "Solved It" to the right of that reply after logging in your account. It will help us to concentrate on new questions.''

  • When i click on a search result from google, i am automatically redirected to another website everytime

    This just started recently, since installing firefox 4. Now whenever I search on google or other search engines, when I click on a result, I am automatically redirected to another search site. Any ideas?

    Try running several malware scanners. It is best to run several as each will pick up things that the others miss. Some scanners you can try are:
    * [http://www.malwarebytes.org/mbam.php Malwarebytes]
    * [http://www.superantispyware.com/ SUPERAntiSpyware]
    * [http://www.lavasoft.com/products/ad_aware_free.php Ad-Aware]
    * [http://www.microsoft.com/windows/products/winfamily/defender/default.mspx Windows Defender]
    * [http://www.safer-networking.org/en/home/index.html Spybot S&D]
    If the above malware scanners do not find any malware or can not clear it, you should consider posting in one of these forums for specialized malware removal help:
    * http://forums.spybot.info/
    * http://www.spywarewarrior.com/index.php
    * http://forum.aumha.org/
    * http://www.bleepingcomputer.com/forums/
    * http://www.spywareinfoforum.com/

  • When redirecting to site url jsessionid is appended and url becomes wrong

    hi,
    i have requirement when user clicks on link on b2c application then it should redirect to a site url.The problem when redirecting to site url is that jsessionid gets appended to site url and as a result url is not opened   due to wrong url generated as follows
    http://www.mahindralifespaces.com/SPLENDOUR/PROJECTMILESTONE.ASP;jsessionid=(mlkndcrmsdev_LCD_00)ID0618353650DB01149016834107209233End;saplb_*=(mlkndcrmsdev_LCD_00)7680550?a=b
    how to overcome this problem .did any one have idea
    Regards,
    Pavan

    i am directing forwarding to url using struts action forward using following code
    strUrl=mybom.getProjectStatusBO().getProjectStatusURL(userId);
    log.error("user url"strUrl"userId--"+userId);
    request.setAttribute("strUrl",strUrl);
    forward.setPath(strUrl);
    forward.setRedirect(true);
    return forward;
    following solved my problem
    i have chaged  web-j2ee-engine.xml file
    <cookie-config>
              <cookie>
                   <type>SESSION</type>
                   <path>APPLICATION</path>
                   <domain>NONE</domain>
              </cookie>
              <cookie>
                <type>APPLICATION</type>
                <path>APPLICATION</path>
                <domain>NONE</domain>
              </cookie>
    domain to none solved my problem
    Regards,
    Pavan

  • When using the google search button my queries are always redirected to another site, and not google as indicated as my preferred search engine.

    I have to open up an Internet Explorer browser when I try to to a search for anything. Even though I've selected google as my default search engine, I still get redirected to some random site. It's useless. I would like to use Firefox all the time, but I cannot do so.

    Do a malware check with some malware scan programs. You need to scan with all programs because each program detects different malware. Make sure that you update each program to get the latest version of the database before doing a scan.
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and Searches are redirected to another site

  • When i use Firefox and do a Google search, find what i need and click on the link I keep getting automatically redirected to another search site

    When i use Firefox and do a Google search, find what i need and click on the link I keep getting automatically redirected to another search site called http://www.scour.com
    Can someone tell me if this is a problem with Google or Mozilla? or both? or neither?

    This type of behaviour can be caused by malware. Try running several malware scanners. It is best to run several as each will pick up things that the others miss. Some scanners you can try are:
    * [http://www.malwarebytes.org/mbam.php Malwarebytes]
    * [http://www.superantispyware.com/ SUPERAntiSpyware]
    * [http://www.lavasoft.com/products/ad_aware_free.php Ad-Aware]
    * [http://www.microsoft.com/windows/products/winfamily/defender/default.mspx Windows Defender]
    * [http://www.safer-networking.org/en/home/index.html Spybot S&D]
    This link may help - http://deletemalware.blogspot.com/2010/02/remove-google-redirect-virus.html
    If the above malware scanners do not find any malware or can not clear it, you should consider posting in one of these forums for specialized malware removal help:
    * http://forums.spybot.info/
    * http://www.spywarewarrior.com/index.php
    * http://forum.aumha.org/
    * http://www.bleepingcomputer.com/forums/
    * http://www.spywareinfoforum.com/

  • It is very annoying when I am at a favourite web site and Firefox will not automatically redirect to another page. It is so continuous and I have to "Allow" through the whole time I am at my favourite web sites

    # Question
    It is very annoying when I am at a favourite web site and Firefox will not automatically redirect to another page. It is so continuous and I have to "Allow" through the whole time I am at my favourite web sites.
    Here is one of those sites:
    http://conservatives4palin.com/

    You can make it automatically redirect by doing this:
    1. Go to: Tools > Options > Advanced > General
    2. Untick the 'Warn me when websites try to redirect or reload the page' option
    3. Click 'OK'
    '''If this was the answer you were looking for, please click 'Solved' -- Thanks.'''

Maybe you are looking for

  • How to achieve automated posted for invoice and stock transfers

    Hi, I have following queries for an RFP, can some one give hints on how to achieve them in SAP o Receive self-billing documents from the customer, stating the deliveries and amounts that are settled and paid o Automatic posting of invoice documents f

  • Text cannot be resized or selected? :(

    Hi, folks I have been parachuted for an exploration into this brave new world of e-publishing. Though I have some experience in the layout of magazines and newspapers with the tools of the trade, some things amaze me and I am in that starting point w

  • Error in Communication channel java.lang.NullPointerException

    Hello Experts, We have a file adaptor which we using to send data to the file sytem. We are getting the following  error Message could not be forwarded to the JCA adapter. Reason: java.lang.NullPointerException: while trying to invoke the method com.

  • Why Isn't OpenX Working On My Flex Website When Using a PC?

    Hi, I'm using OpenX to serve ads. It serves ads when I use my Mac with Safari or Firefox. But, it doesn't work when I checked my site on two PCs both running Windows XP with IE and Firefox. I'm getting error #1090, which is "XML parser Failure: eleme

  • Page item default value using PL/SQL

    Hello, I'm trying to set a default value for a text field page item in a form. I'm using this PL/SQL Function Body in the Default section: begin select ("DEPT_CODE"|| ' ' || DEPT_NAME) from MyView where UserID = :G_USER_ID; end; I get the following e