struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashish Kulkarni <kulkarni_ash1...@yahoo.com>
Subject RE: A big problem for me in Action Mapping
Date Wed, 02 Oct 2002 22:57:48 GMT
Hi David,
Thanx very much for the solution, it works fine now..i
will do some more testing ....
Ashish
--- "Karr, David" <david.karr@attws.com> wrote:
> > -----Original Message-----
> > From: Ashish Kulkarni
> [mailto:kulkarni_ash1312@yahoo.com]
> > Sent: Wednesday, October 02, 2002 3:20 PM
> > To: Struts Users Mailing List
> > Subject: A big problem for me in Action Mapping
> > 
> > Hi,
> > I have a action mapping as below,
> > <action path="/pages/sessioninvalid"
> > type="com.myapp.action.SessionInvalidAction"
> > scope="request">
> > <forward name="success" path="/pages/index.jsp"
> > redirect="false" />
> > </action>
> > Then i have jsp called include.jsp in "pages"
> folder
> > with following line of code
> > String user =
> (String)session.getAttribute("user");
> > if (user == null)
> > {
> > System.out.println("there is no user so  invalid
> > session");
> >
>
request.getRequestDispatcher("sessioninvalid.do").forward(request,
> > response);
> > }
> > 
> > Then I include this jsp in all my pages to check
> if
> > the session is valid or not,
> > I have some jsp in folder "pages" and some jsp in
> > subfolder in side pages (say "planning")
> > now the code in include.jsp works very well in all
> the
> > jsp in "pages" folder, 
> > but it does not work in jsp in subfolders, i get
> the
> > following error
> > 2002-10-02 18:06:44,078 INFO 
> [HttpProcessor[8080][3]]
> > action.RequestProcessor
> (RequestProcessor.java:217) -
> > Processing a 'GET' for path
> > '/pages/planning/sessioninvalid'
> > 2002-10-02 18:06:44,078 ERROR
> [HttpProcessor[8080][3]]
> > action.RequestProcessor
> (RequestProcessor.java:645) -
> > Invalid path /pages/planning/sessioninvalid was
> > requested
> > 
> > so what is wrong if i have to make it work how can
> i
> > do it..
> 
> You defined the path for the action as
> "/pages/sessioninvalid", but you
> asked for "sessioninvalid.do".  That will work from
> pages that are relative
> to the "/pages" folder, but not anywhere else. 
> Change the forward to
> request "/pages/sessioninvalid.do" and you should be
> fine.
> 
> --
> To unsubscribe, e-mail:  
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 


=====
A$HI$H

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message