You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Hyma <hy...@visualsoft-tech.com> on 2003/11/11 12:52:58 UTC

Deploying Sample Application

Dear Sir/Madam,
                        I have done following steps,even i am not able to access my Hello.vm file

Step1 :

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
     <!-- Define Velocity template compiler -->
     <servlet>
     <servlet-name>velocity</servlet-name>
     <servlet-class>
     org.apache.velocity.tools.view.servlet.VelocityViewServlet
     </servlet-class>
      <init-param>
     <param-name>toolbox</param-name>
     <param-value>/WEB-INF/toolbox.xml</param-value>
     </init-param>
     <load-on-startup>10</load-on-startup>
     </servlet>
     <!-- Map *.vm files to Velocity -->
     <servlet-mapping>
     <servlet-name>velocity</servlet-name>
     <url-pattern>*.vm</url-pattern>
</servlet-mapping>
</web-app>

I placed servlet.jar in lib folder eventhough i am getting exception of
 nested throwable: (java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet)
no class defintion error.I placed required jar files in lib folder .Please give the solution
Regards,
Hyma

Re: Deploying Sample Application

Posted by Nathan Bubna <na...@esha.com>.
Hyma said:
...
> I have done following steps,even i am not able to access my Hello.vm file
>
> Step1 :
>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
>      <!-- Define Velocity template compiler -->
>      <servlet>
>      <servlet-name>velocity</servlet-name>
>      <servlet-class>
>      org.apache.velocity.tools.view.servlet.VelocityViewServlet
>      </servlet-class>
>       <init-param>
>      <param-name>toolbox</param-name>

this is wrong.  it should be "org.apache.velocity.toolbox"
however, it isn't what is causing the problem below.

>      <param-value>/WEB-INF/toolbox.xml</param-value>
>      </init-param>
>      <load-on-startup>10</load-on-startup>
>      </servlet>
>      <!-- Map *.vm files to Velocity -->
>      <servlet-mapping>
>      <servlet-name>velocity</servlet-name>
>      <url-pattern>*.vm</url-pattern>
> </servlet-mapping>
> </web-app>
>
> I placed servlet.jar in lib folder eventhough i am getting exception of
>  nested throwable: (java.lang.NoClassDefFoundError:
> javax/servlet/http/HttpServlet)
> no class defintion error.I placed required jar files in lib folder .
> Please give the solution

we have given the solution.  VelocityTools is distributed with fully working
example applications.  you should look at how those are set up (particularly
the "simple" example) to see how to get things running.  that should give you
an idea of what jars are necessary and how to set up your file structure,
web.xml, toolbox.xml, velocity.properties and so on.

Nathan Bubna
nathan@esha.com


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


Re: Deploying Sample Application

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Where is your velocity and velocity-tools jars?

On Tuesday, November 11, 2003, at 06:52 AM, Hyma wrote:

> Dear Sir/Madam,
>                         I have done following steps,even i am not able 
> to access my Hello.vm file
>
> Step1 :
>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web 
> Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
>      <!-- Define Velocity template compiler -->
>      <servlet>
>      <servlet-name>velocity</servlet-name>
>      <servlet-class>
>      org.apache.velocity.tools.view.servlet.VelocityViewServlet
>      </servlet-class>
>       <init-param>
>      <param-name>toolbox</param-name>
>      <param-value>/WEB-INF/toolbox.xml</param-value>
>      </init-param>
>      <load-on-startup>10</load-on-startup>
>      </servlet>
>      <!-- Map *.vm files to Velocity -->
>      <servlet-mapping>
>      <servlet-name>velocity</servlet-name>
>      <url-pattern>*.vm</url-pattern>
> </servlet-mapping>
> </web-app>
>
> I placed servlet.jar in lib folder eventhough i am getting exception of
>  nested throwable: (java.lang.NoClassDefFoundError: 
> javax/servlet/http/HttpServlet)
> no class defintion error.I placed required jar files in lib folder 
> .Please give the solution
> Regards,
> Hyma
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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