Ønskjeliste
<%
BufferedReader input = new BufferedReader(new FileReader("/locals/web/folk/jorgenav/onskeliste.txt"));
String line = "";
String[] lines = new String[200];
int counter = 0;
while ((line = input.readLine()) != null) {
lines[counter] = line;
counter++;
}
out.flush();
input.close();
%>
<%
String mywish = request.getParameter("mywish");
String status = request.getParameter("status");
String melding = request.getParameter("melding");
if (status != null) {
status = status.replaceAll("\r\n", " ");
melding = melding.replaceAll("\r\n", " ");
status = status.replaceAll("\n", " ");
melding = melding.replaceAll("\n", " ");
int myind = Integer.parseInt( mywish )*4;
lines[myind+2] = status;
lines[myind+3] = melding;
//always give the path from root. This way it almost always works.
try {
PrintWriter pw = new PrintWriter(new FileOutputStream("/locals/web/folk/jorgenav/onskeliste.txt"));
for (int i=0; i
<%-- background: #F7E7C7 --%>
Ønskeliste til Ingvild og Jørgen sitt bryllup
Hei, og velkommen til ønskelista vår. Siden me ikkje klarte å finne
eit bra alternativ på nett, har me benytta høvet til å friske opp
dei gamle IT-kunnskapane våre og lage den sjølve :-)