终于搞定了,公司要求搭建这个开发环境,断断续续的看资料自己研究,终于搭建完成了。之前一直用eclipse和netbeans,数据库用mysql,应用服务器用glassfish。所以等于是摸着石头过河。安装了完整版的oracle10g,由于没有选择安装的时候创建数据库,所以安装完毕之后,控制面板—>管理工具->服务,一看没有oracle打头的服务,有一个打头的还是office。然后网上找原因,很多人说要重装。虽说不是自己的电脑,但是也不能这么祸害啊,老卸载重装,硬盘受不了啊,而且我装得小心翼翼的,一路每一步都查询过。包括出现了预先校验的时候有未执行的情况。是由于IP地址是路由分配的,oracle这儿通不过。新建了一个本地连接2指定IP骗过了oracle。说的远了,刚才说自己安装完了oracle。(在SQLPLUS中登录测试安装成功)顿时茫然了,不知道该干嘛。通过自带的DBCA创建数据库。然后通过oracle提供的企业管理器(URL地址)管理数据库。在访问数据库之前,先设置oracle服务器端的监听服务,在oracle自带的netmanager中监听程序中设置。然后在客户端的本地服务设置(必须跟服务器端监听程序保持一致)。OK这会儿就可以在企业管理器中管理数据库了,也可以用PL/SQL连接oracle,然后就是授权,见表,sql脚本等等.....

安装weblogic8.16server,没装platform。一路安装。安装完成后,这时候安装目录下没有userproject。weblogic控制台url地址是localhost:7001/console这一点跟glassfish不一样(localhost:4848)默认的登录用户名跟密码是weblogic/weblogic

1.安装WebLogic8.1

2.创建一个UserProject

step1:Start->Programs->BEAWebLogicPlatform8.1->ConfigurationWizard

step2:CreateaNewWebLogicConfiguration->SelectaConfigurationTemplate(选择BEA下面的BasicWebLogicServerDomain),点击next.

step3:ChooseExpressorCustomConfiguration(selectExpress),点击next.

step4:Configurationadministrativeusernameandpassword,自己填写()点击next.

step5:ConfigureServerStartMode(DevelopmentMode)andJavaSDK(第二个)(jdk1.4weblogic8只支持这个版本的JDK),点击next.

step6:CreateWebLogicConfiguration(输入ConfigurationName),点击Create。至此完成了创建一个UserProject的工作。

然后就可以在myeclipse中配置weblogic服务器了。windows-preferences-myeclipse-server中weblogic8.x。注意选择enable。然后BEA目录设置为weblogic安装的BEA目录。然后domainroot设置为userproject下得domain目录下自己定义的domain目录。然后就是设置JDK,特别注意这儿的JDK默认应该是6.0或者别的。必须指定为与新建域时候的JDK版本一致,也就是ADD目录指向WEBLOGIC自带的jdk1.4的目录,然后完成,这时候,环境基本搭建完成了。在myeclipse中点击启动weblogic,控制台输出

<2011-11-9下午07时04分57秒CST><Info><WebLogicServer><BEA-000377><StartingWebLogicServerwithJavaHotSpot(TM)ClientVMVersion1.4.2_11-b06fromSunMicrosystemsInc.>

<2011-11-9下午07时04分58秒CST><Info><ConfigurationManagement><BEA-150016><Thisserverisbeingstartedastheadministrationserver.>

<2011-11-9下午07时04分58秒CST><Info><Management><BEA-141107><Version:WebLogicServer8.1SP6WedJun2108:18:55PDT2006781680

WebLogicXMLXModule8.1SP6WedJun2108:18:55PDT2006781680>

<2011-11-9下午07时04分58秒CST><Notice><Management><BEA-140005><LoadingdomainconfigurationfromconfigurationrepositoryatD:\ProgramFiles\bea\user_projects\domains\mydomain\config.xml.>

<2011-11-9下午07时05分00秒CST><Notice><LogManagement><BEA-170019><TheserverlogfileD:\ProgramFiles\bea\user_projects\domains\mydomain\myserver\myserver.logisopened.Allserversidelogeventswillbewrittentothisfile.>

<2011-11-9下午07时05分01秒CST><Notice><Security><BEA-090082><Securityinitializingusingsecurityrealmmyrealm.>

<2011-11-9下午07时05分01秒CST><Notice><WebLogicServer><BEA-000327><StartingWebLogicAdminServer"myserver"fordomain"mydomain">

<2011-11-9下午07时05分05秒CST><Warning><HTTP><BEA-101248><[Application:'D:\ProgramFiles\bea\user_projects\domains\mydomain\applications',Module:'Hello']:Deploymentdescriptor"web.xml"ismalformed.CheckagainsttheDTD:org.xml.sax.SAXParseException:cvc-elt.1:Cannotfindthedeclarationofelement'web-app'.(line6,column54).>

<2011-11-9下午07时05分09秒CST><Notice><WebLogicServer><BEA-000331><StartedWebLogicAdminServer"myserver"fordomain"mydomain"runninginDevelopmentMode>

<2011-11-9下午07时05分09秒CST><Notice><WebLogicServer><BEA-000360><ServerstartedinRUNNINGmode>

<2011-11-9下午07时05分09秒CST><Notice><WebLogicServer><BEA-000355><Thread"ListenThread.Default"listeningonport7001,ipaddress*.*>

说明正常启动。

登录localhost:7001/console显示控制台界面。

接下来试验下将WEB应用发布到WEBLOGIC。

做个最简单的helloworld试验。

新建webproject起名helloworld

webroot(这也是myeclipse的特点之一)右键新建JSP,

点击HelloWorld,单击鼠标右键,选择“MyEclipse\AddandRemoveProjectDeployments…”菜单,弹出ProjectDeployments对话框,在Project组合框中选择HelloWorld,单击Add,在Server组合框中选择WebLogic8,点击完成按钮回到ProjectDeployments对话框,这时服务器信息就会显示在Deployments列表中,点击确定按钮关闭对话框。

(6)点击工具栏上的Run/StopServers下拉按钮,选择“WebLogic8\Start”菜单,启动服务器。

(7)运行IE,在地址栏输入http://localhost:7001/HelloWorld/index.html,即可在页面中看到“HelloWorld”字样。

OK,准备工作一切顺利。由于是回忆式的总结,我并没有把遇到的每个问题都详细写出来,以及参考资料。所以,如果有问题可以留言。每日更新。欢迎交流