This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CMSC433, Fall 2007 Programming Language Technologies and ParadigmsBill PughSeptember 6th, 2007Project 0 issues• A couple of people had problems getting Eclipse to recognize/find JUnit– I suspect all of those people were using Eclipse 3.2– I’ll switch to a way of using JUnit that is compatible with Eclipse 3.2– but you should probably upgrade• Submission from inside Eclipse is simpler than web submission2Office hours, initial pass• David An– Tuesday, 1:30pm - 2:30pm– Thursday, 10:45am - noon• Bill Pugh– Monday, 1:30pm - 3pm– Friday, 10:30am - noon• Plus by appointment• Plus additional office hours in the days before an assignment is due3Still need a note taker • We still need a volunteer to help another students with taking notes for the course– The campus (via Disability student services) requests your help and will pay you.4Project 1• Complete implementation of a web server• Use a simplification of Servlets– Allowing Java code to generate responses, rather than just serving up static web pages• Use reflection to map request strings to servlets• Worry about security• Use custom mocking framework for server sockets• Due Wednesday, Sept 19th– posted later today56Regular expressionsPatternMeaningX*Zero or more X’sX+One or more X’sX|YEither X or YXYX followed by Y(X)X (indicates capturing group, and useful for precedence).Any one character^The beginning of a line$The end of a line[A-Za-z]Any ASCII letter[^0]Any character other than 0Using regular expressionsPattern p = Pattern.compile("[0-9]+");! while (true) {! ! String s = in.readLine();! ! if (s == null) break;! ! Matcher m = p.matcher(s);! ! while (m.find()) ! ! System.out.println(" -> " + m.group());! ! ! !! ! }7Looking for matches• Matcher.matches tries to match Pattern against entire String• Matcher.find tries to find the next occurrence of the pattern in the String– keeps track of where it has been, can be applied iteratively8Capturing groups• Each group of parentheses defines a capturing group– numbered started at 1, depending on position of left parentheses• After a match, m.group(i) returns the portion of the string matched by the i’th capturing group• m.group() matches the entire string that matched the pattern9Implementing a simple web server• Before we dive into project 1, we are going to implement a simple web


View Full Document

UMD CMSC 433 - Paradigms

Documents in this Course
Trace 1

Trace 1

62 pages

Reflection

Reflection

137 pages

Testing

Testing

25 pages

Testing

Testing

17 pages

Java RMI

Java RMI

17 pages

Java RMI

Java RMI

17 pages

Java RMI

Java RMI

17 pages

Trace 1

Trace 1

46 pages

Jini

Jini

4 pages

Final

Final

15 pages

Java RMI

Java RMI

13 pages

Testing

Testing

16 pages

Load more
Download Paradigms
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Paradigms and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Paradigms 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?