O'Reilly logo

Struts Kick Start by Kevin Bedell, James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Uploading a File Using <html:file>

This section provides information on the following tag:

  • <html:file>— Render an HTML <input type=file> element to support file uploading from forms

If you point your browser to the URL

http://myAppServer/StrutsTaglibs/html.jsp

you’ll bring up the main page that links to all the sample codes for the Struts tag chapters. This section uses the <html:file> Sample Code page at /StrutsTaglibs/HtmlFile.do.

The input form page for this application is very basic and is presented in Figure 12.8.

Figure 12.8. The <html:file> Sample Code page showing a file upload form at /StrutsTaglibs/HtmlFile.do.

Listing 12.10 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required