• 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: How to target a WO component in an html include
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to target a WO component in an html include


  • Subject: Re: How to target a WO component in an html include
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 20 Mar 2008 11:59:58 -0700

Hi Reid,


On Mar 20, 2008, at 11:40 AM, Reid Bundonis wrote:
On Mar 20, 2008, at 1:16 PM, Chuck Hill wrote:
I have a component that I stripped the html, head, and body tags from and then deployed it. I can hit it by doing http://server/Apps/WebObjects/Classes . Everything works fine.

However, if I want to include that WO snippet into a standard .shtml page, I get one of the two results:

If I do:
	<!--#include virtual="/Apps/WebObjects/Classes" -->

I get, "No Instance Available." So at least I know that the WO engine was hit. It is just not finding my deployed application.


sudo touch /tmp/logWebObjects

Then load that page a couple of times and look in

/tmp/WebObjects.log

You will then see what the woadaptor is attempting to dispatch. That may show the source of "No Instance Available."

Also great advice. I created the file, stopped both Apache and WO and then started them all backup again. On the first load, I got "No Instance Available" as seen here:


Info: <WebObjects Apache Module> new request: /Apps/WebObjects/ Classes.woa/wa/default
Debug: App Name: Classes.woa/wa/default (7)
Info: V4 URL: /Apps/WebObjects/Classes.woa/wa/default
Info: Selected new app instance at index 9
Debug: Composed URL to '/Apps/WebObjects/Classes.woa/1/wa/default'
Info: New request is GET /Apps/WebObjects/Classes.woa/1/wa/default INCLUDED

That INCLUDED on the end looks unusual to me.


Info: Sending request to instance number 1, port 2010
Info: Trying to contact Classes:1 on (2010)
Info: Caching hostent for 209.210.211.212
Info: attempting to connect to 209.210.211.212 on port 2010
Info: Classes:1 on (2010) connected [pooled: No]

OK, so it is talking to the app.


Info: Request GET /Apps/WebObjects/Classes.woa/1/wa/default INCLUDED
 sent, awaiting response

Waiting....

Info: Reading configuration from http://localhost:1085/WebObjects/wotaskd.woa/wa/woconfig
Info: attempting to connect to localhost on port 1085
Info: Preparing to read config for host: localhost
Info: New response: HTTP/1.0 200 Apple WebObjects
Debug: nonBlockingRecv(): recv() returned 0 (connection closed)
Info: retrying request due to connection reset

And the app did not respond.

What I would do now is to override dispatchRequest() in the application and log out the request.uri and all of the headers. Then call super in a try...catch:

try {
    return super.dispatchRequest(request);
}
catch (Exception e) {
	NSLog.out.appendln(e);
	throw e;
}

See if it gets as far as dispatch request and if it throws.
<snip>


As mentioned, I can hit this application with both the fqdn/Apps/ WebObjects/Classes and with fqdn/Apps/WebObjects/Classes.woa/wa/ default. Also, I have only one instance of the app currently running and there are no deaths. From WOMonitor this is the start argument for the app. I am not doing anything special other than defining the path to the app and then letting it rip.

-WOPort 2010 -WOCachingEnabled YES -WODebuggingEnabled NO - WOOutputPath /dev/null -WOAutoOpenInBrowser NO - WOAutoOpenClientApplication NO -WOLifebeatInterval 30 - WOLifebeatEnabled YES -WOLifebeatDestinationPort 1085 -WOAdaptor WODefaultAdaptor -WOWorkerThreadCount 8 -WOListenQueueSize 128 - WOWorkerThreadCountMin 16 -WOWorkerThreadCountMax 256 - NSProjectSearchPath () -WOSessionTimeOut 3600 -WOApplicationName Classes -WOMonitorEnabled YES -WONoPause YES

When hosting under 10.3 I recall doing the includes. Then a few years ago I upgraded the hosting environment to 10.4 and then never resolved it but also no longer needed it. This server is hosting 3 other WO apps that are full projects and never need any attention.

The includes module is loaded in Apache as I am a heavy user of includes. CGI execution and SSI are on for the virtual host and the evil web performance cache is turned off.

Does the log show anything that I am missing? In both cases it is marking the instance dead and the server unresponsive. But meanwhile all other apps are running fine.

Thanks again for helping. Chuck, are you going to do a "Dealing with Separation Anxiety - Moving Stubborn WO Developers Away from XCode" session at WWDC this year?

I tried that last year. I'm not sure there is much hope for the rest of you holdouts. :-P


Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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: How to target a WO component in an html include
      • From: Reid Bundonis <email@hidden>
References: 
 >How to target a WO component in an html include (From: Reid Bundonis <email@hidden>)
 >Re: How to target a WO component in an html include (From: Chuck Hill <email@hidden>)
 >Re: How to target a WO component in an html include (From: Reid Bundonis <email@hidden>)

  • Prev by Date: Re: Better start with Wonder than WO
  • Next by Date: Re: Better start with Wonder than WO
  • Previous by thread: Re: How to target a WO component in an html include
  • Next by thread: Re: How to target a WO component in an html include
  • Index(es):
    • Date
    • Thread