当前位置: 首页>>代码示例>>Java>>正文


Java IMxRuntimeResponse.setContentType方法代码示例

本文整理汇总了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();
}
 
开发者ID:mendix,项目名称:IBM-Watson-Connector-Suite,代码行数:18,代码来源:OpenIDHandler.java

示例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();
}
 
开发者ID:mendix,项目名称:EmailModuleWithTemplates,代码行数:18,代码来源:OpenIDHandler.java

示例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");
}
 
开发者ID:mendix,项目名称:IBM-Watson-Connector-Suite,代码行数:13,代码来源:OpenIDHandler.java

示例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");
}
 
开发者ID:mendix,项目名称:EmailModuleWithTemplates,代码行数:13,代码来源:OpenIDHandler.java


注:本文中的com.mendix.m2ee.api.IMxRuntimeResponse.setContentType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。