• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
re: WOResponse & appendContentString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: WOResponse & appendContentString


  • Subject: re: WOResponse & appendContentString
  • From: Jonathan Miller <email@hidden>
  • Date: Wed, 17 Oct 2007 14:41:39 -1000

Hi,

I'm using a custom Request Handler that returns a _javascript_ which redirects the browser to a new page.  In development mode this works fine but when deployed instead of returning the _javascript_ the browser just prints it as text.  Does anyone know what I'm doing wrong?

CODE 

        if("Production".equals(System.getProperty("MODE"))) {
        sb.append("<html><body><script type=\"text/_javascript_\">\n\t")
        .append("url = '';\n\t").append("window.location.replace(url);\n</script></body></html>");
        response.appendContentString(sb.toString());

       

        } 

Thanks in advance

Jon
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Fwd: WOResponse & appendContentString
      • From: Jonathan Miller <email@hidden>
    • Re: WOResponse & appendContentString
      • From: Lachlan Deck <email@hidden>
  • Prev by Date: (no subject)
  • Next by Date: Re: WOResponse & appendContentString
  • Previous by thread: Nevermind Re: Weird problem ...
  • Next by thread: Re: WOResponse & appendContentString
  • Index(es):
    • Date
    • Thread