Berthou.comA french developper blog | |
DescriptionaTicker is a simple, free and small Ticker texte scrolling Applet. aTicker runs on all browsers with JDK 1.1x support. (aTicker is free with all source code). Source HTML
<applet codebase="/jar" archive="applet-aticker.jar" code="com.berthou.applet.aticker.aticker.class" width=220 height=20 mayscript>
<param name=file value="s">
<param name=cSep value="§">
<param name="speed" value="1">
<param name="delay" value="30">
<param name="local" value="true">
<param name="bgcolor" value="13693183">
<param name="Font1" value="Verdana, 14, 0, 0">
<param name="Font2" value="Verdana, 14, 1, 1220">
<param name="s0" value="JavaSide § http://www.javaside.com § _load">
<param name="s1" value="Mess 2 § javascript:alert('Salut...') § _script § ?PopupJavascript">
<param name="s2" value="berthou-fr § http://www.berthou.com/fr/ § _load">
<param name="s3" value="berthou-us § http://www.berthou.com/us/ § _load">
</applet>
This article aims at presenting how to create a servlet that sends a zip file to the user. We create here a html page with a form where you can enter an url. The servlet will get the content of this url (only the html page, not the images or other frames), create a zip file with it, and send you the file.
li>Creating a zip file Have you ever noticed the java.util.zip package ?
zout.putNextEntry(new ZipEntry("file.html"));
zout.write(b,0,size);
zout.closeEntry();
zout.finish();
String zip=bout.toString();
|
CategoriesTagsArchivesRecent Comments
|
|
| |