----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------


>I found that one can only have an alias point to a subdirectory.
>
>http://server/servlets/test/TestServlet

That is just wrong. 
What about

        http://server/servlets/test.TestServlet

It's the class of the servlet.


>is impossible,
>only http://server/servlets/TestServlet
>is possible with TestServlet being an alias to test.TestServlet.
>
>:(
>
>> 
>> From going through the mail archives, I remembered to turn on 
>> all the jserv
>> logging.  
>> [06/11/1999 22:52:20:598 CST] Status: 404 Not Found
>> [06/11/1999 22:52:20:598 CST] Servlet-Error: 
>> ClassNotFoundException: subdir
>> 
>> When I do:
>>    myvhost.com/servlets/subdir/MS
>> It thinks that subdir is a servlet, rather than a directory!
>> Perhaps, it is thinking that /MS is the translated path or 
>> something...
>> 
>> 
>> 
>> ----------------------------------------------------------------
>> 
>> We run all of our servlets in servlet zones, one per virtual host.
>> So on one of our virtual hosts we mapped https://vhost/servlets to
>> .../zones/vhost  (We put all of our zones in a zones dir.)
>> Well, I put MyServlet.java in .../zones/vhost/test/ and changed the
>> package
>> to "package test;" and recompiled.  But, it gives me "HTTP 404 - File
>> not
>> found."
>> 
>> Now from the FAQ it says:
>> 
>>  "It looks in the 'test' subdirectory of each directory in 
>> the classpath
>> for
>> files in the 'test' package."
>> 
>> Well, for the heck of it, I added .../zones/vhost to the classpath of
>> jserv.properties.  Well that didn't fix it.  Which even if it did,
>> wouldn't
>> be right, since I don't want one zone to accidently import 
>> classes from
>> another zone.
>> 
>> Any suggestions?
>> 
>> --
>> Chris Busch [EMAIL PROTECTED]
>> MedServe Link Inc.
>> 
>> From the FAQ:
>> I have a directory within my servlets directory and things 
>> break when I
>> try
>> to use http://www.server.com/servlets/test/TestServlet, but when I put
>> TestServlet directly in the servlets directory and remove the "test"
>> from
>> the URL, things work just fine. Is this a bug? No, this is 
>> not a bug but
>> a
>> wanted feature. This problem derives from the way Java structures
>> classes
>> into subdirectories per package name. People suffer similar problems
>> writing
>> non-servlet code. (we have a love-hate relationship with this 
>> approach:
>> it's
>> clean, but it creates deep directory trees.) Java would expect a file
>> called
>> $DIR/test/SimpleServlet to have the fully-qualified classname
>> test.SimpleServlet. It looks in the 'test' subdirectory of each
>> directory in
>> the classpath for files in the 'test' package. 
>> The module currently converts a request for test/SimpleServlet into a
>> request for the class test.SimpleServlet. It finds the class file, but
>> gets
>> confused because the file actually contains a definition of the file
>> 'SimpleServlet'. In short: make sure the package name declared in the
>> class
>> matches the directory structure where the class file is located. 
>> To fix this particular problem: declare the servlet using a proper
>> package
>> name: org.dummy.test.SimpleServlet, compile it into
>> $ROOT/servlets/org/dummy/test/SimpleServlet.class, and make your
>> ServletPath
>> $ROOT/servlets. Add an alias or servlet.simple.code property 
>> to generate
>> a
>> shorter URL if you like. (Thanks to Martin Pool) 
>> 
>> --
>> Chris Busch [EMAIL PROTECTED]
>> 
>> 
>> 
>> --
>> --------------------------------------------------------------
>> Please read the FAQ! <http://java.apache.org/faq/>
>> To subscribe:        [EMAIL PROTECTED]
>> To unsubscribe:      [EMAIL PROTECTED]
>> Archives and Other:  <http://java.apache.org/main/mail.html>
>> Problems?:           [EMAIL PROTECTED]
>> 
>
>
>--
>--------------------------------------------------------------
>Please read the FAQ! <http://java.apache.org/faq/>
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>Archives and Other:  <http://java.apache.org/main/mail.html>
>Problems?:           [EMAIL PROTECTED]
>

Ciao,
        Carsten Heyl

  Carsten Heyl                          [EMAIL PROTECTED]
  NADS - Solutions on Nets              http://www.nads.de/
  NADS GmbH                             http://www.pixelboxx.de/
  Hildebrandtstr. 4E                    Tel.: +49 211 933 02-90
D-40215 Duesseldorf                     Fax.: +49 211 933 02-93


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to