Mario,

It's important to realize that the Wt API sometimes expects a URL, and
sometimes expects a file path.

appRoot() is intended to be a prefix for files, that are accessed by
the process running on the server. A sqlite db is an example: you
don't intend to serve the db through http as a file, but you do want
to open it in the server process.

An image, on the other hand, takes a URL. The url is sent to the
client, who will request it. CSS urls, image urls, ... will be used by
the client to fetch files. Look in your webbrowser's debugger
(firebird for firefox, or whatever your browser's built-in debugger is
for other browsers) to see what URLs are requested, and in your case
you'll probably see that they return a 404. The URL used to retrieve
Wt resources can be configured in the Wt config file wt_config.xml.
You may also want to reconfigure your web server to redirect certain
paths to other locations. Prefixing your URLs with appRoot() will be
wrong in all practical cases.

Best regards,
Wim.

Op 15 april 2012 03:38 heeft  <[email protected]> het volgende geschreven:
> Hi,
>
> I am giving a try to the ISAPI connector. I have started from a full 
> functional
> application built using httpd connector. Following recomendations from Wt
> Wiki for ISAPI deployment, I changed all relative local file access to 
> absolute
> file access using appRoot() and then built the ISAPI version as a dll (Windows
> 7, Visual C++ 2010 Express).
>
> The dll works pretty well from IIS server, but I have some problems with
> built-in widgets styles and image loading. It seems like theme (I am using
> the default theme (app->setCssTheme("default")) does not load. Also, every
> image that the program loads in diferent pages are not displayed, showing
> just the anoying box with an x inside (I use the following sentence to load
> an image: WImage(applicationWD + "resources/icons/image.jpg", container);
> applicationWD is a non static global variable of type std::string loaded
> in the createApplication entry point with the value of appRoot()).
>
> I would appreciate if somebody could give some advice regarding what I am
> doing wrong. The same application compiled with httpd connector works ok.
>
> Thanks a lot.
>
> Mario Diethelm
>
>
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to