Top.Mail.Ru
November 15th, 2004 - Java developers — LiveJournal
? ?

Java developers

November 15th, 2004
 

04:27 pm - Imagelordfwknight - Ugh

I just spent 30 minutes debugging something that drove me crazy. I did something of this nature

if(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?
Image

08:38 pm - Imagepromdi - 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!
Powered by LiveJournal.com
Image