Dynamic forwards

B

bb

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):
ForwardConfig[name=null,path=[URL]http://nokia:8080/site/global/home/l_home.jsp,redirect=false,contextRelative=false]/site/global/home/l_home.jsp,redirect=false,contextRelative=false[/URL]]

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


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..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top