java

Any function / method in Java to implement a "freeze panes"-like sheet?

We are using Java and Javascript to try to display a huge sheet with freeze panes, but it is being very difficult. Does someone know about a library, method, script or something, either free or commercial, to do this? Thanks. ...

RuntimeException from xmlbeans - can't find compiled schema

I'm getting a RuntimeException while executing some code that depends on generated xmlbeans classes. I can't figure out if this is: me missing something during code-generation or packaging a runtime dependency missing a misleading error message, and I should be looking elsewhere. The xbean.jar version is the same in the build and exe...

web form generation out of xml schema

I have a requirement where i need to generate html forms on the fly based on many different xml schema's (as of now i have 20 of them and the count keeps increasing). I need to collect data from the user to create instance docs corresponding to each of them and then store the instance docs in db.... challenges 1) schema has lot of unbo...

Java NIO: What does IOException: Broken pipe mean?

For some of my Java NIO connections, when I have a SocketChannel.write(ByteBuffer) call, it throws an IOException: "Broken pipe". What causes a "broken pipe", and more importantly, is it possible to recover from that state? If it cannot be recovered, it seems this would be a good sign that an irreversible problem has occurred and that ...

Redirection problem in Java(Wicket)

I have a page that is inherited from WebPage and is protected by class below: public final class WiaAuthorizationStrategy implements IAuthorizationStrategy, IUnauthorizedComponentInstantiationListener { private RealmPolicy roleManager; private static WiaAuthorizationStrategy instance; private WiaAuthorizati...

Pros and cons of using BlazeDS or web services as the remoting and messaging technology between Flex view layer and Spring business layer?

In my company, we are going to use Flex3 for the presentation layer of a new financial web application and Spring for the business layer but a debate is still going on regarding the best messaging/remoting technology. Can you share your own experiences in terms of pros and cons of using one or the other technology? ...

Reimplementing mkpasswd

On Linux I am used to using mkpasswd to generate random passwords to use, on OS X however I don't have this command. Instead of sshing in to my vps every time, I wanted to re implement it using Java. What I have done is pick at random 4 lower case letters, 2 upper case letters, 2 symbols (/ . , etc) and 2 numbers. Then I create a vector...

What is a Class Library in Java?

Hi, What is a Class library in Java? Is it a collection of classes with in a package, or it is a package that has collection of classes? I'm bit confused. ^_^ ...

Mutable seqs in clojure

I have the a list in clojure, and (due to the underlying java library) must modify the list (using the iterator's remove method). Is there a more elegant way to get this effect in closure than writing a destructive equivalent of (map fn seq)? ...

Problem in running Classic tag handler

Hi, I want to display the body value of JSP in custom tag name Simple from the tag handler by extending the class, BodyTagSupport, but getting a runtime exception ;o) The JSP code is: <html><body> <%@ taglib prefix="mine" uri="simpleTags" %> Advisor page <mine:simple> Balle Balle </mine:simple> </html></body> and the Tag handler cl...

what is the c# equivalent of public final static in java

In Java I can write: public final static MyClass foo = new MyClass("foo"); is there an equivalent in C#? ...

I/O prioritization in Java

I'd like to use of the Vista+ feature of I/O prioritization. Is there a platform independent way of setting I/O priority on an operation in Java (e.g. a library, in Java 7) or should I revert to a sleeping-filter or JNx solution? (Do other platforms have similar feature?) ...

An idea about developing an agile wall web tool

Hi folks, I'm thinking about developing a web app to visualize the agile wall. The reason is that the project I'm working in has multiple distributed teams, so it is very difficult to share the information on the agile wall across the teams. I know some tools like JIRA do have agile wall functionality built in, what I want to have is a ...

Java: get last element after split

Hi there i am using the String split method and i want to have the last element. The size of the Array can change. examples : String one = "Düsseldorf - Zentrum - Günnewig Uebachs" String two = "Düsseldorf - Madison" i want to split this and get the last item : lastone = one.split("-")[here the last item] <- how? lasttwo = one.s...

JSF Exception: /main.jsp not found in external context as a Resource

Hi, I have a User Interface built using "IceFaces". And it's deployed on a portal built using "LifeRay". The UI application is getting undeployed automatically from the portal sometimes. And the log is showing the following error message :- javax.servlet.ServletException: java.lang.Exception: javax.faces.FacesException: Problem in r...

Lightweight Java IDE

I've bought a Compaq Mini 733 (1.6G Hz Atom CPU, 1GB RAM, 4200 RPM HDD, XP Home) primarily for my girlfriend but also for me to use while on holiday, traveling about, etc. The rigorous of my job necessitates being able to write patches, small enhancements and system maintenance via ssh even when on holiday. (Not a bad thing--I work a f...

Constructor overloading in Java - best practice

There are a few topics similar to this, but I couldn't find one with a sufficient answer. I would like to know what is the best practice for constructor overloading in Java. I already have my own thoughts on the subject, but I'd like to hear more advice. I'm referring to both constructor overloading in a simple class and constructor ov...

Looking for tutorial to call WCF service from Java

I have some Java code and I want to call a WCF service which I developed by using VSTS 2008 + C# + .Net 3.5 and using basic Http Binding. Any reference samples or tutorials are appreciated? ...

What is the optimal way for reading the contents of a webpage into a string in Java?

I have the following Java code to fetch the entire contents of an HTML page at a given URL. Can this be done in a more efficient way? Any improvements are welcome. public static String getHTML(final String url) throws IOException { if (url == null || url.length() == 0) { throw new IllegalArgumentException("url cannot be null or empty...

Generating PDFs in Java using iText. Support for Free flowing text.

We have pdf templates of the following nature that need to be generated by a web application: Sample Paragraph: Dear {customer.name}, Your lawyer, {customer.lawyer.name} has contacted us about your account, {customer.account.number} requesting immediate closure of the account. ... The {...} fields mentioned above are to accommodate ...