Please reply....what steps are needed tp move from VelocityServlet to VelocityViewServlet.
I downloaded the jar velocity-tools-view-1.4.jar. and extended my VMServlet class from velocityViewServlet. what other changes are required. Please guide its urgent. On 1/23/08, Kaur, Jasdeep Guglani <[EMAIL PROTECTED]> wrote: > > Hi Thanks for responding... > > If I have to use Velocity Servlet...can this problem be rectified.... > > > On 1/23/08, Will Glass-Husain <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > Have you looked at the Velocity Tools subproject? Look at the > > VelocityViewServlet. It's a much better servlet and is actively > > maintained. > > > > Let's take any other discussion to the [email protected] > > mailing list please. > > > > WILL > > > > On 1/23/08, Kaur, Jasdeep Guglani < [EMAIL PROTECTED]> wrote: > > > Hi > > > > > > I wish to use the code written by. Attcahed is the file you wrote. It > > has > > > alternate version of the Velocity servlet to load multiple instances. > > > > > > I extend this class and want multiple instances of the subclass too. > > Is it > > > possible? or how else can I proceed to wards it... > > > > > > > > > > > > I can quote my problem in following way: > > > > > > There is a servlet (VMServlet) that handles all our requests. It has a > > > member variable viz. "user" that stores the username etc. As we are > > using > > > singleton model; only one copy of the VMServlet class gets created. > > > > > > > > > > > > So when multiple users log into the application, and there is one > > instance > > > of the VMServlet which is handling the requests, we see wrong user > > name in > > > the application. This problem appears when more than one instance of > > the > > > application are busy processing simulataneously. > > > > > > The VM Servlet class extends VelocityServlet. > > > > > > > > > > > > In VelocityServlet class I made some change to drop the singleton > > model > > > being followed earliar. > > > > > > The change is > > > > > > protected void initVelocity(ServletConfig config) > > > > > > throws ServletException > > > > > > { > > > > > > try > > > > > > { > > > > > > Properties props = loadConfiguration(config); > > > > > > //Velocity.init(props); This line was commented > > > > > > > > > > > > /* Code inserted */ > > > > > > ve = new VelocityEngine(); > > > > > > System.out.println("\n\n\n*************In Velocity > > Servlet > > > Modified****************"); > > > > > > ve.init(props); > > > > > > } > > > > > > catch(Exception e) > > > > > > { > > > > > > throw new ServletException("Error initializing Velocity: " > > + e, > > > e); > > > > > > } > > > > > > } > > > > > > But this has not solved the problem. > > > > > > > > > > > > Do you have any idea how to go about it? your alternate velocity > > servlet has > > > not solved my problem. > > > > > > Please help...n thanks! > > > > > > > > > > > > > > > -- > > Forio Business Simulations > > > > Will Glass-Husain > > 415 440-7500x89 > > [EMAIL PROTECTED] > > www.forio.com > > > >
