Programming for the Web Assignment 1 Help Mark Johnson.

Slides:



Advertisements
Similar presentations
11-Jun-15 Getting Ready for CIT Registering and labs If you are not yet registered (and want to be), be sure I have your name and student ID We.
Advertisements

1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
Coursework 2: getting started (4) – using PhoneGap to build mobile applications (optional) Chris Greenhalgh G54UBI /
CS115 HOW TO INSTALL THE JAVA DEVELOPMENT KIT (JDK)
XMAS installation instructions Windows Version: 1.0 4/22/2008.
Introduction to Java ISYS 350. A Brief History Sun Microsystems released this language in 1996 – Versions: 1.0 – 1.6 Java Development Kit, JDK – Standard.
Eclipse Introduction Dwight Deugo Nesa Matic
Tomcat server browser requested page returned page displayed Request-Response Cycle C: ---- /webapps/ROOT/chapter01/sample00.htm.
Website Development with PHP and MySQL Introduction.
13-Jul-15 Getting Ready for Java. 2 What You Need 256 MB of RAM (512 MB or more recommended) 500 MHz Pentium or better Macintosh: must run Mac OS X, preferably.
PHP Scripts HTML Forms Two-tier Software Architecture PHP Tools.
Dynamic Web site With PHP and MySQL. MySQL The combination of MySQL database and PHP scripting language is optimum for building dynamic websites. MySQL.
ECE356 – Database Systems Lab 1 – Building a Web Project with NetBeans Tiuley Alguindigue Lab Instructor – University of Waterloo, E & CE Dept. Fall 2013.
SERVLETS.
Installing Tomcat on Windows  You may find the Tomcat install shield has some problems recognizing JSDK 1.4 beta installations.  You.
TUTORIAL (1) Software installation Written by: Eng. Ahmed Mohamed Abdel Ghafar, Edited by Eng. Muhammed Hammad, Eng. Hamdy Soltan & Eng. Osama Talaat.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Installing DSpace on Window Bharat M. Chaudhari School of Petroleum Management, PANDIT DEENDAYAL PETROLEUM UNIVERSIRY, GANDHINAGAR
E-Commerce LAB#1 Samia alblwi1E-Commerce ( IS412) 2011.
Installing and Configuring Tomcat A quick guide to getting things set up on Windows.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Servlets Environment Setup. Agenda:  Setting up Java Development Kit  Setting up Web Server: Tomcat  Setting up CLASSPATH.
SQL HW1 Turn in as a hardcopy at the start of next class period. You may work this assignment in groups.
Views, Indexes and JDBC/JSP tutorial Professor: Dr. Shu-Ching Chen TA: Haiman Tian 1.
CSE 305 Theory of Database Tutorial on Connecting with Sybase from Java program and Developing GUI Jalal Mahmud, TA, CSE 305.
1 IMPORTANT NOTE  IMPORTANT NOTE not  As of this writing the default project you will download, import and use in this class is not enabled for Tomcat.
TimeTablePublisher T3 Webinar Frank Purcell May 14, 2008.
The PLASTIC Model to WSDL transformation tool UDA.
Apache, MySQL and PHP Installation and Configuration Chapter 4 XAMPP Installation and Configuration.
ATG Environment Setup In this session you will learn – Setting Up ATG environment – Creating new ATG application – Configuring Data Source – Configuring.
CSC 411/511: DBMS Design Dr. Nan WangCSC411_L12_JDBC_MySQL 1 MySQL and JDBC.
How to Tag a Corpus Using Stanford Tagger. Accuracy All tokens: 97.32% Unknown words: 90.79%
Basic Setup Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting Installation and Testing.
Java and C# [this is a bonus – it is not a required lesson] ACO101: Introduction to Computer Science.
( ) 1 ISYE 7210—Fall 2005 Design of Real-Time Interactive Simulations (in Java) Initial Notes Christine M. Mitchell Director & Professor Center for.
Servlets Database Access. Agenda:  Setup Java Environment  Install Database  Install Database Drivers  Create Table and add records  Accessing a.
Index and JDBC/JSP tutorial Professor: Dr. Shu-Ching Chen TA: Hsin-Yu Ha.
Setting Up Eclipse. What is Eclipse? Eclipse is a free, downloadable software that allows us to create, compile, and run JAVA programs.
Welcome to java installation. After download java software, assuming you downloaded jdk1.7.0_11 Follow the procedure bellow to install java.
JDBC Tutorial CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Liferay Installation Prepared by: Do Xuan Hai 8 August 2011.
Tool Install How to download & install Java 6 & Eclipse updated version based on Dr. G. L. Ray’s slides.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
COMP 321 Week 4. Overview Normalization Entity-Relationship Diagrams SQL JDBC/JDBC Drivers hsqldb Lab 4-1 Introduction.
Installing MySQL BCIS 3680 Enterprise Programming.
Apache, MySQL and PHP Installation and Configuration Chapter 2 MySQL Installation and Configuration.
How to Install Eclipse Click hereClick here to download Eclipse.
WAMP Server Installatin Shiyun Wen. WAMP Server Installation  WAMP Server is an integrated installation of Apache, MySQL, and PHP for Windows. Following.
CS1101 Using CourseMarker (CM) CM website: Updated:
Unit 1 – Web Concepts Instructor: Brent Presley.
Chapter 3 Servlet Basics. Contents A.Installing Eclipse WTP and configuring Tomcat B.Prime Number Problem C.Multiplication Table Problem.
1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Processing  Install Processing  Learn how to edit, run, save, export,
1 Download current version of Tomcat from: g/tomcat/ g/tomcat/ Install it in: C:\Program Files\Apache.
Tomcat Setup BCIS 3680 Enterprise Programming. One-Click Tomcat Setup 2  This semester we’ll try to set up Tomcat with a PowerShell script.  Preparation.
Settings MySQL Database and JDBC configuration Instructor: Sergey Goldman.
INTERNET APPLICATIONS CPIT405 Install a web server and analyze packets.
Mysql And Java Developers Guide Using Java To Connect To MySQL Mohammad Asheri.
WMarket For Adminstrators Manual Installation. Basic Dependencies To install your own WMarket instance, you are required to install the following software:
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Labs: Create, deploy and test a simple web service
Apache Tomcat & Quick Tutorial
How to install VisualWorks?
HW#4 Making Simple BBS Using JDBC
Installing OpenRefine
MSIS 655 Advanced Business Applications Programming
CS115 HOW TO INSTALL THE JAVA DEVELOPMENT KIT (JDK)
Getting Started With Solr
Review of Previous Lesson
Presentation transcript:

Programming for the Web Assignment 1 Help Mark Johnson

Things you this will help you with… Software to install at home –Java –Eclipse –Tomcat –MySQL

Installing Java The version of Java we will use is There are two forms in which Java can be installed –Software development kit (sdk) –Runtime environment (jre) We want the SDK Click here to install correct versionhere

Installing TomCat If you install Java using the previous method it should set up the JAVA_HOME environment variable If not (you will be able to tell if the following doesn’t work), go to the System control panel and set a variable JAVA_HOME to point to where you have installed TomCat Click here to download the correct version of TomCathere

Installing Eclipse You can install the latest version of Eclipse Find it from This will allow you to do the initial programming exercises in Java that we did (and will check syntax, etc)

Installing MySQL The version of MySQL we are using is 4.1 Download it from here and double-click to installhere Don’t choose a password! To run the MySQL server, browse to C:\mysql\bin Unlike in the lesson, you can run the program ‘winmysqladmin’ which will run the server within windows (not DOS) Check it’s working by using the Command window (run  cmd) –Type C: –Type cd \mysql\bin –Type mysql –u root

Installing Java MySQL connectivity Finally, we need the file which connects Java to MySQL This can be found at the MySQL website and it’s called Connector/J Actually, what you need is one file within the Connector/J download called Download that file from herehere Copy the file to the Common\lib directory in TomCat –So if you installed Tomcat at C:\program files\Apache\Tomcat4.1, the file should be copied to C:\program files\Apache\Tomcat4.1\Commons\lib Start TomCat by running start.bat in your TomCat bin directory (probably C:\program files\Apache\Tomcat4.1\bin) Check it works by pointing your web browser to Any problems, contact me!

Making a connection to a database So we now need to write the.jsp code to connect to the database The code is: <% String connectionURL = "jdbc:mysql://localhost:3306/mytest?user=;password="; Connection connection = null; Statement statement = null; ResultSet rs = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); connection = DriverManager.getConnection(connectionURL, "", ""); statement = connection.createStatement(); rs = statement.executeQuery("SELECT * FROM urls"); while (rs.next()) { out.println(rs.getString("url")+" "); } rs.close(); %>

Outputting results This code will simply output results, with the file encoded as XML It needs to output ‘proper’ XML, so the lines while (rs.next()) { out.println(rs.getString("url")+" "); } Need to change so that the output is wrapped by … etc

Where to go next… 1.Install the software as instructed 2.Set up the database (as in the practical) 3.Copy the code for the.jsp file and create a new.jsp file in tomcat\webapps\ROOT\ and get it to work 4.Run tomcat from check it workshttp:// : Load up page at (if the file you created in 3 is called myfile.jsp)

Quick revision for those who didn’t do the practical this week Creating a database Download and install mysql from location specified in slide 6slide 6 Find and run the file C:\mysql\bin\mysqld Load a DOS (cmd) window In DOS window type C: Type cd \mysql\bin Type mysql You will now be in mysql Type create database mytest; Type use mytest; Type create table test (url text, description text, mydate date); Type insert into test values (“ “tomcat”, “2007/5/1”); Type select * from test; So now when you use code in slide 8, you will use a connection string that reads: "jdbc:mysql://localhost:3306/mytest?user=;password=";slide 8 And your select string will read “select * from test” (your table name)