Develop the first web program with eclipse myeclipse weblogic8.1 -
Developing the first web program with Eclipse MyECLIPSE WebLogic8.1
1. Installing JRE Eclipse Although it is developed by Java, it is not brought by JRE. So you must install yourself, go http://java.sun.com/downloads to download the latest J2SE1.4.2_03 JRE installation file J2RE-1_4_2_03-Windows-i586-P.exe. After the installation is successful, restart the machine and add the JRE's BIN folder path to the system environment variable path, such as: C: / Program Files / Java / J2RE1.4.2_03 / bin. 2. Install Eclipse2.1.2 Eclipse The latest Stable is already build to 3.0m5, but this version of LanguagePackFeature has not been launched, there is a problem with LanguagePackFeaRe2.1.2. Therefore, it is recommended to use Eclipse to stabilize version 2.1.2, and the full Chinese interface can be implemented after LanguagePackFeature 2.1.2. Eclipse SDK 2.1.2 and its LanguagePackFeaature download address is http://download2.eclipse.org/downloads. Eclipse installation is very simple, just unpacking Eclipse-sdk-2.1.2-win32.zip, copy the folder Eclipse to the place you want. Then double-click Eclipse.exe to start compiling and initialize Eclipse, and automatically enter Eclipse. Let's start installing LanguagePackFeature. (1) Unzip Eclipse2.1.2.1-sdk-win32-languagePackFeature.zip. (2) Start Eclipse, select the "Help / Software Updates / Update Manager" menu to switch the main interface to the installation update perspective screen. (3) Right-click in the Feature Updates view of the upper left under the form, select the "New Site Bookmark" menu, and pop up the New Site Bookmark dialog. In the name of Name, you will enter what your name is: LanguagePack. The previous (1) decompression folder path is decompressed, such as File: E: / Development Tools / Eclipse/eclipse2.1.2.1-sdk-win32-languagePackFeature/eclipse. Press the Finish button to close the dialog box. A "LanguagePack" appears in the Feature Updates view. To expand this item, you can see a lot of language pack plugins. (4) Select a language package, such as: Eclipse Java Development Tool Language Pack 1.2.1.2, click the Install Now button in the right view to start installing. After the installation is successful, Eclipse will restart. Install all the language package plugins according to the subkey. You will find all interfaces into Simplified Chinese throughout the installation process. 3. Install myECLIPSE2.7RC2 to Http://www.myeclipseide.com Download the latest MyEclipse installation file MyECLIPSE_ENTERPRISE_WORKBENCLIPSE_ENTERPRISE_WORKBENCH_INSTALLER_020700RC2.EXE. The path of the folder where Eclipse is located during the installation process, and the Eclipse will be automatically entered after the installation is successful. At this time, you will find more "myeclipse" in the main menu, and we choose the Window / Preferences menu to open the preference dialog. Expand the MyECLIPSE node, click Subscription Child, you can see this 30-day limit.
However, you can download the crack program myeclipse_enterprise_workbench_v3.6.4.zip to http://www.cracks4u.com. Run the keyd.exe in ZIP, just enter a username, then select 2.6.4, click the Generate button to generate the subscription code. In the Subscriber and Subscription Code text boxes described above, you can see the information Number of Licenses: Unlimited, and your MyEClipse has been cracked. 4. Installing WebLogic8.1 Installing WebLogic is relatively easy, and you will no longer be done here, you can refer to the relevant documentation. Now we will focus on WebLogic configuration because the information here will be used later. (1) Run the start / program / BEA WebLogic Platform 8.1 / Configuration Wizard. (2) Select CREATE A New WebLogic Configuration, the next step. (3) Select Basic WebLogic Server Domain, the next step. (4) Select Custom, next. (5) Enter admin, Listen Address at Name, select LocalHost, and the following two ports use the default value, the next step. (6) Select SKIP to skip Multiple Servers, Clusters, and Machines Options, the next step. (7) Select SKIP to skip the configuration of the JDBC connection pool (Note: The configuration of the JDBC connection pool can be performed on the console after starting WebLogic, you can refer to the relevant documentation), next step. (Select Skip Skip JMS Configuration (Also leave it to the console), next step. (9) Continue to skip, next. (10) Select Yes, next. (11) Click Add in USER Page, Add a user user, password 12345678, the next step. (12) Assign the user user User to the Administrators group (also assigned to other groups simultaneously, the method is to select the group to be added, then hook the check box before User) Next. (13) Direct click Next Skip. (14) Set the user user's permissions, select Admin, check box before User (to specify other permissions), next. (15) adopting Default settings, directly click Next to skip. (16) Use the default settings, directly click Next to skip. (17) Configure JDK, use WebLogic default values, click Next to skip. (1 Final in Configuration Name Enter DEV, then click Create Generation Configuration, click Done to close the Configuration Wizard dialog. 5. Configure the Myeclipse's WebLogic Server MyEClipse default application server for JBoss3, where we use WebLogic8.1. Start Eclipse, Select Window / Preferences "Menu, open the first option dialog. Expand the Application Servers node under MyECLIPSE, click JBoss 3, select the DISABLE button in the right, deactivate jboss 3. then click WebLogic 8, select the right ENABLE radio button to enable WebLogic server.
Simultaneous configurations are as follows: (1) BEA Home Directory: D: / BEA. Assume that WebLogic is installed in the D: / BEA folder. (2) WebLogic Installation Directory: D: / bea / weblogic81. (3) Admin UserName: User. (4) admin Password: 12345678. (5) Execution Domain root: D: / bea / user_projects / dev. (6) Execution Domain Name: DEV. (7) Execution Server name: admin. (8) Hostname: PortNumber: Localhost: 7001. (9) Security Policy File: D: /bea/weblogic81/server/lib/weblogic.policy. (10) Jaas login configuration file: omitted. Then expand the WebLogic 8 node, click JDK, select the default JDK for WebLogic 8 at the WLS JDK Name on the right. This combination box is default to J2RE1.4.2_03, which is the JRE that is previously installed. Click the Add button to pop up the WebLogic> Add JVM dialog box, enter one name at the JRE name, such as JRE1.4.1_02. Then select the JDK folder in the WebLogic installation folder at the JRE home directory, such as D: / BEA / JDK141_02, the program automatically populates the Javadoc URL text box and the JRE system library list box. Click the OK button to close the dialog. At this time, you can choose JRE1.4.1_02 in the WLS JDK Name Combination box. After which they In the following Optional Java VM arguments, such as -ms64m -mx64m -Djava.library.path = "D: / BEA / weblogic81 / server / bin" -Dweblogic.management.discover = false -Dweblogic.ProductionModeEnabled = false final Click Paths, in the Prepend to ClassPath list box, add D: /BebLogic81/server/lib/weblogic81/server/lib/webservices.jar through the Add Jar / Zip button. . If you use the database, you also need to add the database's drive class library. Here we use the SQL Server database drive library D: /bea/weblogic81/server/lib/msqlogic81/server/lib/mssqlserver4v65.jar with WebLogic SQL Server Database. At this point, the configuration of WebLogic8 in myECLIPSE is completed. Let's take a look at whether you can start WebLogic in Eclipse? Since the installed MyECLIPSE, there will be a RUN / STOP Servers drop-down button in the Eclipse toolbar. Click on the drop-down section of the button to select the "WebLogic 8 / Start" menu, start to start WebLogic. By looking at the console message below, you can know if the startup is successful, or what exception occurs. Stop WebLogic Select the "WebLogic / Stop" menu. 6. Create the first web program --Helloworld boot Eclipse: (1) Select the File / New / Project menu to open the New Project Wizard.
First select the J2EE on the left, then select the Web Module Project on the right, the next step in the Project Name Processing Enter HelloWorld, click the Complete button to generate project files. The view structure is as follows: HelloWorld ├ --SRC ├─jre system library [J2RE1.4.2_03] ├─J2ee 1.3 library container └ --Webroot (2) Click SRC, right-click, select "New / Servlet" menu, create HelloWorld Servlet. Enter a servlet at the package name, enter HelloWorld at the servlet name, remove the hook in the CREATE DOGET check box, the next step, use the default setting, click the completion button. Modify the dopost method code as follows: Response.setContentType ("text / xml"); PrintWriter out = response.getwriter (); Out.Println ("Hello World"); out.flush (); out.close (); (3 Click Webroot, right-click, select "New / HTML" menu, create an HTML page. Change the file name to INDEX.html and click the Complete button. Replace the code between
, body> between the following code: