Friday, March 17, 2017

Re: Adding Filter causes GWT Host page to rendering twice

dont't think this is GWTrelated. Sounds like an environment issue with your Glassfish/VPN maybe proxy? setup. You could try to create a simple html file at annother path without servletfilter mapping and GWT Scripts inside. Try to request this file.

Frank

On Friday, March 17, 2017 at 4:54:03 AM UTC+1, mohammed sameen wrote:
Hi,
   I have a production issue which i can easily reproducible in Normal GWT application as well, Below is the scenario
 
  •  Created sample GWT application
  • Added Servlet Filters in my web.xml (for Central Authantication System   ,which will not execute in this case,it will skip now and perform chain.dofilter for both the filters).
  • Deploying this sample application on remote server(glassfish) and  accessing through VPN, causing the host page to render twice
Web.xml:
<?xml version="1.0" encoding="UTF-8"?>
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
         version="2.5"
         xmlns="http://java.sun.com/xml/ns/javaee">

  <!-- Servlets -->
  <servlet>
    <servlet-name>greetServlet</servlet-name>
    <servlet-class>com.example.server.GreetingServiceImpl</servlet-class>
  </servlet>
  
  <servlet-mapping>
    <servlet-name>greetServlet</servlet-name>
    <url-pattern>/gwttest/greet</url-pattern>
  </servlet-mapping>
  
  
   <filter>
<filter-name>RedirectFilter</filter-name>
<filter-class>com.example.server.RedirectFilter</filter-class>
</filter>
        <filter>
<filter-name>CASResponseFilter</filter-name>
<filter-class>com.example.server.CASResponseFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>RedirectFilter</filter-name>
<url-pattern>/GWTTest.html</url-pattern>
</filter-mapping> 
        <filter-mapping>
<filter-name>CASResponseFilter</filter-name>
<url-pattern>/GWTTest.html</url-pattern>
</filter-mapping> 
  <!-- Default page to serve -->
  <welcome-file-list>
    <welcome-file>GWTTest.html</welcome-file>
  </welcome-file-list>

</web-app>

Deploying this app in one of our glassfish server which is accessiable through VPN,
If i access the application ,its rendering the html host page twice see the image



And the same if i deploy on my local server, html page is rendering fine.


Need suggestion why GWT application is behaving differently when we deployed on local & remote server(with adding servlet filter on host page)

Please suggest me how to fix this issue?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment