struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mufaddal Khumri <mkhu...@allegrocentral.com>
Subject Namespace issue for a particular result ...
Date Wed, 09 Jan 2008 16:16:53 GMT
I have a struts config file with the following:

<!DOCTYPE struts PUBLIC
     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
     "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
   <package name="authentication" namespace="/authentication"  
extends="mypackage">

	<action name="login" class="com.mypackage.authentication.LoginAction">
	    <result name="success" type="freemarker">${originalUrl}</result>
	</action>	
		
   </package>

</struts>

In this case the LoginAction received the original url as: http:// 
localhost/mypackage/cr/test.action

When I execute this code I get an exception:

java.io.FileNotFoundException: Template /authentication/http:// 
localhost/mypackage/cr/test.action not found.
         at freemarker.template.Configuration.getTemplate 
(Configuration.java:489)
         at freemarker.template.Configuration.getTemplate 
(Configuration.java:459)
         at  
org.apache.struts2.views.freemarker.FreemarkerResult.doExecute 
(FreemarkerResult.java:161)


So basically,
1. Can I forward to my original url in this manner? Or do i have to  
specify a context relative path ?
2. How do I tell the Struts2 framework to not prepend the namespace  
for this particular result?

Thanks.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message