Link to home
Start Free TrialLog in
Avatar of lfabbric
lfabbric

asked on

Deploying simple servlet to JRun 4

Hello,

I have a simple servlet that I want to upload to the default server in JRun.

The server has been configured correctly.

I am mostly looking for a step by step process to upload a Servlet and view it through the web.

(I believe I have to configure some xml files to get it configured)
Avatar of girionis
girionis
Flag of Greece image

Avatar of lfabbric
lfabbric

ASKER

Thanks for the web links.

I have gone through a few of them and I am curious about a few things.

Isn't it just possible for me to upload the .class file to a folder and JRun will load it.

Do I have to create a WAR file for all of my .class files.

Does anyone have any steps in there own words on how to get it set up.

Thanks.
> Isn't it just possible for me to upload the .class file to a folder and JRun will load it.

It is if you have it in the right folder (I assume the class file you are talking about is a servlet and it is defined in the web.xml file).

> Do I have to create a WAR file for all of my .class files.

No.

> Does anyone have any steps in there own words on how to get it set up.

Basically all you want to do is to

a) Define the servlet in the web.xml file
b) compile the servlet and put it in the right folder (that is WEB-INF/classes)
c) Restart the server (if it is the first time you are writing the servlet, otherwise you can set reloadable to true to load it automatically every time there is a change).
d) Access the servlet via the url, something like: http://www.myserver.com/servlet/MyServlet
Thanks girionis for responding.

I am trying the last thing you suggested.
Within JRun I do not have a folder called WEB-INF/Classes

Of the jrun root this is the folder structure I currently have:
jrun4
--servers
----admin
----default
------default-ear
---------default-ejb
---------default-war
---------META-INF
------SERVER-INF
---------jms
----lib
----samples


I currently do not see anything where I can upload the servlet.  Is it possible to create the WEB-INF/classes directory or is there a setting in JRun to do that?
Look inside samples, otherwise do a search for a web.xml or WEB-INF. There should be somewhere. I would be surprised if JRun is using a completely different model, contrary to the specification.
The only two instances of web.xml are within .war files already created.

./default-ear/default-war/WEB-INF/web.xml
./SERVER-INF/temp/flashgateway.war/WEB-INF/web.xml
I see. The people who wrote JRun packed their web application into .war files and then deployed these war files. You could do that too or you could use the "expanded directory" that is, copy the class files straight to your hard disk without having to create a .war file first. But you will have to look at JRun's documentation to find out where you should place these class files I am afraid. It's been a long time since I last used JRun (I think it was back in 1999 or 2000) and I do not remember anything.
Thanks very much.

I will play around and see if I can get that to work.
ASKER CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial