15 November 2004 - java_dev (original) (raw)

| | 04:27 pm - lordfwknight - Ugh I just spent 30 minutes debugging something that drove me crazy. I did something of this natureif(blah);{do some blah;}I accidentally put a ; after the if statement. But this is not considered a syntax error. I then realized you can pretty much put {} around anything you want to. What purpose does that serve exactly? | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

08:38 pm - promdi - writing to a text file using a servlet Hi everyone, it's my first post here.Just wanted to ask if it's possible to write to a text file using a deployed servlet. I'm kinda resorting to this since I don't know database yet. The purpose is to store user data & other information.I tried using fileWriter.write. My code compiled, and my JSP worked but I didn't see any text file created on the webapps directory (I'm using Tomcat). Any idea on how I can retrieve the file?Thanks!