I'm experiencing a problem with pages being returned with a content-type of 
'text/plain' instead of text/html.  I have a fairly standard setup:
  Struts build from November 09
  Tomcat 4.0

I'm using Cactus and HttpUnit to text my struts actions.  The action I'm 
testing returns a jsp page where I dynamically build a table.  In the 
cactus end method I'm using the HttpUnit WebResponse object to grab an 
instance of the table.  I'm getting an error message informing me that the 
content type is text/plain.  I have not specifically set the type to be 
text/plain anywhere in the application and thought the default in struts 
was text/html.  Any thoughts on what is happening?

The error message is:
com.meterware.httpunit.NotHTMLException: The content type of the response 
is 'text/plain': it must be 'text/html' in order to be recognized as HTML
    at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:789)
    at com.meterware.httpunit.WebResponse.getTables(WebResponse.java:334)
    at 
com.hane.lms.command.cart.TestUserCart_Cactus.endView(TestUserCart_Cactus.java:220)
    at 
org.apache.cactus.AbstractTestCase.callEndMethod(AbstractTestCase.java:304)
    at 
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:425)
    at org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:130)
    at org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:371)

Thanks,
Chris....


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to