aspose file tools*
The moose likes JSP and the fly likes XML or database? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "XML or database?" Watch "XML or database?" New topic
Author

XML or database?

nagarjuna borra
Ranch Hand

Joined: Jan 14, 2012
Posts: 41
hi,
here is the situation:

i have an html form with 20 fileds.19 are user supplied inputs,one is a dynamically generated depending upon the value entered in the 19th field (it is a sort of conversion,using a big table,and it cant be calculated).

that conversion table is always the same( ie it doesnt change),and im planning on using an xml file and javascript for doing the task.

The problem is my mini-project incharge guy insists on using a database for that,instead of xml file,so i have to use jsp page or servlet for that,which is the worst way,i think(right now,i dont want to argue with him).

I have two questions:

1.will i have any problems if i use xml files for data storage???(dont worry about the memory,i will split the entire xml file into multiple xml files depending upon the readings,and load the appropriate one).

2.how do professsionals do it...i mean - if they have to update a single field dynamically ,in an html form(constraint is that the data required is only in a database).
will they use a seperate inline frame for that single filed..or anything else???


oh heyy!!! i also need a pop3 server for windows,where can i get it(installation)....windows has smtp but not pop3 by default,i want it for an email system,i will be happy if you guys let me know
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
1. I have used XML for a LOT of stuff but you seem to be describing a "flat file" or single table variety of data problem - time to learn something new!

2. Unclear exactly what you are asking here.

3. I have used the Apache "James" Java mail server - open source, works fine easy to install and configure.

Bill


Java Resources at www.wbrogden.com
nagarjuna borra
Ranch Hand

Joined: Jan 14, 2012
Posts: 41
William Brogden wrote:
2. Unclear exactly what you are asking here.


ok,here is an example: you are given a static hmtl file and there are 20 fields,19 are user supplied,there is one field X that depends upon the another field Y's value,Y is entered by user,the realation between X and Y is stored in a database,

Now if a user enters Y's value and shifts focus,then corresponding X's value should be diplayed in that field.

How would you do that???,the only way occured to me is upon OnChange() of X -calling a jsp or servlet that reproduces the same file with updated Y value.Are there any other ways???,because this sounds - burden on server for just updating a single field,just want to know.

and thanks for the mail server and your concern.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60074
    
  65

You need Ajax which can send a behind-the-senes request which can return any text data you'd like. Based upon the response, you can change just the single field (or make any other changes you want on the page).

Refreshing an entire page just to update a small part of it is so 2001.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
nagarjuna borra
Ranch Hand

Joined: Jan 14, 2012
Posts: 41
Bear Bibeault wrote:You need Ajax which can send a behind-the-senes request which can return any text data you'd like. Based upon the response, you can change just the single field (or make any other changes you want on the page).

Refreshing an entire page just to update a small part of it is so 2001.


thank you,for the clarity.
Heard of ajax,didnt know what it is for until now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML or database?
 
Similar Threads
"code too large for try statement " , While compiling JSP
HTML Table as XML File using JavaScript
how to construct a sql query when field having single quote
XSLT question
Rendering XML in browser