View Full Version : How I deploy simple JSP to OC4J?
Equis Uno
01-12-2004, 05:05 PM
Hi,
How I deploy simple JSP to OC4J?
I started by installing OC4J ( Version J2EE 10g (9.0.4.0.0) ) on the
target machine:
Next, I fired up JDeveloper on the target machine and created a simple
default JSP.
I ran it from JDeveloper with no problem.
Next, I looked for clues in the JDeveloper HELP section on how to
deploy this JSP to my newly installed OC4J.
I found a section: "Deploying Web Applications to Standalone OC4J".
I created a 'Deployment Profile' using the wizard interface; I picked
all defaults.
It created a node called 'webapp1.deploy'.
I created an 'Application Server Connection'.
The connection wizard filled in these key-value-pairs for me:
URL ormi://targetbox/
Target Web Site http-web-site
Local directory /usr/oracle/jdev/j2ee/home
of admin.jar
I successfully tested it.
Next, I right clicked on the webapp1.deploy icon and picked the
'deploy to...' option which pointed to the new
'Application Server Connection' I had just created.
It reacted by starting an 'Embedded OC4J Server' inside of JDeveloper.
At this point I become uncertain.
I got no feed back from JDeveloper and the help documentation did
not give me any clues on what I was supposed to look for.
I looked at the OC4J instance on the target machine and found no
evidence that the JSP had been deployed.
I looked in the project directory and did find newly created EAR and
WAR files.
I wonder how am I supposed to deploy a simple JSP to OC4J?
I'm used to dealing with Tomcat, and although the process is mildly
complex,
it is documented and it is not wizard driven.
-moi
Equis Uno
01-13-2004, 03:01 PM
Hi,
here is the version of JDeveloper I'm using:
9.0.3.1 (build 1107)
-moi
Hans Forbrich
01-13-2004, 04:34 PM
Equis Uno wrote: Hi, How I deploy simple JSP to OC4J?
Have you looked at Oracle Examples and Sample code?
http://otn.oracle.com/obe/start/index.html
or
http://otn.oracle.com >> Samples (icon at top of page)
Equis Uno
01-15-2004, 03:12 PM
Hans Forbrich <hforbric@yahoo.net> wrote in message Have you looked at Oracle Examples and Sample code? http://otn.oracle.com/obe/start/index.html or http://otn.oracle.com >> Samples (icon at top of page)
Yes,
OBE and sample code dig into this a little deeper.
They suggest that JDeveloper is wrapping a call to admin.jar.
Here is some command line syntax they give:
java -jar admin.jar ormi://<host>:<ormi-port> <uid> <pwd> -deploy
-file xyz.ear -deploymentName xyz
Question 1: How do I find out what the ormi-port is?
When I do a netstat -a I see the web server listening on 8888.
Is that the right port?
-moi
Equis Uno
01-15-2004, 08:11 PM
ok,
I figured this out.
First, I found out that the admin.jar shipped with my JDeveoper is
incompatible with the OC4J 9.0.4.
The bad admin.jar gives a NullPointer Exc.
Next, I found out that the ormi port is 23791.
I dug some of this out of the documentation.
The OBE and the OTN samples were not helpful.
The doc url:
http://download-west.oracle.com/docs/cd/B10464_01/web.904/b10321/deploy.htm#1023242
After editing the properties of both the connection and the deployment
description, I got it to work.
Also I found out that not one but two command lines get issued.
Only one is displayed in the log window though.
Here is a command line which I scrapped out of the
JDeveloper log window:
/usr/oracle/X/jdk/jre/bin/java -jar
/usr/oracle/oc4j/j2ee/home/admin.jar ormi://localhost:23791/ admin
oc4j -deploy -file /pt/trading/bibeans/ws01121/deploy/webapp1.ear
-deploymentName webapp1
So, once I got the wrinkles ironed out of JDeveloper, it seemed like a
worthy tool for deploying JSPs on a servlet container. It was
certainly much easier than the deployment methods I need to follow for
Tomcat.
-moi
MyLounge.com Site Map
Forum:
Cars,
Cell Phone,
Database,
Games,
Home Improvement,
IT,
Music,
School,
Sports,
Web Design,
Web Server,
Weight Loss
The MyLounge.com forum is intended for informational use only and should not
be relied upon and is not a substitute for any advice. The information contained
on MyLounge.com are opinions and suggestions of members and is not a representation
of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for
the accuracy, completeness or usefulness of any postings or the qualifications
of any person responding. Please consult a expert or seek the services of an
attorney in your area for more accuracy on your specific situation. Please note
that our forums also serve as mirrors to Usenet newsgroups. Many posts you see
on our forums are made by newsgroup users who may not be members of MyLounge.com
Term of Service
vBulletin v3.0.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.