This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Stopping Execution of jsp when particular condition exists  RSS feed

 
Vasudevan Gopalan
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a form where they can upload the files.Before uploading i am checking whether file already exists in the directory or not.When file already exists then i need to stop proceeding to next JSP statement.I used
out.close()
but still it executes the remaining statements.How to stop executing jsp when particular condition exists.

Thanks in Advance.
Regards,
Vasu
[ December 16, 2003: Message edited by: Vasudevan Gopalan ]
 
Tim Baker
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
return;
 
Vasudevan Gopalan
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
When we will be using
out.close();
 
Tim Baker
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Offhand I can't think of any reason to. The servlet container manages the output stream to the client, so when your servlet/jsp finishes the container should tidy up
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!