- This topic has 8 replies, 2 voices, and was last updated 19 years, 6 months ago by Island1956.
-
AuthorPosts
-
Island1956MemberI am using a fresh install of j2sdk1.4.2_08, Tomcat 4.1.31, Eclipse 3.0.2 and MyEclipse 3.8.4 on Windows XP pro.
1. created a j2ee web project
2. added 1.1 struts support
3. used the wizard for new Struts 1.1 Form, Action & JSP
When I deploy, start the application server and exec the urL…
1. on the console log I get ‘Exception initializing TldLocationsCache: XML parsing error on file /WEB-INF/web.xml: (line 2, col 9): Document is invalid: no grammar found.’
2. in the browser I get ‘org.apache.jasper.JasperException: This absolute uri (http://jakarta.apache.org/struts/tags-bean) cannot be resolved in either web.xml or the jar files deployed with this application’What is the fix? 🙁
Riyad KallaMemberPost your web.xml file please.
Island1956MemberThis is the file as created by MyEclipse 3.8.4
If I add the <taglib> node it tells me it is not a valid tag.
Is the default locations correct in the struts.jar’s and tld’s in 3.8.4?<?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>
Riyad KallaMemberYou are trying to run a web application following the Web 2.4 spec on Tomcat 4.1 which only supports up to web 2.3 spec. Either upgrade tomcat or don’t use the web 2.4 spec doctype for your web.xml file.
Island1956MemberAhh and which version of MyEclipse supports creating applications using the 2.3 servlet without modifying the files created by the wizards I intend to rely on?
Riyad KallaMemberAhh and which version of MyEclipse supports creating applications using the 2.3 servlet without modifying the files created by the wizards I intend to rely on?
All of them, just do File > New > Project > Web Project > (Select Web 2.3 Spec) > Finish
Now you can copy the DOCTYPE from that web.xml file into your existing one.
Island1956MemberSo I create a j2ee 1.3 project to get the correct web.xml?
I just want to create a web project based on Java 1.4.2, Struts 1.1 not using Eclipse 2.x. Should I just had created a j2ee 1.3 in the first place. Is there a good matrix of Java, J2ee, Eclipse, Tomcat and MyEclipse interrelationships anywhere?
Riyad KallaMemberI don’t understand your statement. J2EE is a standard, part of that standard are different version of specs that it supports (Web, Servlet, JSP, EJB, etc.). Tomcat is not a full fledges J2EE app server, it supports a subset of the J2EE spec, namely the Web/Servlet and JSP specs (no EJBs). If you are trying to run a Web 2.3 app (J2EE 1.3) you need Tomcat 4.1, your problem started because you were trying to run a Web 2.4 app (J2EE 1.4) on Tomcat 4.1, which only supports up to Web 2.3 spec. This has nothign to do with Eclipse or MyEclipse or any 3rd party developer tools. This is the same as you trying to run Java 5.0 code on a 1.4 runtime, it just won’t work.
The steps I am giving you are a quick way to have MyEclipse generate a web 2.3 compliant web.xml file for you, then I was instructing you to grab the DOCTYPE header from that file and paste it over the schema declaration you had in your existing web 2.4 compliant file, the reason for this is that the structure of the two files only changed a little bit, so doing this trick would get you up and running very quickly so you could run your app on Tomcat 4.1.
Now, given all that information, can you clarify your question for me?
Island1956Member-“I just want to create a web project based on Java 1.4.2, Struts 1.1 not using Eclipse 2.x. Should I just had created a j2ee 1.3 in the first place.” is very clear and “yes” without the …noise… would have been an excellent response.
Thank you – John
“Is there a good matrix of Java, J2ee, Eclipse, Tomcat and MyEclipse interrelationships anywhere?”
I will look elsewhere… -
AuthorPosts