java

Which SSO Framework to use?

I've used OpenSSO (which is very powerful but complicated) and JOSSO (very simple but lacking many features). I've also looked at the CAS framework. My question is: What is your recommendation & insights regarding the different SSO frameworks (preferably Java oriented)? ...

Coverity for Java static analysis

I'd like to get comments from people who have used or evaluated Coverity for statically analysing Java-code. I know it's popular in C/C++ world, but is it worth spending the money for Java analysis or am I better off with PMD, Findbugs and other Open Source tools? ...

What ways are there of drawing 3D trees using Java and OpenGL?

I know how to draw basic objects using JOGL or LWJGL to connect to OpenGL. What I would like is something that can generate some kind of geometry for trees, similar to what SpeedTree is famous for. Obviously I don't expect the same quality as SpeedTree. I want the trees to not look repetitive. Speed is not a concern, I do not expect to ...

Java: Serializing unknown Arraysize

If I safe an Array and reload it, is there a possibility to get the size if its unknown? Thanks ...

Struts2 - How to do dynamic URL redirects?

I'm trying to have my struts2 app redirect to a generated url. In this case, I want the url to use the current date, or a date I looked up in a database. So /section/document becomes /section/document/2008-10-06 What's the best way to do this? ...

Multiple instances of a java web application sharing a resource

Hi All, I have a web service, that takes an input xml message, transforms it, and then forwards it to another web service. The application is deployed to two web logic app servers for performance, and resilience reasons. I would like a single website monitoring page that allows two things ability to stop/ start forwarding of message...

I'm a professional Java developer, should I learn .NET?

Java and .NET seem to have a great number of parallels especially in the web application area. Both languages have many of the same technologies especially in terms of open source libraries (JUnit and NUnit, Hibernate and NHibernate) but there are also plenty of differences and different approaches to solving certain software development...

Object arrays in method signatures

Consider the following method signatures: public fooMethod (Foo[] foos) { /*...*/ } and public fooMethod (Foo... foos) { /*...*/ } Explanation: The former takes an array of Foo-objects as an argument - fooMethod(new Foo[]{..}) - while the latter takes an arbitrary amount of arguments of type Foo, and presents them as an array of Fo...

.toArray(new MyClass[0]) or .toArray(new MyClass[myList.size()]) ?

Assuming I have an ArrayList ArrayList<MyClass> myList; And I want to call toArray, is there a performance reason to use MyClass[] arr = myList.toArray(new MyClass[myList.size()]); over MyClass[] arr = myList.toArray(new MyClass[0]); ? I prefer the second style, since it's less verbose, and I assumed that the compiler will make...

JKS protection

Are JKS (Java Key Store) files encrypted? Do they provide full protection for encryption keys, or do I need to rely solely on access control? Is there a way to ensure that the keys are protected? I'm interested in the gritty details, including algorithm, key management, etc. Is any of this configurable? ...

Suggestions for a Java-based templating engine?

Do you know a better template engine than FreeMaker or Velocity? ...

Using both Eclipse and NetBeans on the same project

Eclipse is a really great editor, which I prefer to use, but the GUI design tools for Eclipse are lacking. On the other hand, NetBeans works really well for GUI design. Are there any tips, tricks or pitfalls for using NetBeans for GUI design and Eclipse for everything else on the same project? EDIT: I tried Maven, and it does not se...

Spring webflow : Move through view states

Within a spring webflow, i need to implement a navigation bar that will allow to "step back" or resume the flow to one of the previous view. For example : View 1 = login View 2 = My informations View 3 = My messages View 4 = Close session For this example, i would like to return back to view 2 from the view 4 page. ...

Does anyone know if NetBeans 6.x can be used with Java SE 6 on Leopard?

Java SE 6 (64 bit only) is now on OS X and that is a good thing. As I understand it since Eclipse is still Carbon and thus 32 bit, it cannot be used for 1.6 on Leopard, only 1.5. Does anyone know if NetBeans 6.x can be used with Java SE 6 on Leopard utilizing its JVM? ...

Modern equivalent of javadeps?

I am looking for a replacement for javadeps, which I used to use to generate sections of a Makefile to specify which classes depended on which source files. Unfortunately javadeps itself has not been updated in a while, and cannot parse generic types or static imports. The closest thing I've found so far is Dependency Finder. It almos...

Complex profiles in maven

I've been looking at profiles in maven for selecting different sets of dependencies. This is fine when you want to build say a debug build differently from a release build. My problem is that I want to do a fair bit more than this. For my application (Mobile Java app where J2ME is just one target among many) there may be a large number o...

String to Int in java - Likely bad data, need to avoid exceptions.

Seeing as Java doesn't have nullable types, nor does it have a TryParse(), how do you handle input validation without throwing an exceptions? The usual way: String userdata = /*value from gui*/ int val; try { val = Integer.parseInt(userdata); } catch (NumberFormatException nfe) { // bad data - set to sentinel val = Integer.MIN...

java client code for generating SOAP request from WSDL file

Any JAVA opensource api for generating a SOAP request from a WSDL file? Thanks ...

Netbeans Error: "Could not add one or more tag libraries"

I am using Netbeans 6.1 and Tomcat 6.0.1.6. I made some very minor changes to a project that had been working and now I am getting the following error: com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: Could not add one or more tag libraries. The only change I made was to a backing bean method, no ne...

Java: Are concurrent reads and writes possible on a blocking SocketChannel via Object(In|Out)putStreams?

I created an ObjectInputSteam and ObjectOutputStream on a blocking SocketChannel and am trying to read and write concurrently. My code is something like this: socketChannel = SocketChannel.open(destNode); objectOutputStream = new ObjectOutputStream(Channels.newOutputStream(socketChannel)); objectInputStream = new ObjectInputStream(Chan...