Skip to main content

Posts

Showing posts from February, 2011

How to handle values from dynamically generated elements in web page using struts2

Some time you will see the form containing the button " Add More " . This facility is provided for the user to get the values for unknown number of repeating for some information. for example when you are asking to get the projects details from user, you need to put the option to add the more project for the user since you don't known how many projects user have. In the HTML form, you repeat the particular section to get the multiple values for those elements. In Html page , you can put the option to add new row of elements or text fields by writing the java script or using JQuery API. Now, the question is that how to capture the values of dynamically generated text fields on the server. Using the servlet programming you can get the values by using getParameters() method that resultants the array of the parameter having the same name. But this limit you to naming the text fields in the HTML form. To ally this approach, you have to take the same name for t

HSQLDB - Handling Database Programatically (In-Process and Server Mode at a time )

HSQLDB database it a very small database that can be controlled from you application. you can start and stop the database by writing the programming statement. This feature enable to use this database in your application with programmatic control. You can handle the database by writing some java codes. When you use the database with In-Process mode, you will not able to access it other ways. In the In-Process mode, database become the part of your application and it does not run as server on other port number. So using the database In-Process mode is good when you are going to deploy the webapplication on the live server but at the time of development you have to avoid it. At the time of development, you need to look into database table so queckly to see the changes after executing any functionalityies. So you require the way to access the same dtabase from datbase client. But, if the database is running in the in-process mode, it doesn't open any port to access via