本文整理汇总了Java中com.mendix.m2ee.api.IMxRuntimeResponse.setContentType方法的典型用法代码示例。如果您正苦于以下问题:Java IMxRuntimeResponse.setContentType方法的具体用法?Java IMxRuntimeResponse.setContentType怎么用?Java IMxRuntimeResponse.setContentType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.mendix.m2ee.api.IMxRuntimeResponse
的用法示例。
在下文中一共展示了IMxRuntimeResponse.setContentType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleXrds
import com.mendix.m2ee.api.IMxRuntimeResponse; //导入方法依赖的package包/类
private void handleXrds(IMxRuntimeResponse resp) throws IOException {
LOG.info("Found local discovery of RP return_url endpoint.");
resp.setContentType("application/xrds+xml; charset=UTF-8");
resp.getWriter().write(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<xrds:XRDS xmlns:xrds=\"xri://$xrds\" xmlns=\"xri://$xrd*($v*2.0)\"" +
" xmlns:openid=\"http://openid.net/xmlns/1.0\">" +
"<XRD>" +
"<Service>" +
"<Type>http://specs.openid.net/auth/2.0/return_to</Type>" +
"<URI>" + OPENID_RETURN_URL + "</URI>" +
"</Service>" +
"</XRD>" +
"</xrds:XRDS>");
resp.getWriter().close();
}
示例2: handleXrds
import com.mendix.m2ee.api.IMxRuntimeResponse; //导入方法依赖的package包/类
private void handleXrds(IMxRuntimeResponse resp) throws IOException {
log.info("Found local discovery of RP return_url endpoint.");
resp.setContentType("application/xrds+xml; charset=UTF-8");
resp.getWriter().write(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<xrds:XRDS xmlns:xrds=\"xri://$xrds\" xmlns=\"xri://$xrd*($v*2.0)\"" +
" xmlns:openid=\"http://openid.net/xmlns/1.0\">" +
"<XRD>" +
"<Service>" +
"<Type>http://specs.openid.net/auth/2.0/return_to</Type>" +
"<URI>" + OpenIDReturnURL + "</URI>" +
"</Service>" +
"</XRD>" +
"</xrds:XRDS>");
resp.getWriter().close();
}
示例3: forceLogoff
import com.mendix.m2ee.api.IMxRuntimeResponse; //导入方法依赖的package包/类
private void forceLogoff(IMxRuntimeRequest req, IMxRuntimeResponse resp) {
String username = req.getParameter("openid");
String fingerprint = req.getParameter("fingerprint");
if (SINGLESIGNOFF_ENABLED)
forceSessionLogoff(username, fingerprint);
else
LOG.warn("Received force_logoff request, but single sign off is not unabled in the configuration!");
resp.setStatus(IMxRuntimeResponse.OK);
resp.setContentType("text/plain");
}
示例4: forceLogoff
import com.mendix.m2ee.api.IMxRuntimeResponse; //导入方法依赖的package包/类
private void forceLogoff(IMxRuntimeRequest req, IMxRuntimeResponse resp) {
String username = req.getParameter("openid");
String fingerprint = req.getParameter("fingerprint");
if (SINGLESIGNOFF_ENABLED)
forceSessionLogoff(username, fingerprint);
else
log.warn("Received force_logoff request, but single sign off is not unabled in the configuration!");
resp.setStatus(IMxRuntimeResponse.OK);
resp.setContentType("text/plain");
}