Bill Clar

Ranch Hand
+ Follow
since Sep 21, 2006
Bill likes ...
Eclipse IDE Tomcat Server Java
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 Bill Clar

Too little reward for such a monumental task. I'll keep DA.jar in multiple places until such time that I can see about porting this application to a reputable app server.
5 years ago
I have an EAR project in Rational App Developer (8.0.4) that utilizes a utility jar (DA.jar). DA.jar resides in a directory that's a shared library reference for Websphere. This works without issue.

I would like to move DA.jar to my EAR project, but doing so gives me a NoClassDefFoundError. I've tried putting DA.jar in the web module's WEB-INF/lib directory; I've tried declaring it in the Ear Deployment Assembly screen. Nothing works.

My classloader policy is parent first for both the server and application.

5 years ago

All Toastmasters clubs have an open door policy for guests. You can show up at any meeting without applying for membership. This allows you to see what the club is about and if it's a right fit for you.
5 years ago

I'm new to EJBs and they appear to have auto-generated code. I have the following classes:

What procedure triggers the creation of the EJS* files? I tried googling to no avail.
It's legacy code and it runs under my workspace but not my coworkers.

getValue() returns an Object.

It's legacy code. I don't know their intentions.

5 years ago

I'm getting an error: BigDecimal incompatible with java.lang.Long, when I try to run the following code:

Can a BigDecimal be cast to a Long in Java 7? Will it throw an error in Java 6?

FYI, this is legacy code.
5 years ago
Thanks Stefan!
5 years ago
I have a servlet that is not mapping to my URL:

When I try to call the Servlet from a JSP:

The resulting link is http://localhost:9080/View/viewFlow?V1. It's bypassing the project name. The link should be http://localhost:9080/TestFlow/View/viewFlow?V1.

Any suggestions?
5 years ago

fred rosenberger wrote:

Bill Clar wrote:...look for any number divisible by 4 surrounded by brackets.

ughh...Why in the world would you use a regex to do this?

It's a challenge from a coding site. It had to be done by regex.
5 years ago
I have a regular expression that looks for any number divisible by 4 surrounded by brackets.

I have the working regex, but I'm unsure why it works and mine doesn't.

My pattern doesn't work. It accepts [2014] as a valid match.

I use an even grouping of conditions: (condition1|condition2|condition3), but it fails. The working solution utilizes ((condition1|condition2)|condition3). I don't understand the difference in the logic considering it's an OR condition.

5 years ago
Is there a way for Javascript (in Firefox) to detect that the user has exited the browser or tab? To be more specific, exiting by clicking the red "X" in the upper right corner?

I'm aware of the window event 'onbeforeunload', but my situation is a bit more complicated. I have a webpage that displays an embedded pdf. This pdf has several actions that submit its form to the server. So, if I use 'onbeforeunload', any submission through the pdf will trigger this function. I wish to avoid that scenario.

What I'm trying to accomplish is prompting the user with a "You haven't saved your changes" message if they try to leave the page. The pdf has a submit button for "Save" so I do not wish to prompt the user with the previously stated message.

I've been googling left and right and the closest I've come to a solution is here. This didn't work for me. The code specifically mentions microsoft in the comments so I have to assume it's designed for IE.
Oh my stars and garters. I assumed the META-INF directory had to reside under WEB-INF.

Thank you Tim, you are a saint!

6 years ago
I have a peculiar problem. My Context uses a JDBCRealm for authentication. When I put my Context in conf/server.xml, I can login without a problem. But, I'm told this is a bad practice and that I should place my Context in /webapps/Injunction/WEB-INF/META-INF/context.xml.

I've done this. And now my login fails. Same Context. Two different locations.

I've googled left and right but no one else has experienced this issue. I'm using Tomcat 7.0.39. I upgraded to 7.0.55 to see if it would help, but the problem persists.

Here is my Context:

If I can't resolve this problem, I'll have to maintain the Context in the server.xml and manually deploy the webapp. Turns out you can't use the HTML manager gui if you've put the Context in the server.xml.
6 years ago
I'm displaying a table with several read-only pieces of data, and a checkbox field that toggles the row color. The background color for the checkbox is not toggling correctly.

I put together a SSCCE:

If I comment out the Nimbus look and feel, it works as expected. I googled this problem and found one possible solution on Stack Overflow. Their suggestion is:

It's a bug in the synth-installed renderer, quick hack is to force the rendering checkbox opacity to true:

I tried using this line and setting the opacity to true, but it renders the background white. I'm using Java 1.7.0_25.
6 years ago