|
|
|
Sun Dec 16So let me play some haikus, by J. L. Hardesty, about the final project.
Wed Dec 12
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class One extends HttpServlet {
public void doGet(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
IOException {
res.setContentType("text/html");
PrintWriter out = res.getWriter();
String one, two;
String what = req.getParameter("picture");
if (what == null) {
what = "";
}
if (what.equals("one")) { one = "One"; } else {
one = "<a href=\"/examples/servlet/One?picture=one\">One</a>";
}
if (what.equals("two")) { two = "Two"; } else {
two = "<a href=\"/examples/servlet/One?picture=two\">Two</a>";
}
out.println("<html><head><title>Mamma mia!</title></head><body bgcolor=\"white\">" +
"<table border><tr><td>" +
one +
"</td><td>" +
two +
"</td><td>Three</td><td>Four</td></tr>" +
"<tr><td colspan=4 align=center>Picture</td></tr>" +
"<tr><td colspan=4 align=center>Caption</td></tr>" +
"</table></body></html>");
}
Here now is the starting point for the calculator.
<html><head><title>My calculator</title></head><body>
<% Integer a = (Integer)session.getAttribute("acc");
if (a == null) { a = new Integer(0); }
String argument = request.getParameter("arg");
if (argument == null) { argument = "0"; }
int conv;
try {
conv = Integer.parseInt(argument);
} catch(Exception e) { conv = 0; }
a = new Integer(a.intValue() + conv);
session.setAttribute("acc", a);
%>
<form>
The accumulator is now: <%= a %> <p>
<input type="text" name="arg"> <p>
</form>
</body></html>
Tue Dec 11I received this from the Dept. of Chemistry. This is a very exciting position in which you could contribute significantly if you like Perl. They might be open to the idea of mixing some PHP as well. Essentially this is a position in which you extend a computer-assisted instruction tool, developing multi-stage programmed test items. This is a tool for which deSouza has received the President's Award in 1998. Indeed, an excellent position, but you need to enjoy Perl.
Mr. German,
The Department of Chemistry is currently running CALM(Computer
Assisted Learning Method), a tool to assist students in learning course
materials over the web. The application is a Perl based program and we
are looking for a student or two to help us continue development. It is
my understanding that A348 and A548 teach Perl as a language. With that
in mind, I thought it might be a great opportunity for your students to
get practical experience using Perl. Please let me know if you have some
bright students that you could recommend for this position.
--------------------------------- Start Advertisement ------------------
Job Description: CGI Web Developer position to assist development of the
Chemistry Department's Computer Assisted Learning program. Tasks will
include development of functions to improve performance and usability.
The person will also be involved in transitioning old software into new
formats and developing new ways to build on course content. Required
Skills: A strong knowledge of PERL programming and CGI development as
well as the ability to demonstrate proper and efficient code. The
applicant must be able to work independently and learn quickly to meet
the time requirements. Email your experience and resume to - David
Felker - dmfelker@indiana.edu <mailto:dmfelker@indiana.edu> or contact
by phone 855-8450.
--------------------------------- End Advertisement -------------------
Sincerely,
Dave
David Felker
Manager Instructional Computing
Indiana University
Department of Chemistry
Phone: 812-855-8450 | Pager 812-334-6768
Please let me know if you need more info (details) on this job announcement.
Mon Dec 10
Help with Lab Fourteen
(Default Project) has been posted here. Please don't forget to schedule your final appointment for this week on-line here.
Sat Dec 8
Wed Dec 5
Tue Dec 4Lecture notes for today posted.
Sun Dec 2
Date: Thu, 29 Nov 2001 19:40:28 -0500 (EST) From: Brian Keese <bkeese@indiana.edu> To: dgerman@cs.indiana.edu Subject: reloading changed servlets I've struggled with the problem of having to restart the Tomcat server everytime a change was made to servlets I was working on and found it so annoying. Here's a link to information about changes that can be made in the configuration of Tomcat to make the reloads automatic. http://jakarta.apache.org/tomcat/tomcat-3.2-doc/appdev/deployment.html#Integration Just search for reloadable. Cheers, Brian ******************************************** Brian Keese Computer Science LH310 855-3609 bkeese@indiana.edu ********************************************
Thu Nov 29
Wed Nov 28This can happen so use
to find out if you're running Tomcat or not)ps -ef | grep username | grep java
Here's my output:
Remember Tomcat needs to be shut down before restarting.burrowww.cs.indiana.edu% ps -ef | grep dgerman | grep java dgerman 25679 25648 0 13:16:12 pts/47 0:00 grep java dgerman 16722 1 0 06:11:04 ? 0:04 /usr/bin/../bin/../java/bin/../jre/bin/../bin/sparc/native_threads/java -Dtomca burrowww.cs.indiana.edu%
Also, please remember that you need to add it to your crontab.
Lab Notes for today posted, help with Homework Six.
Tue Nov 27
Sun Nov 25
Sat Nov 24Project is due when you have it ready but not later than the final exam (see the what's due page). There's a default project and there will be others, if you're working on the default you are lucky: it started a month ago, if you are waiting for another default doing homework six first would be helpful. More default projects forthcoming.
Tue Nov 20
Mon Nov 19
Thu Nov 15Addendum to the notes for today (read the notes first).
Lecture notes for today and Tuesday posted.
Wed Nov 14
Tue Nov 13
Fri Nov 9
Thu Nov 8
Wed Nov 7Also,
Date: Wed, 7 Nov 2001 09:11:00 -0500 (EST) From: Adrian German <dgerman@cs.indiana.edu> To: Undisclosed recipients: ; Subject: A348 Core Web Programming Book In Bookstore For this last part of the course we use another reference which just made its way into the bookstore: a book by Marty Hall and Larry Brown has been selected and ordered and is now ready for you at IU Bookstore. The book covers mostly HTML, server side Java (basic intro, servlets and JSP) and also has chapters on Javascript and XML processing with Java. Lab today is applets. Lecture tomorrow is Java RMI. Next week we install Tomcat and start server-side Java. Notes for tomorrow will be up sometime tonight. Help for Homework Four will also be somehow presented tomorrow (or posted). I have changed my office hours. I am now available 11am-1pm daily (MTWRF) in LH201D (my office). I will make the change on the website as well. If you need help please let me know. ... Adrian
Tue Nov 6Notes for today start the new topic.
Also,
Date: Tue, 6 Nov 2001 11:02:08 -0500 (EST) From: Adrian German <dgerman@cs.indiana.edu> To: Undisclosed recipients: ; Subject: A348 Projects I have read the minute papers of last week and I am putting together a few more default projects all in Java as discussed at the beginning of the semester. I will show what I've done so far tonight in class. The lab this week looks at applets. We will install Tomcat soon and look at server-side Java, and write a chat application that will be your homework 6. Homework 5 to be posted very soon, is a minor tweak on the Javascript shopping cart we looked at last. For semester projects - you need identify a problem and devise a solution. If you do not have a problem or a team there will be these default projects that you could work on. More to come soon including an update on the grades and standing in this class. ... Adrian P.S. Graduate standing extra work for lab due tomorrow is: nothing. We put it off, and it will be assigned in a broader context soon (also in lab).
Thu Nov 1
Wed Oct 31create table catboo ( isbn char(6), catid int unsigned, primary key (isbn, catid) )
Tue Oct 30
Mon Oct 29
Thu Oct 25
Wed Oct 24
Fri Oct 19
Thu Oct 18
Exam today in class (LH102) at 5:30pm. Here's the program we developed last night during the review session:
#!/usr/bin/perl
use CGI;
$m = new CGI;
$da = $m->param('day');
$mo = $m->param('month');
print $m->header;
print $m->start_html(-bgcolor=>'navyblue');
print "<hr>Hello! ($da) ($mo) <hr>";
open (MYLOG, "/u/dgerman/apache/apache_1.3.20/logs/access_log");
while ($line = <MYLOG>) {
$line =~ s/\[([^\]]+)\]//;
$line = $1;
$line =~ s/2001.+//g;
# print $line, "<br>";
if ($line =~ /$da\//) {
$freq{$line} += 1;
} elsif ($line =~ /\/$mo\//) {
$freq{$line} += 1;
}
}
close(MYLOG);
foreach $key (sort { $freq{$b} <=> $freq{$a} } keys %freq) {
print $key, " : ", $freq{$key}, " <br>";
}
print $m->end_html;
Wed Oct 17
Tue Oct 16The midterm on Thursday will be OPEN BOOK and very basic.
You will be tested on:
readParse)
CGI.pm (as it relates to CGI)
DBI.pm is and how it's used
Format is:
short questions that may ask you to write, rewrite, assess, or fix code.
Here's an exam from the past.
Lecture Notes for Tue Oct 16 posted.
Sun Oct 14
Thu Oct 11
Mon-Wed Oct 8-10
| HPOAG | JTUREL | DCHARNEY | SHUQ | UCHAN | FWANG |
| BKEESE | CTANG | CHENGAN | GMATHUR | ABERZINI | KMWINTER |
| JEEYKIM | JRDIXON | MANAKANO | JDYU | KMODI | YLUO |
| SZHU | GCHOI | TAALEXAN | IPAPAIER | TRJMYERS | JRHARVEY |
| MEBLEWIS | MACHADO | TMLANDER | MRUSZKOW | SOKANG | JDCANNON |
| NMINIBAY | KANWOODS | JMAGLIOL | KTLEE | JTDYAR | WEARNEST |
| MLEDDA | JFFOX | NHARPE | KSALZMAN | DNEELAMR | JMCOMEAU |
| ECCOHEN | KYAMADA | RSOUSA | JKLIPPEL | MKLEINER | LEDOLLEN |
| QCAI | NCINCOTT | and many others... | |||
I'd like to individually help you install php-4.0.6 so
please come to my office (LH201D) when you have time. I think this will
be very beneficial to us, as I will get to talk to, and know, each one of
you. Thanks and let me know if you have any questions or concerns.
Sun Oct 7
Fri Oct 5
Thu Oct 4labFive and then explain
what's needed to successfully install php. Then we will describe the
new assignment.
Everything is OK with the php installation, you just have to be careful about it. In class today we will discuss what we need to do to make sure the installation is successful. We'll spend some time with the posted examples then. We'll demo this with the help of the audience.
Tue Oct 2New homework, grades, practice exam problems to be posted soon, etc.
Lab notes for tomorrow posted, lab assignment to follow.
Sat Sep 29We will start the new week with a fresh new perspective, clear plan.
Get ready to start thinking about projects, new assignments, exams.
Practice problems to be posted soon.
Web site will be revamped (slightly) as we move into this new stage.
Thu Sep 27New homework, grades, practice exam problems to be posted soon.
Lecture notes for today posted.
Tue Sep 25New homework, grades, practice exam problems to be posted soon.
Lecture notes for today posted .
Unix at IU by Rob Henderson.
Why? Perhaps because of this.
Mon Sep 24/home/user1/mysql/bin/mysql
directly if you have problems
setting the PATH.
Thu Sep 20 It's been said mySQL is back up.
Wed Sep 19 Unfortunately mySQL is down.
Tue Sep 18
Fri Sep 14
"God's signs are not always the ones we look for. We learn in tragedy
that his purposes are not always our own, yet the prayers of private
suffering, whether in our homes or in this great cathedral are known
and heard and understood.
There are prayers that help us last through the day or endure the night.
There are prayers of friends and strangers that give us strength for the
journey, and there are prayers that yield our will to a will greater than
our own.
This world he created is of moral design. Grief and tragedy and hatred are
only for a time. Goodness, remembrance and love have no end, and the Lord of
life holds all who die and all who mourn.
It is said that adversity introduces us to ourselves. This is true of a nation
as well. In this trial, we have been reminded and the world has seen that our
fellow Americans are generous and kind, resourceful and brave.
On this national day of prayer and remembrance, we ask almighty God to watch
over our nation and grant us patience and resolve in all that is to come. We
pray that He will comfort and console those who now walk in sorrow. We thank
Him for each life we now must mourn, and the promise of a life to come.
As we've been assured, neither death nor life nor angels nor principalities,
nor powers nor things present nor things to come nor height nor depth can separate
us from God's love.
May he bless the souls of the departed. May he comfort our own. And may he always guide
our country."
Thu Sep 13
Tue Sep 11Lecture notes for today, lab notes for tomorrow, posted.
Please check your crontab entries and make changes such
that your server is being restarted every morning at 8:10am. That means
an entry of this kind
10 8 * * * /u/username/apache/apache_1.3.20/bin/apachectl gracefulNote that
crontab sends a message to you on
burrowww every time it does something for you.
Check your mail account on burrowww frequently
to delete the messages, or redirect the crontab output to
/dev/null to avoid messages being collected.
10 8 * * * /u/username/apache/apache_1.3.20/bin/apachectl graceful > /dev/null
Otherwise your mail spool can grow very large and may disrupt the
entire activity on burrowww causing problems and system outages.
Mon Sep 10
Fri Sep 7
Thu Sep 6Lecture notes for today have been posted.
Giving permission to the world without granting the group the same priviliges creates a problem, so I changed the suggested access masks for your lab assignment files and public directory as illustrated below, and have applied them to my own files including the Apache distribution. Sorry for any confusion yesterday.
Wed Sep 5Don't forget to move the file there, first (fromburrowww.cs.indiana.edu% chmod 711 ~ burrowww.cs.indiana.edu% chmod 711 ~/public burrowww.cs.indiana.edu% chmod 644 ~/public/whoa.tar.gz
lab1).
Tue Sep 4Office hours are being updated.
Dates for the Midterm and Final Exams have been posted.
Sun Sep 2Here's where you can download it from (IUB Network ID requiered).
Thu Aug 30
Wed Aug 29
Tue Aug 28List of students and ports assigned has been posted.
Fall semester 2001 A348/A548 starts in LH102 at 5:30pm.
A348/A548