velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Searle <>
Subject Some kind of buffer/memory overflow using velocity templates as struts tiles?
Date Wed, 03 Nov 2004 09:46:20 GMT

OK - using struts 1.2.4 together with velocity 1.4 and velocity tools

This is based on using the velocity view servlet together with the
struts tiles integration. It is a conversion of an existing
struts/tiles project converting jsp's to vm's.

Tiles layout is fairly simple -

header across the top
left menu down the left
content - footer - copyright above each other down the center
right menu down the right

Each tile is a .vm template - as is the layout files. The only jsp
left in the system is welcome.jsp.

Now - in some cases instead of getting the page I get the last few
lines of content, the footer, copyright and the right menu only. It
seems to depend on the size of the content tile.

The log shows that the correct templates are being visited.

It happens in two cases

1) The frontpage. Here content.vm is very large - but static (text in
   the .vm itself)

2) A product page - here the product.vm is very small - but when
   $product.description goes over a given size this triggers - however
   - here the only difference is the size of the text returend from
   the database.

Here's how it looks when triggered (a little sanitized for names etc):


Last part of text from product database
<!-- End product.vm -->

<!-- Start foot.vm -->
<p>For mer informasjon, vennligst kontakt <a href="mailto:mail@mail.tld">mail@mail.tld</a></p>
<!-- End foot.vm -->

<!-- Start copyright.vm -->
<div id="copyright">
<hr />
<p>Copyright &copy; 2004 ....</p>
<!-- End copyright.vm -->

<!-- Start productrightmenu.vm -->
<div id="rightmenu">

  <li><a href="/external/">Produktmeny</a></li>
      <li><a href="/external/">product 1</a></li>
      <li><a href="/external/">product 2</a></li>
      <li><a href="/external/">product 3</a></li>
      <li><a href="/external/">product 4</a></li>
      <li><a href="/external/">product 5</a></li>
      <li><a href="/external/">product 6</a></li>
      <li><a href="/external/">product 7</a></li>

<hr />



<hr />

      <a href="http://...">Link 1</a>
        <a href="http://...">Link 2</a>
        <a href="http://...">Link 3</a>
        <a href="http://...">Link 4</a>
<!-- End productrightmenu.vm -->


Note that by reducing the database content size I can get the whole
page processed. Same happens if I reduce the amount of static text on
the frontpage.

Is there a size limitation to a velocity template used as a tile?

Chris Searle

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message