Skip to main content

Question about storing facelets in database

12 replies [Last post]
liberitas
Offline
Joined: 2010-05-01
Points: 0

Hi! I'm thinkin of storing facelets in database instead of files. Is it real? So i think of implementing this by such way:
1. I write servlet which will handle almost all requests.

2. It will handle request like '/page/[0-9]+' which is mapped, for example, to some facelet called "page" in database.
3. <--- here i get problem: how could I post xml-content from database to mojarra servlet or primefaces servlet?

So, cud u answer these questions, please, or offer something coz I'm already broke my head and all organs containing intellect? :)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
liberitas
Offline
Joined: 2010-05-01
Points: 0

I've asked another one. :)

liberitas
Offline
Joined: 2010-05-01
Points: 0

Thx to Jason for the idea, and I haven't found yet smth. more better than loading templates through jars.
For now I have such trouble:

First, I select t1.jar as source for facelets, go to http://...../another/template.xhtml
It shows me some page;

Then, when I change source to t2.jar via "administration" facelet (it's in web-module of deployed application) and go to http://...../another/template.xhtml, it's contents don't change though pages have diff. content but same locations in jars.

jar:file:///tmp/t1.jar!/another/template.xhtml
jar:file:///tmp/t2.jar!/another/template.xhtml

If there's some cache of pages? Later, I'll write the experimental code.

Jason Lee

On 5/1/10 8:46 AM, webtier@javadesktop.org wrote:
> Hi! I'm thinkin of storing facelets in database instead of files. Is it real? So i think of implementing this by such way:
> 1. I write servlet which will handle almost all requests.
>
> 2. It will handle request like '/page/[0-9]+' which is mapped, for example, to some facelet called "page" in database.
> 3.<--- here i get problem: how could I post xml-content from database to mojarra servlet or primefaces servlet?
>
> So, cud u answer these questions, please, or offer something coz I'm already broke my head and all organs containing intellect? :)
>
I have some sample code I can share, but I can't do it right now. I'll
try to write it up for you in the next day or two. I hope that works
for you. :P

--
Jason Lee
Senior Member of Technical Staff
GlassFish Administration Console

Oracle Corporation
Phone x31197/+1 405-343-1964
Blog http://blogs.steeplesoft.com

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

vladperl
Offline
Joined: 2004-08-11
Points: 0

I'm in the line to read it :)

Jason Lee

On 5/3/10 9:25 PM, webtier@javadesktop.org wrote:
> I'm in the line to read it :)
>
I'll try to get that done today. I have to write up some GlassFish 3.1
planning docs first, though. :)

I'm hurryin' :P

--
Jason Lee
Senior Member of Technical Staff
GlassFish Administration Console

Oracle Corporation
Phone x31197/+1 405-343-1964
Blog http://blogs.steeplesoft.com

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

liberitas
Offline
Joined: 2010-05-01
Points: 0

Of course, Jason, We understand U. :)

jdlee
Offline
Joined: 2006-01-25
Points: 0

OK. I've finally posted what I've been promising:

http://blogs.steeplesoft.com/2010/05/putting-facelets-in-a-jar/

Hopefully, it delivers what you're needing. :P Feel free to poke holes, ask questions, shower me with cash. Whatever comes to mind. :)

liberitas
Offline
Joined: 2010-05-01
Points: 0

Thx U much, Jason. I'll try it now!

vladperl
Offline
Joined: 2004-08-11
Points: 0

> Thx U much, Jason. I'll try it now!

Please provide us with some feedback once you get to some point.
Approximately in one week I'm going to do something in this area too.
So more details and using cases pretty much important resources for me.

Thank you,
Vladimir

liberitas
Offline
Joined: 2010-05-01
Points: 0

Konechno :) (=of course, russian), Vladimir.
I'll give a link to post in blog, when finish first experiments. Hope to make 'tis till 10-11 May.

vladperl
Offline
Joined: 2004-08-11
Points: 0

> Konechno :) (=of course, russian), Vladimir.
Udachi vam Alexandr.

> I'll give a link to post in blog, when finish first
> experiments. Hope to make 'tis till 10-11 May.
Sound good!
My guess is that you need this functionality in some kind of CMS.

liberitas
Offline
Joined: 2010-05-01
Points: 0

> My guess is that you need this functionality in some
> kind of CMS.

Emm, yes, exactly for this.