Serving static css files

View: New views
5 Messages — Rating Filter:   Alert me  

Serving static css files

by Edward Stow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I would like to serve static css files to render my pages.

I have been trying in my WebApplication subclass.

MyApp>>initPageHeaderLinks
        super initPageHeaderLinks.
        self addLinkToScreenStyleSheet: '/css/mycss.css'

The link is added to the html served to my browser but the css file
cannot be located. (404 error)

I note that the (AIDASite named 'mysite') homeDirectory returns './'
-- I assume this is relative to squeak.exe

I tried setting the absolute path with #homeDirectory: with no effect.

I am sure I'm missing something ...


--

Edward Stow
_______________________________________________
Aida mailing list
Aida@...
http://lists.aidaweb.si/mailman/listinfo/aida

Serving static css files

by Nicholas Moore :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Edward,

I have the same problem in squeak, which I am just starting to use. It is strange because I have just migrated my sites from VW where they all work fine.

... looks like we are both missing something... ;-)

Edward Stow wrote:
Hi

I would like to serve static css files to render my pages.

I have been trying in my WebApplication subclass.

MyApp>>initPageHeaderLinks
	super initPageHeaderLinks.
	self addLinkToScreenStyleSheet: '/css/mycss.css'

The link is added to the html served to my browser but the css file
cannot be located. (404 error)

I note that the (AIDASite named 'mysite') homeDirectory returns './'
-- I assume this is relative to squeak.exe

I tried setting the absolute path with #homeDirectory: with no effect.

I am sure I'm missing something ...


  

--
NJM TSR-i

Nicholas J Moore


_______________________________________________
Aida mailing list
Aida@...
http://lists.aidaweb.si/mailman/listinfo/aida

Re: Serving static css files

by Janko Mivsek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Edward again,

Please load latest Aida from http://mc.bioskop.fr/Aida.html. Official
Squeak release has some issues with static file serving which are now
solved in  dev releases. Yes, we need to make a new relase soon ...

Also,  ./ means a home from directory where image was started, not VM!

I hope this helps
Janko

Edward Stow wrote:

> Hi
>
> I would like to serve static css files to render my pages.
>
> I have been trying in my WebApplication subclass.
>
> MyApp>>initPageHeaderLinks
> super initPageHeaderLinks.
> self addLinkToScreenStyleSheet: '/css/mycss.css'
>
> The link is added to the html served to my browser but the css file
> cannot be located. (404 error)
>
> I note that the (AIDASite named 'mysite') homeDirectory returns './'
> -- I assume this is relative to squeak.exe
>
> I tried setting the absolute path with #homeDirectory: with no effect.
>
> I am sure I'm missing something ...
>
>

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
Aida@...
http://lists.aidaweb.si/mailman/listinfo/aida

Re: Serving static css files

by Edward Stow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Apr 2, 2008 at 5:52 AM, Janko Mivšek <janko.mivsek@...> wrote:
> Hi Edward again,
>
>  Please load latest Aida from http://mc.bioskop.fr/Aida.html. Official
>  Squeak release has some issues with static file serving which are now
>  solved in  dev releases. Yes, we need to make a new relase soon ...
>
>  Also,  ./ means a home from directory where image was started, not VM!

Thanks, in my development environment this is the same directory.
--
Edward
_______________________________________________
Aida mailing list
Aida@...
http://lists.aidaweb.si/mailman/listinfo/aida

Re: Serving static css files

by Nicolas Petton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le mardi 01 avril 2008 à 20:52 +0200, Janko Mivšek a écrit :
> Hi Edward again,
>
> Please load latest Aida from http://mc.bioskop.fr/Aida.html.

Please be careful, there are several branches of Aida on the repository.
The *real* latest is Aida5.6-np.27.mcz.

To see how we deal with webStyle and different pageFrame methods, you
can also load Scribo (a CMS written with Aida) on the same repository,
and look bit at the code.
See WikiPageApp>>viewMain and BlogPostApp>>viewMain for example.

Cheers!

Nico

> Official
> Squeak release has some issues with static file serving which are now
> solved in  dev releases. Yes, we need to make a new relase soon ...
>
> Also,  ./ means a home from directory where image was started, not VM!
>
> I hope this helps
> Janko
>
> Edward Stow wrote:
> > Hi
> >
> > I would like to serve static css files to render my pages.
> >
> > I have been trying in my WebApplication subclass.
> >
> > MyApp>>initPageHeaderLinks
> > super initPageHeaderLinks.
> > self addLinkToScreenStyleSheet: '/css/mycss.css'
> >
> > The link is added to the html served to my browser but the css file
> > cannot be located. (404 error)
> >
> > I note that the (AIDASite named 'mysite') homeDirectory returns './'
> > -- I assume this is relative to squeak.exe
> >
> > I tried setting the absolute path with #homeDirectory: with no effect.
> >
> > I am sure I'm missing something ...
> >
> >
>


_______________________________________________
Aida mailing list
Aida@...
http://lists.aidaweb.si/mailman/listinfo/aida

signature.asc (196 bytes) Download Attachment