I'm working on a utility to update a list of entities in a database as a group. The database contains a list of entities. The result of the update is a new list. The API accepts this new list.
The update may end up modifying some of the entities in the list, creating new ones and deleting some. So at the entity level, I may have to do a...
I have stored a webpage's HTML in the database.
I want to take advantage of HtmlUnit's ability to find/reference DOM elements.
Is it possible to load the HtmlPage object from a string (via a database column)?
...
This question was asked already here, but rather than answering the specific question, descriptions of how the decorator pattern works were given instead. I'd like to ask it again because the answer is not immediately evident to me just by reading how the decorator pattern works (I've read the wikipedia article and the section in the bo...
I haven't had any experience with web service related development. So, any ideas will be greatly appreciated.
Suppose, I have a file listing draft specification of WSDL operations. Following is one example. How would I go about creating the WSDL file. Is notepad sufficient or do I need to have WSDL editor?
getHostSystemInfo
Return...
Hi Guys.
Have a question related to how RMI loads the interface classes.
So here is my set up:
An interface that defines the operation that the rmi server performs.
Common
public interface Computable<T> extends Remote{
public AnalyticalServiceOutput<T> compute(Request request) throws RemoteException;
}
Server
Computable<Map<S...
What is the preferred way to extract elements from a HTML page in Java?
My HTML is has many of the following rows:
<tr class="item-odd">
<td class="data"><a href="http://.....">TITLE</a></td>
<td><div class="cost">$1.99</div></td>
</tr>
The class alternates item-odd and item-even.
I need to extract:
Ur...
I have a buildr script that first loads a java properties file, then creates an ant task. I'm getting an abort error: Buildr aborted! org/apache/tools/ant/DefaultLogger when running buildr.
Here's the (simplified) buildfile:
CONFIG = Hash.from_java_properties("a=1")
define "my_project", :version => "1.0" do
ant("ant_test") do |ant...
I have SOAP web services for Application 1 available to me. And, I'd like to implement a Java application that translate Application 1's Web Services calls to Application 2's JMX API. So App 1 can manage a bunch of operations through App 2.
If I understand the problem correctly, I want to build a SOAP/JMX Proxy (Remote Proxy design patt...
im developing a multi-player card game that needs the clients to communicate with each other or a general server. i have never done this before so i need some direction or tutorial on how to achieve this.
so far i have created the local, single person version of the game...
...
I have a html table like:
<table ..... class="cars">
<tr class="item-odd">
...
</tr>
<tr class="item-even">
</tr>
</table>
How could I get the table rows using xpath?
//tr[contains(@class, ???)
can I use OR in there somehow to say item-odd|item-even
...
I have downloaded a few libraries for my netbeans solution to work.
I want to store these in a seperate folder so when I save to GIT, I can checkout my project at home at not have to redownload all the libs it references.
Can I do this if I already have my project up and running?
...
I am looking for a class similar to ThreadLocal which would work on thread groups instead of threads.
If there is not such a class (in some open source library) how would you implement it? Some better idea than having thread groups in WeakHashMap?
I am implementing a debugging framework tunable in run-time with various parameters in gl...
It seems JSR 292 will add support for dynamic languages to the JVM but I've not seen many details about it. Will dynamic types be incorporated into the language (or just the VM)? If so, what will the semantics look like?
Will there be something like C# 4's:
dynamic x = 10, y = 5;
Console.WriteLine(x + y);
...
Exposition:
I'm writting an OpenGL app in Java via JOGL. The built in fonts with GLUT are very basic. I want to be able to take a Java Font, render all the characters in it to a 2D array of bytes (a greyscale image representing the characters), which I can then load as a texture in OpenGL.
Problem:
I can load the textures in OpenGL; I...
How do you solve the max value problem when using an integer counter, that looks like
counter = counter + 1;
When this reaches the max value, how do you know this happened? Do you add another counter for this counting how often this happened?
My question concerns about java.
...
I have a binary value being URL Encoded, and then POSTed to an HttpServlet. The following code shows how I first attempted to extract this data. Very simple except that the result is a String, not bytes.
This seemed to work at first, except that an extra byte appeared three bytes from the end. What I eventually figured out was that my d...
I'm trying to find the most efficient way to get all objects from the datastore except ones already contained in a list.
Eg. PersistencyManager.getObjectsById(List) will return a list of objects with given ID's. I want a getObjectsExcept(List) method that will return all of the objects that are not contained in the given collection.
...
I have a WS ( CarASessionBean )it will call another WS ( CarBProxy ) to create a car details. So inside my CarASessionBean WS has a method call createCar :
(In proxy has the same method as well call createCar just it take in CarB object as parameter).
public void createCar(CarA car) {
//here i will call the proxy and here error...
I have a bit of XSLT which is performing some magic on integer database identifiers. The relevant code snippit is
<xsl:variable name="releaseId" select="@ID + $contentOffsetId"/>
<xsl:attribute name="OLD_ID"> <xsl:value-of select="@ID" /> </xsl:attribute>
<xsl:attribute name="RELEASE_ID"> <xsl:value-of select="$releas...
I found this code witch I tried and it works great but(!). I want to store the file in a folder that I will choose and also get it from a folder that I again will chose. Since the Sender get an argument then I suppose that if I give an argument like /home/user/test.txt then that's ok and it'll work out fine but I don't get how to store t...