You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Markus <ma...@gmx.com> on 2004/02/13 10:48:41 UTC

Problem with $link.setAbsolute("...")

Hi,
I would like to use the $link.setAbsolute("...") syntax.
I use velocity with struts and I've installed velocity successful but I
can't use  $link
I've followed the installation guide and looked into the velstruts example
but there are two different toolbox.xml (one with generic.ToolLoader and one
without)
And I've tried to use the struts link tool, too.
with:
<tool>
     <key>link</key>
     <scope>request</scope>
     <class>org.apache.velocity.tools.struts.StrutsLinkTool</class>
  </tool>

Here is my toolbox.xml:
<toolbox>
 <tool>
     <key>toolLoader</key>
     <scope>request</scope>
     <class>org.apache.velocity.tools.generic.ToolLoader</class>
  </tool>
  <tool>
     <key>link</key>
     <scope>request</scope>
     <class>org.apache.velocity.tools.view.tools.LinkTool</class>
  </tool>
  <tool>
     <key>msg</key>
     <scope>request</scope>
     <class>org.apache.velocity.tools.struts.MessageTool</class>
  </tool>
  <tool>
     <key>errors</key>
     <scope>request</scope>
     <class>org.apache.velocity.tools.struts.ErrorsTool</class>
  </tool>
  <tool>
     <key>form</key>
     <scope>request</scope>
     <class>org.apache.velocity.tools.struts.FormTool</class>
  </tool>
</toolbox>

an the snip from web.xml:
<servlet>
    <servlet-name>velocity</servlet-name>
   
<servlet-class>org.apache.velocity.tools.view.servlet.VelocityViewServlet</servlet-class>
    <init-param>
        <param-name>org.apache.velocity.toolbox</param-name>
        <param-value>/WEB-INF/toolbox.xml</param-value>
    </init-param>
    <init-param>
      <param-name>org.apache.velocity.properties</param-name>
      <param-value>/WEB-INF/velocity.properties</param-value>
   </init-param>
    <load-on-startup>10</load-on-startup>
  </servlet>

any suggestions?

Thanks in advance,

kind regards,

Markus


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Problem with $link.setAbsolute("...")

Posted by Markus <ma...@gmx.com>.
Sorry my fault, found the mistake!

Kind regards,

Markus
> Hi,
> I would like to use the $link.setAbsolute("...") syntax.
> I use velocity with struts and I've installed velocity successful but I
> can't use  $link
> I've followed the installation guide and looked into the velstruts example
> but there are two different toolbox.xml (one with generic.ToolLoader and
> one
> without)
> And I've tried to use the struts link tool, too.
> with:
> <tool>
>      <key>link</key>
>      <scope>request</scope>
>      <class>org.apache.velocity.tools.struts.StrutsLinkTool</class>
>   </tool>
> 
> Here is my toolbox.xml:
> <toolbox>
>  <tool>
>      <key>toolLoader</key>
>      <scope>request</scope>
>      <class>org.apache.velocity.tools.generic.ToolLoader</class>
>   </tool>
>   <tool>
>      <key>link</key>
>      <scope>request</scope>
>      <class>org.apache.velocity.tools.view.tools.LinkTool</class>
>   </tool>
>   <tool>
>      <key>msg</key>
>      <scope>request</scope>
>      <class>org.apache.velocity.tools.struts.MessageTool</class>
>   </tool>
>   <tool>
>      <key>errors</key>
>      <scope>request</scope>
>      <class>org.apache.velocity.tools.struts.ErrorsTool</class>
>   </tool>
>   <tool>
>      <key>form</key>
>      <scope>request</scope>
>      <class>org.apache.velocity.tools.struts.FormTool</class>
>   </tool>
> </toolbox>
> 
> an the snip from web.xml:
> <servlet>
>     <servlet-name>velocity</servlet-name>
>    
>
<servlet-class>org.apache.velocity.tools.view.servlet.VelocityViewServlet</servlet-class>
>     <init-param>
>         <param-name>org.apache.velocity.toolbox</param-name>
>         <param-value>/WEB-INF/toolbox.xml</param-value>
>     </init-param>
>     <init-param>
>       <param-name>org.apache.velocity.properties</param-name>
>       <param-value>/WEB-INF/velocity.properties</param-value>
>    </init-param>
>     <load-on-startup>10</load-on-startup>
>   </servlet>
> 
> any suggestions?
> 
> Thanks in advance,
> 
> kind regards,
> 
> Markus
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org