• 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: Webobjects-dev Digest, Vol 3, Issue 187
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Webobjects-dev Digest, Vol 3, Issue 187


  • Subject: Re: Webobjects-dev Digest, Vol 3, Issue 187
  • From: Travis Cripps <email@hidden>
  • Date: Wed, 22 Mar 2006 00:37:46 -0800

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@hidden wrote:

Message: 9

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

From: Jeffrey Pearson <email@hidden>

Subject: Re: Basic Question

To: Paul Lynch <email@hidden>

Cc: WebObjects-Dev Apple <email@hidden>

Message-ID: <email@hidden">email@hidden>

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Basic Question (Webobjects-dev Digest, Vol 3, Issue 187)
      • From: Paul Lynch <email@hidden>
  • Prev by Date: Re: One-to-One Relationship
  • Next by Date: Re: Child EditingContext and fetches
  • Previous by thread: Re: One-to-One Relationship
  • Next by thread: Re: Basic Question (Webobjects-dev Digest, Vol 3, Issue 187)
  • Index(es):
    • Date
    • Thread