I've got a folder in my Web Application, fonts. I'd like to get the path for each of those files in that directory. How do I do that? In asp.net I'd do something like:
System.IO.Directory.GetFiles(Server.MapPath("/fonts"))
...
Suppose I am making jdbc call and I had fetched data from db to resultset. But due to some network issue I lost my connection with db. (Connection, statement and resultset is not closed in DB). So can I still able to iterate resultset ?
...
I need to make asynchronous calls to .NET web services from java since synchronous calls are too slow. I know in .NET this is easily done since the stub (proxy) class created by wsdl.exe also generates methods for asynchronous calls(BeginMethod()/EndMethod()). I created the service stub using eclipse Ganymede but no asynchronous method...
The plug-in really needs to be unpacked, yes I know it shouldn't care, but it does. I just want to make this warning go away, how do I do that?
...
The problem: Consder the following floats[]:
d[i] = 1.7 -0.3 2.1 0.5
What I want is an array of int[] that represents the order of the original array with indices.
s[i] = 1 3 0 2
d[s[i]] = -0.3 0.5 1.7 2.1
Of course it could be done with a custom comparator, a sorted set of custom objects, or by simply sorti...
Eclipse WTP creates its own server.xml file which it places in some folder which configures the tomcat instance you are running for your web project. If you double click on the server in the servers list you get a nice screen which makes it simple to configure some aspects of the server.xml file.
How do I configure a new connection to a...
I have an application which is running on tomcat, one of the methods is, creating a simple thumbnail from an jpeg image. The functions works fine offline and a week ago also on tomcat. But now i get the following error:
java.lang.NoClassDefFoundError
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:164)
java.aw...
Where the heck do I get org.hibernate.tool.ant.HibernateToolTask ? I can't seem to find a .jar file that contains it.
...
I need to know if there are any tools to figure out the interface to a TCP client. My Company has purchased a 3rd party tool and we really like the Server side and most of the client side.
I would like to see if I can figure out the calls that the client side makes to the server so I can create the client side functionality we want.
I...
I am working inside of a quite complex eclipse based application, and having a problem with a JTable based custom component inside of a JSplitPane. The part of the application that I actually have access to is a panel, within a tab, within a panel, within the actual application, so there are a lot of things that can go wrong.
The speci...
While I know that by definition a boolean consists of only two states, true or false. I was wondering what value does a boolean have before it is initialized with one of these states.
...
After seeing some of the benefits of GWT, my partner and I decided that it would be a good front end for the web app we hope to build. A main part of this web app will be content management. We were hoping to use a CMS framework and put GWT on the front end, but all the open source CMS systems we find seem to be very tied to their fron...
When I copy an Eclipse project directory, it contains the .classpath and .project files so that when I take that same directory to another Eclipse instance, I don't have to setup my build path and such (assuming that all the resources are contained in the project, and not external.)
However, this procedure doesn't cause launch profiles ...
I hit on this nasty behavior on JBoss 4.2 in QA, and I want to nip it in the bud before we go into production and find some other corner case.
A jsp calles a method that had the following signature:
public void methodName(String arg)
This was changed to:
public void methodName(String arg, Object... args)
A pre-existing JSP calle...
I wanted to learn to program and looked at both Java and C#. I decided to go with C# because it was so easy to just open a form and plop some buttons and text boxes on it. With just one download, C# Express got me going. From what I saw with Java that couldn’t be done. At least not with out downloading and configuring other software. All...
I have to use a GUI Element that draws a picture at a specific screen position.
If the user selects this picture there is a border drawn around the Image.
Now we want to include another border that identifies pictures with a specific value for the user.
At the moment the Element looks at his internal state if it is selected and then ...
I've been writing .NET software for years but have started to dabble a bit in Java. While the syntax is similar the methodology is often different so I'm asking for a bit of help in these concept translations.
Properties
I know that properties are simply abstracted get_/set_ methods - the same in C#. But, what are the commonly accepted...
I have a string which contains digits and letters. I wish to split the string into contiguous chunks of digits and contiguous chunks of letters.
Consider the String "34A312O5M444123A".
I would like to output:
["34", "A", "312", "O", "5", "M", "444123", "A"]
I have code which works and looks like:
List<String> digitsAsElements(String...
I have a "processor" component that can process a single File, InputStream, Reader, or etc.
For various reasons, I end up with several large files instead of one huge file.
Is there a way to construct an input stream (or reader) that: transparently "appends" all these files so that:
1) The "processor" does not know where one file star...
Hi,
I'm new to JMS and I am working on setting up ActiveMQ with Tomcat 6 and Spring. I have most of the basic things configured however I'm a little bit confused with the Message Listener Containers that Spring provides. Reading the documentation it sounds like the Message Listener Container is used to "handle" subscribing (I'm worki...