java

What is the best report engine for Java

For most of our project, we use Jasper Reports, does anyone have experience with other report engines, is there anything better? (We use JR for stock-exchange reports) ...

How do you Programmatically Download a Webpage in Java

I would like to be able to fetch a web page's html and save it to a String, so I can do some processing on it. How would I go about doing that using Java? ...

Where does Websphere get the WSDL from?

I have a java application that has Web Services published using Axis. With the latest release one of the service methods in the WSDL is wrong. It has a field in a complex type with double instead of an array of doubles. I've checked the src WSDL and the generated classes like the data object and the binding stub, but they are all corr...

What design pattern to use for User Authentication in Java

There are certain common components that are used across projects: User Authentication and Authorization Exception Handling Logging E-mail DataBase Access Caching etc Is there a consistent design pattern that can be used for each of these common modules? By the way, the framework can vary like JAAS/JNDI for User Authentication and Au...

Getting a file from an http request in java

How do I call a url in order to process the results? I have a stand-alone reporting servlet which I link to for reports. I want to email these reports now, if I were doing this in the browser, I could just use an xhttprequest, and process the results - I basically want to do the same thing in Java, but I'm not sure how to go about it. ...

Quick question: Java system clock

What's a simple/easy way to access the system clock using Java, so that I can calculate the elapsed time of an event? ...

Pros and Cons of being a java expert?

After spending much thought on the issue and learning a few things about my languages preferences ie. I absolutely dislike php and everything it stands for. I am wondering whether or not it would be wise to delve into the world of java while I am student. This gives the advantage of the fact I am already proficient in java and most of ...

How do you import classes in JSP?

I am a complete JSP beginner. I am trying to use a java.util.List in a JSP page. What do I need to do to use classes other than ones in java.lang? ...

Java data grid control

Are there any third party enterprisey data grid controls out there, alla JIDE Data Grid? Is there a website like torry.net that lists third party java controls? Google doesn't turn up much for and I thought there would be a lot of both considering how popular java seems to be. TIA ...

During execution, how can a java program tell how much memory it is using?

During execution, how can a java program tell how much memory it is using? I don't care how efficient it is! ...

JAXB or StAX Message Limits

I'm current developing a WebService in a Bea Websphere 6.1 environment with Axis 2 implementation, I'm trying to respect the current standards for Web Services (JAXB, JAXWS, StAX...). How long can be an XML message on this platform? I've searched around but I haven't found anything related to this topic. ...

Which is the best alternative for Java Serialization?

I'm currently working on a project which needs to persist any kind of objects (of which implementation we don't have any control) so these objects could be recovered afterwards. We can't implement a ORM because we can't restrict the users of our library at development time. Our first alternative was to serialize it with the Java defau...

convert html to pdf with linked documents inline

I need to convert a bundle of static HTML documents into a single PDF file programmatically on the server side on a Java/J2EE platform using a batch process preferably. The pdf files would be distributed to site users for offline browsing of the web pages. The major points of the requirements are: 1. The banner at the top should not be...

Activex from java application?

Is it possible to easily embed ActiveX controls in Java application? Is it worth it. In my next project I should either use existing activex in Java app or have to reimplement everything from scratch, so I'm wondering what will be less hassle. ...

Java events

How does the event creation and handling work in Java? ...

How to output a String on multiple lines using Graphics

My Program overrides public void paint(Graphics g, int x, int y); in order to draw some stings using g.drawString(someString, x+10, y+30); Now someString can be quite long and thus, it may not fit on one line. What is the best way to write the text on multiple line. For instance, in a rectangle (x1, y1, x2, y2)? ...

Thread dump programmatically /JDI (Java Debugger Interface)

I like to generate a thread dump programmatically. I've learned that there a basically two ways to do it: Use the "Java Virtual Machine Tool Interface" JVM-TI Use the higher abstracted "Java Debugger Interface" JDI For the JVM-TI I was able to find some useful information, but I would have to write a JNI-DLL which, at least for the m...

When should I use primitives instead of wrapping objects?

Actually here is a similar topic with little practical value. As far as I understand, primitives perform better and should be used everywhere except for the cases where Object-related features (e.g. null check) are needed. Right? ...

Overriding a method with Generic Parameters in Java?

I have an abstract Class Monitor.java which is subclassed by a Class EmailMonitor.java. The method public abstract List<? extends MonitorAccount> performMonitor(List<? extends MonitorAccount> accounts) is defined in Monitor.java and must be overridden in EmailMonitor.java. I currently have the method overridden in EmailMonitor.java a...

Things possible in IntelliJ that aren't possible in Eclipse?

I have heard from people who have switched either way and who swear by the one or the other. Being a huge Eclipse fan but having not had the time to try out IntelliJ, I am interested hearing from IntelliJ users who are "ex-Eclipsians" some specific things that you can do with IntelliJ that you can not do with Eclipse. Note: This is not...