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

Error - Cannot create redirect URL

Dilip kumar
Ranch Hand

Joined: Oct 16, 2000
Posts: 360
Hello All -

I'm getting below error message. Spent almost an hour but couldn't find the cause. Really appreciate any help. Thanks

javax.servlet.ServletException: Cannot create redirect URL: Cannot retrieve ActionForwards collection


Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
This error could occur if the Struts ActionServlet has not initialized prior to your requesting this JSP.

Did you specify <load-on-startup>1</load-on-startup> for the ActionServlet in your web.xml file?

Consultant, Sima Solutions
Navgire Parikshit

Joined: Jan 31, 2011
Posts: 3
Even I am getting the exception! I tried the <load-on-startup> thing but it didn't work. Please check the struts-config file.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
<form-bean name="searchForm" type="SearchForm" />
<!-- global forwards -->
<forward name="search" path="/search.jsp" />

<!-- Action Mapping Configuration -->
<action path="/search" type="SearchAction" name="searchForm"
scope="request" validate="true" input="/search.jsp">
<!-- Message Resources -->
<message-resources parameter="MessageResources" />
I agree. Here's the link:
subject: Error - Cannot create redirect URL
It's not a secret anymore!