Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets-Help(servlet.properties)

 
vishal sodani
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a BulletinBoard servlet from "Inside Servlets"(Chapter 7).For this example,I have used servlet.properties file to initialize FilePath.
# bulletinboard
servlet.bulletinboard.code=BulletinBoard
servlet.bulletinboard.initArgs=FilePath=c:\jsdk2.0\examples\
But when I run servlet ,FilePath is initialized to null.Why?Please help.
My servletrunner settings are-
servlet dir=.\examples
servlet propfile=.\examples\servlet.properties
I am using JSDK2.0 on win98.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not used JSDK in a while, but doesn't the property line:
servlet.bulletinboard.initArgs=FilePath=c:\jsdk2.0\examples\
create a property named servlet.bulletinboard.initArgs
NOT a property named FilePath?
Also you might try escaping the backslash characters
c:\jsdk2.0\examples\ would become
c:\\jsdk2.0\\examples\\
Why are you using JSDK instead of Tomcat?
Bill
 
vishal sodani
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bill,
I have downloaded Tomcat.But I don't have a clue how to set the classpath variables.I have Windows 98.I would appreciate if yu could help me out.
I also have problem with classpath of JSWDK also.
 
Nagarajan Seshadri
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
set java_home=< your java directory..>
set tomcat_home=< your tomcat directory..>
create a batch file in ur tomcat bin as..
For Example..
set java_home=c:\jdk1.3.1_02
set tomcat_home=C:\jakarta-tomcat-3.3
set classpath=%classpath%<path 2 ur tools.jar in java lib dir>;
startup

thats it ur done...now run this batch file...
 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
If you are new to tomcat. Have a look at the discussion subject "how to use the servlet in tomcat??" present in this section posted yesterday.
http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=7&t=007415
-arun
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to suceed with Tomcat you MUST remove all traces of older servlet development kits and XML parser libraries from your system. Changes in the servlet API and the XML parsers used to initialize the servlet engine through the web.xml file mean that you will get very confusing error messages about methods not found if you do not. I have wasted days tracking these problems down.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic