Hello all!
This is my first post here!
I’ve started play (lets say working, sounds better!) with vaadin almost 1 month ago and I really find the server-side idea, really cool! I’ve deployed some little application with GWT 2.3 but this one, the one that i’m developing now, is a little bit more complicated.
I’m quite new to the Web Application world and I’m asking you some clarifications about the Web.xml file, specially the servlet mapping section
I’m serving css and images of vaadin themes dynamically and I’ve replaced the default vaadin servlet with one of mine.
I’ve tried this configuration
<servlet>
<servlet-name>MonitorServlet</servlet-name>
<servlet-class>com.aa.aa.aa.MonitorServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>com.aa.aa.MyApp</param-value>
</init-param>
<init-param>
<param-name>widgetset</param-name>
<param-value>com.aaa.aaa.widgetset.aaa_applicationWidgetset</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
[b]
<servlet-mapping>
<servlet-name>MonitorServlet</servlet-name>
<url-pattern>/Monitor/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>MonitorServlet</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
[/b]
This configuration will trigger my servlet on every call to a path that will start with “/Monitor”.
My WebContent folder has this structure:
|____images
|_audio
| …
Until the client calls
/Monitor
, the servlet will serve images and audio from they’re real path as the images is linked with an ExternalResource to “images/image.png” so the Browser will try to get
Context/images/image.png
, and the same for the audio.
Now, if the client accidentaly calls
/Monitor/
the servlet will serve images from
“Context/Monitor/images/image.png”
that does not exists.
How can I achive this? How can I avoid this behaviour? With different servlet mapping?
I tryied “extact match” mapping , trying to map the servlet to
“/Monitor”
but then the UIDL will complain about that with the big red message “Cannot read UIDL from Server…”
If this is a dumb question, well, sorry about that!
Thank you very much in advance,
Yngwie