摘要:
packageorg.springframework.web.servlet.theme;importjavax.servlet.http.Cookie;importjavax.servlet.http.HttpServletRequest;importjavax.servlet.http.HttpServletResponse;importorg.springframework.web.util.WebUtils;/***ImplementationofThemeResolverthatusesacookiesentbacktotheuser*incaseofacustomsetting,w 阅读全文
2012年5月17日 #
摘要:
在写iframe完成长连接获取上传状态的时候,有两次请求,一次上传,一次获取状态的。发现第一次上传上传的请求和获取状态的请求是不同的session,再次上传时就没问题了。找了资料,都说是放jsessionid,或者加P3P头信息。这些都不是我现在的真正问题。在google的bug工具中,看到原因了。我的iframe写得是<iframe name="upload${inputName}" src="" id="upload${inputName}" style="display:none"></if 阅读全文
摘要:
LocaleSpring MVC缺省使用AcceptHeaderLocaleResolver来根据request header中的 Accept-Language 来确定访客的local。对于前端jsp页面上,spring提供了标签<spring:message>来提供从resource文件中获取的文字的动态加载功能。例如修改servlet context xml文件中的messageSource部分,增加对多国语言message的code resource的引入。Xml代码<beanid="messageSource"class="org.sp 阅读全文
摘要:
Servlet中的输入参数为都是string类型,而spring mvc通过data bind机制将这些string 类型的输入参数转换为相应的command object(根据view和controller之间传输数据的具体逻辑,也可称为model attributes, domain model objects)。在这个转换过程中,spring实际是先利用java.beans.PropertyEditor中的 setAdText方法来把string格式的输入转换为bean属性,亦可通过继承java.beans.PropertyEditorSupport来实现自定义的PropertyEdit 阅读全文