This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring forum!

sarita chaudhary

Ranch Hand
+ Follow
since Aug 19, 2013
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sarita chaudhary

There are not fixed delimiters in the string so that I can split the string using that.The string can be anything(any combination) for e.g. there can be a 100 characters in a string with no space at all.
Then how to split that?
7 years ago
I have created an application using hibernate and struts.In which a form is created where the user will enter all its personal details(for e.g name ,phone no. and address).
Here for address I have used textarea and whenever user enters the address, sometimes it can be a long string also.
So the problem is if a long string is entered then while displaying that ,address comes on single line and the page is stretched
So can anyone tell me how to break this single string into mutiple lines in java class?

Thanks in advance.
7 years ago
What happens in background when user clicks on button on jsp?How the request goes?
Can anyone will tell me the steps how it works in detail.
7 years ago
Is there any other option to run google chrome as root.
I tried through terminal but is not working.I think it is not identifying the command or not getting the the path.

7 years ago
Can any one give me other suggestions which will really work for
creating HTML that can be reliably imported by spreadsheet applications.
Because Apache POI option is not really working for me.
7 years ago
Thanks for your reply.
Ya it does not appear to be a bug but whenever I click on submit button new image appears
and for latest excel sheet I need to click on the latest image appeared.
7 years ago
As I mentioned in previous msg I have used this option.
while using this option the path of the file is given explicitl for e.g

FileOutputStream fileOut = new FileOutputStream("workbook.xls");

and in my coding I am passing the filename dynamically.It is getting the file but the problem is no contents are
displayed even after selecting UTF-8 option from the pop menu occurred.

7 years ago
Thanks for your instant reply.
.xls file is only getting created.But only thing is that hindi characters are not supported.
I also tried using FileOutputstream.While using this it was asking for the UTF-8 option in the pop menu but after clicking on OK it did not display any records,empty file was displayed.
So, I stuck to previous option only.
Can you explain me in detail how to do solve this using a library like Apache POI.
7 years ago
In my java class I am exporting some records to xls file using table tag which contains hindi charcters and the problem is that the hindi characters are not encoded in excel sheet(Libreoffice calc) and giving garbage value as आननà¥ヘद विहार instead of hindi characters.
I searched for this a lot and from other forums I solved my problem of java class but encoding into xls file is not getting

The records using table tag which is sent to excel method is::

table = table <tr>
<td> masterList.get(j).getBus_stop_cd() </td>
<td> masterList.get(j).getBus_stop_nm()</td>
<td>masterList.get(j).getDevnagiri_nm() </td>
<td>masterList.get(j).getBus_stop_address() </td>

table = table + "</table>";
session.setAttribute("abc", table);

In this entire data of <table> tag is sent to dispexcel method through setting into session i.e using this 'session.setAttribute("abc", table) and the Devnagiri_nm which is iterated from list contains the hindi characters.

The method use for exporting to excel is:
public ActionForward dispExcel(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {

HttpSession session = request.getSession();
String fileType = "xls";
String filename = (String) session.getAttribute("filename");
response.setContentType("application/; charset=UTF-8");
response.setHeader("Content-Disposition", "attachment;filename=\"" + filename + "." + fileType + "\"");
PrintWriter out2 = response.getWriter();
String n = (String) session.getAttribute("abc");

return null;

Can anyone will tell me how to solve this problem?
7 years ago
I tried running through terminal.But it did not work.
The command I run through terminal is given below


[root@localhost ~]# google-chrome
[root@localhost ~]# /opt/google/chrome/google-chrome

But then also google chrome did not open.
Please can anyone will give me exact solution.Whether some plugins are missing?
7 years ago
How to navigate to command line and start? Can you explain in detail.
I have the emergency of google chrome browser to be installed
I have new installation of chrome & When I click the icon in the Panel nothing happens (it looks like it tries to open but it wont)
7 years ago

I am using CentOS 6,4 on which google-chrome is installed.But when I am running the chrome it is not opening only.
I also changed the Launcher properties by appending line with --user-data-dir for root user
but then also it is not working.
Can anyone help me please its urgent.

Thanks in advance.
7 years ago
I mean to say the excel image which appears on the bottom border of the UI which is shown in the screenshot.
The image which is appearing repeatedly is the excel-export image which appears on every submission of the form
7 years ago
I have created one project using struts1.2 and ibatis. In this I showing one report in which I have used jqgrid for displaying records.
The input parameters used in this report are region name and depot name.On selection of these two I am displaing records on the
same page by using ajax.
So, whenever I select these two(region and depot) and click on submit button ,the excel image appears repeatedly on jjqgrid.
I have searched for this on net but I did not get any solution,
Attached is the screenshot for this.
So, please can anyone help me.

8 years ago