Exam 4

Date: 5/13/2002

Exam 4

These are Applet methods:

	URL where the HTML file sits

		getDocumentBase() : http://localhost:8080/

	URL where the class file sit

		getCodeBase()    : http://localhost:8080/classes

	song = getAudioClip(getCodeBase(), "CHINA.AU");
	img = getImage(getCodeBase(), strImage);

New URL

	URL contains:
	
		protocol
		server name (port) and path
		file name

	http://localhost:8080/music/CHINA.AU
	
	
	System.getProperty("user.dir")
	
	
	file:///C:/My Documents/sweeney/cis135/Multimedia/CHINA.AU


Application

	song = Applet.newAudioClip(codeBase);

Drawing the Image in an Applet

	public void paint(Graphics g) {
		
		g.drawImage(img, 0, 0, null);

	}	
	

MediaTracker


Servlet

	Get
	Post
	CGI
	request Object
	response Object
	out Object
	Forwarding a request/response
	Setting/Getting Attribute