• 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: Using WOHyperlink, Redirect to Normal HTML Page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using WOHyperlink, Redirect to Normal HTML Page


  • Subject: Re: Using WOHyperlink, Redirect to Normal HTML Page
  • From: Sreenivasulu A <email@hidden>
  • Date: Fri, 5 Feb 2010 15:04:28 +0530

Hi Kent,

Thanks for your reply. I am using Session in my application. My Normal HTML file is in D:/Logout.html and the java code is in DirectAction.java as shown below:

    public WOComponent logout() {
        session().terminate();
        WORedirect rePage = (WORedirect)pageWithName("WORedirect");
        rePage.setUrl("file:///D:/Logout.html");
        return rePage;
    }

It is not working. I tried with "D:/Logout.html", but it is also not working. I put Logout.html file under WebserverResources and it is called rePage.setUrl("Logout.html"). This one also not working. Please correct me for this example.

Thanks & Regards,
Sreenivasulu Arveti.


On Thu, Feb 4, 2010 at 6:58 PM, Kent Conlan <email@hidden> wrote:
Hi Sreenivasulu,

If you don't use Sessions you can just go to the page.
If you do use Sessions (the default) then terminate the Session and return a WORedirect, or build your own using HTML 302 or META HTTP-EQUIV="refresh".

Checkout WORedirect:
http://developer.apple.com/legacy/mac/library/documentation/WebObjects/Reference/WO53_Reference/com/webobjects/appserver/WORedirect.html


// DirectAction.java
   public WOActionResults logoutAction(){
       if (existingSession() != null) {
           existingSession().terminate();
       }
       WORedirect aRedirect = new WORedirect(context());
       aRedirect.setURL("http://www.google.com");
       return aRedirect;
   }

- Kent
PS.  This was entered by hand so there may be a typo.


On Feb 4, 2010, at 5:27 AM, Sreenivasulu A wrote:

Hi All,

Using WOHyperlink how to redirect to a normal HTML Page in WebObjects?  Will
it work for redirecting to Normal HTML Page? If it is possible, please give
me one example to redirect to a normal HTML page.
I want to redirect to normal html page when I click on Logout button, and
from this normal html page I will redirect to "www.google.com".

Thanks in Advance,
Sreenivasulu Arveti.



 _______________________________________________
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:
    • Re: Using WOHyperlink, Redirect to Normal HTML Page
      • From: Kent Conlan <email@hidden>
References: 
 >Using WOHyperlink, Redirect to Normal HTML Page (From: Sreenivasulu A <email@hidden>)
 >Re: Using WOHyperlink, Redirect to Normal HTML Page (From: Kent Conlan <email@hidden>)

  • Prev by Date: Re: Are these jars needed...
  • Next by Date: Re: Are these jars needed...
  • Previous by thread: Re: Using WOHyperlink, Redirect to Normal HTML Page
  • Next by thread: Re: Using WOHyperlink, Redirect to Normal HTML Page
  • Index(es):
    • Date
    • Thread