• Post Reply Bookmark Topic Watch Topic
  • New Topic

Restful Web Service Response  RSS feed

 
Amit K Srivastava
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using restful service to login into application.In responce i am getting "success".But if i am trying to use this response for further pages it goes always in else case . I am not able to figure it how to handle this.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why on earth is this code in a JSP?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While I don't see the "else" statement you mention, I bet what you actually meant was that the redirect isn't executed - from which you concluded that the "if" doesn't trigger. I'm guessing that that is an incorrect conclusion (which you can easily test by putting a print statement inside the if block).

You can't send a redirect from the middle of a JSP. In fact, it's tricky to send a redirect from a JSP at all. As Bear hints at, you should put all this into a servlet, from which there is no difficulty to send a redirect.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!