Brad wrote:
>
> I've just set up Apache 1.3.6 and JServ 1.0b3 on a RedHat 5.2 system. I'm having
>problems getting JServ to run my test servlet. The following is what I get in the
>jserv.log. I'm assuming the IllegalAccessException is due to permissions. I've
>played with the permissions on directories and files for the repositories to the
>point of setting everything to 777 and making them owned by root. What could I have
>missed. Or is it something else?
>
> [08/04/1999 00:00:11:301 EDT] Initializing servlet request
> [08/04/1999 00:00:11:303 EDT] Reading request data
> [08/04/1999 00:00:11:402 EDT] Parsing cookies
> [08/04/1999 00:00:11:582 EDT] Sending response headers.
> [08/04/1999 00:00:11:663 EDT] java.lang.IllegalAccessException: HelloWorld
> at org.apache.jserv.JServServletManager.load_init(JServServletManager.ja
> va:421)
> at org.apache.jserv.JServServletManager.loadServlet(JServServletManager.
> java:383)
> at org.apache.jserv.JServConnection.run(JServConnection.java:301)
> at java.lang.Thread.run(Thread.java)
Brad,
The JDK 1.1.8 API says for IllegalAccessException:
--
Thrown when an application tries to load in a class through its string
name using:
The forName method in class Class.
The findSystemClass method in class ClassLoader.
The loadClass method in class ClassLoader.
but the currently executing method does not have access to the
definition of the specified class, because the class is not public and
in another package.
--
(http://java.sun.com/products/jdk/1.1/docs/api/java.lang.IllegalAccessException.html#_top_)
This suggests that the problem is in your HelloWorld Servlet. Does it
look something like the following?
import java.io.*;
import javax.servlet.http.*;
import javax.servlet.ServletConfig;
public class HelloWorld extends HttpServlet {
ServletConfig config;
public void init(ServletConfig config) {
this.config=config;
}
protected void doGet(HttpServletRequest req, HttpServletResponse
resp) throws IOException {
PrintWriter writer = resp.getWriter();
writer.print("Hello World!\n");
writer.flush();
}
}
Damian
--
Damian Fauth John Fairfax Holdings Ltd
Software Engineer 201 Sussex Street
Ph: +61 2 9282 3528 Sydney NSW 2000
Fax: +61 2 9282 2256 [EMAIL PROTECTED]
----------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]