This is the friendbook-velocity example?  I'm afraid you can't just take
a webapp and move all the templates around.  There are various relative
and absolute paths encoded in the templates and the maverick config
file.  Moving around the files will break things.

If you want to reference files with a path like
/prototypes/uiprototype2, you need to design your webapp around those
paths.  This is not a Maverick issue, it's a J2EE (and web) issue
regarding the way that paths are resolved in WAR files.

If you're new to J2EE development, I strongly recommend that you start
with well-established design approaches - build your application as a
WAR file and deploy it that way.  Start by putting all templates at the
root of the WAR instead of building a hierarchy.  Don't try to create an
expanded directory structure in JBoss.

The ant buildfile for friendbook-velocity should be good to start with.

Jeff Schnitzer
[EMAIL PROTECTED]


> -----Original Message-----
> From: Scott Chun [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 13, 2003 1:19 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [Mav-user] Newbie: Velocity + Maverick question
> 
> That took care of finding "welcome" but now I get the following:
> 
> 14:11:29,288 INFO  [jbossweb]  Velocity  [error] ResourceManager :
unable
> to
> find resource 'loginForm.vm' in any resource loader.
> 14:11:29,288 INFO  [jbossweb]  Velocity  [error] #parse(): cannot find
> template
> 'loginForm.vm', called from template /prototypes/uiprototype2/welcome.
> vm at (15, 1)
> 14:11:29,298 INFO  [jbossweb]  Velocity   [info] ResourceManager :
found
> /prototypes/uiprototype2/trimOutside.vm with loader
> org.apache.velocity.tools
> .view.servlet.WebappLoader
> 14:11:29,298 INFO  [jbossweb]  Velocity   [warn]
> org.apache.velocity.runtime.exception.ReferenceException: reference :
> template =
> /prototypes/uiprotot
> ype2/trimOutside.vm [line 2,column 9] : $Id is not a valid reference.
> 14:11:29,308 INFO  [jbossweb]  Velocity   [warn]
> org.apache.velocity.runtime.exception.ReferenceException: reference :
> template =
> /prototypes/uiprotot
> ype2/trimOutside.vm [line 3,column 9] : $Source is not a valid
reference.
> 
> This application is just the opt-velocity example.
> 
> Thanks again.
> Scott
> 
> >>> [EMAIL PROTECTED] 03/13/03 12:55PM >>>
> My guess is that the content of your default.jsp is this:
> 
> <jsp:forward page="welcome.m"/>
> 
> This is a relative path, so the full path to default.jsp will be
> prepended to the welcome.m.  Since you have no command
> "prototypes/uiprototype2/welcome", you get 404.
> 
> Try using an absolute path:
> 
> <jsp:forward page="/welcome.m"/>
> 
> Jeff Schnitzer
> [EMAIL PROTECTED]
> 
> > -----Original Message-----
> > From: Scott Chun [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 13, 2003 10:42 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [Mav-user] Newbie: Velocity + Maverick question
> >
> > when I try
> > http://localhost:8080/myproject/prototypes/uiprototype2/default.jsp
I
> > get:
> >
> > HTTP ERROR: 404 There is no such command
> > "prototypes/uiprototype2/welcome".
> > RequestURI=/myproject/prototypes/uiprototype2/default.jsp
> >
> > >>> [EMAIL PROTECTED] 03/12/03 12:51PM >>>
> > I'm sorry, I don't understand your question.
> >
> > Class files in myproject.war/WEB-INF/classes will automatically be
> found
> > in your application's classpath.  A class foo.Blah should be in the
> file
> > WEB-INF/classes/foo/Blah.class.
> >
> > VM files (and JSP files, HTML files, etc) in the WAR will
> automatically
> > be found at the path relative to the WAR.  The path
> > /yourcontext/prototype/uiprototype/yourfile.vm will be loaded from
> > myproject.war/prototype/uiprototype/yourfile.vm.
> >
> > Are you getting some sort of error?
> >
> > Jeff Schnitzer
> > [EMAIL PROTECTED]
> >
> > > -----Original Message-----
> > > From: Scott Chun [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, March 12, 2003 10:56 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: [Mav-user] Newbie: Velocity + Maverick question
> > >
> > > Thanks for the fix, but I'm still at a loss as to how to tell
> velocity
> > and
> > > maverick where the class and vm files are.
> > >
> > > >>> [EMAIL PROTECTED] 03/11/03 07:35PM >>>
> > > You misspelled WEB-INF (note the dash, and if on a unix-based OS,
> the
> > > case is sensitive).
> > >
> > > Jeff
> > >
> > > > -----Original Message-----
> > > > From: Scott Chun [mailto:[EMAIL PROTECTED]
> > > > Sent: Friday, March 07, 2003 2:33 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [Mav-user] Newbie: Velocity + Maverick question
> > > >
> > > > I'm working on a prototype to learn Vellocity and Maverick. I
what
> > to
> > > > deploy my
> > > > test app to JBoss as follows:
> > > >
> > > > 1)
> > JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\lib
> > > >         jdom.jar
> > > >         maverick.jar
> > > >         velocity-dep-1.3.1-r2.jar
> > > >         velocity-tools-view-0.6.jar
> > > >
> > > > 2) I modified my web.xml to include the Maverick and Velocity
> > > servlets.
> > > >
> > > > 3) My prototype jsp file (same as the friendbook-velocity
example)
> > is
> > > in:
> > > >
> > >
> >
>
JBoss\server\default\deploy\myproject.ear\myproject.war\prototype\uiprot
> > > ot
> > > > ype
> > > >
> > > > 4) My templates are in
> > > >
> > >
> >
>
JBoss\server\default\deploy\myproject.ear\myproject.war\prototype\uiprot
> > > ot
> > > > ype\templates
> > > >
> > > > 5) My class files are in:
> > > >
> > >
> >
>
JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\classes\
> > > or
> > > > g\myproject\prototypes\uiprototype
> > > >
> > > > 6) The Maverick.xml file is in:
> > > > JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\
> > > >
> > > > How do I tell Maverick and Velocity where to find the class and
vm
> > > files?
> > > >
> > > > Thanks in advance!
> > > > Scott
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
>
------------------------------------------------------------------------
> > > --
> > > > ----
> > > > This message may contain confidential information, and is
intended
> > > only
> > > > for the use of the individual(s) to whom it is addressed.
> > > >
> > > >
> > > >
> > >
> >
>
========================================================================
> > > ==
> > > > ====
> > > >
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > This SF.net email is sponsored by: Etnus, makers of TotalView,
The
> > > > debugger
> > > > for complex code. Debugging C/C++ programs can leave you feeling
> > lost
> > > and
> > > > disoriented. TotalView can help you find your way. Available on
> > major
> > > UNIX
> > > > and Linux platforms. Try it free. www.etnus.com
> > > > [INVALID FOOTER]
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by:Crypto Challenge is now open!
> > > Get cracking and register here for some mind boggling fun and
> > > the chance of winning an Apple iPod:
> > > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> > > [INVALID FOOTER]
> > >
> > >
> > >
> >
>
------------------------------------------------------------------------
> > --
> > > ----
> > > This message may contain confidential information, and is intended
> > only
> > > for the use of the individual(s) to whom it is addressed.
> > >
> > >
> > >
> >
>
========================================================================
> > ==
> > > ====
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by:Crypto Challenge is now open!
> > > Get cracking and register here for some mind boggling fun and
> > > the chance of winning an Apple iPod:
> > > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> > > [INVALID FOOTER]
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by:Crypto Challenge is now open!
> > Get cracking and register here for some mind boggling fun and
> > the chance of winning an Apple iPod:
> > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> > [INVALID FOOTER]
> >
> >
> >
>
------------------------------------------------------------------------
> --
> > ----
> > This message may contain confidential information, and is intended
> only
> > for the use of the individual(s) to whom it is addressed.
> >
> >
> >
>
========================================================================
> ==
> > ====
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by:Crypto Challenge is now open!
> > Get cracking and register here for some mind boggling fun and
> > the chance of winning an Apple iPod:
> > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> > [INVALID FOOTER]
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:Crypto Challenge is now open!
> Get cracking and register here for some mind boggling fun and
> the chance of winning an Apple iPod:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> [INVALID FOOTER]
> 
> 
>
------------------------------------------------------------------------
--
> ----
> This message may contain confidential information, and is intended
only
> for the use of the individual(s) to whom it is addressed.
> 
> 
>
========================================================================
==
> ====
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:Crypto Challenge is now open!
> Get cracking and register here for some mind boggling fun and
> the chance of winning an Apple iPod:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> [INVALID FOOTER]



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
[INVALID FOOTER]

Reply via email to