TagExtraInfo noclassfound problem(please help)

Some people have encountered this problem before but nobody seemed to have an answer for it, I digged a little bit deeper (as I am stuck and can't really move on to the next thing until I solve this) and I found a bit more.

I have got a jsp file, an actionform file, an actionclass file and struts-config.xml

I will post the files below as I don't think some of you would need them to solve this problem but you can always refer to it if needed.

What happens is that, when I try to execute the jsp file, it's constantly complaining the TaxExtraInfo is missing. Here is the message .

exception

javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagExtraInfo

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagExtraInfo

java.lang.ClassLoader.defineClass1(Native Method)

java.lang.ClassLoader.defineClass(ClassLoader.java:620)

java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

java.net.URLClassLoader.access$000(URLClassLoader.java:56)

java.net.URLClassLoader$1.run(URLClassLoader.java:195)

java.security.AccessController.doPrivileged(Native Method)

java.net.URLClassLoader.findClass(URLClassLoader.java:188)

java.lang.ClassLoader.loadClass(ClassLoader.java:306)

java.lang.ClassLoader.loadClass(ClassLoader.java:299)

sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)

java.lang.ClassLoader.loadClass(ClassLoader.java:251)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)

org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:416)

org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:250)

org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:163)

org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:420)

org.apache.jasper.compiler.Parser.parseDirective(Parser.java:476)

org.apache.jasper.compiler.Parser.parseElements(Parser.java:1426)

org.apache.jasper.compiler.Parser.parse(Parser.java:133)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:215)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)

org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)

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)

So, it took me awhile to go deep into the jar file to see what's going on, what I found is that the servlet-api.jar doesn't actually have such class exist (the jsp directory is empty), it's actually in the jsp-api.jar ( I am using Tomcat 6.0 btw). And then I had a look at my SDK j2ee.jar (which sort of redirect it to javaee.jar), inside javaee.jar, the TaxExtraInfo is actually defined as part of the servlet. (instead of havint the servlet package being splited into servlet-api and jsp-api).

What I did, I copied the j2ee.jar (along with javaee.jar and j2ee-svc.jar) into the ...tomcat6.0\lib directory, it got passed the noclassfound error and it ran into the web-app_2_3.dtd not found error (which is located in my C:\Sun\SDK\lib\dtds) and this is where I am at. I just don't know where to now, (btw, My SDK is 1.60)

This is what my classpath looks like .;C:\Sun\SDK\lib\j2ee.jar;C:\Sun\SDK\jdk\jre\lib\ext\mysql-connector-java-5.0.5-bin.jar;C:\Sun\SDK\jdk\jre\lib\ext\itext-2.0.1.jar;C:\Sun\SDK\jdk\jre\lib\ext\iTextAsian.jar;C:\Sun\SDK\jdk\jre\lib\ext\poi-2.5.1-final-20040804.jar;C:\Sun\SDK\jdk\jre\lib\ext\bcprov-jdk16-136.jar

I also tried to put the web-app_2_3.dtd into various locations but it still didn't work.

I will put all the related programs in next message. I would appreciate if anyone of you could take a look at this problem as I have already put quite a bit of effort in this, I just need some experienced people to point at the right place. Thx.....

[4829 byte] By [SheepSheepa] at [2007-11-27 0:28:08]
# 1

In10.jsp (the first jsp to be executed)

<%@ page contentType="text/html;charset=big5" pageEncoding="big5" %>

<%@ taglib uri="html" prefix="html" %>

<html:html locale="true">

<head>

<title>In10.jsp</title>

</head>

<body>

<html:form

action="/sample"

method="POST">

<html:text

property="value"

size="10" />

<html:submit

property="submit"

value="submit" />

</html:form>

</body>

</html>

the struts-config.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC

"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"

"http://struts.apache.org/dtds/struts-config_1_3.dtd">

<struts-config>

<!-- ================================================ Form Bean Definitions -->

<form-beans>

<form-bean

name="Form10"

type="mypackage.MyActionForm10">

</form-bean>

</form-beans>

<!-- =========================================== Action Mapping Definitions -->

<action-mappings>

<action

path="/sample"

type="mypackage.MyAction10"

name="Form10"

scope="request"

validate="false">

<forward name="success" path="/Out10.jsp" />

</action>

</action-mappings>

</struts-config>

the web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<!--

Licensed to the Apache Software Foundation (ASF) under one or more

contributor license agreements. See the NOTICE file distributed with

this work for additional information regarding copyright ownership.

The ASF licenses this file to You under the Apache License, Version 2.0

(the "License"); you may not use this file except in compliance with

the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and

limitations under the License.

-->

<!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>

<taglib>

<taglib-uri>html</taglib-uri>

<taglib-location>/WEB-INF/classes/tags/struts-html.tld</taglib-location>

</taglib>

<taglib>

<taglib-uri>bean</taglib-uri>

<taglib-location>/WEB-INF/classes/tags/struts-bean.tld</taglib-location>

</taglib>

</web-app>

MyAction10.java

package mypackage;

import org.apache.struts.action.Action;

import org.apache.struts.action.ActionForm;

import org.apache.struts.action.ActionMapping;

import org.apache.struts.action.ActionForward;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

public class MyAction10 extends Action {

public ActionForward execute(

ActionMapping mapping,

ActionForm form,

HttpServletRequest req,

HttpServletResponse res)

throws Exception {

MyActionForm10 myForm = (MyActionForm10) form;

System.out.println("Enter Info");

System.out.println(myForm.getValue());

return mapping.findForward("success");

}

}

MyActionForm10.java

package mypackage;

import org.apache.struts.action.ActionForm;

public class MyActionForm10 extends org.apache.struts.action.ActionForm {

private String value;

public void setValue( String value ) {

this.value = value;

}

public String getValue( ) {

return value;

}

}

SheepSheepa at 2007-7-11 22:28:48 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...