• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

A big problem for me in Action Mapping

 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
thanx in advance
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Despite the fact that both traditional file paths and URLs can be represented with "/"s in them, an URL only actually represents subdirectories if the webserver wants them to to so. Or, as I periodically chant: "A Web Server is NOT a File Server".
In the case of Struts, I've noticed that the Struts Action Servlet will generally consume URL subpaths but not use them for location purposes.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic