• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with velocity templates

 
Pablo Mu�iz
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I'm developing a project with two separate webapps using struts+velocity+jboss.
I've noticed that when I deploy both webapps velocity gets confused and retrieve wrong templates.
In fact, when I access index.vm in webapp_1 I get index.vm of webapp_2.
Reading velocity docs I've figured out VelocityViewServlet uses a singleton model, wich could be why I have this problem.
In both webapps the web.xml looks like this :

Does anyone know why velocity doesn�t looks for the templates in the wright place? Maybe I have something wrong in the configuration?
Is there any way of using velocity in two independent webapps, each using .vm templates in its WAR file?
Thanks in advance.
Greetings, Pablo.
 
Ken Krebs
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pablo,
I don't have any experience with Velocity in webapps at this point but it very well might be that Velocity can't find the properties files. You probably need to place them in /WEB-INF/classes instead of /WEB-INF so they are on the classpath. That's my best guess.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic