File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes html:form question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:form question" Watch "html:form question" New topic

html:form question

Siamak Saarmann
Ranch Hand

Joined: Aug 21, 2004
Posts: 78

1- I am trying to learn struts from "Mastering Jakarta Struts".

In its first example there is a form containing below code:

<html:form action="Lookup" name="lookupForm" type="wiley.LookupForm" >

But I get an error that "name and type" properties are not valid for <html:form>.

2- Is this perhaps because of my struts version? (example uses 1.1 while I am using NetBeans 5.0 which uses 1.2)?

If so then which version ise being used at the time being by most of developers?


PhD Artificial Intelligence, OCJP1.6
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
In version 1.2.9, which is the latest, the two attributes you mentioned are deprecated. Just eliminate them, and the form will still work fine. The reason these attributes were deprecated is that they're already defined in the struts-config.xml file, and are therefore unnecessary.

I can't really say which version the majority of developers are using. I'm sure, though, that many are sticking with the older releases because of conservative adoption policies taken by their companies. Another factor is tooling. For example, even the latest version of IBM's Rational Application Developer IDE is tooled for Struts Version 1.1.

In one sense, this says something about the fact that Struts is a very stable product. The later releases aren't hugely different from 1.1, and unless one needs to use one of the new features, there isn't really a lot of motivation to upgrade.

Consultant, Sima Solutions
I agree. Here's the link:
subject: html:form question
It's not a secret anymore!