I checked the log file for /mine:
2002-06-15 21:36:23 StandardContext[/mine]: Error initializing naming
context for context /mine
2002-06-15 21:36:50 WebappLoader[/mine]: Deploying class repositories to
work directory /usr/local/jakarta-tomcat-4.0.3/work/localhost/mine
2002-06-15 21:36:50 WebappLoader[/mine]: Deploy JAR /WEB-
INF/lib/datetime.jar to /usr/local/jakarta-
tomcat-4.0.3/webapps/mine/WEB-INF/lib/datetime.jar
2002-06-15 21:36:50 WebappLoader[/mine]: Reloading checks are enabled
for this Context
2002-06-15 21:36:50 StandardManager[/mine]: Seeding random number
generator class java.security.SecureRandom
2002-06-15 21:36:50 StandardManager[/mine]: Seeding of random number
generator has been completed
2002-06-15 21:36:53 ContextConfig[/mine] Parse error in application
web.xml
org.xml.sax.SAXParseException: The content of element type "servlet" is
incomplete, it must match "(icon?,servlet-name,display-
name?,description?,(servlet-class|jsp-file),init-p$
at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213)
at
org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(
XMLValidator.java:1851)
---
/mine in server.xml:
<Context path="/mine" docBase="mine" debug="0" reloadable="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_mine_log." suffix=".txt" timestamp="true"/>
</Context>
Clearly there's something wrong..however I don't know what it means..
Michael
On Saturday, June 15, 2002, at 06:28 PM, Jacob Kjome wrote:
> The <servlet-name> parameter inside <servlet-mapping> must match up
> *exactly* with the <servlet-name> inside the <servlet> element.
>
> So, try the follwing exactly as written:
>
> <servlet>
> <servlet-name>HelloServlet</servlet-name>
> <servlet-class>Hi</servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>HelloServlet</servlet-name>
> <url-pattern>/Hi</url-pattern>
> </servlet-mapping>
>
> Jake
>
> At 01:39 PM 6/15/2002 -0400, you wrote:
>> hi, I tried your suggestions and it still can't fine /mine ...
>>
>> I removed the space in the servlet name, and made sure the servlet
>> mapping is called Hi, web.xml:
>>
>> You may define any number of servlet mappings, including zero.
>> It is also legal to define more than one mapping for the same
>> servlet, if you wish to.
>> -->
>>
>> <servlet-mapping>
>> <servlet-name>Hi</servlet-name>
>> <url-pattern>/Hi</url-pattern>
>> </servlet-mapping>
>>
>>
>> -----
>>
>> The servlet name tag:
>> <servlet>
>> <servlet-name>Initial_Servlet</servlet-name>
>> <description>
>> A Servlet to test Tomcat
>> </description>
>> <servlet-class>Hi</servlet-class>
>> </servlet>
>>
>> give it a try:
>>
>> www.taoki.org:8080/mine/Hi
>>
>> --
>>
>>
>> Also, here's the context for /mine in server.xml:
>>
>> <Context path="/mine" docBase="mine" debug="0"
>> reloadable="true">
>> <Logger
>> className="org.apache.catalina.logger.FileLogger"
>> prefix="localhost_mine_log."
>> suffix=".txt"
>> timestamp="true"/>
>> </Context>
>>
>> <!-- Tomcat Examples Context -->
>>
>> --
>>
>> Sorry about this...I really want to develop webapps in Java!! Hmm
>> maybe I should buy WebObjects ... hehe
>> Michael
>> On Friday, June 14, 2002, at 11:54 PM, Jacob Kjome wrote:
>>
>>> You need to either provide a servlet mapping for your "Hi" servlet or
>>> access it like this:
>>>
>>> http://localhost:8080/mine/servlet/Hi
>>>
>>> Tomcat provides a default servlet mapping of /servlet/* in its
>>> web.xml in TOMCAT_HOME/conf
>>>
>>> Also, you probably want to keep your servlet-name values non-spaced.
>>> For instance, here is what you wrote:
>>>
>>> <servlet>
>>> <servlet-name>Initial Servlet</servlet-name>
>>> <description>
>>> A Servlet to test Tomcat
>>> </description>
>>> <servlet-class>Hi</servlet-class>
>>> </servlet>
>>>
>>> You probably want to do soemthing like:
>>>
>>> <servlet>
>>> <servlet-name>Initial_Servlet</servlet-name>
>>> <description>
>>> A Servlet to test Tomcat
>>> </description>
>>> <servlet-class>Hi</servlet-class>
>>> </servlet>
>>>
>>> Actually, you can also access your servlet by its servlet name like
>>> this:
>>>
>>> http://localhost:8080/mine/servlet/Initial_Servlet
>>>
>>> This efficacy of this is more apparent when your servlet is part of a
>>> package such as:
>>>
>>> org.mycompany.myproject.core.tests.servlet.Hi
>>>
>>> So, you would have:
>>>
>>> <servlet>
>>> <servlet-name>Initial_Servlet</servlet-name>
>>> <description>
>>> A Servlet to test Tomcat
>>> </description>
>>> <servlet-
>>> class>org.mycompany.myproject.core.tests.servlet.Hi</servlet-class>
>>> </servlet>
>>>
>>> Which can be accesed via:
>>>
>>> http://localhost:8080/mine/servlet/org.mycompany.myproject.core.tests.servlet.
>>> Hi
>>>
>>> or the more sane URL...
>>>
>>> http://localhost:8080/mine/servlet/Initial_Servlet
>>>
>>> If you add a mapping, it gets even easier:
>>>
>>> <servlet-mapping>
>>> <servlet-name>Initial_Servlet</servlet-name>
>>> <url-pattern>/hi</url-pattern>
>>> </servlet-mapping>
>>>
>>> Now you can access it as:
>>>
>>> http://localhost:8080/mine/hi
>>>
>>> or even...
>>>
>>> <servlet-mapping>
>>> <servlet-name>Initial_Servlet</servlet-name>
>>> <url-pattern>/hello.html</url-pattern>
>>> </servlet-mapping>
>>>
>>> http://localhost:8080/mine/hello.html
>>>
>>>
>>> You should grab a good servlet book and read it. You should have
>>> this stuff down within the first few chapters.
>>>
>>> later,
>>>
>>> Jake
>>>
>>> At 09:41 PM 6/14/2002 -0400, you wrote:
>>>> Hi I added a new context to my /usr/local/jakarta-
>>>> tomcat-4.0.3/conf/server.xml called mine:
>>>>
>>>> <!-- Tomcat Root Context -->
>>>> <!--
>>>> <Context path="" docBase="ROOT" debug="0"/>
>>>> -->
>>>>
>>>> <!-- Tomcat Manager Context -->
>>>> <Context path="/manager" docBase="manager"
>>>> debug="0" privileged="true"/>
>>>>
>>>> <!-- you probably want to set "reloadable"
>>>> to "true" during development, but you should
>>>> set it to be "false" in production. -->
>>>>
>>>> <Context path="/mine" docBase="mine" debug="0"
>>>> reloadable="true">
>>>> <Logger
>>>> className="org.apache.catalina.logger.FileLogger"
>>>> prefix="localhost_mine_log."
>>>> suffix=".txt"
>>>> timestamp="true"/>
>>>> </Context>
>>>>
>>>> <!-- Tomcat Examples Context -->
>>>> <Context path="/examples" docBase="examples" debug="0"
>>>> reloadable="true" crossContext="true">
>>>> <Logger className="org.apache.catalina.logger.FileLogger"
>>>> prefix="localhost_examples_log." suffix=".txt"
>>>> timestamp="true"/>
>>>> <Ejb name="ejb/EmplRecord" type="Entity"
>>>> home="com.wombat.empl.EmployeeRecordHome"
>>>> remote="com.wombat.empl.EmployeeRecord"/>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> -----------
>>>>
>>>> /usr/local/jakarta-tomcat-4.0.3/webapps/mine/WEB-INF/web.xml :
>>>>
>>>>
>>>> You can define any number of servlets, including zero.
>>>> -->
>>>>
>>>> <servlet>
>>>> <servlet-name>Initial Servlet</servlet-name>
>>>> <description>
>>>> A Servlet to test Tomcat
>>>> </description>
>>>> <servlet-class>Hi</servlet-class>
>>>> </servlet>
>>>>
>>>> --------------
>>>>
>>>> /usr/local/jakarta-tomcat-4.0.3/webapps/mine/WEB-INF/classes/:
>>>>
>>>> Hi.class
>>>> Hi.java
>>>>
>>>> ------------
>>>>
>>>> When I do a: http://localhost:8080/mine/Hi
>>>>
>>>> in a web browser.. I get a Tomcat resource not found:
>>>>
>>>>
>>>>
>>>> Apache Tomcat/4.0.3 - HTTP Status 404 - /mine/Hi
>>>> ------------------------------------------------------------------------
>>>>
>>>> type Status report
>>>>
>>>> message /mine/Hi
>>>>
>>>> description The requested resource (/mine/Hi) is not available.
>>>>
>>>> ...
>>>>
>>>>
>>>> I know Tomcat is running however since
>>>> http://localhost:8080/examples/servlet/RequestInfoExample
>>>>
>>>> will run that servlet.
>>>>
>>>> My server is probably running right now:
>>>>
>>>> http://www.taoki.org:8080/examples/servlet/RequestInfoExample
>>>>
>>>>
>>>> any help would be appreciated!
>>>> Michael
>>>>
>>>>
>>>>
>>>> --
>>>> To unsubscribe, e-mail: <mailto:tomcat-user->>
>>>> [EMAIL PROTECTED]>
>>>> For additional commands, e-mail: <mailto:tomcat-user->>
>>>> [EMAIL PROTECTED]>
>>
>>
>> --
>> To unsubscribe, e-mail: <mailto:tomcat-user-
>> [EMAIL PROTECTED]>
>> For additional commands, e-mail: <mailto:tomcat-user-
>> [EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>