Re: CSS background graphics
Re: CSS background graphics
- Subject: Re: CSS background graphics
- From: Kieran Kelleher <email@hidden>
- Date: Tue, 27 Apr 2004 17:27:57 -0400
I can deploy apps on XServe no problem, but I still cannot figure out
how to disable direct connect while doing "Build and Run" during XCode
development. Chuck Hill has suggested this many times, but I still
cannot figure out where to but the WODirectConnectEnabled false since
XCode is launching the app.
On my dev machine, Apache is running, WOTaskD is running, JavaMonitor
is not (I don't believe it is required for this objective). I have
studied the shell scripts in the {BUILD_FILES_DIR}, I have tried adding
a Build setting
COMMAND_LINE_ARGS -WODirectConnectEnabled false
and
COMMAND_LINE_ARGS -DWODirectConnectEnabled false
Someone out there must be developing "in deployment mode", that is
launching the app from XCode using "Build and Run" and accessing it
through Apache using a URL such as:
http://localhost/cgi-bin/WebObjects/myapp.woa
instead of direct connect
http://kieranmac.local:57563/cgi-bin/WebObjects/myapp.woa
Any direction would be appreciated so I can start seeing CSS rendering,
etc.
Thanks, Kieran
On Dec 31, 2003, at 3:28 PM, Chuck Hill wrote:
Hi Drew,
You are facing a decision here. There are two paths. One is to turn
on
Apache and use it while you are developing. The other path is the one
you
are on, letting the application serve up everything. I prefer the
former
path; I like to develop as I deploy.
The Apache Way
Pro:
- web server handles what it does best
- no change between development and deployment
- full power of web server available (rewrite rules, HTTPS(SSL),
redirects,
virtual hosts, etc.)
Con:
- need to know how to configure a web server
- need to have web server running
The WO Way
Pro:
- no need to know how to configure a web server
- no need to have web server running
Con:
- WOResouceManager is very finicky about vending things in development
mode
as you have discovered
- development is not exactly like deployment so you can run into nasty
surprises just as you deploy
- lack full power / capabilities of a web server
The choice splits along the ease vs power and dependability line. If
you
go the Apache way, the document root will be as specified in the Apache
conf file. I think it is /Library/WebServer/Documents by default on
OSX.
You will need to turn off Direct Connect to make this work (see
methods in
WOApplication or launch with -DWODirectConnectEnabled=false).
Otherwise,
it pretty much works out of the box as long as you have Apache
started. :-)
Deployment documentation is here:
http://developer.apple.com/documentation/WebObjects/Deployment/
Deploying_App
lications/index.html
Happy New Year!
Chuck
At 11:41 PM 30/12/2003 -0500, Drew Thoeni wrote:
This makes great sense. This is my first app in WO and I have not yet
made it to the deployment stage. It seemed to me that putting the
images in the web server and letting that handle the CSS calls was the
right thing to do. But, oddly, I can't determine the web server
directory (and hence the URL) that WO uses in development.
I'm developing on a PowerBook and my web services is actually off
(Apache is not running). However, WO will serve up pages to the
localhost. So, I was figuring that there must be a way to serve these
images from WO's built-in web server and also make sure my image files
are in the right place to make it easy for later deployment.
Can you suggest a reference for how I should have set up my dev
environment?
Drew
PS. I really appreciate your help, and the help others on the list are
giving. I know it can be eye-rolling frustrating when some of these
questions come across. But, I really feel like I've made a lot of
progress in the past month or so.
On Dec 30, 2003, at 10:28 PM, Chuck Hill wrote:
Drew,
You are sort of misusing WO. From an optimization point of view you
should
avoid running static resource requests through the application. The
"wr?wodata" part of the URL below shows that you are using the
application
and WOResourceManager to vend the images. In addition to some
quirks,
WOResourceManager is also a lot slower than, say, Apache at this sort
of
thing. The reason that it only works when you display the image
elsewhere
on the page is that WOResourceManager only makes it available when it
knows
that it needs to. WOResourceManager knows nothing about your
external
CSS
file.
What I would do is to put quaq_r3_c1.gif under the DocuemntRoot of
your
webserver, let's say under /images/ and then use CSS like this:
background-image: url("/images/quaq_r3_c1.gif");
You can also make the image part of the Webserver Resources of your
project, do a split install, and reference it like
background-image:
url("/WebObjects/WOTestApp.woa/Contents/WebServerResources/
quaq_r3_c1.gif");
In general, CSS is not a WO specific technology and it is most
efficient to
keep the two separated.
Chuck
At 10:01 PM 30/12/2003 -0500, Drew Thoeni wrote:
I'm using a linked style sheet in my WO application and images
referenced using the CSS format below only show if the image is also
being displayed elsewhere on the page using, for example, a WOImage
(and this oddity took a while to figure out).
Has anyone successfully displayed images in backgrounds (of tables
or
DIVs) from linked CSS URLs?
Regards,
Drew
background-image:
url("/cgi-bin/WebObjects/WO-quaq.woa/wr?
wodata=file:/Users/drewt/Documents/WOTestApp/webServerRe
so
ur
ces/quaq_r3_c1.gif");
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
--
Chuck Hill email@hidden
Global Village Consulting Inc.
http://www.global-village.net
--
Chuck Hill email@hidden
Global Village Consulting Inc.
http://www.global-village.net
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
___________________________________
Kieran Kelleher
SmartleadsUSA,LLC
2656 West Lake Rd
Palm Harbor, FL 34684
email@hidden
727-785-0766 x33
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.