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.

Reply via email to