--
There are not enough details here to know precisely what the problem is, so I
will describe the most common thing users don't understand about classes in
packages -- much more info is in the FAQ-O-MATIC at http://java.apache.org
If you have classes in packages, you need to include the directory structure
that represents the package hierarchy inside your repository. To be more
specific, let's assume you have Apache JServ's examples installed at:
/usr/local/jserv/example
and that this directory is listed in the "repositories" properties for your
zone. Then, your classes should appear in the following files:
/usr/local/jserv/example/com/netNaturals/Hello.class
/usr/local/jserv/example/com/netNaturals/NavigationBar.class
You also need to make sure that these files can be read by the username under
which Apache JServ is running (normally "nobody" unless you've changed the
httpd.conf file for Apache). In addition, this username must have "read" and
"execute" access to all of the directories above these files. (In the servlet
runner case, you are running under your username with your access permissions.)
Craig McClanahan
Garry Thuna wrote:
> --
>
> I have a servlet named com.netNaturals.NavigationBar which will work from
> servlet runner but does not seem to work from my jserv enabled apache, while
> other classes in same package do. The error I receive is
> "The requested URL /nnservlet/com.netNaturals.NavigationBar was not
> found on this server."
> I believe it has something to do with the use of full package names for
> servelts (?).
>
> Some background which will explain things
>
> 1. Took the Hello.java from the jserv distribution put it in same directory
> with NavigationBar.java (same zone, same everything as far as I can tell.)
>
> 2. Modified the text from Hello.java just to be sure that this was the
> version served up and not some stray copy I left around, and added a
> 'package com.netNaturals;' to the top (same package as NavigationBar).
>
> 3. Connected to www.myserver.com/nnservlets/com.netNaturals.Hello and get my
> modified message. (okay so far). Connect to
> www.myserver.com:8080/servlet/com.netNaturals.Hello and get my modified
> message (okay from servletrunner as well)
>
> 4. Connected to www.myserver.com/nnservlets/com.netNaturals.NavigationBar
> and get the error mentioned above. Connected to
> www.myserver.com:8080/servlet/com.netNaturals.NavigationBar and it works
> from servletrunner!
>
> I should point out that the zone files do not have any init args and I
> removed the NavigationBar.initArgs file I was using just to be sure it
> wasn't the problem.
>
> Now the really weird stuff.
>
> 5. Comment out the bulk of my code in NavigationBar.java so that it does
> almost nothing and it works.
>
> I am going nuts trying to figure out what's going on. Any help would be
> greatly appreciated.
>
> I don't really know what will be of use to people that can help, so I won't
> attach everything right now but I will gratefully provide anything you need
> on request -- zone files, conf files, my source code, etc.
>
> My apache setup is running on RedHat 5.2 built from
> Apache_JServ_1.0.tar.gz
> apache_1.3.6.tar.gz
> mm-1.0.4.tar.gz
> openssl-0.9.3.tar.gz
>
> T
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> READ THE FAQ!!!! <http://java.apache.org/faq/>
> Archives and Other: <http://java.apache.org/main/mail.html/>
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
READ THE FAQ!!!! <http://java.apache.org/faq/>
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]