First JSP: Scriptlets and Expressions

Steps

  1. Create new jsp file Path
  2. Add HTML tags for H1 and P.
  3. Add scriptlet for today's Date.
  4. Run. Note
  5. Add expression for todays date.
  6. Do same thing with scriptlet. Run.
  7. Add import. Run.
  8. Add client-side and server-side comments. Run.
  9. Get parameter 'x' and display it. Run.
  10. Cube x, handle NumberFormatException with local error page. Run.
  11. Edit web.xml to define global error page. Run.

Final Code

  • Source: First.jsp
  • Source: FirstErrorPage.jsp
  • Source: /GlobalErrorPage.jsp
  • Run It

  • first.jsp