• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Session Out Problem

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
In my project I'm using frames for web pages and technologies are java, jsp, struts, Filter, LDAP, DB2,Ajax. My problem is whenever the session is timed out, If I tried to access any page, I'm getting the login page in the child frame. The upper frame remains the same. I'm doing session checking in Request processor. whenever the request comes from any page, it will goto reqprocessor and it will go to the subsequent page. This flow is working fine, when the is session true. Whenever the session is timed out, the request is not at all going to request processor. It's gone to login page. the login page shows in the child frame. I would have redirected the page to login page if I have a control. but I don't have any control if the session is timed out. I want to know the flow if the session is timed out. And Is there any way control if the session is out. I'm setting username in a session and I'm checking the username is null or not null in request processor. If it's null, it should go to session expired page otherwise continue. I'm sure every request is going to req processor except session out request. Can you please help how to get the session control. I think the the session timed out request taking the page from web.xml. If this is true, how to handle it manually. And I'm using Filter, j_security_check, LDAP for security. Is these things will affect the session flow? Is there any way to get the control of the session? here I mentined the web.xml file details.

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<filter>
<filter-name>FormLoginFilter</filter-name>
<filter-class>com.authentication.FormLoginFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>FormLoginFilter</filter-name>
<url-pattern>/j_security_check</url-pattern>
</filter-mapping>

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
<security-role-ref>
<role-name>iadmin</role-name>
<role-link>iadmin</role-link>
</security-role-ref>
<security-role-ref>
<role-name>iuser</role-name>
<role-link>iuser</role-link>
</security-role-ref>
</servlet>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>/loginRedirect.jsp</welcome-file>
</welcome-file-list>

<security-constraint>
<web-resource-collection>
<web-resource-name>VendorPayment</web-resource-name>
<description></description>
<url-pattern>*.jsp</url-pattern>
<url-pattern>*.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>Restrict Main app to admin users</description>
<role-name>iadmin</role-name>
<role-name>iuser</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>

<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/login.jsp</form-error-page>
</form-login-config>
</login-config>

<security-role>
<description>Admin users are assigned to this role.</description>
<role-name>iadmin</role-name>
</security-role>
<security-role>
<description>General users are assigned to this role.</description>
<role-name>iuser</role-name>
</security-role>
<resource-ref>
<res-ref-name>Vptables</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>
Regards
Kasi
 
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic