本文整理了Java中org.apache.wicket.markup.html.WebPage.configureResponse()
方法的一些代码示例,展示了WebPage.configureResponse()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebPage.configureResponse()
方法的具体详情如下:
包路径:org.apache.wicket.markup.html.WebPage
类名称:WebPage
方法名:configureResponse
暂无
代码示例来源:origin: brix-cms/brix-cms
@Override
protected void configureResponse(WebResponse response) {
super.configureResponse(response);
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
}
}
代码示例来源:origin: brix-cms/brix-cms
@Override
protected void configureResponse(WebResponse response) {
super.configureResponse(response);
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
}
}
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
/**
* @see org.apache.wicket.markup.html.WebPage#configureResponse()
*/
protected void configureResponse()
{
super.configureResponse();
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
/**
* @see org.apache.wicket.markup.html.WebPage#configureResponse()
*/
protected void configureResponse()
{
super.configureResponse();
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_FORBIDDEN);
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* @see org.apache.wicket.markup.html.WebPage#configureResponse()
*/
@Override
protected void configureResponse()
{
super.configureResponse();
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
/**
* @see org.apache.wicket.markup.html.WebPage#configureResponse()
*/
protected void configureResponse()
{
super.configureResponse();
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_NOT_FOUND);
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* @see org.apache.wicket.markup.html.WebPage#configureResponse()
*/
@Override
protected void configureResponse()
{
super.configureResponse();
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_FORBIDDEN);
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* @see org.apache.wicket.markup.html.WebPage#configureResponse()
*/
@Override
protected void configureResponse()
{
super.configureResponse();
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_NOT_FOUND);
}
代码示例来源:origin: org.geoserver.web/web-core
@Override
protected void configureResponse() {
super.configureResponse();
// this is to avoid https://issues.apache.org/jira/browse/WICKET-923 in Firefox
final WebResponse response = getWebRequestCycle().getWebResponse();
response.setHeader("Cache-Control", "no-cache, max-age=0, must-revalidate, no-store");
}
代码示例来源:origin: apache/wicket
@Override
protected void onRender()
{
// Configure the response such as headers etc.
configureResponse((WebResponse)RequestCycle.get().getResponse());
// The rules if and when to insert an xml decl in the response are a bit tricky. Allow the
// user to replace the default per page and per application.
renderXmlDecl();
super.onRender();
}
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
/**
* @see org.apache.wicket.markup.html.WebPage#configureResponse()
*/
protected void configureResponse()
{
super.configureResponse();
if (getWebRequestCycle().getResponse() instanceof WebResponse)
{
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* @see org.apache.wicket.markup.html.WebPage#configureResponse()
*/
@Override
protected void configureResponse()
{
super.configureResponse();
if (getWebRequestCycle().getResponse() instanceof WebResponse)
{
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
}
代码示例来源:origin: org.apache.wicket/wicket-core
@Override
protected void onRender()
{
// Configure the response such as headers etc.
configureResponse((WebResponse)RequestCycle.get().getResponse());
// The rules if and when to insert an xml decl in the response are a bit tricky. Allow the
// user to replace the default per page and per application.
renderXmlDecl();
super.onRender();
}
代码示例来源:origin: org.wicketstuff/wicket-security-wasp
@Override
protected void configureResponse(final WebResponse response)
{
super.configureResponse(response);
if (doAuthentication)
{
WebRequest request = (WebRequest)RequestCycle.get().getRequest();
String auth = request.getHeader("Authorization");
if (Strings.isEmpty(auth))
requestAuthentication(request, response);
else
{
int index = auth.indexOf(' ');
if (index < 1)
requestAuthentication(request, response);
String type = auth.substring(0, index);
try
{
handleAuthentication(request, response, type, auth.substring(index + 1));
}
catch (LoginException e)
{
log.error(type + " Http authentication failed", e);
error(e);
requestAuthentication(request, response);
}
}
}
}
代码示例来源:origin: org.wicketstuff/wicketstuff-security-wasp
@Override
protected void configureResponse(final WebResponse response)
{
super.configureResponse(response);
if (doAuthentication)
{
WebRequest request = (WebRequest)RequestCycle.get().getRequest();
String auth = request.getHeader("Authorization");
if (Strings.isEmpty(auth))
requestAuthentication(request, response);
else
{
int index = auth.indexOf(' ');
if (index < 1)
requestAuthentication(request, response);
String type = auth.substring(0, index);
try
{
handleAuthentication(request, response, type, auth.substring(index + 1));
}
catch (LoginException e)
{
log.error(type + " Http authentication failed", e);
error(e);
requestAuthentication(request, response);
}
}
}
}
代码示例来源:origin: brix-cms/brix-cms
@Override
protected void configureResponse(WebResponse response) {
super.configureResponse(response);
String mimeType = getMimeType(getModelObject());
String encoding = Application.get().getRequestCycleSettings().getResponseRequestEncoding();
((WebResponse) getResponse()).setContentType(mimeType + "; charset=" + encoding);
// TODO figure out how to handle last modified for pages.
// lastmodified depends on both the page and the tiles, maybe tiles
// can contribute lastmodified dates and we take the latest...
// response.setLastModifiedTime(Time.valueOf(node.getObject().getLastModified()));
}
内容来源于网络,如有侵权,请联系作者删除!