Practical practices: Developing a shopping website (1)

Source: Internet
Author: User
Practice: J2EE-Development and shopping website (1)-General Linux technology-Linux programming and kernel information. For details, see the following. Preface

?? This article describes how to use J2EE to build enterprise-level network applications through a shopping website! This article is intended for beginners like me. If you are a master, you will not have to laugh!

I. Build a development platform

?? This article is based on actual practice, so I will not talk much about some conceptual questions. These things can be found on google. First, prepare the following guys:

?? 1. oracle
?? 2. weblogic
?? 3. jbuilder

?? Others: struts-console-2.2 (used for struts view development) PowerBulider (convenient database operation) Dreamweaver (beautifying the front-end page)
The above is what I used in my company! The development platform is win2000.

?? The following describes how to build a J2EE development platform based on the configuration in my house. (Home software is used on the Internet)

?? Home machine configuration: P4 sai Yang 1.7G, 256 MB 20 GHDD Operating System: windows2000 SP3
?? Database: oracle 8i
?? J2EE application platform: weblogic 6.1 sp2
?? EJB, JSP, and jAVABEAN development: jbuilder 7 weblogic

?? Step 1: install and configure the oracle database

?? There is nothing to do with installing 9i of the latest oracle version. However, if you install 8i on the P4 server, the problem may occur. (This problem also exists in P4 saiyang) No way. My oracle is the 8i from the Internet (more slim than 9i). If you want to install 8i on P4 machines, first, follow the following method (this is the method I found on the Internet)

?? (1) create a temporary directory and copy the installation source program of Oracle8i to this directory.
?? Find directory
?? The symcjit. dll file under stage \ Components \ oracle. swd. jre \ 1.1.7.30 \ 1 \ DataFiles \ Expanded \ jre \ win32 \ bin is renamed as symcjit. old. Note that there is a symcjit. dll file in the OEM directory to be renamed.
?? (2) Search for the oraparam. ini file, open it, and change the RE_MEMORY_OPTIONS =-mx48m parameter to JRE_MEMORY_OPTIONS =-nojit-ms16m-mx32m.
?? (3) Other parameters remain unchanged.
?? (4) execute the setup.exe file under the local hard drive install \ win32 \ setup.exedirectory. The modified parameter file oraparam. ini is called.
?? (5) Select the custom mode during installation and do not create a database.
?? (7) after Oracle8i is installed, each of the following files in the installation directory must be modified accordingly. (If no point is modified, no application will respond)

?? Assistants \ dbca \ dbassist. cl
?? Assistants \ dbma \ dbmig. cl
?? Assistants \ ifa. cl
?? Bin \ elogin. cl
?? Bin \ owm. cl
?? Ldap \ oidamdin \ oidadmin. cl
?? Network \ tools \ netasst. cl
?? Network \ tools \ netca. cl
?? Owm \ install \ instelogin. cl
?? Owm \ install \ instowm. cl

?? Open the above files in sequence with the editing tool and add the parameter-nojit. Take the dbassist. cl file as an example:

?? Command = ("C: \ Program Files \ Oracle \ jre \ 1.1.7 \ BIN \ JREW"-nojit-classpath ....)

?? Modify the content of each. cl file in the same way.
?? After the modification, run the database Configuration Assistant Under the Database administrator to create the database. This is a long process. When creating the Database, you must create a global ID. Just remember it, configure the database connection later. After creation, the default DBA username is system and the password is manager.
?? In the future, I will talk about oracle beginners to help you get started quickly!

?? Step 2: install and configure weblogic 6.1SP2 and connect to oracle

?? Weblogic on win platform can be directly installed, but be careful not to install it in a directory with spaces, such as Program Files or a Chinese directory. The default value is c: \ bea, click Next by default to complete the installation. This is almost no accident! (The simplest installation operation). Remember the management password you set!
I changed the Administrator name and service name.



?? For convenience of debugging, weblogic is not set as automatic service startup.



?? Set your management password, go to the console, and start the service.



?? For convenience, I installed the directory on the d disk, changed the domain to maxuan, and the server to max. Next we will configure JDBC to connect to the oracle database.

?? First open D: \ bea \ wlserver6.1 \ config \ maxuan (maxuan is the name I changed, the default is mydomain), and use a text editor such as NotePad or editplus to open startWebLogic. cmd, find the line "set PATH =" and add ". \ bin \ oci817_8 ", for example," set PATH =. \ bin ;. \ bin \ oci817_8; % PATH %"

?? To enable weblogic to start, you do not need to enter the password every time. In "set WLS_PW =", enter the password set during installation.

?? Double-click startWebLogic. cmd or directly run Start Default Server in the program to Start the weblogic Service (do not close this window)
Start weblogic



?? Then, run Start Default Console in the program to go to the Console for operations. In the displayed dialog box, enter the management username system, and enter the password you set!



?? Click Services on the left. You can see JDBC



?? Click it and click Connection Pools below. The Configuration item appears on the right. Click Configure a new JDBC Connection Pool to Configure the Configuration item under the General tab of Configuration.

?? Name: "mytest" is entered here ";
?? Enter "jdbc: weblogic: oracle" as the URL ";
?? Driver Classname: Enter weblogic. jdbc. oci. Driver ";
?? Properties (key = value): Enter:
?? User = system
?? Password = manager
?? Server = oradb
?? Here, oradb is the global identifier of the database created by the installed oracle. User and password I use the default DBA. You can use the username and password created by yourself. Click Apply.



?? Click the Servers label under Targets, move the Tgets-Server under Available to Chosen, and click the Apply button.



?? Configure the following Data Sources, and use "Configure a new JDBC Data Source" to create a new Data Sources on the right side. The Name and Pool Name here are filled in with the set "mytest ", set the JNDI Name to "oradb". Similarly, click the Servers label under Targets, move the Targets-Server under Available to Chosen, and click the Apply button.



?? Click Start Default Server to open the jDriver/Oracle startup window!
?? PS: You have been using weblogic for a while and have also attended weblogic J2ee training. You will be able to share your experience on the Forum in the future!
?? Restart the service!
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.