All:
I'm sure this question has been asked many times in this forum but my searching has not revealed a concrete answer for me.
I have a
JSP that has several enterable fields, all of which are to be used to build an XML document to be written on a directory on a server. This same JSP page has a HTML "Submit" button tag that has an "on-click" event handler code. When the user enters data into all of those fields and clicks the submit button, I would like to call a POJO, sending to it all of the data elements that were entered in those enterable fields and have that POJO create and write out the XML file.
Can I do this this way? Can a POJO be called via javascript? If yes, can someone direct me to where I can find a sample working solution? If a POJO canoot be called in javascript then what are my alternatives? Do I somehow save the data in a DOM object and have the JSP invoke the POJO sending in the DOM object? If so, how do I do that? Do I use AJAX?
I'm sure there must be a way to complete such a fundamental process, but I cannot find a solution.
BTW: So far I have been able to create the XML document in javascript but then I am reading that javascript cannot write files on a directory on a server. Can someone confirm this?
Thank you for your time.
Gary