chris_andre Posted January 21, 2009 Share Posted January 21, 2009 Hello everybody, I have created an application with GWT (Google Web Toolkit) and I don't know how to integrate HTML files in JS.Indeed, one could think that adding a folder with the pages inside would be sufficient but unfortunately, the configuration of the DispatcherServlet makes it catch any queries to a resource with the extension *.html.As the pages are automatically generated by GWT, I can't change their names (to rename it to *.htm for example) or else, I would break the whole application.Moreover, I need to put these pages within JS so that I can use the ACEGI filter to filter the access to these pages.I'm sure that Spring experts are used to this kind of silly problem but, as I'm not one, I was wondering if someone could help me with it?Thanks in advance! Chris Link to comment Share on other sites More sharing options...
mmflynn Posted January 21, 2009 Share Posted January 21, 2009 Hi Chris, I don't know if this will point you in the right direction for your app or not. But there are two resources you can try. One is a white paper called "Customizing and Rebranding the JasperSoft User Interface." The section, "Extend a Page Flow" might get you started with some ideas: http://www.jaspersoft.com/re_overview.html#whitepapers. The better more comprehensive resource is Chapter 9 of the JasperServer Ultimate Guide. The JS Ultimate Guide is included with JS Pro or you can purchase a copy at http://www.jaspersoft.com/JasperShop_Documentation.html. The Ultimate Guide covers Pro and Community Edition. Good luck! I'd love to see what you end up with... :) Mary Link to comment Share on other sites More sharing options...
chris_andre Posted January 21, 2009 Author Share Posted January 21, 2009 Hey Mary, I had tried the two resources you mention and they work really well as long as we are trying to integrate a non-HTML file. Unfortunately, the problem caused by the DispatcherServlet prevented me from using HTML files. Thanks to a great book ("Pro Web 2.0 Application Development with GWT" for those who are interested), I found a solution: change the initialization order of the DispatcherServlet to have it loaded after the default servlet (I am using Tomcat) that I have explicitly mapped to the path of my folder containing my GWT application and the HTML files contained inside are rendered without any problem. Cheers ! Chris Link to comment Share on other sites More sharing options...
jogrey Posted March 13, 2009 Share Posted March 13, 2009 I am very interrested by integrating GWT in JS, would you, chris, list there the main problems you discovered mixing both solutions ? It could be interresting to see the difficulties you had before getting mines :)Can you shortly show us you DispatcherServlet ?In advance, thank you :) Link to comment Share on other sites More sharing options...
chris_andre Posted March 13, 2009 Author Share Posted March 13, 2009 Actually, I have encountered two problems: The first one is the one I mentioned in this post: the default mapping of the requests to the Spring dispatcher to "*.html" made it very hard to integrate the application at first. I didn't change the DispatcherServlet itself but, in the web.xml, explicitely mapped the queries going to one folder (containing my GWT application's files) to a servlet that just serves the requested files without doing anything else. The second one, probably caused by a wrong configuration of ACEGI (A.K.A. Spring Security) is that, when someone accesses the application, the anonymous user (the one used to access the login page) is associated with the ROLE_USER. I haven't found a solution for the moment as the project (internal project) has been put on hold but I saw that the book I mentioned in the previous posts has some hints on how to integrate ACEGI and GWT.Hope it helps, ChrisPost Edited by Chris André at 03/13/09 10:17 Link to comment Share on other sites More sharing options...
jogrey Posted October 12, 2009 Share Posted October 12, 2009 So you created a special servlet ? Or you just used the spring default one ?Then you had just declared the servlet in the web.xml ? that is right ?I am going to test, because i have the same troubles deploying my own gwt pages :) Link to comment Share on other sites More sharing options...
chris_andre Posted October 12, 2009 Author Share Posted October 12, 2009 I used the default servlet (the one used by default by the application server to serve the static files) and mapped it to my folder and the HTML files inside (with a regular servlet configuration from web.xml).As I am not familiar with Spring WebFlow, I preferred not to modify the DispatcherServlet. Link to comment Share on other sites More sharing options...
jogrey Posted October 13, 2009 Share Posted October 13, 2009 OK, in fact you just added somthing like :<servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/myGwtRep/*</url-pattern></servlet-mapping>In your web.xml, and pointing the jsp/html to this rep ? Link to comment Share on other sites More sharing options...
vishal29bhp Posted November 18, 2009 Share Posted November 18, 2009 Hi Chris, I tried ur solution by editing web.xml adding default servlet but i still not accessing my html pages. I have a folder of help contents that must be shown by hyperlink. Any Pointer ,thanks in advance.Vishal Link to comment Share on other sites More sharing options...
vishal29bhp Posted November 20, 2009 Share Posted November 20, 2009 Any Help Plz Thanks Vishal Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now