Re: Basic Question
Re: Basic Question
- Subject: Re: Basic Question
- From: Chuck Hill <email@hidden>
- Date: Wed, 22 Mar 2006 14:26:24 -0800
There is a distinction between adding something to the project and
adding it to a target. Assets added to the project (source files,
images, templates etc) are generally copied into the project (I
think, I don't do this very often).
Assets are not so much added to a target as associated with the
target. When that target is executed, a process will be run on the
assets associated with that target (e.g. compile, add the file to the
bundle).
Chuck
On Mar 22, 2006, at 1: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:
40global-village.net
This email sent to email@hidden
--
Coming in 2006 - an introduction to web applications using WebObjects
and Xcode http://www.global-village.net/wointro
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