jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: Problem with ServletInit and testSetAttribute in tests_tomcat_40
Date Sat, 20 Apr 2002 17:35:53 GMT
Sam,

> -----Original Message-----
> From: Sam Joseph [mailto:gaijin@yha.att.ne.jp]
> Sent: 20 April 2002 14:16
> To: Vincent Massol; cactus
> Subject: Re: Problem with ServletInit and testSetAttribute in
> tests_tomcat_40
> 
> Vincent Massol wrote:
> 
> >Sam,
> >
> >I think you should better read both :
> >
> >- E:\Dev\jakarta-cactus\documentation\dist\doc\getting_started.html,
> >which explains how Cactus tests are packaged
> >
> >and
> >
> >- E:\Dev\jakarta-cactus\documentation\dist\doc\howto_config.html
which
> >explains how to configure your application web.xml.
> >
> >:-)
> >
> >Then, come back here and ask your question if something was not clear
> >from the documentation.
> >
> Well I've reread the documentation for the 3rd time but still feel no
> wiser.

Oops. :-(. Actually that's quite interesting as you could help us make
it more clear ... :-)

> 
> In the first instance I am confused why I should need to edit the
> web.xml files in a sample that comes prepackaged with cactus. 

Answer is no you don't need to edit anything. Can you tell me where does
it say you need to do this ? If you want to run the samples then simply
read the Samples Howto on the web site
(E:\Dev\jakarta-cactus\documentation\dist\doc\howto_sample.html).

> I mean
> surely the sample is a fixed thing, why do I need to reconfigure the
> web.xml regarding information that is intrinsic to the existing
sample?
> Why can't it just be configured already?
> 

it is.

> I can't see anything in the documents that says I need to change the
> web.xml file in my actual tomcat distribution, so I haven't tried that
> assuming that I need to make some modifications to the three different
> web.xml files in the sample/conf/ sample/conf/test/ and
> sample/conf/test/tomcat40
> 

that's right.

> I have identified that the main web.xml that is being accessed from
> sample/conf/test/ and that the sample/conf/test/tomcat40/ web.xml is
> also required to be "added" I have tried various combinations of
placing
> the web.xml file described in
> D:\jakarta-cactus-23-1.2\doc\howto_config.html in both of these
places,
> in either, combining it with the existing web.xml that was in these
> locations originally, and so forth. I have not improved upon my
original
> error and now have new ones such as the one appended below.
> 
> I would say that at least three things are unclear from your
> documentation.
> 
> 1. Which web.xml file I am supposed to be editing?
> 2. Am I supposed to add the example web.xml to the existing ones or
> replace them?
> 3. Am I supposed to be taking this package and placing it in my tomcat
> webapps, and modifying a web.xml file over there?
> 
> Any help will be greatly appreciated.
> 
> CHEERS> SAM
> 

You're mixing 2 things : 
- the preconfigured sample for which you don't need to touch anything
apart from editing its build.properties file
- the way to configure cactus for your own webapp.

In any case, there is only one web.xml that is important, it is the one
you're using to run your application. The sample application is a full
fledged application and it is why there are 2 web.xml : one that is the
one without the tests, when you want to deliver your application and one
for testing (i.e. the one that includes Cactus mappings).

Feel free to send some documentation patches to improve the Web site
documentation for places when you think it is not clear.
> 
> 
> [excuse the illegible characters, my operating system is japanese]
> 
> start_tomcat_40:
> [java] HttpConnector ???????IP????????????????????
> [java] ???? Tomcat-Standalone ??????
> [java] Apache Tomcat/4.0.3
> [java] StandardHost[localhost]: URL
> jar:file:D:\jakarta-cactus-23-
> 1.2\sample\target\test\tomcat40\webapps\test.war!/
> ?????????? /test ?Web??????????????????
> [java] WebappLoader[/test]: ?????????????????
> D:\jakarta-tomcat-4.0.3\work\localhost\test ??????
> [java] WebappLoader[/test]: JAR /WEB-INF/lib/cactus.jar ?
> D:\jakarta-cactus-23-1.2\sample\target\test\tomcat40\webapps\test\WEB-
> INF\lib\cactus.jar
> ??????
> [java] WebappLoader[/test]: JAR /WEB-INF/lib/httpclient.jar ?
> D:\jakarta-cactus-23-1.2\sample\target\test\tomcat40\webapps\test\WEB-
> INF\lib\httpclient.jar
> ??????
> [java] WebappLoader[/test]: JAR /WEB-INF/lib/junit.jar ?
> D:\jakarta-cactus-23-1.2\sample\target\test\tomcat40\webapps\test\WEB-
> INF\lib\junit.jar
> ??????
> [java] WebappLoader[/test]: JAR /WEB-INF/lib/log4j.jar ?
> D:\jakarta-cactus-23-1.2\sample\target\test\tomcat40\webapps\test\WEB-
> INF\lib\log4j.jar
> ??????
> [java] StandardManager[/test]: ????????? java.security.SecureRandom
> ????????????
> [java] StandardManager[/test]: ???????????????????
> [java] ERROR reading java.io.ByteArrayInputStream@1f2ee1
> [java] At Line 38 /web-app/servlet/
> [java]
> [java] ContextConfig[/test]: ?????????web.xml????????
> [java] java.lang.IllegalArgumentException: addChild: Child name 'jsp'
is
> not unique
> [java] java.lang.IllegalArgumentException: addChild: Child name 'jsp'
is
> not unique
> [java] at
>
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
> [java] at
>
org.apache.catalina.core.StandardContext.addChild(StandardContext.java:1
27
> 6)
> [java] at java.lang.reflect.Method.invoke(Native Method)
> [java] at
org.apache.catalina.util.xml.AddChild.end(XmlMapper.java:811)
> [java] at
> org.apache.catalina.util.xml.XmlMapper.matchEnd(XmlMapper.java:419)
> [java] at
> org.apache.catalina.util.xml.XmlMapper.endElement(XmlMapper.java:119)
> [java] at
>
org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:34
7)
> [java] at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1523)
> [java] at org.apache.crimson.parser.Parser2.content(Parser2.java:1766)
> [java] at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1494)
> [java] at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
> [java] at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
> [java] at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
> [java] at
> org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
> [java] at javax.xml.parsers.SAXParser.parse(SAXParser.java:326)
> [java] at javax.xml.parsers.SAXParser.parse(SAXParser.java:101)
> [java] at
> org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:275)
> [java] at
>
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfi
g.
> java:256)
> 
> 
> 

I don't see anything related to Cactus in this startup error. Maybe you
should post to the Tomcat mailing list because I think you've got
something wrong in your Tomcat web.xml. The easiest way to solve it is
to re-download Tomcat and unzip it (that's all it needs).

-Vincent


--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message