For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 4 replies, 2 voices, and was last updated 21 years ago by
Riyad Kalla.
-
AuthorPosts
-
nwangluMembereclipse 3.1 rc3+ myeclipse 4.0
i create a j2ee webproject then add struts capabilities 1.2 to it,
create myjsp.jsp from template struts 1.2 .
1.jsp***************
<%@ page language=”java” pageEncoding=”UTF-8″%><%@ taglib uri=”/WEB-INF/struts-html.tld” prefix=”html” %>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html:html locale=”true”>
<head>
<html:base /><title>MyJsp.jsp</title>
</head><body>
This a struts page. <br>
</body>
</html:html>MY web.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<web-app xmlns=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” version=”2.4″ xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>MY STRUTS-CONFIG.XML
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE struts-config PUBLIC “-//Apache Software Foundation//DTD Struts Configuration 1.1//EN” “http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd”><struts-config>
<data-sources />
<form-beans />
<global-exceptions />
<global-forwards />
<action-mappings />
<message-resources parameter=”com.yourcompany.struts.ApplicationResources” />
</struts-config>seems nothing wrong,but,
after i deploy and wrong tomcat,problem happened:
type Exception reportmessage
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: org/apache/commons/logging/LogFactory
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.MyJsp_jsp._jspService(MyJsp_jsp.java:75)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)root cause
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
org.apache.struts.util.MessageResources.<clinit>(MessageResources.java:101)
org.apache.struts.taglib.html.HtmlTag.<clinit>(HtmlTag.java:93)
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:494)
java.lang.Class.newInstance0(Class.java:350)
java.lang.Class.newInstance(Class.java:303)
org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:116)
org.apache.jsp.MyJsp_jsp._jspx_meth_html_html_0(MyJsp_jsp.java:87)
org.apache.jsp.MyJsp_jsp._jspService(MyJsp_jsp.java:66)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
——————————————————————————–
Apache Tomcat/5.0.28
//tomcat ‘s common lib is default,
NOW,HOW CAN I DO? THANKS!
July 24, 2005 at 11:44 am #233537
nwangluMembermy os is: win xp sp2
jdk version is: 5.0July 24, 2005 at 11:47 am #233538
Riyad KallaMemberPart of adding Struts Capabilities to your project is to add all the necessary Struts libraries. This includes commons-logging.jar. It seems you have tampered with the added JARs or just forgotten to include them in your WEB-INF/lib directory.
July 24, 2005 at 12:11 pm #233541
nwangluMember@support-rkalla wrote:
Part of adding Struts Capabilities to your project is to add all the necessary Struts libraries. This includes commons-logging.jar. It seems you have tampered with the added JARs or just forgotten to include them in your WEB-INF/lib directory.
i am sure
commons-beanutils.jar
commons-digester.jar
commons-fileupload.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jarthese jars ‘re in the tomcat/webapp/ deploy-project/WEB-INF/lib directory…..
myeclipse 3.84 dose’nt has this problem….July 24, 2005 at 12:44 pm #233542
Riyad KallaMemberHmm this is very strange. Is this a web project? If you open up your project properties and go to MyEclipse-Web, what settings do you have in that panel?
Also what is the contents of your Java Build Path > Libraries tab?
-
AuthorPosts
