This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line!
See this thread for details.
Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Passing value from JSP to Cewolf Dataproducer Java File

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using cewolf to generate charts using JSP.

Can anyone tell me how to pass a value (from a html form field) to cewolf dataproducer java file.

Thanks
Mazhar
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'd submit the form containing the field to a servlet, which can then pass the value to the DatasetProducer object. The cewolfexample web app (which comes with cewolf) shows this in practice on the "Testpage" example (only there it submits to a JSP, not a servlet, but the procedure is similar).
 
Mazhar Ismail
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got the solution we can pass the parameters from jsp using the cewolf:param tag

ex: <cewolf:param name="year" value="<%=(Serializable)inputYear%>"/>

and now can read in the produceDataset method of the java file.

ex:
String year = null;
if(params.containsKey("year")) {
year = (String)params.get("year");
}


hope makes sense
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!