Hello,
This is my first post on the boards, so please be kind
I guess my questions is already answered somewhere, but I'm still a little helpless with the search.
I have written REST APIs for database access before and I'm familiar with
Servlets and Web Services. The work here is part of my diploma thesis and i could really need a hint or two ;)
It was easy to find out, how to resolve the webapp root from a simple Servlet (ServletContext#getRealPath(url)), but for a Rest Resource... no clue^^ I'm sure it must be possible in a few lines of code, but i didn't find anything on the net yet. Thanks in advance!
The ultimate goal is to store files (sent by a
java applet) on the server (a Tomcat6.0) with a simple HTTP PUT command. The files are placed in a subdirectory of WEB-INF. The Rest API should list all files under the URL "MyWebAppRoot/messages/" and later i want to store and get files by the URL "MyWebAppRoot/messages/{message}".
The whole story is, that a Java Applet records voice and sends it to the server (The processing part is not my construction site). Using files is only a quick'n'dirty fallback, personally i would prefer a streaming solution, but since i have no experience with that, it would just bloat things up at the moment. Anyway, i would be thankful for hints on that topic too.
The big picture is, there's a set of tools developed at our university for generating user interfaces from in-house XML models - including previous work of mine. My work consists of 1) creating a generator for GWT interfaces, 2) adding sound input/output to the XML models, and 3) GWT elements for sound I/O.
I have already implemented the Java applet for recording (.wav files) and a wrapping GWT element. The job is now to bring the recording to the server. If a realtime streaming thing would be possible without too much overhead, that would be just great! But my time is limited and there's other work to do, so i think i will stick with the Rest API.