Deploying simple servlet to JRun 4

Posted on 2005-03-03
Medium Priority
Last Modified: 2013-11-24

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)
Question by:lfabbric
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 35

Expert Comment

ID: 13452434
LVL 30

Expert Comment

by:Mayank S
ID: 13456917

Author Comment

ID: 13459641
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.

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 35

Expert Comment

ID: 13459983
> 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.


> 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

Author Comment

ID: 13460127
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:

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?
LVL 35

Expert Comment

ID: 13460216
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.

Author Comment

ID: 13460242
The only two instances of web.xml are within .war files already created.

LVL 35

Expert Comment

ID: 13460431
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.

Author Comment

ID: 13460445
Thanks very much.

I will play around and see if I can get that to work.
LVL 35

Accepted Solution

girionis earned 500 total points
ID: 13460468
Yes try this and if you still can't make it post here again :)

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month10 days, 21 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question