verduka fox

Ranch Hand
+ Follow
since Jan 18, 2001
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 verduka fox

My code is actually running on WebSphere Portal on AIX. When it runs there, the apostrophe is displayed as a question mark '?' instead of an apostrophe. When I'm debugging this on Windows, Windows displays the apostrophe as Æ. In either case, the apostrophe I specify in the code is not displayed as such. How do I get the code when run to display what is actually written in the code?

PS Sorry for the urgent comment. I didn't mean to upset anyone.
9 years ago
fred rosenberger: Thanks for the reply. Unfortunately, this data is dictated by the system. The presence of the apostrophe in the data is outside of my control. I have to accommodate it.

Eli Wood and Campbell Ritchie: I will be loading these values dynamically, so I won't be able replace the apostrophe with the Unicode value. I tried to do this programmatically:

which prints:


so this didn't work. Did I use the regex above incorrectly?

Are there any other ways to make this work? This is urgent, so I appreciate your responses.
9 years ago
I have a TreeSet of values. One value contains an apostrophe. When the contents of the TreeSet are listed, instead of an apostrophe, it displays another character. I tried changing the TreeSet to an ArrayList, with the same result. How do I get around this?



I really need the output to match what I have listed above. Any tips are greatly appreciated. Thanks in advance.
9 years ago
I have an applet within a portlet (IBM portlet API) on WebSphere Portal Server 6.1. The applet has been in production for a few months, with no issues. I'm about to deploy some changes, so I've asked various people to test the updates. Four people have experienced this scenario: when the applet displays, it displays an old version, a version that is no longer on the server, and that they would not have previously downloaded to their PC. We have tried various solutions to correct the issue: (1) for one user, the solution was to uninstall and reinstall the same version of Java (1.5.0_11); (2) for another user, the solution was to rebuild their LDAP profile; (3) for another user, we tried both of these solutions, and neither resolved the issue; (4) the last user, we are keeping as a test case so we haven't tried a solution. I have even tried renaming the applet jar: the last user (case 4 above) still displayed the outdated applet. I checked the list of applets in the Java control panel, and the newly renamed version is listed, it just isn't being used. It's like this old applet is cached on the PC, but I don't know where to look.

I've searched online about adding cache_archive and cache_option, but they have me a little confused. If this could correct my problem, please explain in more depth.

Here's my object tag to load the applet:

This has me extremely baffled. This problem is delaying a production release, so prompt replies are greatly appreciated. Thanks in advance.
11 years ago
I am trying to install Checkstyle from in RAD 7.5.2 on Windows XP. I have tried following the advice listed earlier - open RAD 7.5.2, go to Help - Software Updates - Available Software. I then click Add Site. I have tried Local to the directory where the zip resides and Archive to the zip and to checkstyle-all-5.0.jar, but each time I get a message 'No repository found' and the Install button is disabled. I'd really like to get Checkstyle working from RAD 7.5.2. Can anyone advise me what I'm doing incorrectly? I appreciate your help.
11 years ago

Thanks so much for your response. I had the images in the jar from the beginning, I just forgot to mention this in my original post.

I changed my code from:

icon = new ImageIcon("/images/icon_hospital.gif");

to: imageURL = IconListRenderer.class.getResource("/images/icon_hospital.gif");
if (imageURL != null)
icon = new ImageIcon(imageURL);

and it works now. Thanks so much for the tip! I appreciate your helpfulness.

11 years ago
I have an applet with several JLists. I implemented a custom DefaultListCellRenderer to display an icon in front of each item in the JList. This works successfully in the applet when run in my test environment in RAD. When I export the applet as a jar and add it to my WebSphere application, it installs successfully and displays the icons in the JLists - but only on my PC. I can't get it to work on any other PC. I added a println, which I can see in the Java console on other PCs, and it matches the output from that on my PC. If you have any tips, I'd really appreciate it.

I am using JDK 1.5.

11 years ago
Thanks for the response. Yes, this is an intranet portlet application.

I don't understand what you mean by "You'll probably need to use the general JDBC way of obtaining connections."

Here's my current db connection code.
12 years ago
I am trying to connect to a Sybase database from an applet running on WebSphere Portal Server 6.1. I have signed the jar. I receive this error in the Java Console:

NamingException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

Can anyone advise how I can get around this please? Thanks in advance.
12 years ago
Thank you, Rene. I did the installation twice (installed, uninstalled, and installed again) because I was never given the option of where to install it. I found it under C:\Program Files\java. You saved my day! Thanks again.
12 years ago
I used RAD 7 for developing an applet. I need to sign the applet for JDBC connectivity. This cannot be done within RAD 7. I downloaded JDK 5.0 Update 16 from . It installed successfully, but I cannot locate its installation on my PC. It doesn't show up under Programs, nor as a directory on C:\. How do I utilize this? Please help!
12 years ago
I am developing a Java application in 1.5 that utilizes drag and drop to move data between two JLists. My question: why is there a delay in moving the items? I need to first click on the item, then click and drag it to the other list. This behavior isn't intuitive; I wouldn't expect to first have to select the item, then click again to move it. I expect to be able to click and drag the item in one movement. I'm sure I'm just missing something. Can anyone please explain?

Code follows. If you compile and run, you should be able to reproduce the behavior I see.

Thanks in advance!

And the TransferHandler:
12 years ago
We have a request to set the focus into a portlet's textfield when the page loads. Since we don't have access to the HTML body tag to add 'on_load=document.myform.mytextfield.focus();', I tried doing the following in the endPage(). It doesn't work when the page is first displayed, but if you refresh the page by clicking on the selected tab, it does work. Can anyone explain why it only works sometimes?

PrintWriter writer = response.getWriter();
writer.println("<script for=\"window\" EVENT=\"on_load\" LANGUAGE=\"JavaScript1.2\">");
writer.println("try {");
writer.println("catch(e) { }");

When I view the source of the HTML, it looks like this:

<script for="window" EVENT="on_load" LANGUAGE="JavaScript1.2">
try {
catch(e) { }

FYI, We use WPS 5.1.
15 years ago
Thanks for the reply.

Perhaps the original date is not in UTC format. I need to translate "127310819640982810" to "06/07/2004 06:39". When I try to do so using the algorithm above, it is several hours off. Do you have another suggestion?
16 years ago