Re: [Cppcms-users] Plugins and templates
Brought to you by:
artyom-beilis
|
From: Julian P. <ju...@wh...> - 2010-08-19 12:07:29
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 19.08.2010 13:48, schrieb Artyom:
>
>> nothing to repeat, at offset 0
>>
>> "This loop completed." is not printed anymore, the program terminates.
>
>
> This looks like issue in your regular expression. It is PCRE error.
>
> Also note, when you mount application by a pointer, it is mounted as
> asynchronous
> application. You need a factory to mount generic application that would be
> created per request.
>
> Artyom
>
Ok, that was it. Forgot a dot in the regular expression ^^
But now I encounter 404 not found errors. The plan is to mount the
plugin's application at the path specified by plugin.getModulePath(). I
create the mount point using the following code:
std::string mount_at = "/modules/";
mount_at += plugin.getModulePath(); // Where the result of function call
is "HelloWorld"
cppcms::mount_point mp(mount_at);
srv.applications_pool().mount(plugin.getApplication(),mp);
In the application itself I called
dispatcher().assign("/index",&HelloApplication::index,this);
Expected result would be to see a "Hello World!" message if I point to
http://localhost:8080/modules/HelloWorld/index
(cppcms is currently running with api http).
Instead, I get a 404 error.
How do I have to adjust the regex's to have HelloApplication::index called?
Thanks,
Julian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJMbR52AAoJENidYKvYQHlQhlYP/R5081vd78IbLlPCu7OaAPXY
IOJZGnYBRsN/+yi5jah346q9l3N8RnbXtobHoo8NkncGlvvkkibokVfP6P15M9rW
QAR6HAZMN4o/j0JIvpc6SAGKTmFGRfAK6JmpQG9v4xYUNZ3EVaCCiBuh0GxYI62x
TqDWbVphyuJ04ZYYNkfQIDsEzPo5T9R1LwWLAdZdpsuA0nTTtDANvpJEwuY86o67
wGN3vZ8Y24Q3P14MHUz0QDWHs2wC1cilHbPee8aW1HtFOClehYfzPWlq0gtSA+TT
AVV75D3WRWN4lPEQjk+IGJ0CJeUUGr9qAe5rwSJ2D61RDPaRPqEv26QUoc8/K8bS
jIPj0wI3bgSkE2QWBSMABTqH9aqUo/Y+WcEg3s+6IBQDkwh9xyW4BUAFPte9YY8J
zY+n7avAwk89m9y4rMizs5Vd/T1psZfBwqpBFrtk20wSYWeRZcPnvmV9ANl0zjX7
FMr/6RknY1oe1xBSAhxSf9aTLEpN45GV0UhkgJG3K0PVhckwwII/xjlQQJK73xYf
A9nFwAFLqAlMLybnzoaDG96ATTc5A+XEgYGcWonvea8rvl4MQDJe1ZjgEK0ZbCBG
nyqYTG4pN/ni0BFamKZ2ZNm7IaCygPo12Z6mUqSI9D6fvfRuHMyG3uvcpkp67+tk
SSJGDxsl+FD09uAWKftG
=TwML
-----END PGP SIGNATURE-----
|