aspose file tools*
The moose likes Servlets and the fly likes Servlets-Help(servlet.properties) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets-Help(servlet.properties)" Watch "Servlets-Help(servlet.properties)" New topic
Author

Servlets-Help(servlet.properties)

vishal sodani
Ranch Hand

Joined: Aug 26, 2000
Posts: 127
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

Joined: Mar 22, 2000
Posts: 12835
    
    5
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

Joined: Aug 26, 2000
Posts: 127

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

Joined: Feb 14, 2002
Posts: 2
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

Joined: Nov 28, 2001
Posts: 233
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


Sharing is learning
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets-Help(servlet.properties)