Project

General

Profile

Built-in httpd does not render any widget

Added by Javier Arauz over 12 years ago

I've written my first "Hello world" kind of application. I'm using the built-in httpd (./testapp.wt ---docroot . ---http-address 0.0.0.0 ---http-port 8080) to test it on my dev computer, but when I point my browser to http://127.0.0.1:8080 I get an empty page. When I browse source for the page I get the attached HTML. Browser's error console shows a lot of "Error in parsing value for . Declaration dropped" ( are declarations in the resource/ files), a few "Unknown property . Declaration dropped", and the following:

Error: missing ) after condition

Source File: http://127.0.0.1:8080/?wtd=CYTp4BgTOh5JNJ8B&htmlHistory=true&request=script&rand=542474374

Line: 1, Column: 43080

Source Code:

if (typeof window.jQuery === 'undefined') {(function(a9,K){var aq=a9.document,br=a9.navigator,bi=a9.location;var b=(function()

I haven't changed the default /etc/wt-config.xml. Any clue what's going on?

127.0.0.1.html (3.36 KB) 127.0.0.1.html HTML obtained from http://127.0.0.1:8080

Replies (12)

RE: Built-in httpd does not render any widget - Added by Wim Dumon over 12 years ago

What operating system version, browser version, boost version, and Wt version?

Wim.

RE: Built-in httpd does not render any widget - Added by Javier Arauz over 12 years ago

I'm on Ubuntu 11.10. Both Chromium 14 and Firefox 7.0.1 behave the same. I'm using witty 3.1.10-1 and boost version is 1.46.1-1. Code snippet follows:

Wt::WApplication* createApplication ( const Wt::WEnvironment& env )

{

Wt::WApplication* app = new Wt::WApplication(env);

app->setTitle("Test witty app");

app~~messageResourceBundle().use(app>appRoot() + "string");

app
messageResourceBundle().use(app~~>appRoot() + "templates");

app->useStyleSheet("style/test.css");

new Wt::WText(\"

Hello, World!

\", app->root());

return app;

}

int main ( int argc, char **argv )

{

return Wt::WRun(argc, argv, &createApplication);

}

RE: Built-in httpd does not render any widget - Added by Koen Deforche over 12 years ago

Hey,

This seems a duplicate of: http://redmine.emweb.be/boards/2/topics/3075#message-3184

So I am keen on getting this resolved.

Can you enable in your wt_config.xml ?

The HTML code seems fine, but the problem seems to be with the script file.

Regards,

koen

RE: Built-in httpd does not render any widget - Added by Michael Kulabuhov over 12 years ago

System: Ubuntu 11.10

Attached files:

error - from firefox

code - full script from chomium

error (76.2 KB) error
code (133 KB) code

RE: Built-in httpd does not render any widget - Added by Koen Deforche over 12 years ago

Hey,

I think we are making progress.

The minified jquery JavaScript is broken: it contains "\" as a string literal, which is not a proper string literal (should be "\\" or "\"\" ?). It seems thus that either there was a problem in the minification step, or in the conversion from a .js file to a .C file which contains this as a C string literal.

First of all, this minified jquery.min.js does not look at all like the one that is distributed with Wt ... Where does it come from? And how was it minified?

Secondly, can you check whether your jquery.min.js is indeed correct, and if possible, attach both the jquery.min.js and JQuery_js.C file (that is generated during the build of Wt) ?

Regards,

koen

RE: Built-in httpd does not render any widget - Added by Michael Kulabuhov over 12 years ago

jquery.min.js form ubuntu 11.10 repos. Wt also form this repos

RE: Built-in httpd does not render any widget - Added by Javier Arauz over 12 years ago

The problem only arises with the witty packages downloaded from Ubuntu 11.10 repositories. When building the library from source everything works fine.

RE: Built-in httpd does not render any widget - Added by Koen Deforche over 12 years ago

Hey,

We have identified the problem in the debian packages ans are working with Pau who's maintaining these to get the problem solved.

Regards,

koen

RE: Built-in httpd does not render any widget - Added by Pau Garcia i Quiles over 12 years ago

For progress on this issue, please check Launchpad:

https://bugs.launchpad.net/ubuntu/+source/witty/+bug/886456

I am still investigating the problem. I will provide a fix in the Wt PPA as soon as possible.

RE: Built-in httpd does not render any widget - Added by Pau Garcia i Quiles over 12 years ago

Please try 3.1.10a from the Wt PPA and tell me if it solves your problem.

https://launchpad.net/\~pgquiles/+archive/wt

RE: Built-in httpd does not render any widget - Added by Pau Garcia i Quiles over 12 years ago

Great.

Apparently when the package was built in the Ubuntu archive, it picket a buggy jQuery, or something like that. There is no difference between 3.1.10-1 and 3.1.10-1a, other than 3.1.10-1a is a rebuild of 3.1.10-1.

    (1-12/12)