|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface Encodes.URLEncoder
The URL encoder used to encode URL by including the session ID,
and servlet context path.
It is a plugin that Encodes.encodeURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String) will call
to encode the URL.
In a sophisticated environment, e.g.,
Reverse Proxy,
the encoded URL might have to be prefixed with some special prefix.
To do that, you can implement Encodes.URLEncoder, and then
specify the class with the library property called
org.zkoss.web.servlet.http.URLEncoder.
When encodeURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, org.zkoss.web.servlet.http.Encodes.URLEncoder) encodes an URL, it will invoke
encodeURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, org.zkoss.web.servlet.http.Encodes.URLEncoder) such you can do customized encoding,
such as insert a special prefix.
Encodes.encodeURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String)| Method Summary | |
|---|---|
java.lang.String |
encodeURL(javax.servlet.ServletContext ctx,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
java.lang.String url,
Encodes.URLEncoder defaultEncoder)
Encodes the specified URL by including the session ID and the servlet context path, if necessary. |
| Method Detail |
|---|
java.lang.String encodeURL(javax.servlet.ServletContext ctx,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
java.lang.String url,
Encodes.URLEncoder defaultEncoder)
throws java.lang.Exception
Notice that url might contain "~" and other special characters that the Web server won't support. The implementation might invoke back the default encoding by use of the defaultEcoder parameter.
url - the URL to encode. It shall not include
the servlet context path.defaultEncoder - the default encoder (never null).
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||