Preliminary study on WebLogic

xiaoxiao2021-03-06  68

Preliminary Study on WebLogic is a set of Java-based e-commerce suite, providing a lot of functional middleware to facilitate the programmaker's JSP, servlet and other e-commerce applications, which can provide a complete business application to resolve Program. For developers WebLogic, you can download a complete WebLogic for free at www.bea.com, and get a license that limits IP for learning and developing this kit. If you need to be officially put into use, you must pay a certain fee to get the unlimited license. Since this kit is based on this release method, it is easy to learn development for general website developers, of course, is another matter. The weblogic5.10 I have received is two big ZIP files, one is a WebLogic package, one is a data document. Because it is based on Java, although there is a distinction between the operating system, the set of practices I have found can be running in WinNT and Linux. The following mainly use Linux as an example, Winnt installation method is also similar. Preparing before installation: Before installation, the user must get a set of JDK corresponding to the user's operating system (free download of www.sun.com), unwash the WebLogic5.10's compression package, suggest On the root directory, this will save a lot of trouble to modify settings, can solve other directories under Linux, and then do a hard connection in the root directory. My installation file directory is

/usr/local/jdk1.2//usr/local/weblogic/ln -s / / usr / local / webLogic / Configuration WebLogic: Start WebLogic needs to perform two script files: Linux: setENV.SH and StartWeblogic.sh WinNT Settenv.cmd and startweblogic.cmd 1, weblogic.properties Open / usr / local / weblogic / weblogic.properties file, find this line WebLogic.Password.system = this is to set up administrator password, this setting item Can't be empty, so a reliable administrator password must be set. For example: WebLogic.Password.system = SDFJKDSHFDS Settings 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 puts those comments, that is, change for

# 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.JSPServletweblogic.httpd.initArgs. *. jsp = / PageCheckseconds = 1, / compilecommand = c: /jdk1.2.1/bin/javac.exe, / WorkingDir = / WebLogic / myserver / classfiles, / verbose = true To note that this line is to be configured: compileCommand = / usr / Local / JDK1.2 / BIN / JAVAC, / This is the path to JAVA compiler of JDK. 2, setenv.sh open /weblogic/setenv.sh, find this line java_home = / usr / java to change to java_home = / usr / local / jdk1.2 / 3, startweblogic.sh Find a full-write "Linux" character Strings, change to "Linux", is very strange to be this? This is because of the startup, the script file calls the uname command to get the name of the system, and then compare whether it is a Linux system with the "Linux" string, but the name of the system returned by the UNAME instruction is Linux, so we have to change it. This should be a small bug of this startup script, Wint doesn't have to be so troublesome. Running WebLogic: Try to run after a simple configuration. Execute in the directory / WebLogic / under (please pay attention, I have two "here." Because we need to perform this script under the current shell) ./startweblogic.sh When seeing successfully started WebLogic When the information is made, the startup is successful. Server Simple Test: WebLogic default web port is 7001, we can open a browser input address http: // localhost: 7001 / test can be connected. Servlet's test If you can connect, you can perform the next servlet test, in the browser input address http: // localhost: 7001 / helloWorld This is the demo of WebLogic Servlet (as for how to install servlet, please see below The JSP test is established in the directory / WebLogic / MyServer / public_html / down file Test.jsp

<% Out.print ("Test JSP");%>; In the browser input address http: // localhost: 7001 / test.jsp test can see the correct output "Test JSP" information. The structure will learn a set of systems first to understand its structure. This article introduces some structural and characteristics of WebLogic: Most of WebLogic is completed in WebLogic.properties, as long as this document can be clear, you can clearly Know some of the structural and characteristics of WebLogic, one of the configuration items in the WebLogic.properties file: WebLogic.httpd.documentroot = public_html / this is the root directory of WebLogic web server, namely directory / WebLogic / MyServer / public_html / WebLogic.Password.system = SDFJKDSHFDS This forebel is already mentioned that it is set to set the administrator password. WebLogic.System.Listenport = 7001 This is the web server port settings WebLogic. WebLogic.httpd.servlet.classpath = / weblogic / myServer / servletClasses Set the path to the servlet About servlet for security purposes, WebLogic running under WebLogic must be registered in WebLogic.properties to run, such as mentioned above Servlet Http: // localhost: 7001 / HelloWorld, the registration in WebLogic.Properties is WebLogic.httpd.register.HelloWorld = Examples.Servlets.HelloworldServlet actually, this servlet's actual path is

/weblogic/myserver/servletclasses/examples/servlets/helloWorldServlet.class controls the registration item in WebLogic.Properties and the path to the HelloWorldServlet.class file, it should be difficult to find the registration of the registration servlet. There are several servlet registers in WebLogic.properties:

转载请注明原文地址:https://www.9cbs.com/read-109912.html

New Post(0)