hi all, I have html form where the data is going to be filled, what i want is? I want to convert this data into an xml format using java or It is possible to transfer the data from html to java objects where i got the structure of that form.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Here's an idea off the top of my head: Create your javabean, but along with the usual getter & setter methods, have a setter method for each property that accepts a string, and knows how to convert the string to whatever type it is. in your HTML form, name each field exactly as the javabean property is named, also put a hidden field in the form with the classname of the javabean. Make a filter (which runs before servlets) that goes through all the request data, and 1) gets an new instance of the javabean based on the classname field. 2) for each parameter, 2a) looks for a method named set[ParameterName] that accepts a String 2b) invokes that method on the bean, passing it the ParameterValue 3) puts the object in the request attributes/context and then when it gets to the servlet, have the servlet extract the bean.
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.