Subversion Repositories SmartDukaan

Rev

Rev 822 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 822 Rev 832
Line 772... Line 772...
772
	public String getHtmlFromVelocity(String templateFile, VelocityContext context){
772
	public String getHtmlFromVelocity(String templateFile, VelocityContext context){
773
		Properties p = new Properties();
773
		Properties p = new Properties();
774
		p.setProperty("resource.loader", "class");
774
		p.setProperty("resource.loader", "class");
775
		p.setProperty("class.resource.loader.class",
775
		p.setProperty("class.resource.loader.class",
776
		"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
776
		"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
777
		p.setProperty("file.resource.loader.path",
777
		p.setProperty("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.NullLogSystem"); 
778
		"/home/FTP-shared/upload/");
-
 
779
 
778
		
780
		try {
779
		try {
781
			Velocity.init(p);
780
			Velocity.init(p);
782
			//Velocity.setProperty(Velocity.FILE_RESOURCE_LOADER_PATH, value)
781
			//Velocity.setProperty(Velocity.FILE_RESOURCE_LOADER_PATH, value)
783
			Template template = Velocity.getTemplate(templateFile);
782
			Template template = Velocity.getTemplate(templateFile);
784
			if(template != null) {
783
			if(template != null) {