Hi Karl Goodmorning ,
When i tried to setup servlets.properties like this
servlet.<sevletname<.code=<servletclass> , here the result
servlets.properties content :
# Define servlets here
# <servletname>.code=<servletclass>
# <servletname>.initparams=<name=value>,<name=value>
snoop.code=SnoopServlet
snoop.initparams=initarg1=foo,initarg2=bar
jsp.code=com.sun.jsp.runtime.JspServlet
servlet.SimpleServlet.code=SimpleServlet <--------------------------- this
is my servlet
#End of servlets.properties
When stopping and then restarting the server here the result :
Shutting down Http Server
Taking down context: default
Context: com.sun.web.core.Context@80ac8cd down
Taking down context: examples
Context: com.sun.web.core.Context@80acbb0 down
Server shutdown
[1]+ Done ./stopserver
[root@bcm600 jsdk2.1]# ./startserver&
[1] 15997
[root@bcm600 jsdk2.1]# Using classpath:
./server.jar:./servlet.jar:.:/usr/java/l
ib/class.zip:/informix/jdbc/lib/ifxjdbc.jar:/informix/jdbc/lib/ifxjdbc-g.jar
:/ho
me/sidaty/servlet/jsdk2.1/servlet.jar:/home/sidaty/servlet/jsdk2.1/server.ja
r
JSDK WebServer Version 2.1
Loaded configuration from file:/home/sidaty/servlet/jsdk2.1/default.cfg
java.lang.IllegalArgumentException: no class for servlet name servlet
at com.sun.web.core.Context.processServletsProps(Context.java:470)
at com.sun.web.core.Context.init(Context.java:235)
at com.sun.web.server.HttpServer.start(HttpServer.java:276)
at com.sun.web.shell.Startup.<init>(Startup.java:94)
at com.sun.web.shell.Startup.main(Startup.java:430)
[1]+ Done ./startserver
[root@bcm600 jsdk2.1]#
As i use JSDK2.1 i think that i can do <servletname>.code=<sevletclass> ?
----- Message d'origine -----
De : Karl Roberts <[EMAIL PROTECTED]>
A : sidaty <[EMAIL PROTECTED]>
Envoy� : lundi 13 septembre 1999 08:40
Objet : Re: How Can I run Servlet on the server side throug browser
> Hi Sidaty,
>
> I don't know if I can help you as I am using jrun with with it's own
web
> server for development. but I'll have a go.
>
> First things first the error Page Not Found means just that ie the web
server
> could not find a valid file (or in your case output from a servlet) at the
URL
> specified. So before you go into the nicknameing (name regestering) of
your
> servlet try calling it with the class name.
> ie if your servlet classfile is called MyServlet.class and your web host
is
> called myHost and the port is 8080 (in jrun the default is 8000 ) try
> http://myHost:8080/servlet/MyServlet
>
> if this doesn't work then it is a classpath error, not with your normal
> environment but with your webserver.
> Check that the full path to your servlet is in the class path outputted in
the
> error resonse ie,
> [root@bcm600 jsdk2.1]# Using classpath:
>
./server.jar:./servlet.jar:.:/usr/java/lib/class.zip:/informix/jdbc/lib/ifxj
dbc.jar:/informix/jdbc/lib/ifxjdbc-g.jar:/home/sidaty/servlet/jsdk2.1/servle
t.jar:/home/sidaty/servlet/jsdk2.1/server.jar
>
> In Jrun there is a default servlet directory underneath the install
directory,
> I added an additional servlet directory with a comma seperated list of
servlet
> dirs (using the full path to make sure) using the jrun admintool.
>
> However if the preceading example did work then it is definately your
> properties file that is wrong.
> At first glance there seams to be a problem in that you use
> # <servletname>.code=<servletclass>
> and not
> # servlet.<servletname>.code=<servletclass> which is the recomendation
>
> and you use
> # <servletname>.initparams=<name=value>,<name=value>
> and not
> # servlet.<servletname>.initparams=<name=value>,<name=value> again note
the
> "sevlet." as a prefix
>
> be aware also that different servlet engins may have a slightly different
way
> of setting the arguments for examle the jrun servlet engine sets them like
:-
> # servlet.<servletname>.args=<name=value>,<name=value>
>
> however with Jrun the recomended way of setting the properties is with the
> admintool GUI using the aliases panel where the alias is <servletname>.
>
> Hope this helps
>
> Karl
>
>
> sidaty wrote:
>
> > Hi KARL
> >
> > I have written a Simple servlet program its compilation is Ok .
> > my servlet server seems to work very nice , it tried successfully the
> > examples servlets that come with .
> > But each time i try to run my own it results in a "not found page "
> > message.
> > I have edited the property file to set up my Servlet property name
here is
> > its content :
> >
> > # $Id: servlets.properties,v 1.2 1999/04/02 02:04:22 duncan Exp $
> >
> > # Define servlets here
> >
> > # <servletname>.code=<servletclass>
> > # <servletname>.initparams=<name=value>,<name=value>
> >
> > snoop.code=SnoopServlet
> > snoop.initparams=initarg1=foo,initarg2=bar
> > jsp.code=com.sun.jsp.runtime.JspServlet
> > SimpleServlet.code=SimpleServlet
> >
> > "servlets.properties" 12 lines, 322 characters
> >
> > Following is the starting of the server :
> > [root@bcm600 jsdk2.1]# ./startserver&
> > [1] 15192
> > [root@bcm600 jsdk2.1]# Using classpath:
> > ./server.jar:./servlet.jar:.:/usr/java/l
> >
ib/class.zip:/informix/jdbc/lib/ifxjdbc.jar:/informix/jdbc/lib/ifxjdbc-g.jar
> > :/ho
> >
me/sidaty/servlet/jsdk2.1/servlet.jar:/home/sidaty/servlet/jsdk2.1/server.ja
> > r
> > JSDK WebServer Version 2.1
> > Loaded configuration from file:/home/sidaty/servlet/jsdk2.1/default.cfg
> > endpoint created: bcm600/172.16.4.60:8081
> >
> > [1]+ Done ./startserver
> > [root@bcm600 jsdk2.1]#
> >
> > Can Anybody tell me what is wrong in my property file , what should be
its
> > location (now it is under
> > <install-dir>webpages/WEB-INF/servlets.properties
> > What should be the exact value in sevlets.properties and default.cfg
files
> > and their path .
> >
> > A lot of thanks in advance
> > [EMAIL PROTECTED]
> >
> >
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html