8088MMX
asked on
Setting up JSDK 2.1
My question is very simple:
Is there anybody out there that can tell me in which directory of the JSDK I have put my servelets in ?
I am using JSDK2.1 and its web server to test servlets in my Sun Sparc with Solaris. However, I am not able to run the servlets from the web browser because the server does not know where they are...but they are right there.
This is obviously a configuration problem with JSDK. I don't know how to change the files "default.cfg", "mapping.properties", and "servlets.properties" in a way that makes the server work (i.e. find the servlets that I am evoking).
I need help on altering the configuration of those files to make my servlet server work. I've dissected all the information from java.sun.com but their examples are too general.
Are you up to the challenge ?
Is there anybody out there that can tell me in which directory of the JSDK I have put my servelets in ?
I am using JSDK2.1 and its web server to test servlets in my Sun Sparc with Solaris. However, I am not able to run the servlets from the web browser because the server does not know where they are...but they are right there.
This is obviously a configuration problem with JSDK. I don't know how to change the files "default.cfg", "mapping.properties", and "servlets.properties" in a way that makes the server work (i.e. find the servlets that I am evoking).
I need help on altering the configuration of those files to make my servlet server work. I've dissected all the information from java.sun.com but their examples are too general.
Are you up to the challenge ?
Hi,
The servlets have to be put in the following dir
jsdk2.1/httproot/webapp/se rvlets/you rfile.clas s
you can see the output at
http://machinename:8080/servlet/yourfile
IMP dont use local host in place of machine name.
eg
http://mmx:8080/servlet/yourfile
there is no need to change any of the configuration files.
THe servlet engine by default runs of port 8080 .Ensure that there is no other server which is running on that port before u start servlet engine.
The files are for fine tuning
default.cfg you can change the port number to some other value
servlet.properties you can set init parameters for your servlets.
Hope u get the display now
Ganu
The servlets have to be put in the following dir
jsdk2.1/httproot/webapp/se
you can see the output at
http://machinename:8080/servlet/yourfile
IMP dont use local host in place of machine name.
eg
http://mmx:8080/servlet/yourfile
there is no need to change any of the configuration files.
THe servlet engine by default runs of port 8080 .Ensure that there is no other server which is running on that port before u start servlet engine.
The files are for fine tuning
default.cfg you can change the port number to some other value
servlet.properties you can set init parameters for your servlets.
Hope u get the display now
Ganu
Sorry dont get confused
What i meant is dont use
http://localhost:8080/servlet/yourfile
but something like
http://mmx:8080/servlet/yourfile
where mmx is your machine name
What i meant is dont use
http://localhost:8080/servlet/yourfile
but something like
http://mmx:8080/servlet/yourfile
where mmx is your machine name
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for the time you took to answer my question. What Ganu suggested did not work. I put my servlets in the directory path that you mentioned but the server still would not find my files.
Then, I tried Shyam's solution and everything started working fine.
As it turned out, I could create a directory to put my own servlets in, but I had to register it in the default.cfg file. And not all the directory names work. The directory structure has to be of the form <jsdk_root_dir>/mydirector yname/WEB- INF/servle ts
if I changed the WEB-INF name to any other name, the server could not get to the /servlets directory.
Then, I had to include two lines in default.cfg with the following form: server.webapp.mydirectoryn ame.mappin g=/mydirec toryname
server.webapp.mydirectoryn ame.docbas e=mydirect oryname
after doing that I could access my servlets from the browser with http://magik.blabla.edu:8080/mydirectoryname/servlet/MyServletFile
I appreciate the time that both of you took to answer my question. It was a easy question and not worth 300 points, but I needed a working answer fast, so the points go to Shyam.
Then, I tried Shyam's solution and everything started working fine.
As it turned out, I could create a directory to put my own servlets in, but I had to register it in the default.cfg file. And not all the directory names work. The directory structure has to be of the form <jsdk_root_dir>/mydirector
if I changed the WEB-INF name to any other name, the server could not get to the /servlets directory.
Then, I had to include two lines in default.cfg with the following form: server.webapp.mydirectoryn
server.webapp.mydirectoryn
after doing that I could access my servlets from the browser with http://magik.blabla.edu:8080/mydirectoryname/servlet/MyServletFile
I appreciate the time that both of you took to answer my question. It was a easy question and not worth 300 points, but I needed a working answer fast, so the points go to Shyam.
The servlets have to be put in the following dir
jsdk2.1/httproot/webapp/se
you can see the output at
http://<machinename>:8080/servlet
IMP dont use local host in place of machine name.
there is no need to change any of the configuration files.
THe servlet engine by default runs of port 8080 .Ensure that there is no other server which is running on that port before u start servlet engine.
The files are for fine tuning
default.cfg you can change the port number to some other value
servlet.properties you can set init parameters for your servlets.
Hope u get the display now
Ganu