hi fan - i've attached a reply i put together the other day which briefly describes the fields contained within the default.cfg file. further, with jsdk2.1 it is possible to specify multiple "webapp" contexts each of which in turn contain a specified docbase and WEB-INF directory structure which can be accessed via distinct url requests. for example, assumming we have a directory structure that follows as: .../webpages/WEB-INF/servlets/Foo.class # default server docbase .../bar/Web-INF/servlets/Bar.class # newly added webapp and the corresponding default.cfg will have the following additional webapp entries: server.webapp.bar.mapping=/bar server.webapp.bar.docbase=bar then here's what the urls will look like to access each: http://localhost:8080/servlet/Foo -> .../webpages/WEB-INF/servlets/Foo.class http://localhostd:8080/bar/servlet/Bar -> .../bar/WEB-INF/servlets/Bar.class hope this helps, - james Fan Wu wrote: > Thanks Ray, > > But I am now with JSDK. > > In the readme.txt of JSDK2.1, it says: > > "The servlets directory is located at: <install_dir>/webpages/WEB-INF/servlets" > > But its example servlets are located at: <install_dir>/examples/web-inf/servlets > > I have searched all the human-readable file of JSDK but find no mentioning > of this. Or the follwing lines of the default.cfg are the reason? > > server.docbase=webpages > server.webapp.examples.mapping=/examples > server.webapp.examples.docbase=examples > > Can anyone kindly offer an answer? Thanks! > > Fan > > >yes. if you are using jws then they go in server_root/servlets/ (it says > >here) - where server_root is where you installed your server. > > >hth > > >Ray (will hack java for food) http://home.pacbell.net/rtayek/ > >hate Spam? http://www.blighty.com/products/spade/ > > ___________________________________________________________________________ > 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
<cross-posting to [EMAIL PROTECTED]> hi paul - with regards to item 1: the default.cfg file is a means by which to configure service options prior to startup. that other means is command line (eg. startserver -help). the options are: server.port the port the http service will be listening on once started server.hostname the server's host name server.inet the server's ip address server.docbase the directory name which will be used to resolve the default "/" resource server.workdir a scratch work dir # note: multiple tuples of the following can be added server.webapp.foo.mapping=/bar a named resource server.webapp.foo.docbase=bar the directory name which will be used to resolve requests for the afore mentioned mapping resource without changing a thing, you should be able to start the server: % startserver and view the "home page" at: http://localhost:8080/ if you change one or more of the afore mentioned configurations you can adjust the url accordingly to see the results. the remainder of your questions are better served on [EMAIL PROTECTED] so i stop at this point. hope this helps, - james /servlet-interest Paula Lumby wrote: > I;ve asked these before, but no one replied, so I'll try again: > > These questions relate to the JSP 1.0 reference implementation downloadable from > SUN > 1. Is there an explanation of the default .cfg file apart from the crypitc > comments in the file? > 2. Where should I put bean classes so that I do not get Class not found > exceptions when I try to load reference > them in a JSP. > a) What if the bean is used just by the JSP, as are the examples provided in > the reference implementation > b) What if hte bean is preapred in advance by a servlet that then invokes the > JSP > Paula Lumby > IBM VisualAge for Java/C++/RPG Services > tel: 448-2517 (T/L) 778-2517 > Room: 2G42C 2G/KB4/1150/TOR > e-mail: [EMAIL PROTECTED] > > External Address: > IBM Toronto Laboratory > 1150 Eglinton Avenue East > Toronto, Ontario, Canada, M3C 1H7 > > FAX: (416) 448-4414 > > ___________________________________________________________________________ > 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