'Handler class
Sub Class_Globals
End Sub
Public Sub Initialize
End Sub
Sub Handle(req As ServletRequest, resp As ServletResponse)
Dim filename As String = req.GetParameter("Filename")
Dim Dir As String = req.GetParameter("Dir")
Dim Buf() As Byte
If File.Exists(Dir, filename) Then
Buf = File.ReadBytes(Dir, filename)
resp.SetHeader( "Content-Disposition", "attachment; filename=" & filename)
resp.OutputStream.WriteBytes(Buf, 0, Buf.Length - 1)' [B]get out, no error message, complete stop[/B]
Else
resp.SendError(404, "File not found")
End If
End Sub