Thanks Charlie I tried both it did not work. My
web.xml looks like this:
<servlet>
      <servlet-name>HelloWorld</servlet-name>
     <servlet-class>HelloWorldExample</servlet-class>
 </servlet>
<servlet-mapping>
      <servlet-name>HelloWorld</servlet-name>
      <url-pattern>/hello</url-pattern>
    </servlet-mapping>

So I have mapped by class to a servlet and then mapped

to urlpattern /hello. My understanding is (correct me)
if I have html in the webapp/myapp/ directory I should
be able to call with /hello or HelloWorld with a tag
like- /hello or /HelloWorld. On the other hand if I
try- http://localhost:8080/search/hello I get this
error( search is myapp dir under webapps):
java.util.MissingResourceException: Can't find bundle
for base name LocalStrings, locale en_US
        at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:707)
        at
java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:604)
        at
java.util.ResourceBundle.getBundle(ResourceBundle.java:559)
        at HelloWorldExample.doGet(Unknown Source)


If I try http://localhost:8080/search/HelloWorld I get
Resource not found error.
Thanks a lot.
Sanjay


--- "Cox, Charlie" <[EMAIL PROTECTED]> wrote:
> 
> 
> > -----Original Message-----
> > From: Sanjay Bahal [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 20, 2002 1:28 PM
> > To: Tomcat Users List
> > Subject: RE: [Tomact Servlet Deploy Problem Help]
> > 
> > 
> > I took care of this last error- some malform in
> the
> > web.xml. 
> > Now I am back to square 1- my server starts but
> when I
> > execute it gives error:
> > 1. http://localhost:8080/servlet/HelloWorld
> > The requested resource (/servlet/HelloWorld) is
> not
> > available.
> 
> try:
> http://localhost:8080/servlet/HelloWorldClass
> 
> you need the actual class name here
> 
> > 2. /hello 
> > The requested resource (/hello) is not available.
> try:
> http://localhost:8080/hello/world
> 
> This mapping means that anything in the 'hello'
> directory should go to the
> servlet.
> 
> > Thanks a lot,
> > Sanjay
> > --- Sanjay Bahal <[EMAIL PROTECTED]> wrote:
> > > Thanks Lance.
> > > I made it all caps- That took me a step further.
> 
> > > ----
> > > Note to Windows(NT) users- windows shows the
> name in
> > > mixed case in explorer- even though you may type
> it
> > > in
> > > caps if you look at properties and DOS-NAME it
> will
> > > show the actual name- uppercase in this case. 
> > > -------
> > > I got an error. This error was a
> <servlet-mapping>
> > > tag
> > > was not closed. I had used the sample web.xml
> for my
> > > web.xml and it had a comment with a
> > > <servlet-mapping>
> > > tag. I got rid of that. 
> > > That brought me to my next error. The part of
> error
> > > that I could garb on the DOS screen is as below.
> How
> > > do I log the errors in a log file?
> > >         at
> > >
> >
>
org.apache.catalina.startup.ContextConfig.applicationConfig(Unknown
> > > S
> > > ource)
> > >         at
> > >
> >
>
org.apache.catalina.startup.ContextConfig.start(Unknown
> > > Source)
> > >         at
> > >
> >
>
org.apache.catalina.startup.ContextConfig.lifecycleEvent(Unknown
> > > Sour
> > > ce)
> > >         at
> > >
> >
>
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Unknown
> > > Source)
> > >         at
> > >
> >
>
org.apache.catalina.core.StandardContext.start(Unknown
> > > Source)
> > >         at
> > >
> >
>
org.apache.catalina.core.ContainerBase.addChildInternal(Unknown
> > > Sourc
> > > e)
> > >         at
> > >
> >
>
org.apache.catalina.core.ContainerBase.addChild(Unknown
> > > Source)
> > >         at
> > >
> >
>
org.apache.catalina.core.StandardHost.addChild(Unknown
> > > Source)
> > >         at
> > >
> >
>
org.apache.catalina.core.StandardHostDeployer.install(Unknown
> > > Source)
> > > 
> > >         at
> > >
> >
>
org.apache.catalina.core.StandardHost.install(Unknown
> > > Source)
> > >         at
> > >
> >
>
org.apache.catalina.startup.HostConfig.deployDirectories(Unknown
> > > Sour
> > > ce)
> > >         at
> > >
> >
>
org.apache.catalina.startup.HostConfig.deployApps(Unknown
> > > Source)
> > >         at
> > >
> org.apache.catalina.startup.HostConfig.run(Unknown
> > > Source)
> > >         at java.lang.Thread.run(Thread.java:484)
> > > [ERROR] Digester - -Parse Fatal Error at line
> 145
> > > column 3: The content of eleme
> > > nts must consist of well-formed character data
> or
> > > markup. <org.xml.sax.SAXParseE
> > > xception: The content of elements must consist
> of
> > > well-formed character data or
> > > markup.>
> > > 
> > > Thanks a lot,
> > > Sanjay
> > > 
> > > --- Lance Smith
> <[EMAIL PROTECTED]>
> > > wrote:
> > > > Yes it must be ALL capital letters.
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Sanjay Bahal [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, March 20, 2002 11:14 AM
> > > > To: Tomcat Users List
> > > > Subject: Re: [Tomact Servlet Deploy Problem
> Help]
> > > > 
> > > > 
> > > > Kaikuo Luo,
> > > > Thanks. Check my mail- I am doing all that. Is
> the
> > > > name WEN-INF case sensitive?
> > > > Sanjay
> > > > --- Law Kaikuo <[EMAIL PROTECTED]> wrote:
> > > > > Hi Sanjay Bahal,
> > > > > 
> > > > >   Maybe you should create a subdirectory
> under
> > > > > WEN-INF called classes and put
> > > > > you java class there. You need to specify
> the
> > > > fully
> > > > > qualified pathe for your
> > > > > servlet class in the web.xml file and set
> the
> > > > > mapping. Use the map name in any
> > > > > request.
> > > > > 
> > > > >   Kaikuo Luo
> > > > > 
> > > > > Sanjay Bahal <[EMAIL PROTECTED]> wrote:
> > > > > I installed Tomcat4.01/NT the examples run-
> > > > > webapps/servlets.
> > > > > I am trying to deploy my example it does not
> > > run.
> > > > > I have directory structure
> > > > > /webapps/search/Web-inf/classes.
> > > > > Under /search I have my html file hello.htm-
> > > > > <td VALIGN=TOP WIDTH="30%"><a
> href="/hello"><img
> > > > > SRC="/images/execute.gif" HSPACE=4 BORDER=0 
> > > > > align=TOP></a><a
> > > > >
> > >
> href="/servlet/HelloWorldExample">Execute</a></td>
> > > > > 
> > > > > I have my class in /classes. Under Web-inf I
> > > have
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to