• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

XML -JSP transformation

 
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

I am really having trouble in solving this issue.
I have not used xml for displaying purpose, but the requirement wants me to do so.
I have an xml which is to be displayed as an Html/JSP form. Somehow I managed to do so using xsl.
The form is good enough to send data to server. The problem is to retrieve data back in to the form.
I dont know how to do it. If on my jsp I update my xml doc used for displaying with retrieved values,
then I am afraid, It will be displayed to other clients as well .


Please help me regarding this .




Thanks in advance.
 
Marshal
Posts: 28425
102
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you're generating HTML, just like with a normal JSP. Are you saying you don't know how to write HTML which can send data back to the server? If so, you should really go back and learn HTML before messing around with XML and so on, because that's one of the first things you learn about HTML when writing a web application.

The question isn't anything to do with XML, so I'm going to move it to the JSP forum.
 
Prash Singh
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Paul,

I am sorry for not being so clear about my question.
I have to generate an HTML form using java. I am successful in generating it via xml using xsl.
The form is also able to send data to a servlet for further processing.
The problem I am facing is how to populate same form ?

If I somehow modify xml file used for displaying form , then for any other client using that form will
show all the form fields populated.(I Guess)

So I want to know exactly what is going to happen and how can i avoid this situation
?
 
Paul Clapham
Marshal
Posts: 28425
102
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay. Your XSLT is transforming some input document which is XML? Then you populate the form by putting the appropriate data into that XML and having the XSLT put it into the right place.

So yeah, obviously you can't use a hard-coded XML document for this if you want it to contain different data in different circumstances. You'll have to generate the XML somehow.
 
Prash Singh
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Paul,


Can you please suggest me the approach I should follow.
Or is there something like library suitable for this functionality.

Thanks
 
Paul Clapham
Marshal
Posts: 28425
102
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The approach you should follow? First step: figure out what your requirements are.

You apparently have this XML file, which you haven't said much about. Except that you're using it to generate an HTML form, or something like that. And then you have to fill in this form with data which is customer-specific. Whereas the XML form isn't customer-specific. Am I right?

Anyway that's what I mean by the requirements. Forget about looking for solutions until you have a clear description of the problem.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic