WebLogic is a set of powerful Java-based e-commerce kit. It provides many powerful middleware to facilitate coding of JSP, Servlet, and other e-commerce applications, it can provide enterprises with a complete business application solution. For developers, WebLogic can download a complete set of Weblogic at www.bea.com for free and get a license that limits IP addresses for learning and developing code based on this suite. If you need to officially put it into use, you must pay a certain amount of fee to obtain an unlimited license. Because this kit is based on this release method, it is easy for General website developers to get WebLogic for learning and development. Of course, it is another thing to put it into use.
The weblogic5.10 I got is two large ZIP files, one is the Weblogic package and the other is the document. Because it is based on Java, although there is a distinction between the operating system during the download, but the set I obtained after practice found that both WINNT and Linux can run, the following mainly uses Linux as an example, the Installation Method of WinNT is similar.
Preparations before installation:
Before installation, you must obtain a set of JDK corresponding to your operating system (free download at www.sun.com). After installation, uncompress the weblogic5.10 package. We recommend that you store it in the root directory, this saves a lot of trouble in modifying the settings. in Linux, you can solve the problem in other directories, and then make a hard connection in the root directory.
My installed file directory is
/Usr/local/jdk1.2/
/Usr/local/WebLogic/
Ln-S // usr/local/WebLogic/
Configure WebLogic:
To start WebLogic, You need to execute two script files:
Linux: setenv. SH and startweblogic. Sh
Winnt corresponds to setenv. CMD and startweblogic. cmd.
1. weblogic. Properties
Open the weblogic. properties file of/usr/local/WebLogic/and find this line.
Weblogic. Password. System =
This is used to set the administrator password. This setting item cannot be blank. Therefore, you must set a reliable administrator password.
Example: weblogic. Password. System = sdfjkdshfds
Set to run JSP:
# WebLogic JSP properties # ------------------------------------------------ # sets up automatic page compilation for JSP. adjust init ARGs for # directory locations and uncomment to use. # weblogic. httpd. register. *. JSP =/# weblogic. servlet. jspservlet # weblogic. httpd. initargs. *. JSP =/# pagecheckseconds = 1,/# compilecommand = C:/jdk1.2.1/bin/javac.exe,/# workingdir =/WebLogic/myserver/classfiles,/# verbose = true
Delete the comments and change them
# WebLogic JSP properties # ------------------------------------------------ # sets up automatic page compilation for JSP. adjust init ARGs for # directory locations and uncomment to use. weblogic. httpd. register. *. JSP =/weblogic. servlet. jspservlet weblogic. httpd. initargs. *. JSP =/pagecheckseconds = 1,/compilecommand = C:/jdk1.2.1/bin/javac.exe,/workingdir =/WebLogic/myserver/classfiles,/verbose = true
You must also configure this line:
Compilecommand =/usr/local/jdk1.2/bin/javac ,/
This is the path of the JDK Java compiler.
2. setenv. Sh
Open/WebLogic/setenv. SH and find this line.
Java_home =/usr/Java
Change
Java_home =/usr/local/jdk1.2/
3. startweblogic. Sh
Find a "Linux" string in uppercase and change it to "Linux". It's strange why? This is because at startup, the script file calls the uname command to get the system name, and then compares it with the "Linux" string to check whether it is a Linux system, but the system name returned by the uname command is Linux, so we need to change it. This should be a small bug in the startup script, so Wint won't be so troublesome.
Run WebLogic:
After simple configuration, the test run is completed.
Run the following command in the/WebLogic/directory:
../Setenv. Sh (please note that I have two ".." here, because we need to execute this script under the current shell)
./Startweblogic. Sh
When Weblogic is successfully started, it indicates that Weblogic is successfully started.
Simple Server test:
WebLogic uses the default Web port 7001. You can enter the address in a browser.
Http: // localhost: 7001/
Test whether the connection can be established.
Servlet Testing
If it can be connected, you can perform the next servlet test and enter the address in the browser.
HTTP: /localhost: 7001/helloworld
This is the Weblogic servlet demonstration (for how to install the servlet, see the following)
JSP Testing
Create a file named test. jsp under/WebLogic/myserver/public_html /.
Test. jsp <% Out. Print ("test jsp"); %>
Enter the address in the browser
Http: // localhost: 7001/test. jsp
Test whether the output "test jsp" is correct.
To learn a set of systems, first of all, we need to understand its structure. This article describes in detail some of the structures and features of WebLogic:
Most WebLogic configurations are in weblogic. properties, as long as you carefully study this file, you can clearly understand some of the structure and characteristics of Weblogic, the following is the weblogic. some configuration items in the properties file are described as follows:
Weblogic.httpd.doc umentroot = public_html/
This is the root directory of the Weblogic Web server, that is, the directory/WebLogic/myserver/public_html/
Weblogic. Password. System = sdfjkdshfds
As mentioned above, the administrator password is set.
Weblogic. Systems. listenport = 7001
This is the Web server port for weblogic.
Weblogic. httpd. servlet. classpath =/WebLogic/myserver/servletclasses
Set the servlet storage path
About Servlet
For security purposes, WebLogic running in WebLogic must be in weblogic. properties, for example, Servlet http: // localhost: 7001/helloworld, which is in weblogic. the registration item in properties is
Weblogic. httpd. Register. helloworld = examples. servlets. helloworldservlet
Actually, the actual path of this servlet is/WebLogic/myserver/servletclasses/examples/Servlets/helloworldservlet. Class.
Check the registration items in weblogic. properties and the path of the helloworldservlet. Class file. It is not difficult to find out the rules of registering servlet.
There are several servlet registration items in weblogic. properties:
Weblogic. httpd. Register. adminevents = Admin. adminevents
Weblogic. httpd. Register. adminclients = Admin. adminclients
Weblogic. httpd. Register. adminconnections = Admin. adminconnections
Weblogic. httpd. Register. adminjdbc = Admin. adminjdbc
Weblogic. httpd. Register. adminlicense = Admin. adminlicense
Weblogic. httpd. Register. adminmain = Admin. adminmain
Weblogic. httpd. Register. adminprops = Admin. adminprops
Weblogic. httpd. Register. adminrealm = Admin. adminrealm
Weblogic. httpd. Register. adminthreads = Admin. adminthreads
Weblogic. httpd. Register. adminversion = Admin. adminversion
This is the Servlet used by the Administrator to manage weblogic. Access http: // localhost: 7001/adminmain through URL. In the displayed authentication dialog box, enter system and. password. system = password, you can go to the Weblogic Web management interface for management.