public final class HighlightFilter extends Object implements javax.servlet.Filter
The filter should be declared in a similar fashion as this:
<filter>
<filter-name>jhighlight</filter-name>
<filter-class>com.uwyn.jhighlight.servlet.HighlightFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>jhighlight</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
It will respond to files with the following extensions:
.javas, .htmls, .htms,
.xhtmls, .xmls and .lzxs. These will
be automatically mapped to files without the last s in the
filenames. Thus, for example, a request like this:
http://myhost.com/folder/MySource.javas
will retrieve this file:
http://myhost.com/folder/MySource.java
The contents of this file will be automatically highlighted and the resulting HTML will be served.
| コンストラクタと説明 |
|---|
HighlightFilter() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
void |
init(javax.servlet.FilterConfig filterConfig) |
public void init(javax.servlet.FilterConfig filterConfig)
init インタフェース内 javax.servlet.Filterpublic void destroy()
destroy インタフェース内 javax.servlet.Filterpublic void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter インタフェース内 javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionCopyright © 2011–2016. All rights reserved.