欢迎来到天天文库
浏览记录
ID:6102855
大小:1.17 MB
页数:27页
时间:2018-01-02
《湘潭大学j2ee实验报告(绝对完整)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、实验一、应用服务器集成1.整合apache和tomcat安装apache到c:j2eeApache中解压tomcat到c:j2eeTomcat中输入测试http://localhost/输入测试http://localhost:8080/接着关掉Apache和tomcat然后打开C:j2eeApacheconfhttpd.conf去掉如下图红线框中的#符号在文件最后添加接下来启动Apache和Tomcat,在C:j2eeTomcatapache-tomcat-6.0.44
2、webappsROOT建一个文件名为host,host里面新建一个test.jsp接着,在浏览器中输入http://localhost:8080/host/test.jsp得到如下页面在浏览器中输入http://localhost/host/test.jsp同样得到如下页面到此,Apache和tomecat整合成功!2.Tomcat+ActiveMQ实现消息服务在jsm-test项目中需要在tomcat的lib中导入一共导入6个包:commons-logging-1.1.jaractivemq
3、-core-5.5.0.jaractivemq-web-5.11.1.jargeronimo-j2ee-management_1.1_spec-1.0.jargeronimo-jms_1.1_spec-1.1.1.jargeronimo-jta_1.0.1B_spec-1.0.1.jar修改文件:Tomcatconf下的context.xmlWEB-INF/web.xml6、onFactory"factory="org.apache.activemq.jndi.JNDIReferenceFactory"brokerURL="failover:(tcp://localhost:61616)?initialReconnectDelay=100&maxReconnectAttempts=5"brokerName="localhost"useEmbeddedBroker="false"/>7、ory"auth="Container"type="org.apache.activemq.ActiveMQConnectionFactory"description="JMSConnectionFactory"factory="org.apache.activemq.jndi.JNDIReferenceFactory"brokerURL="tcp://localhost:61616"brokerName="localhost"useEmbeddedBroker="false"/>8、cename="jms/topic/MyTopic"auth="Container"type="org.apache.activemq.command.ActiveMQTopic"factory="org.apache.activemq.jndi.JNDIReferenceFactory"physicalName="MY.TEST.FOO"/>
6、onFactory"factory="org.apache.activemq.jndi.JNDIReferenceFactory"brokerURL="failover:(tcp://localhost:61616)?initialReconnectDelay=100&maxReconnectAttempts=5"brokerName="localhost"useEmbeddedBroker="false"/>7、ory"auth="Container"type="org.apache.activemq.ActiveMQConnectionFactory"description="JMSConnectionFactory"factory="org.apache.activemq.jndi.JNDIReferenceFactory"brokerURL="tcp://localhost:61616"brokerName="localhost"useEmbeddedBroker="false"/>8、cename="jms/topic/MyTopic"auth="Container"type="org.apache.activemq.command.ActiveMQTopic"factory="org.apache.activemq.jndi.JNDIReferenceFactory"physicalName="MY.TEST.FOO"/>
7、ory"auth="Container"type="org.apache.activemq.ActiveMQConnectionFactory"description="JMSConnectionFactory"factory="org.apache.activemq.jndi.JNDIReferenceFactory"brokerURL="tcp://localhost:61616"brokerName="localhost"useEmbeddedBroker="false"/>8、cename="jms/topic/MyTopic"auth="Container"type="org.apache.activemq.command.ActiveMQTopic"factory="org.apache.activemq.jndi.JNDIReferenceFactory"physicalName="MY.TEST.FOO"/>
8、cename="jms/topic/MyTopic"auth="Container"type="org.apache.activemq.command.ActiveMQTopic"factory="org.apache.activemq.jndi.JNDIReferenceFactory"physicalName="MY.TEST.FOO"/>
此文档下载收益归作者所有