The new superDevMode is *very* impressive. Well done!

I don't know how unusual my use-case is, but I require custom handling of some 
CSS files to make things work properly. For example, I allow customers to skin 
my app, and that requires CSS in a database. So there's a CSS file referenced 
in a gwt.xml file that does not exist as a regular file on disk. Consequently, 
the code server cannot possibly handle it correctly.

I also use ant to write a build number into the name of some CSS files in 
gwt.xml files. The CSS files are stored without the build number, and so I have 
an http filter that removes the build number from the file name. This means 
that users' browsers are forced to update their CSS whenever I release a new 
build.

Modifying com.google.gwt.dev.codeserver.WebServer to do what I want was pretty 
easy, but I'd prefer not to change it at all. Ideally, it would be easier to 
customise its behaviour via subclassing.

In particular, I would like the following changes:
(a) WebServer.doGet(...) to be protected, not private
(b) WebServer.sendOutputFile(String, HttpServletResponse) to be protected, not 
private
(c) The signature of WebServer.sendOutputFile(String, HttpServletResponse) to 
be modified so that the HttpServletRequest is passed in (so that I can work out 
who the http referer was, and pass on the request for the database-generated 
CSS to my tomcat server)
(d) CodeServer constructs WebServer directly. That means I would have to copy & 
paste CodeServer and make the replacement create my WebServer subclass. 
Alternatively, it would be easier if CodeServer.main(String[]) were to construct an 
instance, and then use protected instance methods to do all the work, including 
parsing the options and creating the WebServer instance. That way, I could subclass 
CodeServer as well.

Is this possible?

Thanks,
Paul

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to