Hi,
you should distinguish between pictures, which are purely part of the
application and pictures, which are data.
Pictures, which are part of the application are something like logos or
images for buttons. Those pictures should be compiled into the application.
But for pictures, which are part of data it makes absolutely no sense to
compile the application when they change. It would be a very strange
process if someone needs to compile the application every time he loads
a new picture into his picture archive.
For those pictures the static@tntnet component is one easy option.
Another option is to write a own component, which may load the images
from a database. But don't forget to set the content type e.g.:
reply.setContentType("image/png");
You may want to look at the gd demo application. It generates images on
the fly using the fine gd library.
And one other thing to say here: it is sometimes more convenient, when
static data can be changes without restarting tntnet while developing
the application. You may want to add a mapping to static@tntnet for your
static resources while development so that you can just edit your css or
html snippets or js or whatever and just reload the page. Later you add
the whole directory to your static resources in one step.
Some knowledge of shell scripting is helpful here. To generate a list of
resources for a Makefile.am this can be used:
find resources/ -type f|sed 's/.*/\t\0 \\/'
Put the output to the Makefile.am, which is generated from
tntnet-project, under staticSources and all static files are compiled
into your resources component.
Tommi
Am 05.02.2016 um 20:39 schrieb Raphael Fuchs:
Hi tntnet!
Is there a simple way to include whole folders of pictures into a
tntnet application?
I am struggling to keep all images under control :)
Thanks!
Best regards,
Raphael
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general