Displaying keyword search results 1 - 10
Created by Fang on July 25, 2012 12:52:40 Last update: September 14, 2012 13:37:57
Summarized from official JAX-WS documentation : Sending and Receiving SOAP Headers To send a SOAP header:
HelloService helloService = new HelloService(); ...To receive a SOAP header:
List<Header> inboundHeaders = bp.getInboundHeaders...Message logging On the client side, set system property:
com.sun.xml.ws.transport.http.client.HttpTransport...On the server side, set system property:
com.sun.xml.ws.transport.http.HttpAdapter.dump=tru...Propagation of Server-side Stacktrace Propagation of Stack trace is on by default. The whole stacktrace (including nested exceptions) is propagated in the SOAP Fault and the complete exception stacktrace is visible to the client as cause of SOAPFaultException . To turn off stack trace propagation, set this system property on the server:
com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptu...Update: At least on the client side, the property name has been changed to:
com.sun.xml.internal.ws.transport.http.client.Http...The messages are dumped to stdout . For...
Created by voodoo on August 03, 2012 08:42:38 Last update: August 03, 2012 09:31:25
The C function getsockopt lets you get the error codes with the option SO_ERROR . The possible error numbers are defined in the global errno.h . The relevant values are:
#define ETIMEDOUT 110 /* Connection timed out */ ...But here's the whole list on my Linux system ( /usr/include/asm-generic/errno.h ):
#ifndef _ASM_GENERIC_ERRNO_H #define _ASM_GENER...
Created by zhidao on April 25, 2012 14:56:38 Last update: April 25, 2012 14:56:38
Lacking better alternatives, this is how I render a global validation error:
<spring:bind path="changePasswordForm"> <c:if ...<form:errors> without path attribute seems to work too:
Created by James on April 24, 2012 14:01:39 Last update: April 24, 2012 14:01:39
This is the Mathias Bynens placeholder plugin with several bug fixes of my own.
/*! http://mths.be/placeholder v2.0.7 by @mathias ...
Created by James on April 24, 2012 13:50:05 Last update: April 24, 2012 13:50:05
[Global log] this is: [object Window] [log.cal...
Created by Fang on April 16, 2012 12:58:35 Last update: April 16, 2012 12:58:35
To implement a JSP custom tag with dynamic attributes (for example, to pass-thru arbitrary attributes not handled by the JSP tag): Set the dynamic-attributes element to true in the TLD:
<tag> <name>mark</name> <tag-class>c...The tag handler must implement javax.servlet.jsp.tagext.DynamicAttributes :
package com.example.jsp; import java.io.*; ...
Created by James on February 02, 2012 16:09:05 Last update: February 02, 2012 16:09:17
flowplayer is another way to embed Flash in a web page. The code looks like this:
<object width="6400" height="380" data="swf/flowpl...You need to download two swf files: http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf http://releases.flowplayer.org/swf/flowplayer.controls-3.2.0.swf
Created by James on February 02, 2012 16:00:15 Last update: February 02, 2012 16:00:15
Video for Everybody seems to be a generic way to embed video in a web page, even without flash. This code snippet comes from that site.
<!-- first try HTML5 playback: if serving as XML, ...
Created by zhidao on January 25, 2012 16:07:29 Last update: January 25, 2012 16:07:29
A JSON response is auto-magically returned when you add the @ResponseBody annotation to the return value of a @RequestMapping annotated method:
import org.springframework.stereotype.Controller; ...For magic to happen, you must: Add annotation-driven to the org.springframework.web.servlet.DispatcherServlet config xml:
<?xml version="1.0" encoding="UTF-8"?> <beans x...Put Jackson jar files on CLASSPATH (i.e., under WEB-INF/lib ), which includes jackson-core-asl-1.6.4.jar and jackson-mapper-asl-1.6.4.jar .
Created by Fang on December 06, 2011 19:03:25 Last update: December 07, 2011 08:54:11
Our custom tag, as implemented in the previous note , is broken when a template is used. Create a template file ( home-template.xhtml ):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Stric...and a test page that uses it ( home.xhtml ):
<?xml version="1.0" encoding="UTF-8"?> <ui:comp...Then request the page with URL: http://localhost:8080/facelet-demo/home.jsf?name=Jack . You'll find that our hello tag works inside ui:repeat but fails to get the value defined by ui:param ! What's the problem? Our hello tag implementation evaluated the EL with the wrong EL context! This is the corrected implementation:
package com.example; import java.io.IOExcep...