Redirect to main jsp when the session expires

Hi,
I have a jsp say mainframe.jsp in which I have two frames each having a jsp page say child1.jsp and child2.jsp.
When the session expires and I when i try do any changes in child2.jsp or child1.jsp, the page redirects to login page and when I login successfully, I am getting redirected to child2.jsp or child1.jsp respectively. But I want it to be redirected to mainframe.jsp.
Any help is greatly appriciated.
Thanks in advance.
Vinod

I think I am not clear.
When I try to login after session expiry, I am redirected to child jsp.
But what I want is that I should be redirected to mainfram.jsp page.
url in the address shows : ../mainframe.jsp?ID=******
When my seesion is expired and I try do some manipulation in child1.jsp (which is inside a frame of my mainframe.jsp). it is redirected to login page and from there to child1.jsp instead of mainframe.jsp
Now the address url shows : ../child1.jsp?ID=********* because of which I am not able to see child2.jsp along with child1.jsp
What I want : ../mainframe.jsp?ID=********
this is the code I am using !!
String destPage = request.getRequestURI();
response.sendRedirect("../redirect.jsp?dest=" + URLEncoder.encode(destPage));

Similar Messages

  • Is it possible to auto delete directory when the session expires?

    I create a directory for each session based on the unique session id e.g. c:\website\8D143E46EA18FAEFEF4D807180A307E2
    Is it possible to auto delete this directory when the session expires?

    thanks
    i found this great link which teach how to use HttpSessionListener, in case someone has the same problem as me.
    http://www.stardeveloper.com/articles/display.html?article=2001112001&page=1

  • Alert when the session Expires

    Hi Everybody,
    I am doing a web based application in JSF ,in that I want to make an pop up or an alert message automatically when the session expires.please give me valuable inputs on this regardings...
    Thanks in Advance

    Hi,
    yes...I have tested correctly.But here I am giving <a4j:support> to specify the dropdown listbox action.only for this reason the form is not submitting when I use dropdownlist..for ur reference here is a sample code
    <h:selectOneMenu id="animalNameCombobox" value="#{Animal.animalName}" styleClass="sampleDropDownListBox">
                                        <f:selectItems value="#{Animal.animalItemList}"/>
                                        <a4j:support action="#{Animal.animalComboboxAction}" event="onchange" reRender="animalOutputPanel"/>
                                    </h:selectOneMenu>I have given all this within <a4j:outputpanel>..Is there any remedies are there to resolve this issue...please give me a valuable inputs and suggestion on this regardings..
    Regards

  • How to effectively detect the session expiration in the portlet (JSP pages)

    Hi,
    In a web application using weblogic personalization server, I want to
    monitor how many users are currently logged on the system.
    It can be detected when a user logs on(by clicking sign on button), and logs
    off (by clicking the sign off button).
    I want to know how to detect the sign off event when the session
    automatically expires (in this case, the user does not click the sign-off
    button).
    Thanks!
    Jeff

    TRIPLE post http://forum.java.sun.com/thread.jsp?forum=45&thread=532724&tstart=0&trange=15

  • How does c:url tag know when the session is cookieless and thus to redirect

    i have been looking at the source code for c:url tag and can't figure out how they are doing that. I need a way to do that in a jsp, to check if the cookies are allowed or not.

    how does c:url tag know when the session is cookieless and thus to redirecthuh?
    What do cookies have to do with redirecting?
    Cookies get encoded into a URL using the method in HttpServletResponse: response.encodeURL() or encodeRedirectURL().
    That method determines whether or not it prints out the session id as part of the url, or it gets uses cookies.
    You can try: request.isRequestedSessionIdFromCookie().
    If that is true, you know that session cookies are supported (or at least that one was)

  • Can anyone tell me how the session expires once we logout the page?

    can anyone tell me how the session expires once we logout the page?
    After logout ,if we click back button, it wont goes to last page,please explain how to write a code in jsp?

    When we click logout the page redirects to logout.jsp or sevlet, there
    the code for removing the attributes and invalidating the session is written. and then redirect the page to other page
    Do You want some code???

  • How do I close a connection when the session ends?

    I have a website that is using JavaMail to display a user's mail through the browser. I'd like to keep the connection to the mail server open during the whole session that the user is logged in, in order to improve response time. The problem is, I can't detect if a user closes their browser so that I can close the connection to the server.
    Is there a way for me to close the mail server connection when the session ends?
    Thanks.

    Create session listener, Impliment sessionDestryoyed
    method with your connection close statements.I was wondering how to use the listener for a Servlet as well, what would you type in that method to close the connection?.
    public class ServletListener
         implements
              ServletContextListener,
              ServletContextAttributeListener,
              HttpSessionListener,
              HttpSessionAttributeListener
    public void sessionDestroyed(HttpSessionEvent arg0)
              //System.out.println( arg0 );
    }

  • Delete memory Id when the session is still active

    Hi all,
    Can anyone tell me how to clear the Memory Id when the session is still active.
    I am getting the amount value through Memory Id from import and export parameter when I am posting the check. Again if I reprint the check without closing the session the amount value is getting double evertimes.
    If I delete from Memory Id I am not able to see any amount value while posting for first time.
    Can anyone suggest me how to proceed further.
    Regards
    Yathish

    Looks like you are not clearing the variables before and after that logic. Clear them and try.
    Let us if you are doing that or not.
    Rgds,
    Naren
    Message was edited by:
            Someneni

  • [svn] 2692: Bug: BLZ-227 - When using JMS Destination, MessageClient and FlexClient not released from memory when the session times out .

    Revision: 2692
    Author: [email protected]
    Date: 2008-07-31 13:05:35 -0700 (Thu, 31 Jul 2008)
    Log Message:
    Bug: BLZ-227 - When using JMS Destination, MessageClient and FlexClient not released from memory when the session times out.
    QA: Yes
    Doc: No
    Checkintests: Pass
    Details: Fixed a memory leak with JMS adapter. Also a minor tweak to QA build file to not to start the server if the server is already running.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-227
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/messaging/adapters/J MSAdapter.java
    blazeds/branches/3.0.x/qa/build.xml

    Revision: 2692
    Author: [email protected]
    Date: 2008-07-31 13:05:35 -0700 (Thu, 31 Jul 2008)
    Log Message:
    Bug: BLZ-227 - When using JMS Destination, MessageClient and FlexClient not released from memory when the session times out.
    QA: Yes
    Doc: No
    Checkintests: Pass
    Details: Fixed a memory leak with JMS adapter. Also a minor tweak to QA build file to not to start the server if the server is already running.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-227
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/messaging/adapters/J MSAdapter.java
    blazeds/branches/3.0.x/qa/build.xml

  • Custom web parts in SharePoint 2013 becomes inactive when the session is idle for long time.

    Hi,
    We have a search center site with custom web parts and custom master pages. When the session is inactive for long time all the custom web parts in the page doesn't work, unless we close the browser and open it. Where as this is not the case with the
    OOB web parts. We are not able to identify the root cause as it works with OOB web parts and not the custom web parts.We were able to find that by increasing the session timeout of the web application we can avoid this issue.We do not want to increase the
    session timeout as the OOB web part works perfectly even when the user session is idle for long time.Is there any other alternative where we can acheive the same for custom web parts when the session is idle for long time?
    Thanks,
    Saranya

    Hi Saranya,
    According to your descirption, my understanding is that when the session is long time idle ,then custom web part will not work.
    I suggest you check if you have enable the session in the Page Level in the web.config. By default SharePoint disable the session state.
    In the web.config, you will see <page enableSessionState> tag. You can modify like below and test if it works.
    <pages enableSessionState=”true” ….. />
    Here is a detailed thread for your reference:
    Use Session State in SharePoint
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • Junitreport 'redirect' is not allowed when the secure processing feature is set to true.

    junitreport 'redirect' is not allowed when the secure processing feature is set to true.
    Hello,
       I'm running flexunit4.1.0-8 and I have an ant script running the test suite.    I recently upgraded from FB 4 to 4.5 and now I'm getting
    failures on junitreports.  Here's the full error: 
    [junitreport] : Error! Use of the extension element 'redirect' is not allowed when the secure processing feature is set to true.
    [junitreport] Failed to process C:\TDMSE_2_6\tdmse\flex-test\flex_unit_reports\TESTS-TestSuites.xml
    BUILD FAILED
    C:\TDMSE_2_6\tdmse\build\flexunitbuild.xml:116: Errors while applying transformations: javax.xml.transform.TransformerException: java.lang.RuntimeException: Use of the extension element 'redirect' is not allowed when the secure processing feature is set to true.
    Here's the junitreport section:
    [code]
    <target name="flex-unit-execute-tdmse-test-runner"
                                  description="executes the test runner app">
              <flexunit swf="${FLEX_UNIT_TEST_HOME}/TDMSETestRunner.swf"
                                  toDir="${FLEX_UNIT_REPORTS_HOME}"
                                  haltonfailure="false"
                                  localTrusted="true"
                                  verbose="true"
                                  headless="false"/>
              <junitreport todir="${FLEX_UNIT_REPORTS_HOME}">
                        <fileset dir="${FLEX_UNIT_REPORTS_HOME}">
                                  <include name="Test-*.xml"/>
                        </fileset>
                        <report format="frames" todir="${FLEX_UNIT_REPORTS_HOME}/html"/>
              </junitreport>
    </target>
    [/code]
    And here's the full ant build:
    [code]
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE project>
    <!--
                             TDMS flex unit test suite
    $Author:: hermannee                                                            $
    $Revision:: 10963                                                              $
    $Date:: 2011-11-15 13:38:46 -0500 (Tue, 15 Nov 2011)                           $
    $URL:: svn://ehsntpvld03.niehs.nih.gov/dev/tdmse_test_suite/trunk/build/flexun#$
    -->
              <!-- **** ADD THIS TO tdmes/build/build.xml *************
              <property name="FLEX_UNIT_HOME" value="${tdmsedir}/../tdmse_test_suite" />
              <target name="run_flex_units">
                  <ant antfile="${FLEX_UNIT_HOME}/build/build.xml" />
              </target>
              ********************************************************* -->
    <project name="flexunitbuild" basedir="." default="flex-unit-start-test-runner">
              <tstamp>
                        <format property="build.date" pattern="MMMMM dd, yyyy" />
                        <format property="build.time" pattern="HH:mm:ss" />
              </tstamp>
              <property name="tdmsedir" value="${basedir}/.." />
              <property name="builddir" value="${tdmsedir}/../build" />
              <property name="FLEX_HOME" value="${builddir}/tools/flex-4.5.0" />
              <property name="PARSLEY_HOME" value="${builddir}/tools/parsley-2.4.0" />
              <property name="FLEX_UNIT_HOME" value="${tdmsedir}/flex-test" />
              <property name="FLEX_UNIT_LIBS_HOME" value="${builddir}/tools/flexunit-4.1.0-8" />
              <property name="FLEX_UNIT_REPORTS_HOME" value="${FLEX_UNIT_HOME}/flex_unit_reports" />
              <property name="FLEX_UNIT_TEST_HOME" value="${FLEX_UNIT_HOME}/flex_unit_tests" />
              <!-- ==== tasks ============================ -->
              <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
              <taskdef resource="flexUnitTasks.tasks" classpath="${FLEX_UNIT_LIBS_HOME}/flexUnitTasks-4.1.0-8.jar" />
              <!-- dev -->
              <echo>basedir: ${basedir}</echo>
              <echo>tdmsedir: ${tdmsedir}</echo>
              <echo>builddir: ${builddir}</echo>
              <echo>FLEX_HOME: ${FLEX_HOME}</echo>
              <echo>FLEX_UNIT_HOME: ${FLEX_UNIT_HOME}</echo>
              <echo>FLEX_UNIT_LIBS_HOME: ${FLEX_UNIT_LIBS_HOME}</echo>
              <echo>FLEX_UNIT_REPORTS_HOME: ${FLEX_UNIT_REPORTS_HOME}</echo>
              <!-- =================================
              target: run-tdmse-test  
              ================================= -->
              <target name="flex-unit-start-test-runner"
                                  description="clean, compile and run tdmse flexunit tests"
                                  depends="flex-unit-clean-tdmse-tests,
                                  flex-unit-tdmse-compile-test-suite,
                                  flex-unit-execute-tdmse-test-runner"/>
              <target name="flex-unit-clean-tdmse-tests" description="Cleans the FlexUnit test and reports directories">
                        <delete dir="${FLEX_UNIT_REPORTS_HOME}" failOnError="false"
                                            includeEmptyDirs="true" />
                        <mkdir dir="${FLEX_UNIT_REPORTS_HOME}" />
                        <delete dir="${FLEX_UNIT_TEST_HOME}" failOnError="false"
                                            includeEmptyDirs="true" />
                        <mkdir dir="${FLEX_UNIT_TEST_HOME}" />
              </target>
              <target name="flex-unit-tdmse-compile-test-suite">
                        <mxmlc file="${tdmsedir}/flex-src/TDMSETestRunner.mxml"
                                            output="${FLEX_UNIT_TEST_HOME}/TDMSETestRunner.swf">
                                  <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
                                  <!-- ==== include tdmse resource bundles ====== -->
                <locale>en_US</locale>
                <source-path path-element="${tdmsedir}/flex-src/locale/{locale}" />
                <include-resource-bundles>COMMON</include-resource-bundles>
                <include-resource-bundles>OW</include-resource-bundles>
                <include-resource-bundles>PREF</include-resource-bundles>
                <include-resource-bundles>RD</include-resource-bundles>
                <include-resource-bundles>RG</include-resource-bundles>
                                  <!-- ==== compile parsley library ============= -->
                                  <compiler.library-path dir="${PARSLEY_HOME}" append="true">
                                            <include name="parsley-flex4-2.4.0.swc" />
                                            <include name="spicelib-flex-2.4.0.swc" />
                                  </compiler.library-path>
                                  <!-- ==== compile all tdmse flex-src ========== -->
                                  <source-path path-element="${tdmsedir}/flex-src" />
                                  <source-path path-element="${tdmsedir}/flex-test" />
                                  <!-- ==== compile all flexunit swc's ========== -->
                                  <compiler.library-path dir="${FLEX_UNIT_LIBS_HOME}" append="true">
                                            <include name="*.swc"/>
                                  </compiler.library-path>
                                  <!-- ==== compile all flexunit swc's ========== -->
                                  <compiler.library-path dir="${FLEX_UNIT_LIBS_HOME}/mocklibs" append="true">
                                            <include name="*.swc"/>
                                  </compiler.library-path>
                                  <compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
                                  <compiler.headless-server>true</compiler.headless-server>
                        </mxmlc>
              </target>
              <target name="flex-unit-execute-tdmse-test-runner"
                                            description="executes the test runner app">
                        <flexunit swf="${FLEX_UNIT_TEST_HOME}/TDMSETestRunner.swf"
                                            toDir="${FLEX_UNIT_REPORTS_HOME}"
                                            haltonfailure="false"
                                            localTrusted="true"
                                            verbose="true"
                                            headless="false"/>
                        <junitreport todir="${FLEX_UNIT_REPORTS_HOME}">
                                  <fileset dir="${FLEX_UNIT_REPORTS_HOME}">
                                            <include name="Test-*.xml"/>
                                  </fileset>
                                  <report format="frames" todir="${FLEX_UNIT_REPORTS_HOME}/html"/>
                        </junitreport>
              </target>
              <!-- ======================================================== -->
    </project>
    [/code]
    I haven't seen much info about this problem anywhere on google except for this forum post:
    http://forums.adobe.com/thread/740146
    Thanks for any help!

    If you include the xalan.jar library to the build.xml execution classpath everything works!!!!!!.
    I hope it will be userfull.

  • In tomcat,User took so long to log on the session expired

    Hi,
    Whenever i try to login into the web application, the page will stop at http://localhost:8080/test/en/authorize, then nothing happen.
    The user name and password are correct. This is what i get in log file:
    2004-12-20 21:20:04 Authenticator[test]: Authenticating username 'admin001'
    2004-12-20 21:20:04 JDBCRealm[test]: Username admin001 successfully authenticated
    2004-12-20 21:20:04 Authenticator[test]: Authentication of 'admin001' was successful
    2004-12-20 21:20:04 Authenticator[test]: User took so long to log on the session expired
    2004-12-20 21:20:04 Authenticator[test]: Failed authenticate() test
    Any idea why this happen?
    Thanks

    How to configure to be longer timeout?
    What is 'fast user'?
    I use org.apache.commons.dbcp.BasicDataSourceFactory
    as connection factory. pls advice.
    How to configure to be longer timeout?
    What is 'fast user'?
    I use org.apache.commons.dbcp.BasicDataSourceFactory
    as connection factory. pls advice.Hi,
    I saw your question account on " User took so long to log on the session" in tomcat. Can you please let me know how you solved it ?. Thank you.
    Regards,
    Aravind

  • HT1338 If I install Microsoft office mac 2011 can I also install Microsoft 365 as well if I can will I lose my Microsoft office mac 2011 when the 365 expires?

    Hi can anyone help im new to MAC
    If I install Microsoft office mac 2011 can I also install microsoft 365?
    If I can will my Microsoft Office Mac 2011 uninstall when the 365 expires?
    How do I install the aforementioned I have purchassed them?
    Thanking you in antispation

    You can probably get a better response by posting on the windows Compatibility forum here:
    https://discussions.apple.com/community/windows_software/windows_compatibility
    We're not uncooperative over here but merely focused on BootCamp.

  • Refresh the main view when the pop up was closed

    Hi,all
    how can I refresh the main view when the pop up window  was
    closed to see the updated data? In pop up window I update
    single row in the table based in main view.
    Regards,
    Michael

    Michael,
    There are 2 type of pop-ups in WD, and the answer is different depending on which type you are using:
    1. Stand-alone browser window that hosts separate application (result of IWDWindowManager.createNonModalExternalWindow) -- no way.
    2. Inner pop-up created via IWDWindowManager.createModalWindow -- absolutely possible:
    -- a. Create event in component controller (probably with parameters)
    -- b. Create method in component controller that fires this event (with corresponding parameters, if any)
    -- c. In view that corresponds to window invoke method created in [ b ] and hence fire event. This should be done in action handler of something like "OK" Button or "Close" LinkToAction.
    -- d. In any other controller subscribe to event described in [ a ]
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Varing the session expiration time

    Hi all,
    the default session time with my server and the ADTB are too short (24 mins)
    Do you have a PROOFED WORKING way to extend the session lifetime?
    I tryed both to use the .htaccess variable and the ini_set("session.gc_maxlifetime")
    If I query then the ini_get("session.gc_maxlifetime") I get the new session length I decided.
    But in fact the session expires after a very short time?
    Any help would be really appreciated
    A. F.

    Hi Fonzie,
    if neither the .htaccess approach nor the ini_set function work on your host, I fear I have no idea what you could do instead, as the host admins seems to have disabled both features for whatever reason.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

Maybe you are looking for

  • Possible to start an additional iCloud account on a 2nd older iPad?

    Greetings, My family has several iPads. Originally they were all set up under my Apple account. I'd like to set up one of them to be under my wife's Apple account. I read where to do that I need to delete the iCloud account from that particular iPad

  • Question about Recovery Media Creator

    Hello everyone, first of all, I don't know if this question should be in this catergory, but I thought this would be the best to post in. My question is about the Recovery Media Creator procces. I was about to create the recovery DVD and I noticed th

  • What do I do if someone think their account to mine and I did not except that how do I get rid of it

    How do I do if someone think their account to mine and I did not except that how do I get rid of it

  • Fried iPhoto Library???

    iPhoto stopped opening so I rebuilt the database on opening the app while holding down the command (Apple) + option keys. App opened fine -- with ALL photos missing. Thereafter, I was able to move photos back into the app but ONLY ones that were not

  • Javaw.exe crashing

    We have a simple JNI call. We suspect that after the jni call returns something goes wrong and we get the windows XP crash dialog (telling us javaw.exe has crashed). Since we load and unload the DLL every time, we can keep using the program for a whi