ok. thanks.
but how do i create the html output? something like 'String output =
"<html><head><link..."? I would still like to use a template.
igor.vaynberg wrote:
>
> dont use a page
>
> create a shared resource that streams the contents see WebResource and
> DynamicWebResource
>
> -igor
>
>
> On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote:
>>
>>
>> again, i don't think i follow.
>>
>> my page's markup looks something like:
>> <html>
>> <head>
>> <link ...>
>> <script ...>
>> </head>
>> <body>
>> <div wicket:id="toc">
>> <div wicket:id="title">
>> <div wicket:id="content">
>> </body>
>> </html>
>>
>> DocPage's ctor is something like:
>> DocPage(String contentFilePath) {
>> add(new Label("title", getTitle(contentFilePath)));
>> add(new FileInclude("content", contentFilePath));
>> add(new RelativeFileInclude("toc", contentFilePath));
>> }
>>
>> RelativeFileInclude loades the TOC file (say TOC.html) and changes the
>> links
>> so they are relative to contentFilePath (using DOM). i use url coding
>> strategy which takes a path like /doc/some/path/to/file.html and
>> constructs
>> DocPage with 'some/path/to/file.html'
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > so what you really want is a shared resource and not a page :)
>> >
>> > -igor
>> >
>> >
>> > On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> the page has an associated markup. it has place holders for the
>> content,
>> >> the
>> >> table of contents and a label (name of file of content). the <head>
>> tag
>> >> contains references to css and javascript.
>> >>
>> >> i think what i'd like is for the Page to be able to save the rendered
>> >> content and when called, to write the content to the servlet response,
>> >> stopping the request cycle.
>> >>
>> >> igor.vaynberg wrote:
>> >> >
>> >> > if i got it right what you are doing is reading a bunch of files and
>> >> > combining the result
>> >> >
>> >> > now you dont want to use cache infront of the appserver because the
>> >> page
>> >> > isnt really static like you said
>> >> >
>> >> > the page itself is just a label that spits out the result of the
>> >> > concatenated text correct? so there is little point to caching the
>> >> page.
>> >> >
>> >> > what you really want to do is to cache the expensive operation which
>> >> isnt
>> >> > creating the page but loading/concatenating that text
>> >> >
>> >> > so what you do is create a concurrenthashmap that lives in
>> application
>> >> > scope, this map will house the results of your loaded+concatenated
>> text
>> >> > via
>> >> > softreferences
>> >> >
>> >> > so the model for you label becomes like this
>> >> >
>> >> > new abstractreadonlymodel() { Object getobject() {
>> >> > Map map=getapplication().getcache();
>> >> > Key key=..construct cache key used to identify the result
>> >> > String text=map.get(key);
>> >> > if (text==null) { text=constructcontent(); map.put(key, text); }
>> >> > return text;
>> >> > }
>> >> >
>> >> > -igor
>> >> >
>> >> > On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >>
>> >> >> i didn't follow. can you please elaborate? where will the map be
>> used?
>> >> >>
>> >> >>
>> >> >> igor.vaynberg wrote:
>> >> >> >
>> >> >> > i wouldnt cache the page but i would cache the concatenated
>> result
>> >> >> >
>> >> >> > you can have a concurrenthashmap in your application keeping
>> >> >> > softreferences
>> >> >> > to the concatted text
>> >> >> >
>> >> >> > will that work?
>> >> >> >
>> >> >> > -igor
>> >> >> >
>> >> >> >
>> >> >> > On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote:
>> >> >> >>
>> >> >> >>
>> >> >> >> i read this post already ;)
>> >> >> >>
>> >> >> >> i don't want to add another framework on top of wicket
>> >> >> (reverse-caching
>> >> >> >> HTTP
>> >> >> >> accelerator). and my pages are not exactly static. i read
>> several
>> >> >> static
>> >> >> >> files and combine them (i read the content from one file, a
>> table
>> >> of
>> >> >> >> contents from another and add a Label component whose value is
>> the
>> >> >> file
>> >> >> >> name). once the page is assembled, it is stateless. So what I'm
>> >> >> looking
>> >> >> >> for
>> >> >> >> is saving the assembled code, so when the page is requested
>> again,
>> >> the
>> >> >> >> saved
>> >> >> >> data is served, instead of going through the cycle flow again.
>> >> >> >>
>> >> >> >>
>> >> >> >> Jonathan Locke wrote:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >>
>> http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket
>> >> >> >> >
>> >> >> >> > read post and comments.
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > Ittay Dror wrote:
>> >> >> >> >>
>> >> >> >> >> Hi,
>> >> >> >> >>
>> >> >> >> >> How can I cache rendered pages (the pages I want to cache are
>> >> >> composed
>> >> >> >> >> dynamically, but from a static content. So after composition
>> >> they
>> >> >> >> rarely
>> >> >> >> >> (even never) change)?
>> >> >> >> >>
>> >> >> >> >> Thanks,
>> >> >> >> >> Ittay
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >> --
>> >> >> >> View this message in context:
>> >> >> >>
>> http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949
>> >> >> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >>
>> -------------------------------------------------------------------------
>> >> >> >> Take Surveys. Earn Cash. Influence the Future of IT
>> >> >> >> Join SourceForge.net's Techsay panel and you'll get the chance
>> to
>> >> >> share
>> >> >> >> your
>> >> >> >> opinions on IT & business topics through brief surveys-and earn
>> >> cash
>> >> >> >>
>> >> >>
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> >> >> _______________________________________________
>> >> >> >> Wicket-user mailing list
>> >> >> >> [email protected]
>> >> >> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >>
>> >>
>> -------------------------------------------------------------------------
>> >> >> > Take Surveys. Earn Cash. Influence the Future of IT
>> >> >> > Join SourceForge.net's Techsay panel and you'll get the chance to
>> >> share
>> >> >> > your
>> >> >> > opinions on IT & business topics through brief surveys-and earn
>> cash
>> >> >> >
>> >> >>
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> >> > _______________________________________________
>> >> >> > Wicket-user mailing list
>> >> >> > [email protected]
>> >> >> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >> http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033148
>> >> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> >>
>> -------------------------------------------------------------------------
>> >> >> Take Surveys. Earn Cash. Influence the Future of IT
>> >> >> Join SourceForge.net's Techsay panel and you'll get the chance to
>> >> share
>> >> >> your
>> >> >> opinions on IT & business topics through brief surveys-and earn
>> cash
>> >> >>
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> >> _______________________________________________
>> >> >> Wicket-user mailing list
>> >> >> [email protected]
>> >> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >> >>
>> >> >
>> >> >
>> >>
>> -------------------------------------------------------------------------
>> >> > Take Surveys. Earn Cash. Influence the Future of IT
>> >> > Join SourceForge.net's Techsay panel and you'll get the chance to
>> share
>> >> > your
>> >> > opinions on IT & business topics through brief surveys-and earn cash
>> >> >
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> > _______________________________________________
>> >> > Wicket-user mailing list
>> >> > [email protected]
>> >> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033245
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> -------------------------------------------------------------------------
>> >> Take Surveys. Earn Cash. Influence the Future of IT
>> >> Join SourceForge.net's Techsay panel and you'll get the chance to
>> share
>> >> your
>> >> opinions on IT & business topics through brief surveys-and earn cash
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> _______________________________________________
>> >> Wicket-user mailing list
>> >> [email protected]
>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >>
>> >
>> >
>> -------------------------------------------------------------------------
>> > Take Surveys. Earn Cash. Influence the Future of IT
>> > Join SourceForge.net's Techsay panel and you'll get the chance to share
>> > your
>> > opinions on IT & business topics through brief surveys-and earn cash
>> >
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> > _______________________________________________
>> > Wicket-user mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033319
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Wicket-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
--
View this message in context:
http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033431
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user