Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!

Sarath Madap

Greenhorn
+ Follow
since Feb 07, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sarath Madap

Since you have registered the Servlet with weblogic.httpd.register.UserRegistration_Servlet, the servlet should be invoked with the name UserRegistration_Servlet.
Do not include the packaging structure.
Also make sure E:/weblogic/myserver/servletclasses is added to the classpath.
Hope this helps
-Sarath
19 years ago
As long as the host on which you are trying to make a connection from to the database has access to the database sitting behind the firewall, you do not have to do anything specific to get database connection.
For example: If you are using Oracles thin driver, this is how you make connection to the Database.
DriverManager.getConnection("jdbc:oracle:thin:@ipaddressofthedatabaseserver:portnumber:databasename", "username", "password" ) ;
Hope this helps.
-Sarath
The Java Database Connect API (JDBC) is supported by all major database vendors as well as many small databases. It all depends on what database platform you are trying to connect to.
For example: If you are trying to access Oracle database, Oracle provides you a thin driver(oracle.jdbc.driver.OracleDriver) in the form of a ZIP file. You have to download it and add that to your classpath and you can load the driver from that.
Hope that helps.
-Sarath
Nita there is another way of doing it by creating per server properties and starting each server on different ports. Here you go.
This is the simplest procedure for a Solaris computer:
-----------------------------
1: Install WebLogic.
Let's say the WL installation folder is:
/wls/weblogic/
we'll call that:
WL_HOME/WLS_HOME/
It contains the default server instance folder
/wls/weblogic/myserver/
we'll call that:
WL_HOME/WLS_HOME/myserver/
-----------------------------
2: Make some copies (as many as you need)
of the default server instance folder
with different names, you'll have:
WL_HOME/WLS_HOME/myserver/
WL_HOME/WLS_HOME/server_1/
WL_HOME/WLS_HOME/server_2/
...
WL_HOME/WLS_HOME/server_n/
-----------------------------
3: Locate the general properties file
/wls/weblogic/weblogic.properties
(we'll call it: WL_HOME/WLS_HOME/weblogic.properties)
and make a copy of it into EACH of the individual
server instance folders; you'll end up with:
WL_HOME/WLS_HOME/weblogic.properties
WL_HOME/WLS_HOME/myserver/weblogic.properties
WL_HOME/WLS_HOME/server_1/weblogic.properties
WL_HOME/WLS_HOME/server_2/weblogic.properties
...
WL_HOME/WLS_HOME/server_n/weblogic.properties
-----------------------------
4: In EACH server instance's properties file
WL_HOME/WLS_HOME/server_i/weblogic.properties
set per-server values to all the properties
specific to the individual server; at least:
weblogic.system.listenPort=PORT_i
weblogic.password.system=PWD_i
weblogic.system.SSLListenPort=SSLPORT_i
plus everything else it should need individually,
that is, all the things that make that single
server instance different from all the others
(connection pools, ACLs, EJB auto deployments and so on)
Do NOT modify the file
WL_HOME/WLS_HOME/myserver/weblogic.properties
(it's a backup copy of the default settings)
-----------------------------
5: In the GLOBAL properties file
WL_HOME/WLS_HOME/weblogic.properties
cancel or comment out all the properties
that have been individually set for all
the individual server instances; at least:
weblogic.system.listenPort
weblogic.password.system
weblogic.system.SSLListenPort
-----------------------------
6: Locate the default server's startup script
/wls/weblogic/startWebLogic.sh
(we'll call it: WL_HOME/WLS_HOME/startWebLogic.sh)
and make a copy of it (in the same folder)
for EACH of the new individual server instances;
you'll end up with:
WL_HOME/WLS_HOME/startWebLogic.sh
WL_HOME/WLS_HOME/startServer_1.sh
WL_HOME/WLS_HOME/startServer_2.sh
...
WL_HOME/WLS_HOME/startServer_n.sh
-----------------------------
7: In EACH server instance's startup script
WL_HOME/WLS_HOME/startServer_i.sh
set values to the properties:
weblogic.home=WL_HOME/WLS_HOME
(where WL libraries and global files are)
weblogic.system.home=WL_HOME/WLS_HOME
(where the GLOBAL weblogic.properties is)
weblogic.system.name=server_i
(where the PER-SERVER weblogic.properties is)
weblogic.system.listenPort=PORT_i
weblogic.system.SSLListenPort=SSLPORT_i
with the -D option, as in:
$JAVA $JAVA_OPTIONS -ms64m -mx64m -classpath
$JAVACLASSPATH -Dweblogic.class.path=$WEBLOGICCLASSPATH -Dweblogic.home=$WL_
HOME/$WLS_HOME -Dweblogic.system.home=$WL_HOME/$WLS_HOME -Dweblogic.system.n
ame=server_i -Djava.security.manager -Djava.security.policy=`pwd`/weblogic.
policy -Dweblogic.system.listenPort=PORT_i -Dweblogic.system.SSLListenPort=
SSLPORT_i weblogic.Server
-----------------------------
8: If you need individual per-server security policies,
also duplicate and customize the default policy file
WL_HOME/WLS_HOME/weblogic.policy
(just like you did with weblogic.properties in steps 3 to 5)
and specify the corresponding property in each startup script
with the -D option
-Djava.security.policy=`pwd`/server_i/weblogic.policy
-----------------------------
9: Obviously, when you deploy and use your EJBs or JSPs or applications,
you must make sure that you specify the right individual server's parameters
(name, user, password, port, paths and everything else).

And that's all; obviously, there are better ways to achieve this configuration, but this is the simplest one and is good enough for a basic development environment; you might need to tune some more properties to suit your specific requirements.
On a WinNT computer, the procedure should be more or less the same, the main difference being: instead of .sh script files, you'll have to edit .cmd script files.

-Sarath
19 years ago
Please go to the following link. This will be helpful to you.
http://edocs.beasys.com/wls/docs60/adminguide/config_web_app.html#100408
19 years ago
I have read the documentation that you can set up multiple instances running on different port. Here is the link to the documentation
http://www.weblogic.com/docs51/admindocs/properties.html#multihoming
Please let me know, if any one of you do it. I shall try that too.
-Sarath
19 years ago
Cynthia,
I have implemented Servlet and Jsp on iPlanet 4.1
Beleive me, it is very hard to get that to working even though I have done the Servlets and JSP on WebLogic before.
One thing I could not achieve is run a servlet that has or is under Java Packaging structure. So I had to take the Servlet class out of packaging and deploy.
Let me know if you still need help on running it.
Also the log files help you a lot.
Sarath