Categories
JavaTips and Tutorials → JSP and Servlets

How to set cookies in JSP

You can put client''s browser a cookie in JSP easily. Following example displays how to create cookie and set target browser.
  • Platforms
    • Windows,
    • FreeBSD
  • Licenses
    • Freeware
DETAILS

Sending Emails in JSP

Before to start to examine this sample code, you need a SMTP server. If you know your mail server name you could easily use this sample code in a real website. We will use JavaMAIL API. You must put j2ee.jar under WEB-INF/lib folder in your web work ...
  • Platforms
    • Linux,
    • Windows,
    • FreeBSD,
    • Sun Solaris
  • Licenses
    • Freeware
DETAILS

Starting to work with JSP Sessions

Session are very helpful to associate some data with each visitor. You may pass and retrieve values in diffrent page using sessions. All sessions are an object associated with each web client. In this sample code we will create a session named usern...
  • Platforms
    • Linux,
    • Windows,
    • FreeBSD,
    • Sun Solaris
  • Licenses
    • Freeware
DETAILS

Handling Unhandled Exceptions

Java Server Pages (JSP) could handle any erros that might be arised in scriptlets, expressions, or other JSP elements. You could use try/cacth blocks to handle any known erros. In this technic we could use to display a custom error on our file where ...
  • Platforms
    • Linux,
    • Windows,
    • FreeBSD,
    • Sun Solaris
  • Licenses
    • Freeware
DETAILS
©2003-2019 jCay.com