Works with URL (using IP) but does not work with URL (using Domain Name)

Hello guys,

I have been evaluating and learning Vaadin, and now I have finished creating my first Vaadin application.
And, I am stuck at last hurdle. (I am sure, more will come, but this is critical)

So, to the point now,

Application URL
is
http://ultradomainsearch.com/

And after few seconds, it shows following error in a browser dialog box.

[i]

Failed to load the widgetset: /VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/com.vaadin.terminal.gwt.DefaultWidgetSet.nocache.js?1273403734577

[/i]

But
Same application
with direct (IP ) URL works
Which is this one…

http://98.158.185.59/DomainSearchVaadin/

I am new to world of internet (worked on intranet mostly) so not having much experience with Domain-Config, Server-Admin etc, so It may be probably a configuration issue of tomcat or something not related to Vaadin.

Any ideas?

Cheers

For me the ip link above did not work. Complained also about the missing widget set. Are you sure that you have set up a separate VAADIN/* uri mapping? This is required if you are not mapping /*

See book of vaadin for an example web.xml

In other words appending the “VAADIN/wigdetsets/…” part to the original URL should show the widgetset (javascript) file.


http://98.158.185.59/DomainSearchVaadin/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/com.vaadin.terminal.gwt.DefaultWidgetSet.nocache.js?1273403734577

shows the widgetset correctly, therefore it works (for me, apparently not for Joonas).


http://www.ultradomainsearch.com/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/com.vaadin.terminal.gwt.DefaultWidgetSet.nocache.js?1273403734577

on the other hand returns 404 and therefore does not work.

As Joonas suggested the problem is in the servlet mappings
(
http://www.ultradomainsearch.com/DomainSearchVaadin
also works fine)

Just to follow up - now http://98.158.185.59/DomainSearchVaadin/ works for me too. Maybe there was some temporary problem last time I used.

Hello Joonas, Artur
Appreciated your help. :slight_smile: and sorry for late response.

I have already specified /VAADIN/* servlet mapping… here is my
web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <context-param>
        <description>Vaadin production mode variable</description>
        <param-name>productionMode</param-name>
        <param-value>true</param-value>
    </context-param>
    <servlet>
        <servlet-name>VaadinApplication</servlet-name>
        <!--<servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>-->
        <!--<servlet-class>com.vaadin.terminal.gwt.server.GAEApplicationServlet</servlet-class>-->

        <!-- AdvancedApplicationServlet extends ApplicationServlet and adds meta tags in header. -->
        <servlet-class>com.logicwind.domainsearch.vaadin.AdvancedApplicationServlet</servlet-class>
       <init-param>
            <param-name>application</param-name>
            <param-value>com.logicwind.domainsearch.vaadin.MyApplication</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>VaadinApplication</servlet-name>
        <url-pattern>/vaadin/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>VaadinApplication</servlet-name>
        <url-pattern>/VAADIN/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>vaadin</welcome-file>
    </welcome-file-list>
</web-app>

And
META-INF/context.xml
is

<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/DomainSerachVaadin"/>


Anyways, I’ll try with statically hosting VAADIN folder,
because thats the proper way of production deployment.

Cheers,

These are is just guesses as I do not know how your deployment configuration outside web.xml…

Maybe you could try to:

  1. use /vaadin/VAADIN/* instead of /VAADIN/* or 2) use /somethingelse/* instead of /vaadin/*

Hi guys,
Thanks for suggestions, you rock.

I am not able to conclude the reason why It was not working.
But, I was able to make it work, by putting VAADIN folder static content, directly not zipped…
and it worked :slight_smile:

Cheers