Vita Rara: A Life Uncommon

struts2 cookbook - login interceptor

I tried the code where a httpRequest is being sought from ActionContext with get(HTTP_REQUEST) method. I tried this code myself but was unable to make this work. The ActionContext does not provide access to HTTP_REQUEST because there is no element with this key.
Has this been tried by anyone? I am using spring with struts on one of projects and want to access httpsession attribute from the interceptor for pretty much the same functionality described in loginInterceptor here.

Thanks
Mahesh

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
  • Allowed HTML tags: <a> <img> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <h1> <h2> <h3>
  • Lines and paragraphs break automatically.
More information about formatting options