Thanuja Vishwanath

Ranch Hand
+ Follow
since Oct 07, 2010
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 Thanuja Vishwanath

Campbell Ritchie wrote:And what happened when you tried the JOptionPane?
What is the encoding you have set on your database?

Campbell as you said it is printing properly in JOptionPane. I checked my database encoding which was latin. I changed it to utf8 and also changed the table properties to utf8. Again i executed my program and it inserts with question mark in the db. But when i tried to store directly in table using insert query it is properly inserted. From this i feel i fixed the db issue by changing latin to utf8. I guess problem is the value passed from java. iam bit confused with this and not sure why it is printing in jOptionPane properly but not getting inserted in db properly.

Please advise should i do anything else in java part?

6 years ago

Campbell Ritchie wrote:Start by trying the display on a Java component: JOptionPane.showMessagedialog(null, "value:"+printVal);
The Windows® terminal is notorious for displaying only a restricted range of characters. I hve had command lines where £ appeared as ú!

Even in mysql database it is getting inserted like this. Only because of this i added print statement to check.

6 years ago
iam creating a java class to read values from excel and insert into DB. Iam using POI package. In excel i have one column which has values like this ≤ 7⅜ x 9¼“ or 260 x 195mm. After reading the values from the cell using POI it is inserted into database as ? 7? x 9?? or 260 x 195mm. First i thought that it is something to do with POI package and was searching for a solution. But after searching i found that it is not issue with POI. It is something to do with java. To confirm this i just assigned the value to a string (hardcoded) and when i did system.out.println it gives output as below. Special characters are replaced by ?.

but the output is: ? 7? x 9?? or 260 x 195mm

What should i do for this?

6 years ago

Akhilesh Trivedi wrote:I am confused, by 'tool' you mean IDE where you want to develop your code. Or you mean 'UI-tool' that will be used by your users on their browser.

For a development tool you should see your own comfort.

For a UI tool to be used by users, you need to understand what features and functionality suits them.

For development tool, eclipse should be good. I think even Flex IDE would be eclipse-based. If you are a beginner and wish to avoid server side coding and are more on UI, then any editor, TextPad or a WYSIWYG editor can be tried.

Sorry for the confusion. Iam not looking for development tool. Iam already using netbeans for that. Iam looking for some front end UI development tools like dreamviewer, Adobe muse, Flex or jquery HTML 5 tools. As i already mentioned iam looking for open source and light weight tool.
I referred HTML 5 in the below link --- jquery HTML 5

Can I use this or should I go for someother thing. for my requirement Google Web toolkit is demanding in terms of server side coding. And flex is heavy on the browser. So after analyzing GWT,Flex and jquery HTML 5 I feel it is better to go for jquery HTML 5. But still can you suggest me if iam on the right track or suggest someother tool for UI development. My target users use old browsers as well. So need to consider that before selecting the right tool. Moreover I need to support IE,chrome,firefox and safari users. So please suggest. And iam looking only for open source.

Is there any drag and drop tool?


Bear Bibeault wrote:If you are using jQuery why are you not using jQuery to perform the Ajax call?

In any case, URLs have limited length. Use a POST, passing the info in the request body rather than on the URL.

And, using the jQuery Form plugin will reduce all this code to a single line.

thanks and it got resolved.

We currently have a web application (version control) through which users upload and download the files from server. Since it is a web application we are not able to make few restrictions at the client level. Hence we are planning to create a stand alone swing application which will act as an agent between the users and the web app. Instead of logging into web app, users need to login into swing application and when she/he selects the files and click download, swing app should call and process the JSP and return the response (success or failure) back to swing application so that swing application will notify the download and upload completion.

Note: Swing application should call and process the JSP and it should not open the JSP in browser. Since it is very old application upload and download logic is written in a servlet. Other logics like access restrictions etc. (database code) Is written in JSP itself.

Is there a way to do this?

7 years ago

Iam calling servlet from jsp using ajax call. Before calling the servlet i use jquery .serialize() method to get all the input values from the form which will help me to pass all the information to the servlet like below:

the above code works fine. But the problem iam facing is when my form has large number of data ie. i have a table and each row has 3 text box, check box and select box. When i have more than 180 rows in the table i get this problem. Since the getParams has larger url string it doesnot call the servlet.

I have this problem only when i have more datas. Is there any other solution to solve this? is there anyother way to call servlet from javascript and pass values from servlet to jsp ?

Please advise.


I came across this coding standard.

Avoid using an object to access a class (static) variable or method. Use a class name instead. For example:

I would like to know the reason as why objects should not be used?
7 years ago


Iam using sun glass fish server and have deployed 3 applications in it. I need to implement single sign on for 2 applications and not for the third one. two applications are inter related and i do not want the user to login seperately for those two application.

For login authentication we use our own logic like checking the user name and password from db and if valid authenticate the user and direct him to the index page from login page. I googled to see how to implement SSO and found these points:

To configure single sign-on, set the following properties in the virtual-server element of the domain.xml file:

sso-enabled - If false, single sign-on is disabled for this virtual server, and users must authenticate separately to every application on the virtual server. The default is true.
sso-max-inactive-seconds - Specifies the time after which a user's single sign-on record becomes eligible for purging if no client activity is received. Since single sign-on applies across several applications on the same virtual server, access to any of the applications keeps the single sign-on record active. The default value is 5 minutes (300 seconds). Higher values provide longer single sign-on persistence for the users at the expense of more memory use on the server.
sso-reap-interval-seconds - Specifies the interval between purges of expired single sign-on records. The default value is 60.
Here is an example configuration with all default values:

<property name="sso-enabled" value="true"/>
<property name="sso-max-inactive-seconds" value="450"/>
<property name="sso-reap-interval-seconds" value="80"/>

i did this in my servers domain.xml file. but it does not seam to work. again i googled and came across this point

Single sign-on applies to web applications configured for the same realm and virtual server. The realm is defined by the realm-name element in the web.xml file.

What is realm and how do i set that in my web applications web.xml.

to implement sso in my applications is this what i have to do or is there anything else which i need to follow. i referred this link

Please guide me
7 years ago

Jesper de Jong wrote:What version of Java are you using?

If you are using an older version, it might not have up-to-date information about when daylight savings changes occur. Whenever Oracle releases a new update version of the JDK, the daylight savings information is often updated. Make sure you're using the latest Java update.

I was using JDK 5.0 and now I have updated to JDK, I am using Netbeans IDE and I have changed the JDK version to in netbeans.conf file. But still the problem remains.

Any clues?

7 years ago
Hi All,

Day light savings happened from 14-March. I tested my code and found that the day light savings change did not take place and it showed the wrong time.

Iam in India and using IST. i try to convert IST time to CST and it was working fine. I used TimeZone.set and getTimeZone. Now after the day light savings it should work and return the new date and time according to the day light savings. but iam not getting the expected output.

This is my code:

I have set the source time to 8:30 PM IST and the expected output is 10:00 AM CST (as there is a change due to day light savings).
Before day light savings the expected output was 9.00 AM CST(it worked perfect).

In API it is mentioned that TimeZone represents a time zone offset and also figures out daylight savings. So i thought it will take care of daylight savings automatically.

Now iam not getting that day light savings change in time. What should i do for this?

I googled and not able to find a proper solution. My app shows wrong time from today because of day light savings change. Please advise.
7 years ago
Hi all,

Iam creating a PDF and open that in browser using servlet. When user save that PDF, then the file name will be saved as its project name which is passed.

Iam setting the file name like this

When i save the PDF in chrome and firefox it is saved with the project name. Whereas if i save the PDF in IE then the file name is saved as the Servlet name and not the name mentioned in the content disposition.

Please advise.
7 years ago

Iam using iText to Create PDF. I have used ColumnText to add table which splits for multiple pages (it should come around 3 page)

But the result is not as expected. I get only the first page of my table and the remaining pages are not generated. If i use document.add(lineTable) then it works fine ie. table is splitted and table header is repeated in all the pages. But i need to use only ColumnText as i have to place the table in absolute position.

Iam not able to figure where iam doing mistake and why ColumnText is not splitting large tables. please guide.