Saturday, August 27, 2011

GWT and servlet calling in IE (in FF it is OK)

Hey guys.

A problem that is driving me nuts these days. I have a simple servlet, NO content, just get and post methods in it:

public class FileDownloadServlet extends HttpServlet
{
    private static final long serialVersionUID = 1L;
   
    /**
     * @see HttpServlet#HttpServlet()
     */
    public FileDownloadServlet()
    {
        super();
    }
   
    /**
     * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
     *      response)
     */
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    {
    }
   
    /**
     * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
     *      response)
     */
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    {
    }
}

And in a widget I have a call like this:
Window.open("FileDownloadServlet", "_blank", "");

The servlet mapping in web.xml is like this:
<servlet>
        <servlet-name>FileDownloadServlet</servlet-name>
        <servlet-class>si.zuti.servlets.FileDownloadServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>FileDownloadServlet</servlet-name>
        <url-pattern>/FileDownloadServlet</url-pattern>
    </servlet-mapping>

When I run my app in FF it is working PERFECTLY, no problems. Nothing is done only new window is opened. As it should be. But when I try to run this in IE... well, this is the output:
> HTTP Status 404 - /ZPortal/si.zuti.ZPortal/FileDownloadServlet
>
> ________________________________
>
> type Status report
>
> message /ZPortal/si.zuti.ZPortal/FileDownloadServlet
>
> description The requested resource (/ZPortal/si.zuti.ZPortal/FileDownloadServlet) is not available.
 
Why is the URL reading as /ZPortal/si.zuti.ZPortal/FileDownloadServlet?! If I remove the si.zuti.ZPortal part, it is fine. In FF it reads as it should: /ZPortal/FileDownloadServlet.

I have no idea what to do. I am deploying this in Apache Tomcat. Any ideas would be very welcome.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment