资源简介
基于JAVA EE的运用到servlet的简单的网上商城代码,是一个很简单的原本。

代码片段和文件信息
package com.oreilly.struts.framework;
import javax.servlet.http.*;
import java.util.Locale;
import org.apache.struts.action.Action;
import org.apache.struts.action.RequestProcessor;
import org.apache.struts.Globals;
/**
* A customized RequestProcessor that checks the user‘s preferred Locale
* from the request each time. If a Locale is not in the session or
* the one in the session doesn‘t match the request the Locale in the
* request is set to the session.
*/
public class CustomRequestProcessor extends RequestProcessor {
protected void processLocale(HttpServletRequest request
HttpServletResponse response) {
// Are we configured to select the Locale automatically?
if (!moduleConfig.getControllerConfig().getLocale()) {
return;
}
// Get the Locale (if any) that is stored in the user‘s session
HttpSession session = request.getSession();
Locale sessionLocale = (Locale)session.getAttribute(Globals.LOCALE_KEY);
// Get the user‘s preferred Locale from the request
Locale requestLocale = request.getLocale();
// If was never a Locale in the session or it has changed set it
if (sessionLocale == null || (sessionLocale != requestLocale) ){
if (log.isDebugEnabled()) {
log.debug(“ Setting user locale ‘“ + requestLocale + “‘“);
}
// Set the new Locale into the user‘s session
session.setAttribute( Globals.LOCALE_KEY requestLocale );
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1568 2018-04-23 21:47 storefront\.classpath
文件 386 2018-04-23 21:47 storefront\.project
文件 88 2018-04-23 21:48 storefront\.settings\org.eclipse.core.resources.prefs
文件 3542 2018-04-23 21:50 storefront\build.xm
文件 4018 2010-03-30 10:39 storefront\build.xm
文件 4358 2010-03-30 10:39 storefront\build.xm
文件 55553 2018-04-23 21:47 storefront\lib\caucho-jdbc-mysql-0.2.7.jar
文件 117404 2018-04-23 21:47 storefront\lib\commons-beanutils.jar
文件 195616 2018-04-23 21:47 storefront\lib\commons-collections.jar
文件 81927 2018-04-23 21:47 storefront\lib\commons-dbcp.jar
文件 100232 2018-04-23 21:47 storefront\lib\commons-digester.jar
文件 14264 2018-04-23 21:47 storefront\lib\commons-fileupload.jar
文件 175967 2018-04-23 21:47 storefront\lib\commons-lang.jar
文件 31219 2018-04-23 21:47 storefront\lib\commons-logging.jar
文件 74 2018-04-23 21:47 storefront\lib\commons-logging.properties
文件 37499 2018-04-23 21:47 storefront\lib\commons-pool.jar
文件 30306 2018-04-23 21:47 storefront\lib\commons-resources.jar
文件 20691 2018-04-23 21:47 storefront\lib\commons-services.jar
文件 44391 2018-04-23 21:47 storefront\lib\commons-validator.jar
文件 967576 2018-04-23 21:47 storefront\lib\hibernate-2.1.8.jar
文件 65368 2018-04-23 21:47 storefront\lib\jakarta-oro.jar
文件 6727 2018-04-23 21:47 storefront\lib\jdbc2_0-stdext.jar
文件 72408 2018-04-23 21:47 storefront\lib\jsp-api.jar
文件 158892 2018-04-23 21:47 storefront\lib\log4j.jar
文件 422239 2018-04-23 21:47 storefront\lib\ojb-0.8.375.jar
文件 81214 2018-04-23 21:47 storefront\lib\poolman.jar
文件 1189 2018-04-23 21:47 storefront\lib\poolman.xm
文件 2111 2018-04-23 21:47 storefront\lib\poolman.xm
文件 93538 2018-04-23 21:47 storefront\lib\servlet-api.jar
文件 488720 2018-04-23 21:47 storefront\lib\struts.jar
............此处省略836个文件信息
- 上一篇:java日记本
- 下一篇:Android项目源码大学生毕设图书管理系统
相关资源
- jsonarray所必需的6个jar包.rar
- 三角网构TIN生成算法,Java语言实现
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 推荐算法的JAVA实现
- 基于Java的酒店管理系统源码(毕业设
- java-图片识别 图片比较
- android毕业设计
- java23种设计模式+23个实例demo
- java Socket发送/接受报文
- JAVA828436
- java界面美化 提供多套皮肤直接使用
- 在线聊天系统(java代码)
- 基于Java的图书管理系统807185
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- java做的聊天系统(包括正规课程设计
- Java编写的qq聊天室
- 基于JSP的学生宿舍管理系统(源码 数
- 商店商品管理系统 JAVA写的 有界面
- JAVA开发聊天室程序
- 在linux系统下用java执行系统命令实例
- java期末考试试题两套(答案) 选择(
- JAVA3D编程示例(建模、交互)
- Java 文件加密传输
- java做的房产管理系统
- 基于jsp的bbs论坛 非常详细
- [免费]java实现有障碍物的贪吃蛇游戏
评论
共有 条评论