You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alan Chandler <al...@chandlerfamily.org.uk> on 2005/08/27 19:36:04 UTC

Getting Assets on to a path for static serving (in particular my .css file)

I have asked this question several times before but never received an answer.  
Now I have got to the point where all my work-arounds don't seem to hack it, 
so I NEED to ask again.

How do I get assets pushed into the correct path so that they can be served 
statically by my web server.  There used to be two tapestry configuration 
parameters  (org.apache.tapestry.asset.dir, org.apache.tapestry.asset.URL)
to do this, but they seem to have disappeared in the latest version of the 
usersguide. (And I couldn't find out how to use these either!).




-- 
Alan Chandler
http://www.chandlerfamily.org.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Getting Assets on to a path for static serving (in particular my .css file)

Posted by Alan Chandler <al...@chandlerfamily.org.uk>.
On Saturday 27 Aug 2005 23:25, Filip S. Adamsen wrote:
> Shamelessly ripped from the 4.0-beta-4 documentation:
>
> "Property:
> org.apache.tapestry.asset.dir, org.apache.tapestry.asset.URL
>
> [..]
>
> NOTE:
> Due to changes in Tapestry, these are no longer needed. Issues with
> security and performance have been fixed in Tapestry 4.0, allowing
> private assets to be accessed with zero configuration."
>
> So, it appears there's no longer a need for doing what you want to do.
> Or else I'm misunderstanding you - very likely - and you can just
> disregard this whole message. : )

I have seen this note, but I don't understand how you do what I want to do 
with "zero configuration".  But since I didn't understand how they worked 
before, I am not sure that "what I want to do" is what was possible before.


-- 
Alan Chandler
http://www.chandlerfamily.org.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Getting Assets on to a path for static serving (in particular my .css file)

Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
Shamelessly ripped from the 4.0-beta-4 documentation:

"Property:
org.apache.tapestry.asset.dir, org.apache.tapestry.asset.URL

[..]

NOTE:
Due to changes in Tapestry, these are no longer needed. Issues with 
security and performance have been fixed in Tapestry 4.0, allowing 
private assets to be accessed with zero configuration."

So, it appears there's no longer a need for doing what you want to do. 
Or else I'm misunderstanding you - very likely - and you can just 
disregard this whole message. : )

-Filip

Alan Chandler wrote:
> I have asked this question several times before but never received an answer.  
> Now I have got to the point where all my work-arounds don't seem to hack it, 
> so I NEED to ask again.
> 
> How do I get assets pushed into the correct path so that they can be served 
> statically by my web server.  There used to be two tapestry configuration 
> parameters  (org.apache.tapestry.asset.dir, org.apache.tapestry.asset.URL)
> to do this, but they seem to have disappeared in the latest version of the 
> usersguide. (And I couldn't find out how to use these either!).

RE: Getting Assets on to a path for static serving (in particular my .css file)

Posted by Patrick Casey <pa...@adelphia.net>.
	I know this is sort of sidestepping the problem, but you could do
something with your own code, maybe in an initializer block for your servlet
class?
	rivate static Boolean fInitialized = false;
	private void initialize(ServletConfig config) {
		String temp = config.getServletContext().getRealPath("img");
		fImgDirectory = temp;
		// foreach asset
			// if (!fImageDirectory.fileExists(asset))
				// copy into fImageDirectory.
	}

	public void init(ServletConfig config) throws ServletException {
		synchronized (fInitialized) {
			if (!fInitialized)
				initialize(config);
			fInitialized = Boolean.TRUE;
		}
		super.init(config);		

	}

> -----Original Message-----
> From: Alan Chandler [mailto:alan@chandlerfamily.org.uk]
> Sent: Saturday, August 27, 2005 10:36 AM
> To: tapestry-user@jakarta.apache.org
> Subject: Getting Assets on to a path for static serving (in particular my
> .css file)
> 
> I have asked this question several times before but never received an
> answer.
> Now I have got to the point where all my work-arounds don't seem to hack
> it,
> so I NEED to ask again.
> 
> How do I get assets pushed into the correct path so that they can be
> served
> statically by my web server.  There used to be two tapestry configuration
> parameters  (org.apache.tapestry.asset.dir, org.apache.tapestry.asset.URL)
> to do this, but they seem to have disappeared in the latest version of the
> usersguide. (And I couldn't find out how to use these either!).
> 
> 
> 
> 
> --
> Alan Chandler
> http://www.chandlerfamily.org.uk
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org