Spring MVC@ResponseBodyが生成したページはIE 8の問題

3862 ワード

Spring MVCを使用してViewを経由せずに直接ページを生成するには、次の2つの方法があります.

@RequestMapping(value = "/something")
public void helloWorld(HttpServletResponse response)  {
  response.getWriter().println("Hello World")
}

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

第2の方法はIE 8でエラーが発生します.

      
	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)

          
	         。


最初の方法、すなわち問題解決に変更します.