Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error - Cannot create redirect URL

 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: java.net.MalformedURLException: Cannot retrieve ActionForwards collection

welcome.jsp


struts-config.xml
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Navgire Parikshit
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<form-beans>
<form-bean name="searchForm" type="SearchForm" />
</form-beans>
<!-- global forwards -->
<global-forwards>
<forward name="search" path="/search.jsp" />
</global-forwards>

<!-- Action Mapping Configuration -->
<action-mappings>
<action path="/search" type="SearchAction" name="searchForm"
scope="request" validate="true" input="/search.jsp">
</action>
</action-mappings>
<!-- Message Resources -->
<message-resources parameter="MessageResources" />
</struts-config>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic