File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Using Vaadin and Struts 1 together Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Using Vaadin and Struts 1 together" Watch "Using Vaadin and Struts 1 together" New topic
Author

Using Vaadin and Struts 1 together

Ragunath Jawahar
Greenhorn

Joined: Jan 28, 2010
Posts: 15
Hi, I'm writing an application using Struts 1 and Vaadin. Struts 1 for the customers and Vaadin for the administrative panel. The application's working fine but I have trouble putting them together. If I change the servlet mapping for the Vaadin application, the CSS doesn't get loaded properly and thereby the Vaadin application looks and works weird. Could someone help me out of this??

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Well, you have two mappings to the same URL--that's not going to work. Why not put a prefix (one not used in the struts app) for the admin app?
Ragunath Jawahar
Greenhorn

Joined: Jan 28, 2010
Posts: 15
Sorry, the mappings are:

<servlet-mapping>
<servlet-name>Reindeer</servlet-name>
<url-pattern>/admin</url-pattern>
</servlet-mapping>


<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

This one is causing problem with the Admin application (Vaadin), the page doesn't load properly. It doesn't work well with any other mapping except /*
Ragunath Jawahar
Greenhorn

Joined: Jan 28, 2010
Posts: 15
Figured it out finally http://vaadin.com/book/-/page/application.environment.html
Ragunath Jawahar
Greenhorn

Joined: Jan 28, 2010
Posts: 15
Thank you David Newton.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using Vaadin and Struts 1 together