I've been searching for a good example of how to configure a Oracle OCI pool connection in tomcat's server.xml (defining a JNDI resource) and subsequently how to use it.
Here's what I have now in conf\server.xml:
<Context docBase="ips" path="/ips" reloadable="true">
<Resource name="jdbc/IPS_DB"
auth="Container"
...
There is some way to use @Autowired with static fields. Or there are some other ways to do this?
...
I while ago I wrote a Java application that processes XML with XSLT using Xalan. Now I'm trying to move towards Spring.
I've been having trouble accessing components. As far as I can tell my XML, XSLT and Java objects are correct, but Spring cannot seem to find and reference the components I want to access.
...
<axslt:component prefix=...
Hi,
I'm currently using a custom framework to build Java Swing applications which have event monitoring over a network. I'd like to replace our custom networking layer with something like JMS but our framework is tightly coupled to its current implementation.
This lead me to search for existing application frameworks which may already ...
Are there any open source libraries for representing cooking units such as Teaspoon and tablespoon in Java?
I have only found JSR-275 (http://jscience.org/jsr-275/) which is great but doesn't know about cooking units.
...
I want to programatically deselect the currently selected row (or rows) in a JTable.
Basically I want the oposite of this:
JTable table = ...;
table.setRowSelectionInterval(x,x);
I tried (with little hope) using:
table.setRowSelectionInterval(-1,-1)
or
table.setRowSelectionInterval(1,0)
but it doesn't work.
Any ideas?
...
I noticed the other day that I can call boolean.class, but not integer.class (or on other primitives). What makes boolean so special?
Note: I'm talking about boolean.class, not Boolean.class (which would make sense).
Duh: I tried integer.class, not int.class. Don't I feel dumb :\
...
I'm working with Doxygen at the workplace and am having a problem with the Java code. With the EXTRACT_ALL=NO, EXTRACT_PRIVATE=NO, EXTRACT_STATIC=NO, EXTRACT_LOCAL_CLASSES=NO, and EXTRACT_LOCAL_METHODS=NO, the output still includes static members that are not defined as public or private.
EX. Let's say I have the following code:
class ...
What is the quickest way in ColdFusion (or Java) for converting a string as such:
Input:
79827349837493827498
Output:
\79\82\73\49\83\74\93\82\74\98
I'm taking an ldap guid and escaping it for a query.
I can do it as a series of MID reductions like this:
<CFSET V1 = "">
<CFSET RetVal = "">
<CFLOOP CONDITION="#V1# NEQ''">
...
I'm doing a java application.
This are my files so far:
Person Interface.
has a setName(String aName) method
PersonImpl
Implementation of Person Interface.
PersonFactory Interface
has a createPerson()
PersonFactoryImpl
Implementation of PersonFactory Interface.
The thing is I was willing to add a method getAll() that returns a ...
I'm creating a cell editor, but I've done (and seen) this in other code. I'm creating an object and then dropping it on the floor like this:
ButtonCellEditor buttonColumn = new ButtonCellEditor(table, 2);
This class takes the table and sets a TableColumnModel and custom cell renderers to it. Then, the method ends and I don't reference t...
I recently added Maven snapshot build capability to a project, configured to use unique timestamp version on deployed artifact. But there is some confusion regarding whether this is the right thing to do (snapshots in question are deployed to one of public repos, not just within an entity like company): some say it causes problems when t...
I have an object field with person's last name.
If I use ${person.lastName}, I get O'Brian
If I use
<c:out value="${person.lastName}"/>
I get O'Brian
Both outputs breaks the next jsp code in IE
<a href="#"
class="delete"
onclick="if(confirm('<c:out value="${application.lastName}"/> ' + _('Are you sure you want to dele...
I have an SHA-1 byte array that I would like to use in a GET request. I need to encode this. URLEncoder expects a string, and if I create a string of it and then encode it, it gets corrupt?
To clarify, this is kinda a follow up to another question of mine.
(Bitorrent Tracker Request) I can get the value as a hex string, but that is not...
I have a list/collection of objects that may or may not have the same property values. What's the easiest way to get a distinct list of the objects with equal properties? Is one collection type best suited for this purpose? For example, in C# I could do something like the following with LINQ.
var recipients = (from recipient in recipien...
When attempting to monitor the performance of a JVM using jstat, I see the following lines -
Timestamp PC PU OC **OU** YGC FGC FGCT GCT
...
283.7 132608.0 132304.8 1572864.0 **398734.1** 20 0 0.000 3.061
284.0 132608.0 132312.8 1572864.0 **1547795.2**...
I am aware of the Eclipse snippet "sysout" which is neatly replaced with System.out.println(); when tab-completed.
This is very useful but sometimes, I need to wrap some existing code in a System.out.println();
In Eclipse internals, the template is defined as being able to wrap a "selected word". But how can I use the snippet with sele...
I've never done a Java Web start application before. I wrote my app's JNLP files and published them along with all the JARs to my Web server. However, after getting the initial splash screen where JWS loads the libraries, nothing happens. Do you have any suggestions on how to debug this, perhaps get some console output? I've tried cleani...
How to split HTML textarea element into array of lines in Java
...
We have a git repository which contains source for a few related Java WARs and JARs. It would be nice if the Java code could somehow:
System.err.println("I was built from git commit " + commitID);
(Obviously real code might be putting this into an HTTP header, logging it on startup, or whatever, that's not important right now)
We are...