Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

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)
0
lfabbric
Asked:
lfabbric
  • 5
  • 4
1 Solution
 
Mayank SAssociate Director - Product EngineeringCommented:
0
 
lfabbricAuthor Commented:
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.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
girionisCommented:
> 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
0
 
lfabbricAuthor Commented:
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?
0
 
girionisCommented:
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.
0
 
lfabbricAuthor Commented:
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
0
 
girionisCommented:
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.
0
 
lfabbricAuthor Commented:
Thanks very much.

I will play around and see if I can get that to work.
0
 
girionisCommented:
Yes try this and if you still can't make it post here again :)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now