Meaningless Drivel is fun!
The moose likes Struts and the fly likes STRUTS - Invalid path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "STRUTS - Invalid path" Watch "STRUTS - Invalid path" New topic

STRUTS - Invalid path

shivakumar sekaran

Joined: Apr 15, 2001
Posts: 18

I am getting the following Invalid Path error when I tried to add a new action block in the struts-config.xml file.

<action path="/cc" type=""
name="countrywisedetails" scope="request" validate="false">
<forward name="success" path="/content/reports/CountryWiseInput.jsp"/>

The error I am getting is :

Path Info: null
Request URI: /TApp/error.jsp
Error Code : 400
Error occured while processing request :
Exception Type :
Message : Invalid path /cc was requested
Stack Trace : Invalid path /cc was requested at at org.apache.struts.action.ActionServlet.process( at org.apache.struts.action.ActionServlet.doGet( at javax.servlet.http.HttpServlet.service( at javax.servlet.http.HttpServlet.service( at at at at at at at at at at at at at at at at at at at

Any idea why I am getting this.

Thanks for your help.

Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Are you using path or extension mapping? This is configured in the servlet-mapping section of your web.xml.

Path Mapping looks like this:

Extension Mapping looks like this:

Did you include the servlet context on your url?
[ May 25, 2004: Message edited by: Chris Mathews ]
shivakumar sekaran

Joined: Apr 15, 2001
Posts: 18
Hi Chris,

I am using extension mapping. The mapping in my web.xml looks like this.


Actually there are lot of other action blocks which I have added earlier works fine. I tried changing the names(value) of the path attribute for this option. Everytime it throws the same error. It does not reach the Action class ( in my case) mentioned in the type attribute at all. No idea whats going wrong here.

I am able to get the context path as well : This is what I get

Context path : /TApp

The place/file from where I am invoking this option looks like this:
Menu3_4=new Array("Policy and Location >>","","",2,20,180);
Menu3_4_1=new Array("Policy","<html:rewrite page='/'/>","",0,20,180);
Menu3_4_2=new Array("Location","<html:rewrite page='/'/>","",0,20,180);

Menu3_5=new Array("Country Wise Report >>","","",1,20,180);
Menu3_5_1=new Array("Country Wise","<html:rewrite page='/'/>","",0,20,180);

Thanks a lot for all your help.
shivakumar sekaran

Joined: Apr 15, 2001
Posts: 18
Hi Chris,

I got it resolved. The struts-config.xml in the remote machine was not reflecting the changes after the build and deployment (UNIX server). It was looking up at a different (struts-config)file in the server. It did work locally. I rectified that and its working now.

Many Thanx for your support.

I agree. Here's the link:
subject: STRUTS - Invalid path
It's not a secret anymore!