Blank page after deployment

Hello,

I’m trying to migrate an existing UI for an ecommerce platform from Echo to Vaadin. Lot of work but everything was ok until now. The application runs ok on my local machine but when I deploy to the development server (WAS 6.1 with Apache 2) i get a blank page when i’m trying to access the application url on any browser except IE8. On IE8 the page loads just fine.
You can see the result here: http://dev.www.shopmagia.ro/admin/v/

Any ideea?

Could you post your web.xml? My (blind) guess is that this has something to do with the servlet mappings and trailing / signs in the mappings.

Here is my web.xml. But I don’t think the issue is in the web.xml. On my local machine (where I develop) is working fine with this setup. Also on the server is working fine if I access the application directly on the application server. But when I try to access it through the Apache server the application is not working (even if the source page looks like the code is there). I think it is related to
this issue
as well …


<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
	<display-name>shopmagia.ro_ver_1.0_admin</display-name>
	<servlet>
		<description>
		</description>
		<display-name>AdminControllerServlet</display-name>
		<servlet-name>AdminControllerServlet</servlet-name>
		<servlet-class>ro.qi.framework.web.site.servlets.AdminControllerServlet</servlet-class>
		<init-param>
			<description>
			</description>
			<param-name>siteInterfaceName</param-name>
			<param-value>shopmagia.ro_admin</param-value>
		</init-param>
	</servlet>
	<servlet>
		<description>
		</description>
		<display-name>AdminControllerInterface</display-name>
		<servlet-name>AdminControllerInterface</servlet-name>
		<servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
		<init-param>
			<description>
			</description>
			<param-name>application</param-name>
			<param-value>com.jseth.framework.web.vaadin.admin.ApplicationController</param-value>
		</init-param>
	</servlet>
	<servlet>
		<description>
		</description>
		<servlet-name>Myproject Application</servlet-name>
		<servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
		<init-param>
			<description>
			</description>
			<param-name>application</param-name>
			<param-value>com.example.myproject.MyprojectApplication</param-value>
		</init-param>
	</servlet>
	<servlet>
		<description>
		</description>
		<display-name>AdminControllerInterface1</display-name>
		<servlet-name>AdminControllerInterface1</servlet-name>
		<servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
		<init-param>
			<description>
			</description>
			<param-name>application</param-name>
			<param-value>ro.shopmagia.admin.AdminApplicationController</param-value>
		</init-param>
	</servlet>
	<servlet>
		<description>
		</description>
		<display-name>LayoutMediaController</display-name>
		<servlet-name>LayoutMediaController</servlet-name>
		<servlet-class>ro.qi.framework.web.servlets.LayoutMediaController</servlet-class>
	</servlet>
	<servlet>
		<description>
		</description>
		<display-name>ContentMediaController</display-name>
		<servlet-name>ContentMediaController</servlet-name>
		<servlet-class>ro.qi.framework.web.servlets.ContentMediaController</servlet-class>
	</servlet>
	<servlet>
		<description>
		</description>
		<display-name>AdminMediaController</display-name>
		<servlet-name>AdminMediaController</servlet-name>
		<servlet-class>ro.qi.framework.web.admin.media.AdminMediaController</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>AdminControllerServlet</servlet-name>
		<url-pattern>/*</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>AdminControllerInterface</servlet-name>
		<url-pattern>/v/*</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>Myproject Application</servlet-name>
		<url-pattern>/v/sample/*</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>AdminControllerInterface1</servlet-name>
		<url-pattern>/v1/*</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>AdminMediaController</servlet-name>
		<url-pattern>/media/*</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>ContentMediaController</servlet-name>
		<url-pattern>/media/content/*</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>LayoutMediaController</servlet-name>
		<url-pattern>/media/layout/*</url-pattern>
	</servlet-mapping>
	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>
	<resource-ref id="ResourceRef_1306793498343">
		<description>
		</description>
		<res-ref-name>mail/default_jms</res-ref-name>
		<res-type>javax.mail.Session</res-type>
		<res-auth>Container</res-auth>
		<res-sharing-scope>Shareable</res-sharing-scope>
	</resource-ref>
	<resource-ref id="ResourceRef_1306793528359">
		<description>
		</description>
		<res-ref-name>jdbc/shopmagia.ro_content</res-ref-name>
		<res-type>javax.sql.DataSource</res-type>
		<res-auth>Container</res-auth>
		<res-sharing-scope>Shareable</res-sharing-scope>
	</resource-ref>
	<resource-ref id="ResourceRef_1307462070625">
		<description>
		</description>
		<res-ref-name>jdbc/store.hermes.qi.ro_datasource</res-ref-name>
		<res-type>javax.sql.DataSource</res-type>
		<res-auth>Container</res-auth>
		<res-sharing-scope>Shareable</res-sharing-scope>
	</resource-ref>
</web-app>

I tried to debug your site a little. Looking at what the apache server sends upon page load, it seems all correct. the original widgetset and theme is loaded into memory but the javascript doesn’t seem to send the ajax call to start the real loading of the application. One thing what I noticed in Chrome Inspector that I haven’t seen in other Vaadin applications is this:

DefaultWidgetSet.nocache.js: Resource interpreted as Script but transferred with MIME type text/plain.
styles.css: Resource interpreted as Stylesheet but transferred with MIME type text/plain.

Might it be that apache sends the files with some kind of wrong header and the files are thus not interpreted as runnable code? Do you think that the apache server or servlet container (tomcat/jboss/etc.) is somehow modified from the default settings? Do you have the possibility to download a clean Apache + Tomcat onto that server and retest it? That would at least narrow down the possibilities a little.

That did the trick :slight_smile:
I had to setup DefaultType none in httpd.conf so that Apache won’t send text/plain for .css and .js files. Tried to make it work with AddType directives but didn’t work (no idea why). The servlet container (WebSphere Application Server 6.1 in my case) didn’t send any mime type for those files but the browser detect them just fine and works when you access it directly. Still through Apache because of the DefaultType directive these where served as text/plain.

Thanks.

Wow. That was a far-fetched shot in the dark. Amazed that it worked but glad that it did!

Yeap :slight_smile:
Strange is that it happen in three different environment with different Apache installations (Slackware with Apache 2.2.19 compiled manually, Suse 11.1 with Apache 2.2.10 from their repository and CentOS with Apache 2.2.3 from CentOS repositories). All of them are sending plain/text even if the mime type should be detected from the file extension. It could also be because of the servlet container (WAS 6.1 in all cases) not sending the right mime type. I will play around with the settings in my project to see if i can make it work without the need to change the DefaultType in httpd.conf

Anyway … thanks again :slight_smile: