Forums Register Login

Servlets-Help(servlet.properties)

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send

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.
+Pie Number of slices to send: Send
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...
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
if you think brussel sprouts are yummy, you should try any other food. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1290 times.
Similar Threads
Servlet runner/304 error
servlet compiling
Error in Servletrunner
problem with compiling servlets
Servlet compile problems
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:21:27.