`
dean_liu
  • 浏览: 75231 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Spring MVC @ResponseBody生成的页面在IE8的问题

    博客分类:
  • Java
 
阅读更多
使用Spring MVC不通过View直接生成一个页面有两种方法:
@RequestMapping(value = "/something")
public void helloWorld(HttpServletResponse response)  {
  response.getWriter().println("Hello World")
}

@RequestMapping(value = "/something")
@ResponseBody
public String helloWorld()  {
  return "Hello World";
}

第二种方法在IE8中会出现错误:
平台版本信息
	Windows 			: 6.1.7600.0 (Win32NT)
	Common Language Runtime 	: 4.0.30319.1
	System.Deployment.dll 		: 4.0.30319.1 (RTMRel.030319-0100)
	clr.dll 			: 4.0.30319.1 (RTMRel.030319-0100)
	dfdll.dll 			: 4.0.30319.1 (RTMRel.030319-0100)
	dfshim.dll 			: 4.0.31106.0 (Main.031106-0000)

源
	部署 URL			: http://localhost:8080/alipay/redirect

错误摘要
	以下是错误摘要,这些错误的详细信息列在该日志的后面。
	* 激活 http://localhost:8080/alipay/redirect 导致异常。 检测到下列失败消息:
		+ 从 http://localhost:8080/alipay/redirect 读取清单时出现异常: 清单可能无效,或者文件无法打开。
		+ 对清单执行分析和 DOM 创建操作时导致错误。发现以下分析错误: 
			-HRESULT: 	0x8007001f
			 起始行: 	0
			 起始列: 	0
			 主文件: 	
		+ 连到系统上的设备没有发挥作用。 (异常来自 HRESULT:0x8007001F)

组件存储事务失败摘要
	未检测到任何事务错误。

警告
	执行此操作的过程中未出现任何警告。

操作进度状态
	* [2013/6/7 17:41:17] : 已启动 http://localhost:8080/alipay/redirect 的激活过程。

错误详细信息
	执行此操作期间检测到下列错误。
	* [2013/6/7 17:41:17] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
		- 从 http://localhost:8080/alipay/redirect 读取清单时出现异常: 清单可能无效,或者文件无法打开。
		- 源: System.Deployment
		- 堆栈跟踪:
			在 System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
			在 System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
			在 System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
			在 System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
			在 System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
		--- 内部异常 ---
		System.Deployment.Application.InvalidDeploymentException (ManifestParse)
		- 对清单执行分析和 DOM 创建操作时导致错误。发现以下分析错误: 
			-HRESULT: 	0x8007001f
			 起始行: 	0
			 起始列: 	0
			 主文件: 	
		- 源: System.Deployment
		- 堆栈跟踪:
			在 System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
			在 System.Deployment.Application.Manifest.AssemblyManifest..ctor(FileStream fileStream)
			在 System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
		--- 内部异常 ---
		System.Runtime.InteropServices.COMException
		- 连到系统上的设备没有发挥作用。 (异常来自 HRESULT:0x8007001F)
		- 源: System.Deployment
		- 堆栈跟踪:
			在 System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid)
			在 System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)

组件存储事务详细信息
	没有可用的事务信息。


改成第一种方法即问题解决。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics