Hi Toby,

>i see mainly 2 purposes for the suffix,:
>1. as an additional way of transporting a path like parameter
>2. as a hint for filenames for browsers when downloading a resource.
>eg, if your resource is addressable under /foo/bar.res and you want to
>provide a download link,
>you don't want to browser to store the file as 'bar.res'. so you add
>for example the original filename: /foo/bar.res/myfile.pdf

does this mean if I have a html.jsp which is accessible using
http://localhost:8888/content/mynode.html.

If I have another file like test.txt in the same place html.jsp
http://localhost:8888/content/mynode.html/test.txt will download the file
according purpose 2.

else in the purpose 1 to have a link to test.txt like a href in html.jsp.

In a script can I use suffixes instead of giving a browser path.


> the "flush" attribute just specifies, that the output buffer is
> flushed before executing the include. usually you can leave this to
> 'false'. this has the advantage, that the output buffer is only
> comitted when it's either full, or the end of the response is reached.
> this allows the included script still to change response headers and
> allows for a better error handling. but it depends on the size of the
> output buffer, and you should not rely on an uncomitted buffer. as
> soon as you write directly on the response.getWriter() you need to
> flush the buffer before hand. otherwise you don't get the correct
> sequence of output.

Is there a way I can know whether the buffer is flushed. can I get the
buffer in a script and check this.

regards,

Janandith.



On Mon, Aug 4, 2008 at 1:19 AM, Tobias Bocanegra
<[EMAIL PROTECTED]>wrote:

> On 8/3/08, janandith jayawardena <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> >  *replaceSuffix:*
> >
> >  I read the following blog post while exploring replaceSuffix for
> SLING-475.
> >
> >
> http://weblogs.goshaky.com/weblogs/lars/entry/an_architecture_for_content_centric2
> >
> >  it says ,
> >
> >  "With the suffix you could for instance address parts of a resource."
> >
> >  under suffix: description.
> i see mainly 2 purposes for the suffix,:
> 1. as an additional way of transporting a path like parameter
> 2. as a hint for filenames for browsers when downloading a resource.
> eg, if your resource is addressable under /foo/bar.res and you want to
> provide a download link,
> you don't want to browser to store the file as 'bar.res'. so you add
> for example the original filename: /foo/bar.res/myfile.pdf
>
>
> >  How can I create a suffix for a resource and use it. I've tried to
> figure it
> >  out but it's still not clear.
> >  Perhaps a simple example will help.
> you can't "create" a suffix, you just use it, for example in a link or
> an image reference.
>
> >  *flush:*
> >
> >  What I have in mind about flush is that it completely erases everything
> that
> >  was created in the same script prior to flush="1" so that any formatting
> >  after flush will be the result of the jsp script.
> >
> >  I want to clear this  also. A simple example will help here too.
> no, you can't erase anything. flush means here: flush the buffer to
> the response.
>
> the "flush" attribute just specifies, that the output buffer is
> flushed before executing the include. usually you can leave this to
> 'false'. this has the advantage, that the output buffer is only
> comitted when it's either full, or the end of the response is reached.
> this allows the included script still to change response headers and
> allows for a better error handling. but it depends on the size of the
> output buffer, and you should not rely on an uncomitted buffer. as
> soon as you write directly on the response.getWriter() you need to
> flush the buffer before hand. otherwise you don't get the correct
> sequence of output.
>
> regards, toby
>

Reply via email to