p hasini

Ranch Hand
+ Follow
since Oct 24, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by p hasini

1. I have a textbox called amt which has a validation to accept only numbers with one decimal point.
2. I use struts tags for the textbox and javascript to perform the validation
3. Struts code:

4. Javascript code:

5. The above validation works for numbers but I have to put a validation for only one decimal point.
6. I want to use the folowing approach:
Use a regular expression like
But how do I call the bean property in javascript and match the value with the regular expression.
For HTML textbox,I can use but how does it work in struts.
7. Is there any other approach.


Please help me resolve this.
12 years ago
1.Input jsp page:


2. Javascript:


3. Conroller: Spring MVC framework


The above abcList contains the list of values

4. This modaltarget is configured in tiles-config.xml,views.properties file which routes the output jsp page

5.The service layer which returns an Arraylist calls Dao class

6. Dao class:
This class contains the JDBC logic select query to retrieve the data from the database table.The data Code and Role columns are added to a VO object and added to a Arraylist.

7. The business logic is fine.But I have modaltarget.jsp page which must display the retrieved values from Dao as a table ,as a list of values in a table using JSTL.

I cannot hardcode te values as shown above.I have to display the retrieved values from Dao from an ArrayList into this jsp.
Since I am new to JSTL,how do I output the values onto the jsp page using JSTL tags.
12 years ago
JSP
1. I have a JSP page which should display a table with 2 columns : Code and Role
2. The data to be displayed in these 2 columns comes from a servlet which calls a DAO class.
3. The DAO class executes a select query and retrieves the data from database table and sets the data in an Arraylist jobList.
4.The ArrayList is passed back to the controller.
5. How do I display the values in this ArrayList as a table using the JTSL tags in the JSP.

Please let me know if I were to use ,<c:forEach> tag,how do I set the values using this tag.

12 years ago
JSP
The webservice is deployed onto a Weblogic 8.1 server.

WSDL file:


SOAP response :



If minOccurs=1,then the element should be displayed in the SOAP response even if the element does not have any value.
If minOccurs=0,if the element does not have any value,then the element must not be displayed in the SOAP response.

But as shown in the code,the element is displayed in the SOAP response with xsi:nil attribute set to true,when the element has minOccurs=0 in WSDL file.

Please let me know why is this problem coming.

13 years ago
Is there any way I can use javascript variable in my jsp.
13 years ago
JSP
Is it possible to do this using traditional javascript.

Because I cannot add .js files.I can only modify the javascript and jsp page.


Also I have to delete a row from the datagrid based on a column value in the grid.
I have a select box and a search button.
When I select an option in the select box and click Search,
a data grid must be displayed .This data grid has 5 collumns.Depending on the select option selected,all the data ,must be displayed.

How can I do this using javascript.
I have 2 jsp pages.The field in one jsp must be automatically updated when a field in another jsp is entered or selected from a dropdown.

How can I do this using DTO
14 years ago
Please clarify.

1. In what situations we write try/finally without a catch.

2. How can we avoid duplicates in a list

3. How can we make an ArrayLsit synchronized explicitly.
14 years ago

1. If we set setMaxInactiveInterval(int interval) to high value,does it mean the user's information will be maintained , after a user exits a browser and reopens the browser again.

2. We can create a Servlet in 2 ways.By extending GenericServlet or by extendiing HttpServlet.
Since GenericServlet and HttpServlet implement Servlet interface , can we write a servlet as



3. To create a session, we use


What is the difference between HttpServletReuqest.getSession(true) and HttpServletRequest.getSession(false)

4. How do we get a ServletConfig object.Are the following ways correct:


5. How do we get a ServletContext object.Can we use both these ways:

14 years ago

1. When the user closes the browser and reopens the browser again,can we still maintain the user's session.

2. What is the difference between request.getSession(true) and request.getSession(false)
14 years ago


1. Can we change the name of struts.xml file

2. Can we change the name of struts-config.xml file
14 years ago
I am learning web services.I want to know if I am understanding the concept correctly.Please tell if this is correct.

Using Axis2 to generate a webservice and server is Apache Tomcat
To create a web service starting from WSDL:

1. First we create a WSDL document.
2. Then create a service skleleton using wsdl2java in cmd.Add our details to the skeleton
3. Then we build using ant jar.server
4. The aar file is generated
5. Deploy this aar in Axis2 --> services folder
6. services.xml and services.wsdl files are automatically generated and placed in META-INF folder
7.Then we create a client to access the webservice

14 years ago
Do we override only the toString() method , to give a meaningful description of the Exception in the stack trace.

Should we override any other methods.
14 years ago