I'm trying to find a good Java cms, I've stumbled uppon some that are quite good like:
Apache Lenya, dotCMS, Info Glue, Open Edit, MMBase, Contelligent, Hippo CMS
Which on do you guys recommend, or even one that I'm missing, because I have some more that I am studying at the moment.
The requirements are that I can build modules for it...
When moving a file from old.package to new.package I want two things to happen:
Update all references to that class (in all files of the project) so that the new package is used
svn move old/package/Foo.java new/package/Foo.java
I use subversive within Eclipse Ganymede. When I just drag the file from one package to the other, all ref...
On my java project, I have a bunch of strings externalized on a messages.properties file. On its respective Messages.java file I had the same number of public static String-typed attributes, so I could access those externalized texts.
Then, I implemented a method called getString, which receives the name of the constant as its argume...
What is the difference between compare() and compareTo() methods in java? Both methods give same answer?Please give some examples.
...
If I am using JAXB as part of Metro Web Services under Glassfish v2, how do tell JAXB to add:
<xsd:any/> and <xsd:anyAttribute/>
tags to my generated complex types so that if I make changes in the future to add elements or attributes to my response objects then my current clients won't break.
JAXB documentation seems somewhat lacki...
Are there inexpensive or free gateways from .NET to Java? I'm looking at some data acquisition hardware which has drivers for C/C++ and .NET -- I really don't want to do any programming in .NET.
Update: I haven't done what I originally wanted to do, but I've done something similar, using JNA to encapsulate some functions from a DLL, in ...
Just got a review comment that my static import of the method was not a good idea. The static import was of a method from a DA class, which has mostly static methods. So in middle of the business logic I had a da activity that apparently seemed to belong to the current class:
static import some.package.DA.*;
class BusinessObject {
voi...
I'm just coming up the learning curve for Java SE & have no problem with the usual Java convention for package names, e.g. com.example.library_name_here.package_name_here
Except.
I've been noticing a failure to abide by this in some fairly well-known packages.
JLine: jline.*
JACOB: com.jacob.* (there is no jacob.com)
JNA: com.sun...
I am using Jfreechart. I have the code like this
TimeSeries t1 = new TimeSeries("EUR/GBP");
t1.add(new Day(4, MonthConstants.JANUARY, 2001), new Double(1.5807));
But I get String from my SQL query. TimeSeries accepts only RegularTimePeriod or TimeSeriesDataItem.
Please let me know how to convert a String into RegularTimePeriod.
Thank...
Hi,
I have to login into a https web page and download a file using Java.
I know all the URLs beforehand:
baseURL = // a https URL;
urlMap = new HashMap<String, URL>();
urlMap.put("login", new URL(baseURL, "exec.asp?login=username&pass=XPTO"));
urlMap.put("logout", new URL(baseURL, "exec.asp?exec.asp?page=999"));
urlMap.put("file", new...
I need to find the caller of a method. Is it possible using stacktrace or reflection?
...
I'm wondering if there is any way to set a JPanel's background to an image instead of just a colour. Thanks and I'm working on dr. java
...
I have a set of files. The set of files is read-only off a NTFS share, thus can have many readers. Each file is updated occasionally by one writer that has write access.
How do I ensure that:
If the write fails, that the previous file is still readable
Readers cannot hold up the single writer
I am using Java and my current solution...
Hey guys!
I've built a form with Netbeans's visual editor. When I press one of the buttons it should do the following :
set it to disabled
perform a task that takes some time
when the task finishes the button will be enabled again
However, the following happens:
the button remains in a pressed state until the task finishes
when th...
Hi all,
I find myself needing to generate a checksum for a string of data, for consistency purposes. The broad idea is that the client can regenerate the checksum based on the payload it recieves and thus detect any corruption that took place in transit. I am vaguely aware that there are all kinds of mathematical principles behind thi...
I'm wondering if it's possible to get a handle on running instances of a given class. The particular issue that triggered this was an application that doesn't exit nicely because of a number of running threads.
Yes, I know you can daemonize the theads, and they won't then hold up the application exit. But it did get me to wondering if ...
I want to be able to detect when a computer connects to a network. The environment is Java 5 under Windows.
...
I have to take over and improve/finish some code that transforms Java objects from a third party library into internal objects. Currently this is done through a big if-else statement along the lines of:
if (obj instanceOf X)
{
//code to initialize internal object
}
else if (obj instanceOf Y)
{
//code to initialize different obje...
As most should know close() also closes any streams uses.
This allows the follow code:
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(...)));
...
br.close();
This is nice, since we don't need a reference to FileInputStream and remember to close it.
But does it also work for FileLocks?
final FileInp...
What's the proper way to create a hyperlink in Spring+JSP? There must be a better way than just coding in the <a href="..."> tag. Take for example a page that displays people. The URL is people.htm. The corresponding controller gets people from the database and performs optional column sorting. The JSP might look like:
<table>
<tr>
<t...