You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by John Rothfield <jo...@sfhypnosis.com> on 2001/12/05 18:54:46 UTC

access templates within WAR file

I am using JBoss/Tomcat. I'm using a WAR file to deploy my app, and I want
to put the templates
in the war file, but I can't seem to get it to work.

I'm trying to setup velocity so I can load my templates from
a jar file. I looked into JarClasspathResourceLoader, but that seems to
want an absolute
file path for the jar file. I also looked into using
ClasspathResourceLoader, but it doesn't
seem to find my templates, which I put into WEB-INF/lib

If anyone has a sample WAR file that works, I'd appreciate seeing it.  I
should be able to drop
the WAR file in the app server and have things work.

Any help greatly appreciated,
John



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: access templates within WAR file

Posted by John Rothfield <jo...@sfhypnosis.com>.
Thanks guys.

I finally figured out the problem, which was that velocity wasn't in my WAR
lib
file.

Regards, John

At 04:20 PM 12/5/2001 -0500, you wrote:
>On 12/5/01 12:54 PM, "John Rothfield" <jo...@sfhypnosis.com> wrote:
>
>> I am using JBoss/Tomcat. I'm using a WAR file to deploy my app, and I want
>> to put the templates
>> in the war file, but I can't seem to get it to work.
>> 
>> I'm trying to setup velocity so I can load my templates from
>> a jar file. I looked into JarClasspathResourceLoader, but that seems to
>> want an absolute
>> file path for the jar file. I also looked into using
>> ClasspathResourceLoader, but it doesn't
>> seem to find my templates, which I put into WEB-INF/lib
>
>That works all the time for me....  I haven't done it with Jboss, but I
>assume it's the same tomcat we all know and love?
>
>> 
>> If anyone has a sample WAR file that works, I'd appreciate seeing it.  I
>> should be able to drop
>> the WAR file in the app server and have things work.
>
>Sure - I'll make one for the servlet_example2.  That would be convenient for
>people...
> 
>> Any help greatly appreciated,
>> John
>> 
>> 
>> 
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>> 
>
>-- 
>Geir Magnusson Jr.                                     geirm@optonline.net
>System and Software Consulting
>"He who throws mud only loses ground." - Fat Albert
>
>
>--
>To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
>For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: build successful...test failed

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 12/5/01 1:30 PM, "Scott Jeppesen" <je...@corp.earthlink.net> wrote:

> Hello,
> I'm using Velocity 1.1.....I just ran ant in the velocity directory and
> it ran fine. However, when I ran "ant test" it generated this
> error....what's wrong?
> 
> Test-template:
> [echo] Running Template tests...
> [java] Class not found
> "org.apache.velocity.test.TemplateTestCase"
> 

Relative path for class inclusion?

Try running from the /build directory

-- 
Geir Magnusson Jr.                       geirm@optonline.net
System and Software Consulting
You're going to end up getting pissed at your software
anyway, so you might as well not pay for it. Try Open Source.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


build successful...test failed

Posted by Scott Jeppesen <je...@corp.earthlink.net>.
Hello,
I'm using Velocity 1.1.....I just ran ant in the velocity directory and
it ran fine. However, when I ran "ant test" it generated this
error....what's wrong?

Test-template:
	[echo] Running Template tests...
	[java] Class not found
"org.apache.velocity.test.TemplateTestCase"

BUILD FAILED

C:\velocity\build\testcases.xml:75: Java returned: -1

Total Time: 2 seconds



Any help is appreciated...
-SJ


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: access templates within WAR file

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 12/5/01 12:54 PM, "John Rothfield" <jo...@sfhypnosis.com> wrote:

> I am using JBoss/Tomcat. I'm using a WAR file to deploy my app, and I want
> to put the templates
> in the war file, but I can't seem to get it to work.
> 
> I'm trying to setup velocity so I can load my templates from
> a jar file. I looked into JarClasspathResourceLoader, but that seems to
> want an absolute
> file path for the jar file. I also looked into using
> ClasspathResourceLoader, but it doesn't
> seem to find my templates, which I put into WEB-INF/lib

That works all the time for me....  I haven't done it with Jboss, but I
assume it's the same tomcat we all know and love?

> 
> If anyone has a sample WAR file that works, I'd appreciate seeing it.  I
> should be able to drop
> the WAR file in the app server and have things work.

Sure - I'll make one for the servlet_example2.  That would be convenient for
people...
 
> Any help greatly appreciated,
> John
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
"He who throws mud only loses ground." - Fat Albert


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>