Christoph15
(Christoph Berger)
March 11, 2012, 10:40pm
1
hello,
i try to configure my vaadin app using div like it is described there:
https://vaadin.com/book/-/page/application.embedding.html#figure.embedding.div
i created now a demo test app to show you my problem
call vaadin test app:
It works (direct call)
then i follow the steps from vaadin tutorial
and thats the first approach
http://admin.c-berger.org:8888/Test/Login.html
WebConsole shows: wnd.vaadin is not defined
second approach
http://admin.c-berger.org:8888/Test/Login2.html
WebConsole shows: e is null
please help, i am little bit frustrated
thanks in advance for any information you can provide!
Kind regards from Austria,
Chris
Marko1
(Marko Grönroos)
March 12, 2012, 2:43pm
2
It should work as described in the beginning of the section, but looks like the “complete example” at the end of the section is probably a bit outdated.
So, your second approach is more correct. I don’t quite know what causes the problem.
Anyhow,
here’s an updated example
of basic embedding.
Please note that the embedding div should be enclosed “
”, not self-enclosing “
Christoph15
(Christoph Berger)
March 12, 2012, 8:51pm
3
hello,
thanks for feedback, that is working as you can see here:
http://admin.c-berger.org:8888/Test20120312/Login3.html
but know i have a little problem, dont know why this is working with iframe but now webconsole says:
[21:48:00.343]
GET http://admin.c-berger.org:8888/Test/VAADIN/themes/reindeer/styles.css [HTTP/1.1 404 Not Found 109ms]
my styles.css in themes directory contains:
@import url(…/reindeer/styles.css);
reindeer look is inside of vaadin jar
someone has an idea?
thanks, best regards Chris
Christoph15
(Christoph Berger)
March 12, 2012, 9:41pm
4
hello again,
problem is located in web.xml
<servlet-mapping>
<servlet-name>Test Application</servlet-name>
<url-pattern>/App/*</url-pattern>
</servlet-mapping>
i need that to show the Login.html, but that leads to reindeer problem
default servlet mapping like:
<servlet-mapping>
<servlet-name>Test Application</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
then is reindeer working but i am not able to show a Login.html, because everything is routed to Test Application
i think thats easy for someone who has know-how with web.xml structure
thx, best regards Chris
Marko1
(Marko Grönroos)
March 13, 2012, 7:48am
5
For the theme problem, if your application servlet is mapped with /foo/, you need to add an additional mapping /VAADIN/ to the same servlet (or any Vaadin servlet).
You could also have the Vaadin app in the normal /* mapping and serve static resources from a sub-url such as /static/* if you map the sub-url to the
default servlet
.
Christoph15
(Christoph Berger)
March 13, 2012, 6:54pm
6
hello,
thank u very much, this helps as well
the next problem was that logoff leads not to Login.html but to Serlvet/App as it is configured in web.xml
that i was able to solve with this:
getMainWindow().getApplication().setLogoutURL(“Login6.html”);
i will wait a couple of time till closing this thread
maybe new things will poping up
thanks again for help
bye Chris