Reply To: Reload configuration (or add/remove filters) at runtime.

Splash Forums Rewrite Users Reload configuration (or add/remove filters) at runtime. Reply To: Reload configuration (or add/remove filters) at runtime.

#26696

AndreaCatania
Participant

It’s a good starting point.

Now the table is this:


+---------------------------------------------+
| <strong>IMAGES</strong>                                      |
+-----------+---------------------------------+
|customUrl  | realImageUrl                    |
+-----------+---------------------------------+
|/test/test | www.example.com/imgs/tree/1.jpg |
+-----------+---------------------------------+

Now imagine that when arrive a request, will be performed a search of URI into the DB than if it is found will be invoked the servlet “ImageInfo” with GET parameter imgUrl=”/test/test”.
The servlet “ImageInfo” generates and shows the HTML with the image and their info.
Otherwise if the URI isn’t found the request goes normally and static files as css, js or servlet can be invoked normally (without rewriting).

If what I’ve said it’s possoble, how can I do that?

The only thing that not convince me is that for each request this approach require a connection on DB and 1 query.
When I open a page, the browser require a lot of resources as (css, js, API) to draw it… So a lot of resources will be used. That can be avoided if we have “static” predefined URLs filters.
So I think the best way (surely more complicated for developer but with more performance for the users) is to change filters dynamically.

I know that you have a lot of experience in more me with this lib, what do you advise me to do?