aspose file tools
The moose likes Other Application Frameworks and the fly likes Issue while using Apache Velocity with servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Reply Bookmark "Issue while using Apache Velocity with servlets" Watch "Issue while using Apache Velocity with servlets" New topic
Author

Issue while using Apache Velocity with servlets

Aditya Sirohi
Ranch Hand

Joined: Jan 05, 2010
Posts: 91

Hello Folks,

I am quiet new with servlets and on top of that i have been trying to implement Apache Velocity for some template rendering. Below is the code i have written to implement velocity. String "ch " stores the value from the UI and prints it on the server logs. I have trying to read the template file KCIJPCFG.vm which is under the "C:" directory and replace the occurance of ${GBL_TARGET_HILEV} in the template file wth "TDITNT.ITM62242". I am able to run the following code when its a simple java code, but i am having issues when trying to implement it as a servlet. Help is appreciated.

Thanks
Adi

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

Issues?

Please read this: TellTheDetails
Aditya Sirohi
Ranch Hand

Joined: Jan 05, 2010
Posts: 91

Thanks Paul for the reply.

The question i have:-

1. when i do System.out.println( writer.toString() ); i dont see any output on the server logs.
2. Does my code looks correct?

-Aditya
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Issue while using Apache Velocity with servlets
 
Similar Threads
Velocity Templates with Servlets
Issue while using Apache Velocity with servlets
Help executing velocity example
Velocity Templates with Servlets
Suppressing Applet alerts when using mail API