File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Dynamic ActionForwards Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Dynamic ActionForwards" Watch "Dynamic ActionForwards" New topic

Dynamic ActionForwards

bill kpi

Joined: Mar 31, 2005
Posts: 2
I'm trying to dynamically forward requests under Resin and Struts. Given the following code:

String referer = (String) request.getHeader("referer");

referer returns: http://nokia:http://nokia:8080/site/global/home/l_home.jsp

ActionForward created is (from debug):

java.lang.IllegalArgumentException: path must be absolute: `http://nokia:8080/site/global/home/l_home.jsp'
at com.caucho.server.http.Application.getRequestDispatcher(
at org.apache.struts.action.RequestProcessor.doForward(
at org.apache.struts.action.ActionServlet.doGet(

What do I need to do to be able to get a dynamic path that can be successfully forwarded by and Action class? I'd rather not have to parse and trim the referer value if possible. As far as I can see, the above path is as absolute as you can get, but I guess I'm missing something..
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
The action forward path should be with respect to ur context should not be the full path just truncate that http://nokia:8080 and form the actionforward with the rest of the path
okay ??
I agree. Here's the link:
subject: Dynamic ActionForwards
It's not a secret anymore!