aspose file tools*
The moose likes Groovy and the fly likes HTTP status in groovy? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "HTTP status in groovy?" Watch "HTTP status in groovy?" New topic
Author

HTTP status in groovy?

miles zarathustra
Greenhorn

Joined: Dec 01, 2009
Posts: 2
I have a groovy page that looks like this:

but it doesn't work:

[u0100050-lx-~/tmp] curl -D hdr.txt http://localhost:6080/indexOK.groovy
STATUS 500
[u0100050-lx-~/tmp] cat hdr.txt
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 17 Feb 2011 22:55:32 GMT



I tried using setStatus() instead, and casting response first, but neither helped.
The JSP version works just fine.

Anybody have any clues? Or does this just not work in Groovy?
If it's a state exception I should see it, right?

Thanks,
-= miles =-

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

What do you mean it doesn't work?


[u0100050-lx-~/tmp] curl -D hdr.txt http://localhost:6080/indexOK.groovy
STATUS 500


Oh wait...You're saying the actual returned status isn't 500. Let me dig in on that...


GenRocket - A Test Data Generation Platform
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

This is just a guess because I can't test this out right now for myself, but try one of the following:



or



See if either / both of those work.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP status in groovy?
 
Similar Threads
Calling webservice: works from standalone app but not from weblogic
How to do enums in Groovy/Grails?
Grails: A Quick Start Guide Question
axis2: set SC_BAD_REQUEST with AxisFault
groovy vs scala