• 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: Basic Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic Question


  • Subject: Re: Basic Question
  • From: Andrew Satori <email@hidden>
  • Date: Wed, 22 Mar 2006 17:14:07 -0500

Maybe I can help.

WebObjects isn't really efficient at serving static content, so it's more efficient to host the static content, like images, outside the deployment war of our WebApp, thus you WO application might live in cgi-bin/WebObjects/WOApplciation.woa your static content lives in / Library/WebServer/Documents/images/ and is referenced from within your WOApp as /images/imagename.jpg. This let's Apache do what it does best and WO do what it does best, but presents the same.

In my case, and from what I can tell of most WO Apps, the entry point to the app is an html redirector that loads the WOApp


For example, I have on the webserver in /Library/WebServer/Documents/ an index.html as well as a css folder for the css files, and an images directory for images and a scripts directory for the common included .js files (for client side DHTML behaviors). Index.html is nothing more than short page that contains a little descriptive text and a manual redirector for that 1% of user for whom the META redirect fails for. Then, within the WOApp, all references to the static content on the site are given absolute paths without the host (css file is ="/css/default.css"). What this means is that the JSP 'all in a WAR' deployment doesn't work, but it also means that the static content isn't running through the adapter jacking up the load on the less efficient Jasper or WO adapters.


I hope this helps clear things up. I'm fairly new to WO myself, so I might have this a little inaccurate, but I think I'm on sound ground here based upon exploration of prominent WO based sites (.mac and store.apple)

Andy



On Mar 22, 2006, at 4:42 PM, Jeffrey Pearson wrote:

So am I also understanding correctly that if you are 'adding an existing' asset, it doesnt actually copy the file to the target but expects it to already exist there?




On Mar 22, 2006, at 4:45 AM, Jean Pierre Malrieu wrote:

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.......

Images ought to go to the "Web Server Ressources" group, not the "ressources" group.
More importantly, they need to be added to the WebServer target (not the Application Server target). When you add a file to a project, you can choose wich target it will belong to. Afterward, you can inspect and change a file's target by getting info for it (select it and click info in the tool bar).
Images will then be served by the web server instead of the application server (no matter if they are static or not).
For this to work in deployment, your images must be copied to: / Library/WebServer/WebObjects/YourAppName.woa/Contents/ WebServerRessources/
They must be readable by www too.
If you have path problems, just look at the html produced for your page. Inspect the path generated by WebObjects for your images and you will know where your problem comes from.


Chuck (guru number one on this list) would probably advise you to build and run your projects without "direct connect" enabled (set the corresponding launch argument in your properties file). That way, even in development, you are going through the webserver for webserver ressources. This will ensure that your app behaves the same in deployment and development, at least as far as ressources are concerned).

I hope these instructions are easy enough.
All this is pretty well covered in Apple documentation. But there is now a lot of documentation... Maybe too much for a beginner?


JPM.



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


This email sent to email@hidden

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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
      • From: Mark Morris <email@hidden>
References: 
 >Re: Basic Question (From: Jean Pierre Malrieu <email@hidden>)
 >Re: Basic Question (From: Jeffrey Pearson <email@hidden>)

  • Prev by Date: Re: Basic Question
  • Next by Date: Re: Basic Question (Webobjects-dev Digest, Vol 3, Issue 187)
  • Previous by thread: Re: Basic Question
  • Next by thread: Re: Basic Question
  • Index(es):
    • Date
    • Thread