Mar
5
在2.2版本中
//setup image directory
HTMLRenderContext renderContext = new HTMLRenderContext();
renderContext.setBaseImageURL(req.getContextPath()+"/images");
renderContext.setImageDirectory(sc.getRealPath("/images"));
logger.log( Level.FINE, "image directory " + sc.getRealPath("/images"));
System.out.println("stdout image directory " + sc.getRealPath("/images"));
HashMap<String, HTMLRenderContext> contextMap = new HashMap<String, HTMLRenderContext>();
contextMap.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT, renderContext );
HTMLRenderContext renderContext = new HTMLRenderContext();
renderContext.setBaseImageURL(req.getContextPath()+"/images");
renderContext.setImageDirectory(sc.getRealPath("/images"));
logger.log( Level.FINE, "image directory " + sc.getRealPath("/images"));
System.out.println("stdout image directory " + sc.getRealPath("/images"));
HashMap<String, HTMLRenderContext> contextMap = new HashMap<String, HTMLRenderContext>();
contextMap.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT, renderContext );
Aug
3
在buffalo推出session的支持后,许多人开始在服务中调用
等操作来获取服务器状态信息,最常见的就是在很多OA应用中,绝大部分操作都需要用户登录才能使用。这种场景的常见处理办法是先判断用户是否登录,然后再调用某些方法。例如,一个列出用户所有的文档:
RequestContext.getContext().getSession()
等操作来获取服务器状态信息,最常见的就是在很多OA应用中,绝大部分操作都需要用户登录才能使用。这种场景的常见处理办法是先判断用户是否登录,然后再调用某些方法。例如,一个列出用户所有的文档:
buffalo.remoteCall("userService.isLogin", [], function(reply) {
if (reply.getResult()) {
buffalo.remoteCall("bookService.listAllBooks", [], function(reply){ ... })
} else {
alert("请先登录")
}
})
if (reply.getResult()) {
buffalo.remoteCall("bookService.listAllBooks", [], function(reply){ ... })
} else {
alert("请先登录")
}
})
Jul
3
类Buffalo
在一般的情况下,Buffalo类可以解决大多数的问题
Buffalo(gateway, async, events, options)
| 参数名称 | 参数类型 | 参数说明 | 是否必须 | 默认值 |
|---|---|---|---|---|
| gateway | string | Bufapp Servlet的地址 | true | N/A |
| async | boolean | 是否异步请求 | false | true |
| events | object | 待响应的事件 | false | 参见 如何自定义事件 |
| options | object | 其他选项 | false | timeout=10000 |
Jun
3
Buffalo支持将对象值绑定到DOM成员上,包括form成员(text, password, hidden, radio, checkbox,select, textarea),table, form, div/span,它也能转换form到具体java类型的对象。它只提供了一种能绑定所有类型值到不同form成员的便捷方法。
你可以如此轻松地使用绑定:
上面的代码片断尝试把"parameters"作为参数调用"yourService.method",然后绑定调用结果给"elementId"。
你可以如此轻松地使用绑定:
buffalo.bindReply("yourService.method", [parameters], "elementId")
上面的代码片断尝试把"parameters"作为参数调用"yourService.method",然后绑定调用结果给"elementId"。
Mar
21
参考
http://gceclub.sun.com.cn/staticcontent/html/sunone/app7/app7-dg-webapp/ch6/ch6-4.html
1.指定了自己的javaEncoding
http://gceclub.sun.com.cn/staticcontent/html/sunone/app7/app7-dg-webapp/ch6/ch6-4.html
1.指定了自己的javaEncoding
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>javaEncoding</param-name>
<param-value>GB18030</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>javaEncoding</param-name>
<param-value>GB18030</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
Feb
6
新的一年开始,按理说要对去年的什么东西做一番总结了,当然总结很多了,这次先总结一下 JSF 了,毕竟这对我来说是今年最主要的技术方向,对它也算是比较熟悉了,虽然没有非常深入的去研究它,但从一年多的使用和理解来说,还是有不少自己的心得的,在新的一年到来之际,把这些东西记录下来,重新记起这个让我欢喜让我忧的 JSF。静观这一年 JSF 的发展,没有太多的兴奋,也没有太多的欢喜,更多的是平静,与同一时间大红大紫的 Ajax 和 RoR 相比,JSF 带给我们的更多是平静,静的让人心里发慌,上半年可以说还是稍有一些波涛了,而随着月份的数字越来越大,波涛是越来越小了。
Jan
6
BEA has released BEA Workshop Studio 3.3 . In this release, Web Folder Mapping allows you to assemble your source files in a folder organization that matches the needs of your development team, not in a structure required by the server or the IDE. All Workshop Studio features then work transparently with the mapped files (eg. AppXRay, WYSIWYG rendering, Wizards, Validation, Navigation, etc). When using WebLogic Server’s split development directory, users can deploy non-standard structures directly to the server from the IDE, bypassing complicated ANT workarounds outside the IDE. In WebLogic Server, this feature is known as split development directory .







