Hello.
Does anyone knows about a webproxy ( preferably written in Java ) that can be used to trace the http request my app does to a 3rd party webservice?
I'm using an IDE that automatically creates a ws-client based on the WSDL.
I execute the code generated and I'm getting a 500 error, I would like to know what the soap request is.
...
What tools are available to view the output of the built-in JVM profiler? For example, I'm starting my JVM with:
-agentlib:hprof=cpu=times,thread=y,cutoff=0,format=a,file=someFile.hprof.txt
This generates output in the hprof ("JAVA PROFILE 1.0.1") format.
I have had success in the past using HPjmeter to view these output files in a r...
I have a JMeter test with 2 Thread Groups - the first is a single thread (which creates some inventory) and the second has multiple threads (which purchase all the inventory). I use BeanShell Assertions and XPath Extractors to parse the returned value (which is XML) and store variables (such as the ids of the items to be purchased).
Bu...
Hey guys.
I've been having some trouble putting together a Java-based graphics pipeline for my Intro to Computer Graphics course. As it stands right now, I just need to get the northern hemisphere of a sphere (with north facing the user) printed, and throw some lights at it.
This is the pipeline (might be some errors...)
1) Initializ...
Hi, is there a way to redirect all NullPointerExceptions to a pretty jsp page perhaps in Struts?
Thanks in advance!
...
Just want to know if there's a tutorial or an how-to for serializing object, put it in a stream over network, and deserialize it on the other point. I understand the principles of serialization, I/O, streams, sockets and so on, just want an example (client sending object to a server) to start with.
Thank you.
...
I'm working on a recursive method...
public BinaryTree<T> TreeMirror ( BinaryTree<T> tree ) {
BinaryTree mirror = new BinaryTree();
mirror = clone(tree);
...
TreeMirror(...)
...
}
I do not wish for the method to make mirror reference a different BinaryTree object in each recursive step, nor to repeat the mirror = clone(...
Hi
I used to generate thread dumps by running kill -quit and I would get them in a log file where my server logs were there. When the file grew too large I removed it using rm and created a new file of the same name.
Now when I use kill -quit to take the thread dumps, nothing gets copied in the log file - its empty.
Can anyone help?
...
Hi,
I make very heavy use of the Java code refactoring tools provided by Eclipse (extract interface, rename method, etc.). Does anyone knows of other similar tools (preferably Eclipse plugins) that can perform Java code refactorings that are not available in Eclipse by default, or that can perform the same refactorings better?
I'm awar...
import java.awt.*;
import javax.swing.*;
public class
import javax.swing.*;
import java.awt.*;
import javax.swing.tree.*;
import javax.swing.event.*;
/*<applet code="JT.class" width=200 height=300>
</applet>*/
public class JT extends JApplet {
JTree tree;
JTextField box;
Object nodeInfo;
String node1;
public voi...
I have been using JDOM library to read and write XML files through Java Servlets.
Problem is that when I send many requests using AJAX to my servlets which read and write data in XML files, many times it fails displaying error: Premature end of file. How can I synchronize all these read/writes to files or is there any other way to prev...
Here's a snippet of code that I saw in some code I'm maintaining.
Object lock = new Object();
synchronized( lock )
{
try
{
lock.wait( 50000 );
Thread.sleep( 3000 );
}
catch(Exception ex)
{
}
}
The developer wants to suspend the current thread for some amount of time and is using Object#wait as the me...
I am trying to write a Factory Pattern to create either a MainMode or a TestMode in my program. The code I was previously using to create these objects was:
play = (isMode) ? new MainMode(numberRanges, numberOfGuesses) :
new TestMode(numberRanges, numberOfGuesses, randNo());
My Game (play) would either create a Main...
I have just written a program for importing data from an xml file to a database using dom4j. It endend up as a series of xpath statements wrapped in java, - and it works, but I strongly feel that there is a better way of doing this.
What is the preferred way to import data from xml into a db?
...
Hi,
i'm implementing x modem protocol for reciveing file form external device using trough serialport using java ,i'm getting 133 bytes from sender after sending C to sender then i'll get 133 bytes i'e first packet afetrthat i've to send acklowledgment i have done that part but i'm not getting second packet and i've sent ack within tim...
I want to print, email and write to PDF very simple reports. The reports are basically a list of items, divided in various sections/columns. The sections are not necessarily identical. Think newspaper.
I just wasted a solid 2 days of work trying to make this kind of reports using JasperReports. I find that Jasper is great for outputing ...
I have developed a Java swing application, then I have deployed it through a .jar package.
I run my application on my PC double-clicking over the .jar file and everything goes fine, everything goes fine from command line (dos prompt) too.
Here my problem.
I have tried to run my app on another PC:
same OS (Windows XP)
same JRE (1.6...
Hi, I've a List<String> object that contains country names. How can I sort this list alphabetically?
Thanks.
...
Hi
I am using some classes from a JAR file and they belong to a package (Say -- com.abc.xyz).
The class am writing also belongs to that package but I won't be able to bundle my file into that JAR file. Is it possible to have classes that belong to the same package spread across multiple JAR files ?
Thanks
A Java Novice
...
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import java.util.Random;
/**
*
*/
public class GUI
{
private static final int BTN_MAX = 8;
private JFrame frame;
private JPanel panel;
private JPanel scores;
private JButton[] buttons;
private ImageIcon[] icons;
...