公告:弹窗测试中,如有不便,请见谅。

Ubuntu开发Struts2应用(5、自定义拦截器)

2012年01月24日  分类:JAVA, Linux, Ubuntu  添加评论  47 次阅读 
Ubuntu开发Struts2应用(5、自定义拦截器)
Struts2为我们提供了丰富的拦截器,而实现自定义拦截器也是容易的一件事。 拦截器必须是无状态的,原因是Struts2不能保证为每一个请求或者action创建一个实例,所以如果拦截器带有状态,会引发并发问题。 实际应用中处理权限问题是常见的,下面就以一个拦截器来判断处理用户是否登录而有权限去执行action的内容。 LoginInterceptor.java package com.linuxsight.interceptor; import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.AbstractInterceptor; public class L...
阅读全文

Ubuntu开发Struts2应用(4、文件上传)

2012年01月21日  分类:JAVA, Linux, Ubuntu  添加评论  74 次阅读 
Ubuntu开发Struts2应用(4、文件上传)
文件上传这个功能在项目应用是非常常见的,这节说说Struts2如何实现文件上传。 Struts2使用开源项目Apache Jakarta Commons FileUpload和内建的FileUploadInterceptor拦截器实现文件上传 下面介绍代码: FileUploadAction    package com.linuxsight.action; import java.io.File; import org.apache.commons.io.FileUtils; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionContext; public class FileUploadAction {  private File upload;  private String uploadFileName;  private String uploadContentType;  priva...
阅读全文

Ubuntu开发Struts2应用(3、知识点记录)

2012年01月16日  分类:JAVA, Linux, Ubuntu  添加评论  108 次阅读 
Ubuntu开发Struts2应用(3、知识点记录)
本节记录了一些struts2的知识点。 1、设置开发调试 struts.properties struts.devMode = true 添加struts2-config-browser-plugin-2.3.1.jar 地址访问:http://localhost:8080/struts2T1/config-browser/index.action 使用标签<s:debug/>显示 地址访问: http://localhost:8080/struts2/linuxsight.action?debug=xml http://localhost:8080/struts2/linuxsight.action?debug=console 2、在struts.properties更换struts2默认主题 struts.ui.theme=simple//主题设为simple,不会在生成多余的html代码 3、struts2运行时变量查找顺序 default.properties strut...
阅读全文

Windows 7官方主题(战争机器3)

2012年01月15日  分类:Windows  添加评论  127 次阅读 
Windows 7官方主题(战争机器3)
Xbox 360大作《战争机器3》(Gears Of Wars 3)发布之际,微软就为其发布了两款官方主题,今天微软再发主题,展现玩家是如何解读《战争机器3》的。 这款主题共提供了7张壁纸,除此之外还包括大量的声音效果。 官方下载: http://download.microsoft.com/download/6/E/B/6EB3D1EA-DA6A-4A8D-980C-3D83B0F887D3/GOW3DeviantArt.themepack
阅读全文

Ubuntu开发Struts2应用(2、第一个程序)

2012年01月14日  分类:JAVA, Linux, Ubuntu  添加评论  89 次阅读 
Ubuntu开发Struts2应用(2、第一个程序)
本节介绍在ubuntu上开发的一个struts2应用。 新建一个web项目,利用myeclipse9.1给我们提供的struts2支持,搭建环境。 这里注意不要勾选多余的jar包,我们只需要core myeclipse9.1集成的Sturts版本是struts2.2.1 代码如下: web.xml <?xml version=”1.0″ encoding=”UTF-8″?> <web-app version=”3.0″ xmlns=”http://java.sun.com/xml/ns/javaee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/x...
阅读全文

Ubuntu开发Struts2应用(1、环境搭建MyEclipse+MySQL)

2012年01月14日  分类:JAVA, Linux, Ubuntu  添加评论  114 次阅读 
Ubuntu开发Struts2应用(1、环境搭建MyEclipse+MySQL)
本系列文章带来的是在Ubuntu11.10下开发Struts2程序学习过程所记录的滴滴点点,当中所写的也许不能算是学习的好教程,但所涉及的知识点相信会对学习Struts2有一定的帮助。 首先是在Ubuntu11.10搭建开发环境,相信大部分开发者都是在XP下完成的,比较少涉及Linux平台,如果你是用Ubuntu系统的,那可以看看本节内容。 1、安装myeclipse(由于myeclipse已经自带了Tomcat,所以我们不需要再去下载Tomcat了。) 最新的myeclipse已经是myeclipse10了,不过我这里用的myeclipse9.1。 下载地址:http://www.linuxsight.com/blog/2525 安装方法: linuxsight@linuxsight-ODM:...
阅读全文

PC-BSD 9.0 发布下载

2012年01月14日  分类:BSD  添加评论  189 次阅读 
PC-BSD 9.0 发布下载
如果你是新手,想在你的电脑装上BSD,那请用PCBSD吧,它就是桌面版的freebsd。 官方发布信息: The PC-BSD development team and iXsystems are pleased to announce the immediate availability of PC-BSD version 9.0. Based upon FreeBSD 9.0-RELEASE, this is also the first PC-BSD which offers users a variety of desktop environments to chose from, such as KDE, GNOME, Xfce, LXDE and more. Also available are pre-built VirtualBox / VMware images with integrated guest tools for rapid virtual system deployment, and native support for instal...
阅读全文

FreeBSD 9.0 下载

2012年01月12日  分类:BSD  添加评论  170 次阅读 
FreeBSD 9.0 下载
FreeBSD 9.0 正式版发布了,目前官网上还没发布该消息,但已经可以通过 FTP 下载。 FreeBSD 9.0将采用全新的文本安装器,升级ZFS文件系统,LLVM/Clang将取代GCC编译器,支持索尼PlayStation 3等。 下载信息: Download: FreeBSD-9.0-RELEASE-i386-dvd1.iso (2,140MB, SHA256), FreeBSD-9.0-RELEASE-amd64-dvd1.iso (2,278MB, SHA256). FTP:ftp://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/9.0/
阅读全文

无觅相关文章插件,快速提升流量