You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Hannu Raudasoja <ha...@almasoftware.com> on 2003/11/13 08:08:44 UTC

Velocity, Struts, Tiles and DynaValidator

I have a simple tile layout page MainLayout.jsp like this.

<%@ taglib uri="tags_struts_tiles" prefix="tiles" %>
<%@ taglib uri="tags_struts_html" prefix="html" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<HTML>
<BODY>
<TABLE">
<TR>
  <TD">
    <tiles:get name="header" />
  </TD>
</TR>
</TABLE>
</BODY>
</HTML>
<html:javascript formName="logonForm" />

and tiles-definitions like this

<tiles-definitions>
    <definition name="MainLayout" path="/WEB-INF/pages/MainLayout.jsp">
        <put name="title" value="TITLE"/>
        <put name="header" value="/WEB-INF/pages/header.vm"/>
    </definition>
</tiles-definitions>

Why this does not work with "jakarta-tomcat-5.0.14" but it works with
"Jetty-4.2.14rc0".
I am using the latest versions of all programs (Sturts 1.1 etc.).



I have tried also use Velocity layout page MainLayout.vm, but then i have
other problems.
1. Where i can find "org.apache.velocity.tools.struts.TilesTool.class", that
i can use with the toolbox.xml..
2. How i then get javascipt from the validator context.


Hannu Raudasoja
hannu.raudasoja@almasoftware.com




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


Re: Velocity, Struts, Tiles and DynaValidator

Posted by Hannu Raudasoja <ha...@almasoftware.com>.
> > Why this does not work with "jakarta-tomcat-5.0.14" but it works with
> > "Jetty-4.2.14rc0".
>
> what do you mean by "does not work"?  you aren't telling us what your
problem
> is.  if you don't tell us what the problem is, that makes it pretty hard
to
> help you.

Tomcat throws exception: [Exception in:/WEB-INF/pages/header.vm] null


> > I am using the latest versions of all programs (Sturts 1.1 etc.).
>
> what programs? what latest versions?  nightly builds? final releases?
other
> releases?

velocity-1.4-rc1.jar
--http://cvs.apache.org/dist/jakarta/velocity/v1.4rc1/
--velocity-1.4-rc1.zip
velocity-tools-1.0.jar
--http://jakarta.apache.org/site/binindex.cgi
--Velocity Tools 1.0.zip
struts.jar, commons*.jar, jakarta-oro.jar, jstl.jar, standard.jar
--http://jakarta.apache.org/site/binindex.cgi
--Struts 1.1.zip
crimson.jar
--from somewhere
--192 KB
dom4j.jar
--from somewhere
--476 KB
jaxp.jar
--from somewhere
--33 KB
xalan.jar
--from somewhere
--886 KB

> > I have tried also use Velocity layout page MainLayout.vm, but then i
have
> > other problems.
> > 1. Where i can find "org.apache.velocity.tools.struts.TilesTool.class",
that
> > i can use with the toolbox.xml..
>
> TilesTool is part of the VelocityTools project, but was not part of the
1.0
> release.  you will have to get a recent build of the project or check it
out
> of CVS and build it yourself.  or you can wait for the next release; a
> VelocityTools 1.1-beta1 release will likely happen within the next week.
>
> > 2. How i then get javascipt from the validator context.
>
> the VelocityTools project has also developed a ValidatorTool.  it will be
a
> part of the next release.
>

Thank your for the information!


Hannu Raudasoja
hannu.raudasoja@almasoftware.com




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


Re: Velocity, Struts, Tiles and DynaValidator

Posted by Nathan Bubna <na...@esha.com>.
Hannu Raudasoja said:
> I have a simple tile layout page MainLayout.jsp like this.
...
>     <tiles:get name="header" />
...
> <html:javascript formName="logonForm" />
>
> and tiles-definitions like this
>
> <tiles-definitions>
>     <definition name="MainLayout" path="/WEB-INF/pages/MainLayout.jsp">
>         <put name="title" value="TITLE"/>
>         <put name="header" value="/WEB-INF/pages/header.vm"/>
>     </definition>
> </tiles-definitions>
>
> Why this does not work with "jakarta-tomcat-5.0.14" but it works with
> "Jetty-4.2.14rc0".

what do you mean by "does not work"?  you aren't telling us what your problem
is.  if you don't tell us what the problem is, that makes it pretty hard to
help you.

> I am using the latest versions of all programs (Sturts 1.1 etc.).

what programs? what latest versions?  nightly builds? final releases? other
releases?

> I have tried also use Velocity layout page MainLayout.vm, but then i have
> other problems.
> 1. Where i can find "org.apache.velocity.tools.struts.TilesTool.class", that
> i can use with the toolbox.xml..

TilesTool is part of the VelocityTools project, but was not part of the 1.0
release.  you will have to get a recent build of the project or check it out
of CVS and build it yourself.  or you can wait for the next release; a
VelocityTools 1.1-beta1 release will likely happen within the next week.

> 2. How i then get javascipt from the validator context.

the VelocityTools project has also developed a ValidatorTool.  it will be a
part of the next release.

Nathan Bubna
nathan@esha.com


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