--- Tomasz Wrona <[EMAIL PROTECTED]> wrote:
> > Did you #include() or #parse() your template?
> > #include() just includes everyting verbatim
> > withoutlooking inside.
> At first I've tried #include but it did not work.
> Then I've tried #parse
> (template.vm) but an exception was raised:
> Fri Sep 05 13:31:11 CEST 2003  [error] #parse() :
> arg =
> /templates/group/groupsNavi.vm.  Exception :
> java.lang.ClassCastException:
> org.apache.velocity.runtime.resource.ContentResource


Well, you forgot stack trace. But it looks that you
somehow goofed  with configuration of resource
loaders.

Note that webwork  ( 1.3 )  configures just a
classpath reosurce loader, which would load templates
from
WEB-INF/classes , and not from your .war archive. 

You will need to patch webwork velocity servlet a
little, like one in velocity-tools project to load
your templates from web archive. 

You may also look into velocity.log file ( it will be
somewhere, it writes in current directory of jvm ) -
there are sometime clues about what went wrong...


> >
> >
> > Action execution returns result ( forward name ).
> > If you like to execute action and place result
> into
> > template, you got to use #includeservlet()
> I've tried to use #includeservlet(name) but it does
> not work - no output, no
> error, nothing
> Is the output of the servlet in special variable?

It's embedded into your resultig page.  Such snippet
works for me: 

        <h3>News</h3>
        #set( $prefix = "/infobit/news/" )
        #set( $suffix = "?_render_mode=preview" )
        <table>
            #foreach($newsEntry in $newsSelector.news
)
                
                #set ( $linkname =
"${prefix}${newsEntry.name}${suffix}" )
                #includeservlet( $linkname )
                <tr>
                    <td colspan="2">
                        <a href="$url.setPage(
"$prefix$newsEntry.name")">mehr...</a>
                    </td>
                </tr>
            #end
        </table>


regards,

=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verstärkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] für die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to