09-13 - CMSC 433 Programming Language Paradigms and...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CMSC 433 Programming Language Paradigms and Technologies William Pugh Sept 13th, 2011 JSPs, Servlets and more Project 1: Idea book Due Monday, Sept 19th, 6pm signed in users add ideas and can vote + or - on ideas each user gets one vote per idea, can change vote list ideas by net votes Details at http://goo.gl/ZLN3G Individual project: do not share or look at code by Project 1: Idea book Due Monday, Sept 19th, 6pm signed in users add ideas and can vote + or - on ideas each user gets one vote per idea, can change vote list ideas by net votes Details at http://goo.gl/ZLN3G Individual project: do not share or look at code by other students Submitting project 1 Deploy to Google Appengine Commit to CVS and submit project to submit server Project 2 Project 2 will be to complete several elements of WebGoat Do something impressive You are just getting exposed to the bare edges of what can be done with web servers and appengine mail, chat, sms, cron jobs Recommended Servlet/JSP book Im a fan of the head Frst series. Some people hate them Available free on line via Safari books when connecting from campus Search engines are your friend Bing/google "core jstl" and you will get lots of pointers to the core taglibs in jstl Scriptless JSPs No java source code in your jsp fle Can go part way just using beans But probably want to go to using JavaServer Pages Standard Tag Library (JSTL) JSP Header <%@ page contentType="text/html;charset=UTF-8"%> <%@ taglib prefx="c" uri="http://java.sun.com/jsp/jstl/core "%> Starting JSTL <c:choose> <c:when test="${empty user}"> <p>Welcome. <a href="${loginURL}">Log in</a> to sign ideas you post.</p> </c:when> <c:otherwise> <p>Hello <c:out value="${user.nickname}" /> (<a href="${logoutURL}">sign out</a>).</p> </c:otherwise> </c:choose> Two different things going on ${.} is a JSTL expression <c:choose>, <c:when> and <c:otherwise> are JSTL tags the c comes from the preFx for the taglib, but c is standard for the JSTL core JSTL EL expressions constant attribute_name implicit_object_name exp .name exp [ exp ] unaryOp exp exp binaryOp exp Servlet attributes An attribute can be associated with a session, request or page Each attribute has a name Easy to set attributes via flters For example, user, loginURL and logoutURL are attributes Setting attributes in a flter...
View Full Document

Page1 / 44

09-13 - CMSC 433 Programming Language Paradigms and...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online