- 浏览: 203295 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
Vcb:
http://osgi.jxtech.net是新出的一款基于O ...
java快速开发平台 -
hjwromantic:
http://blog.csdn.net/romantichj ...
java快速开发平台 -
fei_6666:
是的,要和角色关联起来,给不同角色配置不同的过滤条件,我们当时 ...
Ralasafe -
pwlovely:
你好,我想请问一下,ralasafe实现数据级权限的列的显示控 ...
Ralasafe -
bitray:
tomcat在netbeans下好像不行
maven项目部署
由于Struts2架构不能直接在jdk1.4的weblogic8.x下直接发布,所以,经常遇见一些朋友问“Struts2框架的系统在weblogic8.x如何发布”,我也不想再详细说struts2架构的搭建了,只就把工作笔记中的一部分拿出来贴在这里。
1、获得struts2开发包struts-2.0.11-all.zip;
2、解压缩后,在“struts-2.0.11\j4”目录下创建批处理文件“translate_others”,内容如下:
java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar ../lib/struts2-sitemesh-plugin-2.0.11.jar -destjar struts2-sitemesh-plugin-j4-2.0.11.jar
java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar ../lib/struts2-spring-plugin-2.0.11.jar -destjar struts2-spring-plugin-j4-2.0.11.jar
java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar ../lib/commons-logging-1.0.4.jar -destjar commons-logging-j4-1.0.4.jar
3、执行translate_others.cmd,并拷贝该目录下的8个文件到eclipse的workspace下project目录的lib下,做为项目加载类文件,文件名称如下:
backport-util-concurrent-3.0.jar
retrotranslator-runtime-1.2.2.jar
retrotranslator-transformer-1.2.2.jar
struts2-core-j4-2.0.11.jar
xwork-j4-2.0.4.jar
struts2-sitemesh-plugin-j4-2.0.11.jar
struts2-spring-plugin-j4-2.0.11.jar
commons-logging-j4-1.0.4.jar
4、从“struts-2.0.11\lib”目录中拷贝2个类文件到project目录的lib下,文件名如下:
ognl-2.6.11.jar
freemarker-2.3.8.jar
5、将spring组件包拷贝到project目录的lib下,文件名称如下:
spring.jar
6、在project的src目录下创建struts.xml配置文件,内容如下:
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<include file="struts-default.xml"/>
<package name="demo" extends="struts-default">
<action name="HelloWorld" class="HelloWorldAction">
<result>index.jsp</result>
</action>
</package>
</struts>
7、在project的src目录下创建struts.properties,内容如下:
struts.locale=zh_CN
#指定Web应用的默认编码集。该属性对于处理中文请求参数非常有用,对于获取中文请求参数值,应该将该属性值设置为GBK或者GB2312
struts.il8n.encoding=GBK
#开发调试模式开关(调试用)
struts.devMode=true
#每次HTTP请求到达时,系统都重新加载资源文件(调试用)
struts.il8.reload=true
#使用spring来创建创建对象(如Action等)
struts.objectFactory=spring
8、在project的src目录下创建applicationContext.xml,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
<bean id="HelloWorldAction" class="cn.yxc.company.actions.HelloWorld" scope="prototype">
</bean>
</beans>
9、在WebRoot\WEB-INF目录下创建web.xml,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<display-name>Demo系统</display-name>
<!-- Listener contextConfigLocation -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:applicationContext.xml
</param-value>
</context-param>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
10、在WebRoot目录下创建sayhello.jsp,用以调用action,内容如下:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Say Hello 你好</title>
</head>
<body>
<h3>Say "Hello(你好)" to: </h3>
<s:form action="HelloWorld">
Name: <s:textfield name="name" />
<s:submit />
</s:form>
</body>
</html>
11、在WebRoot目录下创建index.jsp,用以获取返回信息,内容如下:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
This is my JSP page. <br>
<h3><s:property value="name" /></h3>
</body>
</html>
1、获得struts2开发包struts-2.0.11-all.zip;
2、解压缩后,在“struts-2.0.11\j4”目录下创建批处理文件“translate_others”,内容如下:
java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar ../lib/struts2-sitemesh-plugin-2.0.11.jar -destjar struts2-sitemesh-plugin-j4-2.0.11.jar
java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar ../lib/struts2-spring-plugin-2.0.11.jar -destjar struts2-spring-plugin-j4-2.0.11.jar
java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar ../lib/commons-logging-1.0.4.jar -destjar commons-logging-j4-1.0.4.jar
3、执行translate_others.cmd,并拷贝该目录下的8个文件到eclipse的workspace下project目录的lib下,做为项目加载类文件,文件名称如下:
backport-util-concurrent-3.0.jar
retrotranslator-runtime-1.2.2.jar
retrotranslator-transformer-1.2.2.jar
struts2-core-j4-2.0.11.jar
xwork-j4-2.0.4.jar
struts2-sitemesh-plugin-j4-2.0.11.jar
struts2-spring-plugin-j4-2.0.11.jar
commons-logging-j4-1.0.4.jar
4、从“struts-2.0.11\lib”目录中拷贝2个类文件到project目录的lib下,文件名如下:
ognl-2.6.11.jar
freemarker-2.3.8.jar
5、将spring组件包拷贝到project目录的lib下,文件名称如下:
spring.jar
6、在project的src目录下创建struts.xml配置文件,内容如下:
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<include file="struts-default.xml"/>
<package name="demo" extends="struts-default">
<action name="HelloWorld" class="HelloWorldAction">
<result>index.jsp</result>
</action>
</package>
</struts>
7、在project的src目录下创建struts.properties,内容如下:
struts.locale=zh_CN
#指定Web应用的默认编码集。该属性对于处理中文请求参数非常有用,对于获取中文请求参数值,应该将该属性值设置为GBK或者GB2312
struts.il8n.encoding=GBK
#开发调试模式开关(调试用)
struts.devMode=true
#每次HTTP请求到达时,系统都重新加载资源文件(调试用)
struts.il8.reload=true
#使用spring来创建创建对象(如Action等)
struts.objectFactory=spring
8、在project的src目录下创建applicationContext.xml,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
<bean id="HelloWorldAction" class="cn.yxc.company.actions.HelloWorld" scope="prototype">
</bean>
</beans>
9、在WebRoot\WEB-INF目录下创建web.xml,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<display-name>Demo系统</display-name>
<!-- Listener contextConfigLocation -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:applicationContext.xml
</param-value>
</context-param>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
10、在WebRoot目录下创建sayhello.jsp,用以调用action,内容如下:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Say Hello 你好</title>
</head>
<body>
<h3>Say "Hello(你好)" to: </h3>
<s:form action="HelloWorld">
Name: <s:textfield name="name" />
<s:submit />
</s:form>
</body>
</html>
11、在WebRoot目录下创建index.jsp,用以获取返回信息,内容如下:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
This is my JSP page. <br>
<h3><s:property value="name" /></h3>
</body>
</html>
发表评论
-
采用CAS原理构建单点登录
2014-06-30 15:47 442企业的信息化过程是一 ... -
开发人员网址
2014-06-27 17:43 566http://www.ostools.net/ 开源中国在 ... -
CAS ABA问题
2013-08-20 22:03 902CAS ABA问题 在JDK 5之前Java语言是靠sy ... -
将java异常信息stackTrace转换成字符串
2011-05-26 12:48 5009public static void main(String[ ... -
Ralasafe
2011-05-06 15:22 1488Ralasafe简介 Ralasafe 是用Java编写的开源 ... -
myeclipse svn 修改用户名和密码
2011-03-22 09:39 766由于在svn的界面中并没 ... -
生成javadoc的乱码解决
2011-02-28 18:01 837myeclipse输入在虚拟机参数的地方输入如下参数即可: ... -
Win7 时区问题解决办法
2011-02-21 17:28 1000为了彻底的解决JAVA在获取系统时间少8小时的问题,请修改注册 ... -
Servlet中doGet与doPost的区别
2010-10-30 23:48 1156Servlet中doGet与doPost的区 ... -
怎样获取表记录数量最快?
2010-10-25 14:29 1005Select Count (*)和Select Count(1 ... -
SVN图标含义
2010-08-27 14:13 1878SVN图标含义 灰色向右箭头:本地修改过 蓝色向左箭头:SV ... -
新发现,中文java类能够运行
2010-08-06 10:37 764大家运行一下下面的代码,呵呵 public class 资讯 ... -
Sring split方法
2010-07-09 19:02 1312在java.lang包中有String.split()方法,返 ... -
hashtable的遍历
2010-06-02 10:12 3563Hashtable<String, String> ... -
oracle中的package
2010-05-19 16:26 1676oracle中的package (2006-12-21 20: ... -
视频服务器
2010-05-17 09:29 835linux下: Kd视频服务器,helix视频服务器,real ... -
理解JNDI中 java:comp/env/jdbc/datasource 与 jdbc/datasource 的不同之处
2010-04-15 23:04 1951[原创]理解JNDI中 java:comp/env/jdbc/ ... -
内存数据库-timesten
2010-04-13 14:33 2686timesten在重研所多个项目中都有内存数据库的应用,但重研 ... -
Open Flash Chart
2010-04-13 13:17 1507Open Flash Chart(OFC) 是一个开 ... -
易博龙ER/Studio简介
2010-04-08 11:12 2855易博龙ER/Studio简介 ER/Studio是一个平台无关 ...
相关推荐
jdk-8u311-windows-x64.exe jdk-8u311-windows-x64.exe.zip jdk-8u311-windows-x64.exe jdk-8u311-windows-x64.exe.zip jdk-8u311-windows-x64.exe jdk-8u311-windows-x64.exe.zip jdk-8u311-windows-x64.exe jdk-8u...
struts2-struts1-plugin-2.3.30.jar, struts2-testng-plugin-2.3.30.jar, struts2-tiles-plugin-2.3.30.jar, struts2-tiles3-plugin-2.3.30.jar, tiles-api-2.2.2.jar, tiles-compat-3.0.1.jar, tiles-core-2.2.2....
java-jdk1.8-8u361-all-jdk-win-linux ...jdk-8u361-linux-x64.rpm jdk-8u361-linux-x64.tar.gz jdk-8u361-windows-i586.exe jdk-8u361-windows-x64.exe 如果需要mac版本,请搜索java-jdk1.8-8u361-jdk-mac
poi-3.8-final-jdk1.4-20120520-rc1.jar
bcprov-ext-jdk15on-1.54.jar和bcprov-jdk15on-1.54.jar压缩文件
jdk-8u131-windows-x64jdk-8u131-windows-x64jdk-8u131-windows-x64jdk-8u131-windows-x64jdk-8u131-windows-x64jdk-8u131-windows-x64jdk-8u131-windows-x64jdk-8u131-windows-x64jdk-8u131-windows-x64jdk-8u131-...
struts2-bean-validation-plugin-2.5.2.jar, struts2-cdi-plugin-2.5.2.jar, struts2-config-browser-plugin-2.5.2.jar, struts2-convention-plugin-2.5.2.jar, struts2-core-2.5.2.jar, struts2-dwr-plugin-2.5.2....
aspose-words-15.8.0-jdk16.jar是Aspose对Word文档转换PDF所用的Jar包;aspose-words-15.8.0-jdk16.jar是Aspose对Word文档转换PDF所用的Jar包
官网发布的json-lib-2.4-jdk13.jar,在JDK1.4中无法使用,经过不懈努力,知道问题出在哪里了,分享下: debug那个json-lib源码,最后错误定位在这个方法 protected static void removeInstance( Object instance )...
json-lib-2.4-jdk15.jar json-lib-2.4-jdk15-sources.jar json-lib-2.4-jdk15-javadoc.jar 包含文件有:json-lib-2.4-jdk15.jar json-lib-2.4-jdk15-sources.jar json-lib-2.4-jdk15-javadoc.jar
json-lib-2.4-jdk14.jar ezmorph-1.0.6.jar commons-logging.jar commons-lang-2.0.jar commons-collections.jar commons-beanutils.jar 之前从别人那下的commons-lang.jar是损坏的 已修正
drools-all-jdk1.4-2.1.jar
jdk-8u171-nb-8_2-windows-x64jdk-8u171-nb-8_2-windows-x64jdk-8u171-nb-8_2-windows-x64jdk-8u171-nb-8_2-windows-x64jdk-8u171-nb-8_2-windows-x64jdk-8u171-nb-8_2-windows-x64jdk-8u171-nb-8_2-windows-x64jdk-...
cas-server-jdk1.4.jar
jdk安装包,Linux版.jdk-8u181-linux-x64.tar.gz
apache-tomcat-5.5.27-for unix JDK1.4补丁
解决no such provider: BC 问题所需的JAR 在jdk中的jre\lib\security修改java.security文件, security.provider.6=com.sun.security.sasl.Provider 下面添加...bcprov-jdk16-143.jar提供加密,解密,生成密钥对等方法
最新版windows jdk-11.0.18_windows-x64_bin.zip最新版windows jdk-11.0.18_windows-x64_bin.zip
jdk-8u162-linux-x64.tar.gz.zip jdk-8u162-linux-x64.tar.gz.zip jdk-8u162-linux-x64.tar.gz.zip
jdk-8u221-windows-x64.exe&jdk;-8u221-linux-x64.tar.gz,JDK最新版本