Maybe read the documentation on the sun site about Java and then look at the
docs on the servlet api and how to do some of the stuff.  It seems that you
aren't grasping the basics of the tools of the java language.

Your last question exhibits that exception because there isn't supposed to be a
main method in a servlet.  They are meant to be run with a servletrunner, or
with a webserver supporting servlets, like apache with jserv, JRun, or Jetty.
Good luck.  But please maybe read the main java site and understand the tools
first.

Cheers
James.


Don Hatch wrote:

> Thanks to everyone that helped me with my last problem but now I get this
> error when I run java <servletname> (compiles file):
>
> Exception in thread "main" java.lang.NoSuchMethodError : main
>
> I thought it was my code, but I've tried it with example servlets from both
> the jserv implementation as well as the jsdk2.0.  I am compiling it in the
> directory /home/admin.  Here is my updated profile info:
>
> PATH=/usr/local/jdk1.2/bin:/usr/local/jsdk2.0/bin:/usr/local/jsdk2.0/lib/jsd
> k.jar:/usr/sbin:/usr/bin:/sbin:/bin
> DISPLAY=:0
> JAVA_HOME=/usr/local/jdk1.2
> CLASSPATH=.:/home/admin:/usr/local/jdk1.2/jre/lib/rt.jar:/usr/local/jsdk2.0/
> lib/jsdk.jar
>
> _____________________________________________
> Get Your Free Email at http://www.webpipe.net
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to