It's not necessary at all to add all jars into classpath to make it your struts application work. Jeromy is right that the problem may caused by wrong syntax on classpath.
Again, Tomcat classloaders will find class for you if your jars placed at right place. You dont even have to put jars in common, shared or server ... Regards Li On 7/2/07, Jeromy Evans <[EMAIL PROTECTED]> wrote:
Guys, please read a classpath tutorial. There's a decent one here: http://www.kevinboone.com/classpath.html The following section is especially relevant that I've copied from that page for you: <quote> JARs on the classpath The java compiler and run-time can search for classes not only in separate files, but also in `JAR' archives. A JAR file can maintain its own directory structure, and Java follows exactly the same rules as for searching in ordinary directories. Specifically, `directory name = package name'. Because a JAR is itself a directory, to include a JAR file in the class search path, the path must reference the JAR itself, not merely the directory that contains the JAR. This is a /very/ common error. Suppose I have a JAR |myclasses.jar| in directory |/myclasses|. To have the Java compiler look for classes in this jar, we need to specify: javac -classpath /myclasses/myclasses.jar ... and not merely the directory |myclasses|. </quote> ie. You cannot use * to reference jar files in the classpath. Please name each jar file explicitly, or use a build tool like ant to do it for you. bindhu wrote: > hi, > > i hv done what u said > > n now my calsspath is > CLASSPATH=C:\Program Files\Java\jre1.6.0_01\lib\* > > still i face the error. > > bindhu wrote: > >> hai, >> >> when trying to open my jsp page in browser i get this error. can >> anyone plas help me. >> type Exception report >> >> message >> >> description The server encountered an internal error () that prevented it >> from fulfilling this request. >> >> exception >> >> org.apache.jasper.JasperException: javax.servlet.ServletException: >> java.lang.NoClassDefFoundError: Could not initialize class >> org.apache.struts.taglib.html.FormTag >> >> org.apache.jasper.servlet.JspServletWrapper.handleJspException( JspServletWrapper.java:541) >> >> org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:417) >> org.apache.jasper.servlet.JspServlet.serviceJspFile( JspServlet.java:320) >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) >> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) >> >> >> root cause >> >> javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not >> initialize class org.apache.struts.taglib.html.FormTag >> >> org.apache.jasper.runtime.PageContextImpl.doHandlePageException( PageContextImpl.java:850) >> >> org.apache.jasper.runtime.PageContextImpl.handlePageException( PageContextImpl.java:779) >> org.apache.jsp.register_jsp._jspService(register_jsp.java:80) >> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) >> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) >> >> org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:393) >> org.apache.jasper.servlet.JspServlet.serviceJspFile( JspServlet.java:320) >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) >> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) >> >> >> root cause >> >> java.lang.NoClassDefFoundError: Could not initialize class >> org.apache.struts.taglib.html.FormTag >> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >> >> sun.reflect.NativeConstructorAccessorImpl.newInstance( NativeConstructorAccessorImpl.java:39) >> >> sun.reflect.DelegatingConstructorAccessorImpl.newInstance( DelegatingConstructorAccessorImpl.java:27) >> java.lang.reflect.Constructor.newInstance(Constructor.java:513) >> java.lang.Class.newInstance0(Class.java:355) >> java.lang.Class.newInstance(Class.java:308) >> org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java :126) >> >> org.apache.jsp.register_jsp._jspx_meth_form_005fform_005f0 (register_jsp.java:92) >> org.apache.jsp.register_jsp._jspService(register_jsp.java:73) >> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) >> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) >> >> org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:393) >> org.apache.jasper.servlet.JspServlet.serviceJspFile( JspServlet.java:320) >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) >> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) >> >> >> note The full stack trace of the root cause is available in the Apache >> Tomcat/6.0.13 logs. >> >> >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Small win by playing smart Big win by playing honest