webloigc deployments 怎么ejb 部署weblogic 10ejb

WebLogic 简介及安装与配置指南_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
WebLogic 简介及安装与配置指南
&&高中物理教学艺术
你可能喜欢本帖子已过去太久远了,不再提供回复功能。&&第一章、Weblogic 9.2群集安装准备1.1、群集安装前的准备1.1.1预备知识Weblogic中Domain和Server的关系DomainDomain是WebLogic Server实例的基本管理单元。所谓Domain就是,由配置为Administrator Server的WebLogic Server实例管理的逻辑单元,这个单元是有所有相关资源的集合。ServerServer是一个相对独立的,为实现某些特定功能而结合在一起的单元。Domain and Server的关系一个Domain 可以包含一个或多个WebLogic Server实例,甚至是Server集群。一个Domain中有一个且只能有一个Server 担任管理Server的功能,其它的Server具体实现一个特定的逻辑功能。&1.1.2 集群概念&&&&&& 在本次项目实施中,我们采用单层结构的集群,其架构如下图所示:这种架构将所有的Web应用以及相关的服务应用全部置于集群中的单一WLS实例中,这种架构的优势在于:·&& 易于管理 ·&& 灵活的负载平衡机制与容错·&& 更强的安全控制1.1.3配置集群应用的必要条件l& 集群中的所有Server必须位于同一网段,并且必须是IP广播(UDP)可到达的 l& 集群中的所有Server必须使用相同的版本,包括Service Pack l& 集群中的Server必须使用永久的静态IP地址。动态IP地址分配不能用于集群环境。 l& 要以CLUSTER方式运行,必须有包含CLUSTER许可的LICENSE才行;(破解版安装请将破解LICENSE拷贝到HOME目录改名为LICENSE.BEA);1.1.4配置前的准备工作在配置集群应用前要对集群的配置信息有一个良好的设计,下面是我们以两台WEB应用服务器配置的一个集群示例:两台服务器分别为server1与server2; 其中由server1作为一个群集服务器节点,并将集群的管理器(adminserver)及代理分发服务(proxyserver)也配在server1上,server2只作为群集服务节点;其具休规划如下:在同一网段内的两台服务器上配置集群机器类型配置名称地址及端口设置角色审计综合应用(server1)adminserverIP:10.166.2.24PORT:8081群集管理服务器Managed1IP: 10.166.2.24PORT: 8081Managed ServerManaged2IP: 10.166.2.23PORT: 8081Managed Server审计综合应用(server2)Managed2IP: 10.166.2.23PORT:8081Managed ServerproxyServerIP: 10.166.2.23PORT: 9002负载均衡代理服务(即用户用来访问的地址)第二章、集群服务器的安装配置由于我们以两台服务器作为群集的节点,并以其中一台作为群集的管理服务器和访问代理服务器;下面,我们首先安装群集管理服器;(我们以windows下的的安装作为实例,在linux系统下基本相同)2.1 集群管理服务器的安装2.1.1创建新的Domain&&&&&& 打开开始菜单中bea product 目录相应工具,如下图所示:&&&&&& (注:如在linux环境下,只需运行在weblogic安装目录下的config.sh即可;如\bea\weblogic92\common\bin\config.sh);选择“Create a new WebLogic configuration”,单击“Next”按钮 2.1.2选择安装类型选择默认安装“WebLogic Serve”即可,单击“Next”按钮 2.1.3设置管理台用户密码及JDK版本如下图:&2.1.4选择定制安装&&&&&&&&&&&&& 选择自定义安装,选中YES;单击“Next”按钮 2.1.5输入Administrator Server(集群管理服务器)的信息输入Administrator Server的名称,监听地址,监听端口,如果需要SSL支持的话可以在“SSL enabled”后面的复选取框上打勾,配置SSL监听端口,单击“Next”按钮:2.1.6配置Server、Cluster、Machine信息首先,添加被管理服务器信息,输入Managed Server的名称,监听地址,监听端口,如果需要SSL支持的话,可以在“SSL enabled”复选框上打勾,配置SSL监听端口。可以配置多个Managed Server。如下图:&2.1.8配置Cluster信息添加cluster,输入Cluster的名称,Cluster的组播地址和端口,Cluster地址默认。单击“Next”按钮 完成后点击下一步:2.1.9将Managed Server添加到Cluster中选择左面列表中的Managed Server,将其添加到右面的列表中,单击“Next”按钮 点下一步,并将各集群节点加入到所建的cluster中:&2.1.10配置Machine信息在此不对Machine进行配置,单击“Next”按钮 2.1.11以下各项默认安装即可,并配置信息确认以及选择安装路径如下图:&&2.1.12系统创建Domain系统根据配置信息,完成缺省的目录及文件的创建 &2.2 集群中其它节点服务器的安装&&&&&& 在所有需要加入群集的节点服务器上安装同一版本的weblogic;并在节点服务器上创建一个与管理服务器同样内容的 具体创建过程跟集群管理服务器中创建Domain一样;如adminserver 以及managed 的地址、端口和CLUSTER均设为一样;(注意:在配置另一台机器上的集群管理服务器时,集群节点managed只用配置一个即可,例如:主集群管理服务器上配置为:managed1(server1)&&&&&&&&&&&&&&&&&&& &&&&&&&&managed2(server2) ,则在群集服务器上只须配置一个相应的集群节点managed2即可)&&&&&第三章 weblogic集群中应用程序的部署&在完成webloigc集群的安装后,即可针对此集群的程序部署,其中包括数据源、数据库连接池及web应用程序包的部署安装等。3.1webloigc集群的启动3.1.1 启动集群中的administrator server完成群集中各节点服务器的安装后,即可启动群集中的管理服务器及各节点服务器;首先,我们必须先启动群集中的管理服务器;具体过程如下:打开开始菜单中的运行所新建的weblogic管理域,如下图: (注:如是linux环境,则直接运行域安装目录中的StartWeblogic.sh即可)&&&&&&& 完成后,即可通过管理域控制台进行相关信息查看,如下图:在上图中,我们可以看到,在servers菜单中,将会有三个server,分别为一个管理服务器(adminserver)及两个集群节点(managed1跟manged2),在state栏中,由于还没有启动managed,所以只有adminserver为&3.1.2 启动managed server在adminserver启动后,即可分别启动各群集节点(managed),其命格式如下:&&&&&& &startManagedWeblogic.cmd &managed名& adminserver访问地址及端口如:startManagedWeblogic.cmd& managed1 如下图所示,首先进入weblogic安装目录中所建域中的bin目录:在成功启动后,如下图所示:&注:群集中各节点需在各自的机器上去启动managed server,如在本实例中,我们在server1服务器上启动managed1 ;到server2服务器上启动managed2 ;其命令分别为:startManagedWeblogic.cmd& managed1 +主服务器地址(http://ip:port)startManagedWeblogic.cmd& managed2 +主服务器地址&3.2 群集中应用程序的部署(在部署应用程序之前请先配置一个代理分发程序(server),具体配置见附一)启动群集中的管理服务器及被管理节点后,即可通过群集管理控制台进行数据源、数据库连接池及应用程序的发布;本实例发布应用程序的具体过程如下:首先,通过:http:// 192.168.19.125:7001/console访问群集管理控制台;如下图所示:(注:在各被管理域均成功启动后,在server栏中,各服务器的状态均为RUNNING,在部署应用程序前,各服务器必须为running状态)在服务器列表中,adminserver 以及各managed server的状态为running,即表示各server已启动;3.2.1配置数据源:打开左边工具栏中服务(services)中的JDBC,点击数据源(data source),在右边的选项中,点击如下图所示:&&&&&& 在数据源属性中,输入数据源名称,并选择数据库产品及数据库链接驱动后,点击下一步:在事务属性中,默认即可,选择下一步:在此数据源连接属性中,输入数据库的SID,主机地址及数据库端口(oracle默认端口为1521);并输入相关表空间用户名口令;如下图:完成后点击下一步:在确定数据源相关信息后,点击左上角的test configuration,对此数据源连接进行测试;在消息栏中显示连接成功后即表示此数据源可用并点击下一步,否则检查各选项输入是否正确;在以下出现的选项中,选择需要采用此数据源的目标服务器,在集群中,我们只需要选中cluster中所有的服务器即可,如下图:注:由于管理服务器不做具体应用,因此在数据源及后面的连接池、应用程序部署中,在选择目标服务器中不能选中adminserver;完成后,点击finish,并点击左上角的 进行保存;&3.2.2配置数据库连接池在完成数据源配置后,接着进行数库连接池的配置,首先展开左边工具栏中services中的JDBC,点击 ,如下图所示:点击new进行添加新的连接池;如下图:输入相关配置信息后,点击下一步:在目标服务器中,同样我们只需选择cluster中的所有服务器即可;完成后点击next,如下图:在添加数据源选项中,将刚才建立的数据源选中加入右侧框即可,完成后点击finish并保存;&3.3 部置应用程序到各集群在部置应用程序到weblogic前,需要将应用程序文件拷贝到管理服务器(即adminserver)中的本地硬盘,完成后点击左侧工具栏中的Deployments(即部署),在部署窗口中,选择安装,如下图:在安装应用程序窗口中,找到应用程序所在路径,并选中webapp程序包进行安装,点击下步如下图:在应用程序目标服务器选项中,同样只需要选择cluster中的所用节点服务器即可;完成后点击next,如下图:默认即可,点击next:再下一步,如下图:在信息栏中,显示 时,即表示应用程序部署成功,点击左上角的保存按纽进行保存,并点击 接受更改;(注:在部署应用程序时,由于程序会同部到集群中的各服务器节点,因此这一部时间较长);完成应用程序的部署后,还需要启动所部署的应用程序,如下图:点击deployments;在部署栏中,选中刚才部署的webapp程序包,点击start进行启动此应用程序,如下图:点击YES;完成后如下图:在webapp程序的状态包由prepared转成activer后,即表示应用程序启动成功,完成后,用户即可通过各节点来访问此应用程序。在本实例中,访问链接分别为:和 ,访问任一链接的效过相同,并两节点的程序文件将保持实时的同步;&附一:集群的代理分发配置访问&&&&&& 在完成webloigc集群的安装部署后,由于实际应用访问的链接为集群各节点的访问地址(如本实例为和),为做到真正的集群负载均衡,我们必须通过一个代理来接收各用户的访问请求并将各访问请求均衡地分发到集群中的各个节点;weblogic本身自带有代理分发的应用程序,我们只需在集群上添加一个名称为proxyserver的服务,并将webloigc中的proxyserve程序部署到所添加的server中即可;(应用程序包:defaultProxyApp.rar,在集群配置文件中可以找到),具体配置如下所示:?& 部署defaultProxyApp.rar包1.解压此文件,然后打开web.xml文件配置,配置内容如下:把集群节点的访问地址按下例事例方式配置好即可。(注意每个集群节点以”|”格开)&&&&&& 2.配置defaultProxyApp.rar与部署审计应该一致,具体配置如下所示:&& &(注意:在部署代理服务时.在选择Servers服务时,请选择 ,如上图所示)?& 打开weblogic主管理器控制台配置一个proxyserver ,如下图所示:1、选择server 服务2、选择 & ,然后点击” ”新建一个server,具体配置如下所示:3、点“ ”完成。4、启动分发服务startManagedWebLogic.cmd &proxyserver& 如下图所示:首先进入weblogic安装目录中所建域中的bin目录:在成功启动后,如下图所示:注:集群分发服务启动命令为:startManagedWeblogic.cmd& proxyserver&?& 考虑到目前代理服务器的可用性,我们可以通过apache来作为代理分发前端服务器;下面,我们介绍采用apache方式作为代理前端的安装方法:(不推荐使用)&附二、集群配置中要注意的问题1、Admin Server只用于集群的管理,而不能参与集群事务。 即只能将应用程序部署在cluster下的managed server上,而不能部署到admin server上2、Web应用应该部署到集群上,文件的同步是由WebLogic来完成的。即我们只需将应用程序拷贝到管理服务器(admin server)上,然后通过admin server 管理控制台进行统一的部署即可;其它managed server只需通过startManagedServer命令启动服务即可;而不用做其它操作.附三、集群环境下应用配置注意事项第一、关于定时操作功能第二、上传文件磁盘映射第三、索引文件磁盘映射
本文已收录于以下专栏:
相关文章推荐
(本文讲述如何在WebLogic Server 9.2上配置集群,以及通过Http代理方式Proxy Server来访问集群)    
什么是Domain和Server
Domain
...
一、Weblogic的集群
还记得我们在第五天教程中讲到的关于Tomcat的集群吗?
两个tomcat做node即tomcat1, tomcat2,使用Apache HttpServer做...
非常详细的weblogic使用教程以及集群配置
他的最新文章
讲师:AI100
讲师:谢梁
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)网站配置未生效 |
| 百度云加速
请打开cookies.
你访问的网站() 使用了
网络。 百度云加速目前无法解析此域名 ().
主要因为: 网站主刚刚在百度云加速添加了这个域名,百度云加速需要几十秒的时间同步到全球网络中。稍等片刻刷新页面即可解决。
也有可能: 网站配置出错.description
The description element is a text description of the Web application.
weblogic-version
The weblogic-version element indicates the version of WebLogic Server on which this Web application (as defined in the root element weblogic-web-app) is intended to be deployed. This element is informational only and is not used by WebLogic Server.
security-role-assignment
The security-role-assignment element declares a mapping between a Web application security role and one or more principals in WebLogic Server, as shown in the following example.
&security-role-assignment&
&role-name&PayrollAdmin&/role-name&
&principal-name&Tanya&/principal-name&
&principal-name&Fred&/principal-name&
&principal-name&system&/principal-name&
&/security-role-assignment&
You can also use it to mark a given role as an externally defined role, as shown in the following example:
&security-role-assignment&
&role-name&roleadmin&/role-name&
&externally-defined/&
&/security-role-assignment&
The following table describes the elements you can define within a security-role-assignment element.
Table B-1 security-role-assignment Elements
Required/Optional
Description
If you do not define a security-role-assignment element and its sub-elements, the Web application container implicitly maps the role name as a principal name and logs a warning. The EJB container does not deploy the module if mappings are not defined.
Consider the following usage scenarios for the role name is "role_xyz"
If you map "role_xyz" to user "joe" in weblogic.xml, role_xyz becomes a local role.
If you specify role_xyz as an externally defined role, it becomes global (it refers to the role defined at the realm level).
If you do not define a security-role-assignment element, role_xyz becomes a local role, and the Web application container creates an implicit mapping to it and logs a warning.
run-as-role-assignment
The run-as-role-assignment element maps a run-as role name (a sub-element of the servlet element) in web.xml to a valid user name in the system. The value can be overridden for a given servlet by the run-as-principal-name element in the servlet-descriptor. If the run-as-role-assignment is absent for a given role name, the Web application container uses the first principal-name defined in the security-role-assignment. The following example illustrates how to use the run-as-role-assignment element.
&run-as-role-assignment&
&role-name&RunAsRoleName&/role-name&
&run-as-principal-name&joe&/run-as-principal-name&
&/run-as-role-assignment&
The following table describes the elements you can define within a run-as-role-assignment element.
Table B-2 run-as-role-assignment Elements
Required/Optional
Description
resource-description
The resource-description element is used to map the JNDI name of a server resource to an EJB resource reference in WebLogic Server.
The following table describes the elements you can define within a resource-description element.
Table B-3 resource-description Elements
Required/Optional
Description
resource-env-description
The resource-env-description element maps a resource-env-ref, declared in the ejb-jar.xml deployment descriptor, to the JNDI name of the server resource it represents.
The following table describes the elements you can define within a resource-env-description element.
Table B-4 resource-env-description Elements
Required/Optional
Description
ejb-reference-description
The following table describes the elements you can define within a ejb-reference-description element.
Table B-5 ejb-reference-description Elements
Required/Optional
Description
service-reference-description
The following table describes the elements you can define within a service-reference-description element.
Table B-6 service-reference-description Elements
Required/Optional
Description
session-descriptor
The session-descriptor elements that define parameters for servlet sessions.
Table B-7 session-descriptor
Element Name
Default Value
jsp-descriptor
The jsp-descriptor element specifies a list of configuration parameters for the JSP compiler. The following table describes the elements you can define within a jsp-descriptor element.
Table B-8 jsp-descriptor Elements
Default Value
Description
auth-filter
The auth-filter element specifies an authentication filter HttpServlet class.
container-descriptor
The container-descriptor element specifies a list of parameters that affect the behavior of the Web application.
check-auth-on-forward
Add the check-auth-on-forward element when you want to require authentication of forwarded requests from a servlet or JSP. Omit the tag if you do not want to require re-authentication. For example:
&container-descriptor&
&check-auth-on-forward/&
&/container-descriptor&
filter-dispatched-requests-enabled
The filter-dispatched-requests-enabled element controls whether or not filters are applied to dispatched requests. The default value is false.
redirect-with-absolute-url
The redirect-with-absolute-url element controls whether the javax.servlet.http.HttpServletResponse.SendRedirect() method redirects using a relative or absolute URL. Set this element to false if you are using a proxy HTTP server and do not want the URL converted to a non-relative link.
The default behavior is to convert the URL to a non-relative link.
index-directory-enabled
The index-directory-enabled element controls whether or not to automatically generate an HTML directory listing if no suitable index file is found.
The default value is false (does not generate a directory). Values are true or false.
index-directory-sort-by
The index-directory-sort-by element defines the order in which the directory listing generated by weblogic.servlet.FileServlet is sorted. Valid sort-by values are NAME, LAST_MODIFIED, and SIZE. The default sort-by value is NAME.
servlet-reload-check-secs
The servlet-reload-check-secs element defines whether a WebLogic Server will check to see if a servlet has been modified, and if it has been modified, reloads it.
The value -1 means never check the servlets. This is the default value in a production environment.
The value 0 means always check the servlets.
The value 1 means check the servlets every second. This is the default value in a development environment.
A value specified in the Administration Console will always take precedence over a manually specified value.
resource-reload-check-secs
The resource-reload-check-secs element is used to perform metadata caching for cached resources that are found in the resource path in the Web application scope. This parameter identifies how often WebLogic Server checks whether a resource has been modified and if so, it reloads it.
The value -1 means never reload. This is the default value in a production environment.
The value 0 means always reload.
The value 1 means reload every second. This is the default value in a development environment.
Values specified for this parameter using the Administration Console are given precedence.
single-threaded-servlet-pool-size
The single-threaded-servlet-pool-size element defines the size of the pool used for SingleThreadMode instance pools. The default value is 5.
session-monitoring-enabled
The session-monitoring-enabled element, if set to true, allows run-time MBeans to be created for sessions. When set to false, the default value, run-time MBeans are not created. A value specified in the Administration Console takes precedence over a value set manually.
save-sessions-enabled
The save-sessions-enabled element controls whether session data is cleaned up during redeploy or undeploy. It affects memory and replicated sessions. Setting the value to true means session data is saved. Setting to false means session data will be destroyed when the Web application is redeployed or undeployed. The default is false.
prefer-web-inf-classes
The prefer-web-inf-classes element, if set to true, will cause classes located in the WEB-INF directory of a Web application to be loaded in preference to classes loaded in the application or system classloader. The default value is false. A value specified in the Administration Console will take precedence over a value set manually.
prefer-application-packages
The prefer-application-packages element specifies a list of packages for classes that must always be loaded from the application. For more information, see
in Developing Applications for Oracle WebLogic Server.
&?xml version="1.0" encoding="UTF-8"?&
&wls:weblogic-web-app
xmlns:wls="/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="/xml/ns/javaee
/xml/ns/javaee/ejb-jar_3_0.xsd
/weblogic/weblogic-web-app
/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd"&
&wls:weblogic-version&12.1.1&/wls:weblogic-version&
&wls:context-root&FilterWeb&/wls:context-root&
&wls:container-descriptor&
&wls:prefer-application-packages&
&wls:package-name&com.oracle.foo&/wls:package-name&
&/wls:prefer-application-packages&
&/wls:container-descriptor&
&/wls:weblogic-web-app&
Note that in order to use prefer-application-packages or prefer-application-resources, prefer-web-inf-classes must be set to false.
prefer-application-resources
The prefer-application-resources element specifies a list of resources that must always be loaded from the application, even if the resources are found in the system classloader. For more information, see
in Developing Applications for Oracle WebLogic Server.
&?xml version="1.0" encoding="UTF-8"?&
&weblogic-web-app xmlns="/weblogic/weblogic-web-app"&
&container-descriptor&
&prefer-web-inf-classes&false&/prefer-web-inf-classes&
&prefer-application-packages&
&package-name&javax.faces.*&/package-name&
&package-name&com.sun.faces.*&/package-name&
&package-name&com.bea.faces.*&/package-name&
&/prefer-application-packages&
&prefer-application-resources&
&resource-name&javax.faces.*&/resource-name&
&resource-name&com.sun.faces.*&/resource-name&
&resource-name&com.bea.faces.*&/resource-name&
&resource-name&META-INF/services/javax.servlet.ServletContainerInitializer&/resource-name&
&/prefer-application-resources&
&/container-descriptor&
&/weblogic-web-app&
Note that in order to use prefer-application-packages or prefer-application-resources, prefer-web-inf-classes must be set to false.
default-mime-type
The default-mime-type element default value is null. This element allows the user to specify the default mime type for a content-type for which the extension is not mapped.
client-cert-proxy-enabled
The client-cert-proxy-enabled element default value is true. When set to true, WebLogic Server passes identity certificates from the clients to the backend servers. Also, WebLogic Server is notified whether to honor or discard the incoming WL-Proxy-Client-Cert header.
A proxy-server plugin encodes each identity certification in the WL-Proxy-Client-Cert header and passes it to the backend WebLogic Server instances. Each WebLogic Server instance takes the certificate information from the header, ensures it came from a secure source, and uses that information to authenticate the user. For the background WebLogic Server instances, this parameter must be set to true (either at the cluster/server level or at the Web application level).
If you set this element to true, use a weblogic.security.net.ConnectionFilter to ensure that each WebLogic Server instance accepts connections only from the machine on which the proxy-server plugin is running. If you specify true without using a connection filter, a potential security vulnerability is created because the WL-Proxy-Client-Cert header can be spoofed.
relogin-enabled
The relogin-enabled element is a backward compatibility parameter. If a user has logged in already and tries to access a resource for which s/he does not have privileges, a FORBIDDEN (403) response occurs.
allow-all-roles
In the security-constraints elements defined in the web.xml descriptor of a Web application, the auth-constraint element indicates the user roles that should be permitted access to this resource collection. Here role-name = "*" is a compact syntax for indicating all roles in the Web application. In past releases, role-name = "*" was treated as all users/roles defined within the realm.
This allow-all-roles element is a backward compatibility switch to restore old behavior. The default behavior is to allow all roles defined in the Web application. The value specified in weblogic.xml takes precedence over the value defined in the WebAppContainerMBean.
native-io-enabled
To use native I/O while serving static files with weblogic.servlet.FileServlet, which is implicitly registered as the default servlet, set native-io-enabled to true. (The default value is false.) native-io-enabled element applies only on Windows.
minimum-native-file-size
The minimum-native-file-size element applies only when native-io-enabled is set to true. It sets the minimum file size in Bytes for using native I/O. If the file being served is larger than this value, native I/O is used. If you do not set this value, the default value used is 4000.
disable-implicit-servlet-mappings
When the disable-implicit-servlet-mappings flag is set to true, the Web application container does not create implicit mappings for internal servlets (*.jsp, *.class, and so on); only for the default servlet mapping. A typical use case for turning off implicit servlet mappings would be when configuring HttpClusterServlet or HttpProxyServlet.
The default value is false.
The temp-dir element specifies the location of the temporary directory for the Web application, as returned by the "javax.servlet.context.tempDir" attribute.
optimistic-serialization
When optimistic-serialization is turned on, WebLogic Server does not serialize-deserialize context and request attributes upon getAttribute(name) when the request is dispatched across servlet contexts.
This means that you must make sure that the attributes common to Web applications are scoped to a common parent classloader (application scoped) or you must place them in the system classpath if the two Web applications do not belong to the same application.
When optimistic-serialization is turned off (default value), WebLogic Server serialize-deserializes context and request attributes upon getAttribute(name) to avoid the possibility of ClassCastExceptions.
The optimistic-serialization value can also be specified at domain level in the , which applies for all Web applications. The value in weblogic.xml, if specified, overrides the domain-level value.
The default value is false.
show-archived-real-path-enabled
The show-archived-real-path-enabled element specifies the behavior of getRealPath() for archived Web applications.
When set to true, getRealPath() returns the canonical path of the resource files.
If the show-archived-real-path-enabled element is set to false, the servlet container will return the real path of files in archived Web applications as null.
The default value is false.
require-admin-traffic
The require-admin-trafffic element defines whether traffic should go through the administration channel. When set to true traffic is allowed to go through the administration channel. Otherwise, traffic can only go through administration channel when the Web application is in administrative mode. For example:
&container-descriptor&
&require-admin-traffic&true&/require-admin-traffic&
&/container-descriptor&
access-logging-disabled
The access-logging-disabled element defines whether to eliminate access logging of the underlying Web application. Setting this property to true improves server throughput by reducing the logging overhead. If the property is not specified or a false value is set, application accesses are logged.
prefer-forward-query-string
When HttpServletRequest.getQueryString() is invoked in a forwarding request, WebLogic Server returns the queryString sent by the forwarding servlet via RequestDispatcher and the original ones sent by the client.
When the prefer-forward-query-string flag is set to true, WebLogic Server returns only the forwarded query string, if it is specified. The default value is false.
charset-params
The charset-params element is used to define code set behavior for non-unicode operations. For example:
&charset-params&
&input-charset&
&resource-path&/*&/resource-path&
&java-charset-name&UTF-8&/java-charset-name&
&/input-charset&
&/charset-params&
input-charset
Use the input-charset element to define which character set is used to read GET and POST data. For example:
&input-charset&
&resource-path&/foo&/resource-path&
&java-charset-name&SJIS&/java-charset-name&
&/input-charset&
For more information, see .
The following table describes the elements you can define within a input-charset element.
Table B-9 input-charset Elements
Required/Optional
Description
charset-mapping
Use the charset-mapping element to map an IANA character set name to a Java character set name. For example:
&charset-mapping&
&iana-charset-name&Shift-JIS&/iana-charset-name&
&java-charset-name&SJIS&/java-charset-name&
&/charset-mapping&
For more information, see .
The following table describes the elements you can define within a charset-mapping element.
Table B-10 charset-mapping Elements
Required/Optional
Description
virtual-directory-mapping
Use the virtual-directory-mapping element to specify document roots other than the default document root of the Web application for certain kinds of requests, such as image requests. All images for a set of Web applications can be stored in a single location, and need not be copied to the document root of each Web application that uses them. For an incoming request, if a virtual directory has been specified, the servlet container will search for the requested resource first in the virtual directory and then in the Web application's original document root. This defines the precedence if the same document exists in both places.
&virtual-directory-mapping&
&local-path&c:/usr/gifs&/local-path&
&url-pattern&/images/*&/url-pattern&
&url-pattern&*.jpg&/url-pattern&
&/virtual-directory-mapping&
&virtual-directory-mapping&
&local-path&c:/usr/common_jsps.jar&/local-path&
&url-pattern&*.jsp&/url-pattern&
&/virtual-directory-mapping&
The following table describes the elements you can define within the virtual-directory-mapping element.
Table B-11 virtual-directory-mapping Elements
Required/Optional
Description
The WebLogic Server implementation of virtual directory mapping requires that you have a directory that matches the url-pattern of the mapping. The image example requires that you create a directory named images at c:/usr/gifs/images. This allows the servlet container to find images for multiple Web applications in the images directory.
url-match-map
Use this element to specify a class for URL pattern matching. The WebLogic Server default URL match mapping class is weblogic.servlet.utils.URLMatchMap, which is based on Java EE standards. Another implementation included in WebLogic Server is SimpleApacheURLMatchMap, which you can plug in using the url-match-map element.
Rule for SimpleApacheURLMatchMap:
If you map *.jws to JWSServlet then
/bar.jws/baz will be resolved to JWSServlet with pathInfo = baz.
Configure the URLMatchMap to be used in weblogic.xml as in the following example:
&url-match-map&
weblogic.servlet.utils.SimpleApacheURLMatchMap
&/url-match-map&
security-permission
The security-permission element specifies a single security permission based on the security policy file syntax. Refer to the following URL for the implementation of the security permission specification: .
Disregard the optional codebase and signedBy clauses.
For example:
&security-permission-spec&
grant { permission java.net.SocketPermission "*", "resolve" };
&/security-permission-spec&
permission java.net.SocketPermission is the permission class name.
"*" represents the target name.
resolve indicates the action.
context-root
The context-root element defines the context root of this standalone Web application. If the Web application is part of an EAR, not standalone, specify the context root in the EAR's META-INF/application.xml file. A context-root setting in application.xml takes precedence over context-root setting in weblogic.xml.
Note that this weblogic.xml element only acts on deployments using the two-phase deployment model.
The order of precedence for context root determination for a Web application is as follows:
Check application.xml if found, use as Web application's context root.
If context root is not set in application.xml, and the Web application is being deployed as part of an EAR, check whether context root is defined in weblogic.xml. If found, use as Web application's context root. If the Web application is deployed standalone, application.xml does not come into play and the determination for context-root starts at weblogic.xml and defaults to URI if it is not defined there.
If context root is not defined in weblogic.xml or application.xml, then infer the context path from the URI, giving it the name of the value defined in the URI minus the WAR suffix. For instance, a URI MyWebApp.war would be named MyWebApp.
wl-dispatch-policy
Use the wl-dispatch-policy element to assign the Web application to a configured Work Manager by identifying the Work Manager name. This Web application-level parameter can be overridden at the individual servlet or JSP level by using the per-servlet-dispatch-policy element.
servlet-descriptor
Use the servlet-descriptor element to aggregate the servlet-specific elements.
The following table describes the elements you can define within the servlet-descriptor element.
Table B-12 servlet-descriptor Elements
Required/Optional
Description
work-manager
The work-manager element is a sub-element of the weblogic-web-app element. You can define the following elements within the work-manager element.
Table B-13 work-manager Elements
Required/Optional
Description
The logging element is a sub-element of the weblogic-web-app element. You can define the following elements within the logging element.
Table B-14 logging Elements
Required/Optional
Description
library-ref
The library-ref element references a library module, which is intended to be used as a Web application library in the current Web application.
&library-ref&
&library-name&WebAppLibraryFoo&/library-name&
&specification-version&2.0&/specification-version&
&implementation-version&8.1beta&/implementation-version&
&exact-match&false&/exact-match&
&/library-ref&
Only the following sub-elements are relevant to Web applications: library-name, specification-version, implementation-version, and exact-match.
You can define the following elements within the library-ref element.
Table B-15 library-ref Elements
Required/Optional
Description
The following table describes the elements you can define within a fast-swap element.
For more information about FastSwap Deployment, see
in Deploying Applications to WebLogic Server.
Table B-16 fast-swap Elements
Required/Optional
Description
async-descriptor
Use the async-descriptor element to configure the asynchronous processing behavior of Web applications. The following table describes the elements you can define within an async-descriptor element.
Table B-17 async-descriptor Elements
Required/Optional
Description
async-work-manager
Use the async-work-manager element to specify a Work Manager for asynchronous jobs, including asynchronous dispatches initiated using the
dispatch methods and runnable jobs started using the AsyncContext start method. If no Work Manager is specified, the asynchronous jobs will be executed in the current request Work Manager.
Backwards Compatibility Flags
For WebLogic Server, backward compatibility for WebLogic Server 9.2 or earlier is supported via the backward-compatible element within the jsp-descriptor element.
Compatibility with JSP 2.0 Web Applications
JSP 2.1 is supported as of WebLogic Server 10.0. Depending on the version of the Web application (version 2.4 or 2.5) and the setting of the backward-compatible element in the weblogic.xml descriptor file, WebLogic Server will also support JSP 2.0.
JSP Behavior and Buffer Suffix
If a Web application version is 2.5 (for example, its web.xml has a version attribute of 2.5) and the backward-compatibility flag is set to false, then:
All version 2.1 JSP/TAG files will follow the new JSP behavior.
All version 2.0 or earlier JSP/TAG files will follow the previous JSP 2.0 or earlier behavior.
If a Web application version is 2.5 and the backward-compatibility flag is set to true, then all JSP/TAG files will follow the previous JSP 2.0 or earlier behavior.
If the Web application version is 2.4 or earlier, then all JSP/TAG files will follow the previous JSP 2.0 or earlier behavior no matter how the backward-compatibility flag is set.
Implicit Servlet 2.5 Package Imports
The Servlet 2.5 specification mandates that only the java.lang.*, javax.servlet.*, javax.servlet.jsp.*, and javax.servlet.http.* packages be implicitly imported. In compliance with the Servlet 2.5 specification, WebLogic Server will only import these mandated packages. Whereas, previous releases of WebLogic Server also imported the java.io.*, java.util.*, and javax.servlet.jsp.tagext.* packages.
WebLogic Server will follow the previous 2.4 or earlier behavior and import the non-mandated packages, if any of the following occur:
The backward-compatible flag is set to true in the weblogic.xml descriptor file.
The Web application version is 2.4 or earlier.
The individual JSP/TAG files in a version 2.5 Web application are version 2.0 or earlier.
Web Container Global Configuration
To configure your Web container at a global level, use the WebAppContainerMBean. For information on the WebAppContainerMBean attributes and how to use them to specify domain-wide defaults for all of your Web applications, see the .
Scripting on this page enhances content navigation, but does not change the content in any way.

我要回帖

更多关于 ejb项目部署 的文章

 

随机推荐