作业帮 > 初中作文 > 教育资讯

www.war33.com

来源:学生作业帮助网 编辑:作业帮 时间:2024/09/23 23:28:19 初中作文
www.war33.com初中作文

篇一:vmware+redhat5+jdk1.4+tomcat5.0+mysql5.0

目录

www.war33.com

文档介绍 ......................................................................................................................................................................... 1

建立虚拟机 ..................................................................................................................................................................... 2

安装Redhat5.x ................................................................................................................................................................ 7

Open ssh 连接虚拟机 .................................................................................................................................................. 37

安装jdk+tomcat+mysql ................................................................................................................................................ 43

安装jdk ................................................................................................................................................................. 43

安装tomcat ........................................................................................................................................................... 48

安装MYSQL ........................................................................................................................................................... 55

安装zcms ...................................................................................................................................................................... 60

文档介绍

本文档演示在VMWARE6.0虚拟的Redhat5.2系统上部署zcms,

软件为jdk1.4.2+tomcat5.0.30+mysql5.0+zcms0906-gbk.war

Redhat5.X 需要VMWARE6.0以上的版本,Redhat4.x只需要VMWARE5.5就可以了

建立虚拟机

篇二:struts2笔记

2012-09-14

DWR AJAX的框架

Struts2 MVC的框架

MVC--MODEL CONTROLLER VIEW

中央控制器(Services)-->控制转发的思想进行一层封装,使之更加通用化 大众化

Struts2的配臵 WebWork+Struts1=Struts2

发明者一种思维方式 第三方的框架/插件/一系列的jar包的集合

Struts2框架无私贡献给了 apache组织

www.apache.org

Struts2项目的目录

app文件夹-->war struts2的小例子

docs文件夹-->struts2的文档 Struts2的网站

lib文件夹----->struts2的jar包

src文件夹----->struts2的源代码

web的项目

开始配臵

1.导入struts2的jar

lib

上传 commons-fileupload-1.2.2.jar

commons-io-2.0.1.jar

类似于jstl和el的东西 ognl-3.0.5.jar

核心jar包 xwork-core-2.3.4.jar

struts2-core-2.3.4.jar

模板技术 页面静态化 freemarker-2.3.19.jar

记录日志 commons-logging-1.1.1.jar

commons-lang3-3.1.jar

将以上jar包导入到项目的lib目录中

2.配臵核心过滤器

在web.xml添加

struts2

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

struts2

/*

3.控制转发配臵文件 struts.xml=Services中央控制器

4.Struts2的流程

页面上使用超链接和FORM提交-->会被web.xml中我配臵的struts2的核心过滤器给拦截.StrutsPrepareAndExecuteFilter交给struts.xml处理(解析struts.xml文件) 看我们请求的服务在struts.xml是不是存在,如果存在的话 就找到它对应

的类.对应的方法去处理.方法处理完成以后.会返回一个字符串.然后又返回到struts.xml的配臵文件中.查看

当前的这个action(服务中)是否存在一个和返回的字符串一致的result 的name的值,如果存在就跳转到指定的页面去完成业务逻辑

5.∑每一个方法的返回值一定要是String类型

6. 要想让一个普通类变成一个服务处理类Action类,可以继承ActionSupport类

或者实现Action接口,但是实现Action接口后,会让你重写一个方法,这个方法叫execute ()

7.传值的问题

(1).将页面上的数据传入到action类中去

(2).将action中的数据传到页面中去

Struts2是如何来传递值传递的,有3种方式:

1.简单传值

规则:只要你的action中有这个数据 而且有这个数据的get和set方法 值就可以传递过去 注意:属性的名字要和action中数据的名字保持一致 数据才能传递过来

action中要有set方法 这个set方法一定是页面上的name的set方法 这个 值可以传递过来 从action将数据传递到页面中

2.复杂传值

流程:

1.先实例化对象

2.调用该对象的set方法进行传值

private UserVO user;

public String execute() throws Exception { } public UserVO getUser() { } public void setUser(UserVO user) { } this.user = user; return user; System.out.println("我是excute方法。。。。"); System.out.println(user.getUser_name()); System.out.println(user.getUser_pass()); return SUCCESS;

3.modeldriver传值 不需要指定类.属性

步骤:

1.将那个类实例化 设臵该类的get和set方法

2.实现modeldriver的接口<类>重写它的方法setModel的方法,返回值就是哪个类的引用

private UserVO user=new UserVO(); public UserVO getUser() { } public void setUser(UserVO user) { } public UserVO getModel() { System.out.println("我是ModelDriven方法。。。。。"); this.user = user; return user;

} 8.struts.xml的图形化配臵

myeclipse提供了struts.xml的图形化配臵

9.动态方法

服务名!方法

动态方法匹配

UserAction_save_success

action name="*_*_*" class="com.softeem.train.action.{1}" method="{2}">

/index2.jsp

10.namespace的问题

在struts.xml的配臵文件中

标签有且只有一个

可以有0个到多个

一个package标签中可以有0个到多个

一个action标签中可以有0个到多个

解释:

package name=可以任意取

extends 必须是struts-default.xml配臵文件 就相当于将struts-default这个xml

中的内容引入进来

namespace="/" /就代表了根路径

每一个package都必须要有一个namespace

每一个namespace都不能一样

我们使用不同的namespace来区分不同的包,来区分相同名的服务

作业: 做一套struts的增删查改

2012-09-15

1.访问Web元素

应用场景: 登录-->index.jsp(header.jsp.sidebar.jsp,main.jsp)

-->欢迎您 xxx Session

在struts2中获得request对象,session对象,application对象:有4种方式

第一种方式:通过Map 方式由 ActionContext获得

public class HelloAction extends ActionSupport {

private Maprequest;

private Mapsession;

private Mapapplication;

public HelloAction() {

//上下文的概念 根/值栈 request=(Map)ActionContext.getContext().get("request"); session=ActionContext.getContext().getSession();

}

第二种方式:通过ServletActionContext得到,使用servlet的方式获得的

public class HelloAction extends ActionSupport {

}

第三种方式:通过Map 方式由ActionContext自动注入过来的

public class HelloAction extends ActionSupport

implements RequestAware,SessionAware,ApplicationAware{

private Maprequest;

private Mapsession;

private Mapapplication;

//就是和ActionContext说 你把application注入给我

public void setApplication(Map application) { } public void setSession(Map session) { } public void setRequest(Map request) { this.request=request; }

this.application=application; private HttpServletRequest request; private HttpSession session; private ServletContext application; public HelloAction() { } request=ServletActionContext.getRequest(); session=request.getSession(); application=session.getServletContext(); this.session=session; 第四种方式:使用的Servlet 方式,实现一个ServletRequestAware

private HttpServletRequest request;

private HttpSession session;

private ServletContext application;

//我只注入一个ServletRequest对象给你

//剩下的自己去通过它来获得

public void setServletRequest(HttpServletRequest request) {

2.result 返回类型 this.request=request; session=request.getSession(); application=session.getServletContext(); } public class HelloAction extends ActionSupport implements ServletRequestAware{

default(dispatcher)

(1)dispatcher

只能跳转到一个页面;若result type不写,默认为dispatcher,可以写参数,但是不能传递

语法: 指定一个页面

或者:指定一个页面

或者:

指定一个页面

(2) redirect 可以跳转到页面,或者一个网址,或者其他的action

在跳转的同时,可以传递多个参数.可以&来分隔多个参数

语法: 指定一个页面

或者:指定一个Action

或者:指定一个网络地址

或者:

指定一个Action?参数1=值&参数2=值&;参数3=值&

true设臵解析模式

(3)chain 可以实现Action和Action之间的跳转,但是不能传递参数(可以写参数,但是参数传递不过去) 跳转到指定的action中,可以写参数,但是不能传递到页面中去

语法:

包的namespace

action的名字

方法名

(4)redirectAction 只能跳转到一个action中,可以在跳转的同时带参数

可以实现Action和Action之间的跳转,可以在跳转的同时,传递任意多个参数

语法:

包的namespace

action的名字

方法名(可选的)

................任意多个参数

动态结果参数

在struts.xml中可以写EL表达式 获得上一个Action的结果集

redirect redriectAction

如果出现跳转的情况

我们可以在struts.xml中获得action的结果 向下面继续传递

这种传递在以上四种跳转中是否都可以用

chain dispatcher 接不到参数

篇三:Dorado学习总结

Dorado 7学习总结

前期的Dorado7学习中,基础的学习内容:Ajax交互处理、动态视图、产品表的增删改和查询、表单开发技巧、数据校验、数据状态、下拉框、数据树、主从表、虚拟属性和虚拟关系、布局管理器、视图模板向导。在项目开发中,为了配合系统的调试所做的临时性的设定,进行War包发布测试。

Dorado7是Web表现层开发框架,即前台的框架。BDFv1是前台+后台的项目开发框架,提供安全,流程,WebService发布与调用、任务调度、SQL审计、数据库维护、多数据源切换等企业应用常见的功能模块。

1.Ajax的交互处理:

Dorado7中通过AjaxAction调用服务器段公开的方法,快速实现Ajax调用效果。为了简单的开发Ajax调用,需要配置Spring注释扫描,在app-context.xml文件中配置 :

app-context.xml是为方便用户而提供的默认的配置文件,其本身被context.xml文件import.

并且context.xml文件默认会被Spring自动扫描。

首次使用ajax调用时,需要在执行的服务端的方法的执行返回结果的代码行打断点,在访问视图页面是激活ajax的方法调用机制。

2.主从表关系

在数据树的实战中,通过对DataTree体现立体数据模型中的数据,主从表数据显示立体数据也是一种常见的模式。

?

?

?

? Grid主从数据模型显示---立体数据模型用主从表展示数据的开发方法。 数据维护----立体数据模型维护技巧 性能优化-主从表数据展示的性能优化 记录状态--记录数据状态

在业务视图创建model的dataType的主表实体对象,生成的实体属性中使用Reference引用项目当中主表对

应的实体类中对应的从表对应的泛型集合。

设定其goods

的属性:

设定其toolbar下的datapliot属性:

设定其DataGrid的属性(获取所有的产品信息):

添加Dialog对话框,将AutoForm添加在dialog的Children下

使用AutoForm完成修改添加的对话框操作:

设定其AutoForm的属性:

新增按钮事件:

this.get("#dsCategory").getData("#.goods").insert();

this.get("#dialogEdit").set("caption","产品新增");

this.get("#dialogEdit").show();

修改按钮事件:

this.get("#dialogEdit").show();

删除按钮事件:

var entity=this.get("#dsCategory").getData("#.goods");

if(entity){

dorado.MessageBox.confirm("您确认要删除此条记录吗?",function(){

entity.remove();

}

);

}

实现其操作功能的后台代码:

package com.bstek.demo.ims.business;

import java.util.Collection;

import java.util.List;

import java.util.Map;

import javax.annotation.Resource;

import org.hibernate.annotations.common.util.StringHelper;

import org.springframework.stereotype.Component;

import org.springframework.transaction.annotation.Transactional;

import com.bstek.demo.ims.dao.CategoryDao;

import com.bstek.demo.ims.dao.GoodsDao;

import com.bstek.demo.ims.entity.Category;

import com.bstek.demo.ims.entity.Goods;

import com.bstek.dorado.annotation.DataProvider;

import com.bstek.dorado.annotation.DataResolver;

import com.bstek.dorado.data.provider.Page;

@Component

public class CategoryGoodsExamplePR {

@Resource CategoryDao categoryDao; @Resource GoodsDao goodsDao; @DataProvider public Collection getAllCategory(){ } @DataProvider public void queryGoodsByCategoryId(Page page,int categoryId){ } @DataResolver @Transactional public void saveAllGoods(List categorys){ } @DataProvider public void getGoodsById(Page page,Map parameter){ if (null!=parameter) { categoryDao.persistEntities(categorys); for (Category category : categorys) { } List goods=category.getGoods(); if (goods!=null) { } goodsDao.persistEntities(goods); for (Goods good : goods) { } good.setCategoryId(category.getId()); good.setCategory(category); goodsDao.save(good); goodsDao.find(page, "from Goods where categoryId="+categoryId); return categoryDao.getAll();

} } String name=(String)parameter.get("name"); String birthplace=(String)parameter.get("birthplace"); String whereCase=""; if(null!=name){ } if (null!=birthplace) { } String queryStr=(StringHelper.isEmpty(whereCase))?"":" where "+whereCase; goodsDao.find(page, "from Goods"+queryStr); List list = goodsDao.find("from Goods"+queryStr); System.out.println("获取长度:"+list.size()); if (StringHelper.isNotEmpty(whereCase)) { } whereCase+="and birthplace like '%"+birthplace+"%'"; whereCase="name like '%"+name+"%'"; }else { } goodsDao.find(page,"from Goods");

界面添加AutoForm数据项目的模糊查询:

设定其DataPilot的属性:

dataset:dsGoods

itemCodes:pages

设定其两个autoformlement的name属性:name,birthplace:

查询按钮的单击事件:

var entity=this.get("#formCondition.entity");

var dataset=this.get("#dsGoods");

dataset.set("parameter",{

});

dataset.flushAsync(); name:entity.name, birthplace:entity.birthplace

简化的查询按钮事件:

简化查询功能:

Var entity=this.get(“#formCondition.entity”);

this.get(“#dsProduct”).set(“parameter”,entity).flushAsync();

角色用户信息管理

Dorado内部加载顺序:

第一步:客户端发出请求

第二步:初始化视图模型

第三步:初始化DataSet

第四步:初始化组件

第五步:完成组件与DataSet之间的绑定

第六步:DataSet向外部请求数据,完成数据加载

第七步:向客户端返回XML/HTML界面模板信息

第八步:完成,显示页面

Dorado7所创建的实例项目,配置部署需要引入下面的jar包

3.数据状态

由于DataGrid使用保存按钮的方法完成产品编辑信息最终的持久化处理。

由于表格是可以批量的增加,修改,删除的,它们对应的数据库最终持久化所采用的DAO底层的持久化方法也是不一样的,比如save(),update(),delete()方法。为了更好解决这个问题,在DataSet对实体对象的维护时,专门提供了state属性,用这个属性标识Entity

篇四:qdf框架及配置

篇五:ARM学习笔记

Ubuntu下安装tftp服务器配置

Ubuntu下安装tftp服务器配置

1、安装server与client

apt-get install tftpd-hpa tftp-hpa xinetd 2、删除standalone的启动方式

update-rc.d -f tftpd-hpa remove 3、新建tftpd目录并修改其属性

mkdir -p /tftpboot

chmod 777 /tftpboot

4、修改配置文件/etc/default/tftpd-hpa 修改为:

RUN_DAEMON="no"

OPTIONS="-l -c -s /tftpboot"

注意:这里默认是没有-c的,-c为可创建新文件,若无此参数,put命令则可能出现错误提示,此时只能复盖原有文件不能创建新文件; 并且get时会出现“TFTP Error code 2: Only absolute filenames allowed”的错误。 5、新建xinetd启动文件 gedit /etc/xinetd.d/tftp & 内容如下: service tftp {

socket_type = dgram protocol = udp wait = yes user = root

server = /usr/sbin/in.tftpd server_args = -s /tftpboot disable = no per_source = 11 cps = 100 2

flags = IPv4 }

6、修改/etc/inetd.conf文件 修改为:

tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /tftpboot 7、启动服务

重新启动xinetd服务

/etc/init.d/xinetd restart 重新加载inetd进程

/etc/init.d/inetd reload 启动tftp服务器

in.tftpd -l /tftpboot 8、测试

tftp localhost tftp localhost tftp> get zImage_N35 tftp>

zImage_N35是之前放入

tftp目录下的文件,执行get zImage_N35命令后在

软件开用户分

发 | 类:

Linux/嵌入式

Linux |

标签:

来原源: 创 |

当前目录下多了zImage_N35文件。Tftp配置成功。 系统分类:

ubuntu tftp |

点击查看原文

发表评论 阅读全文(17) | 回复(0)

发表于 2010/4/14 13:37:02 0

Ubuntu 9.04下nfs安装配置

Ubuntu 9.04下nfs安装配置

1、软硬件环境

VMware 7.0.0,Ubuntu 9.04

2、ubuntu安装后默认是没有带nfs的,使用如下命令安装:

我直接进的root帐户。

apt-get install nfs-kernel-server apt-get install nfs-common

3、虚拟机配置选项里网卡使用的是桥接,IP地址为192.168.0.1,和主机的192.168.0.11在同一网段,主机是连到路由器的。 4、修改配置文件

在设置配置文件之前,先建立共享目录/opt/nfs/root_nfs,root_nfs共享目录。修改nfs配置文件/etc/exports,添加如下一行: /opt/nfs/root_fs *(rw,sync,no_root_squash)

第一个参数是nfs共享目录,第二个是你允许的主机IP,这里设置成所有客户机都可共享该目录,括号里面的rw表示挂接此目录的客户机对该目录有读写的权限,no_root_squash 表示允许挂接此目录的客户机享有该主机的root 身份。

5、启动NFS服务并测试 /etc/init.d/portmap start

/etc/init.d/nfs-kernel-server start

现在roo_fs目录下放入一些文件,然后通过nfs挂载mnt目录测试。 mount localhost:/opt/nfs/root_nfs /mnt

如果mnt下有root_nfs目录下的文件,则证明nfs服务已经配置好了。

软件开用户分

发 | 类:

Linux/嵌入式

Linux |

标签:

ubuntu nfs |

来原源: 创 |

系统分类:

点击查看原文

发表评论 阅读全文(23) | 回复(0)

发表于 2010/4/12 21:59:50 0

ubuntu 9.04 下samba配置实现linux与XP文件共享

ubuntu 9.04 下samba配置实验

原想通过rdesktop实现host和client之间的文件共享,可rdesktop的本地文件挂载实在是不理想,于是打算使用samba来实现文件共享。设置参见这篇文档

一、安装samba

$sudo apt-get install samba 二、配置samba

主要的配置文件是/etc/samba/smb.conf 1、 workgroup = EXAMPLE security = user

2、在smb.conf最后增加下面一段内容 [share]

comment = Ubuntu File Server Share path = /srv/samba/share browsable = yes guest ok = yes read only = no create mask = 0755 3、建立共享目录

sudo mkdir -p /srv/samba/share

sudo chown nobody.nogroup /srv/samba/share/ 4、重新启动samba

sudo /etc/init.d/samba restart

现在已经可以通过\\ip\链接到samba上面

继续配置要求用户名密码访问

5、安装系统用户和smb用户同步的工具

sudo apt-get install libpam-smbpass 6、编辑/etc/samba/smb.conf

Edit /etc/samba/smb.conf, and in the [share] section change: guest ok = no

Finally, restart Samba for the new settings to take effect: sudo /etc/init.d/samba restart

read list = @qa

write list = @sysadmin, vincent

Another possible Samba permission is to declare administrative permissions to a particular shared resource. Users having administrative permissions may read, write, or modify any information contained in the resource the user has been given explicit administrative permissions to.

For example, if you wanted to give the user melissa administrative permissions to the share example, you would edit the /etc/samba/smb.conf file, and add the following line under the [share] entry: admin users = melissa

After editing /etc/samba/smb.conf, restart Samba for the changes to take effect:

sudo /etc/init.d/samba restart write list = @sysadmin, vincent

Another possible Samba permission is to declare administrative permissions to a particular shared resource. Users having administrative permissions may read, write, or modify any information contained in the resource the user has been given explicit administrative permissions to.

For example, if you wanted to give the user melissa administrative permissions to the share example, you would edit the /etc/samba/smb.conf file, and add the following line under the [share] entry: admin users = melissa

After editing /etc/samba/smb.conf, restart Samba for the changes to take effect:

sudo /etc/init.d/samba restart

转自:http://hi.baidu.com/bailiangcn/blog/item/b37bfb66acd1b42caa184c32.html 系统分类:

软件开用户分发 | 类:

Linux/嵌入式

Linux |

标签:

samba 共享

|

来转源: 贴 |

点击查看原文

发表评论 阅读全文(27) | 回复(0)

发表于 2010/4/8 19:32:53 0

“passing argument 2 0f “request_irq” from incompat

今天在些key的driver的时候。。。写完了编译出现一个warmming如下: warning: passing argument 2 of 'request_irq' from incompatible pointer type

我的request_irq函数调用如下:

if(request_irq(key_info->irq_no, key_eint_handler, IRQF_DISABLED,"Mini2440_Key", &i)) {

return -1; }

key_eint_handler函数的原型如下:

static void key_eint_handler(int irq, void *dev_id,struct pt_regs *regs)

报警的提示意思是第二个参数指针类型不匹配。本来觉得不匹配也就是一个warning没关系,不过后来还是想找到为什么。。。

初中作文