velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Melehin Anton <melehin_an...@mail.ru>
Subject Re[2]: a problem with template loading
Date Mon, 11 Mar 2002 08:02:41 GMT
Hello Anthony,

Sunday, March 10, 2002, 9:47:45 PM, you wrote:

AE> Do you have a separate Velocity JAR for each WAR or are you sharing a
AE> single JAR throughout Tomcat?  If you have a separate Velocity JAR in
AE> each WAR then I think that this problem would not occur.

AE> Sincerely,
AE> Anthony Eden

Thank you for answer.

Perhaps it's a way for me. I'll try...BUT

I didn't tell that I want to use many instances of this servlet in one
application (with diffrent settings for every servlet and diffrent templates for some of them)...

That's because I think that this decision don't match for me and I'll
meet the same problem... Am I right?

But If your decision work, there is another problem which I can decide:
suppose, I have three servlet:
/a
/b
/c

every have it's own templateroot
/tmpl/a/html/
/tmpl/b/html/
/tmpl/c/html/
can I use them in one application without using TemplateEngine?

Now I think that I have to make
one root /tmpl/ for an application and set servlet to use it's own
sub-root (/a,/b,/c).

The problem is that I have to change every template to use that new root
(not /html but /a/html). Templates have to be changed because they
include #parse directive which must have the same root that was set in
servlet. So for servlet 'a' there will be #parse (/a/html/) for b
(/b/html/) ...)

Another way for me -- just use TemplateEngine and make my own
base servlet (which will differ from VelocityServlet)...
Can TemplateEngine work in that way (many instances (10-20) of TemplateEngine in
one application)? Or it will spend a large amount of memory?

Which way is right?

-- 
Best regards,
Anton Melehin                            mailto:melehin_anton@mail.ru



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


Mime
View raw message