42
Originally posted by Bear Bibeault:
That's a really odd approach to take.
If it were me, I'd either port the app to an Applet, or to a servlet/JSP based web application. Either should be easy to do if you've already architteted your application to have the model and business logic separated from the UI.
The combination approach is rather unconventional and is likely to be a royal PITA.
Originally posted by Ben Souther:
I think what the others are trying to say is that a servlet that recieves SQL commands from the web (applet, browser, or otherwise) is a very dangerous thing.
The following Google search will give you links to several good articles that cover Servlet/applet communication via Java object serialization and/or HTTP form params.
http://www.google.com/search?hl=en&q=applet+servlet+tunnelling&btnG=Google+Search
Whether you go that route, or, as Bear suggested, just build the whole thing as a webapp (no applets), I would strongly suggest not executing raw SQL commands from the web. It's better to use prepared statements with parameters passed in from the client and thoroughly validated.