Hi, Jeffrey.  

Your approach with the images was laudable and understandable, given the WebServerResources group in the XCode project.  The truth is that almost noone uses real "web server resources" in this way.  The most common way to reference static resources in a WOComponent is to place them under the document root of the web server, which on MacOS X is at /Library/WebServer/Documents.  The reason for this is that it's best to let the web server do the work and vend them directly, rather than stream them through the WebObjects adaptor which creates a lot more unnecessary overhead.

So, if you have an images folder, you may keep them grouped in your app's WebServerResources group, but it's usually best to manually copy the images to the web server.  If your images are at /images under the web server document root, you then simply add a static reference to an image thusly "/images/foo.jpg"  This approach has proven fairly flexible and easy to use in development and translates easily to deployment.  Just copy the images directory to your deployment web server.



To answer your other question, it's common in WebObjects to create a "PageWrapper" WOComponent that holds all of your repetitive content, like the header and footer.  In the portion of that "page wrapper" that should contain the embedded content, you place a dynamic component called a "WOComponentContent."  Then in your subcomponents, you'll make them "partial" web pages and include at the top level your PageWrapper WOComponent, and place your content for that page inside the embedded PageWrapper component.  You'll see something like the following in WebObjectsBuilder for your component:

*PageWrapper ---------------
|                                               |
| Content here...                   |
|                                               |
*-----------------------------------

I hope that's helpful.

Travis


On Mar 21, 2006, at 10:28 PM, [EMAIL PROTECTED] wrote:

Message: 9

Date: Tue, 21 Mar 2006 15:36:20 -0800

From: Jeffrey Pearson <[EMAIL PROTECTED]>

Subject: Re: Basic Question

To: Paul Lynch <[EMAIL PROTECTED]>

Cc: WebObjects-Dev Apple <[email protected]>

Message-ID: <[EMAIL PROTECTED]>

Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed


OK. I SO didn't even understand ANY of that. Can you translate to a  

lower beginner level? I am coming from using IntelliJ and the JSP/ 

Servlet world. I simply dropped the folder of images into my  

resources folder which contained all of my jsp files and it was  

deployed with the rest of the jsp files.


Trying to duplicate this, I first copied my images folder into the  

project root folder in the finder.

In XCode, in the Groups and Files pane, I right click on the 'Web  

Components' folder and selected 'Add Existing Files', and selected  

the folder that I just copied over. I now see my images folder and I  

can drill down and see my individual images in the folder under the  

Web Components folder in the Groups and Files pane.


I'm not understanding.......




Jeff

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to