java

Upload file to webservice (java)

I am looking for a solution to upload a file from a client to a server connected through a web service. The client is written in c# and the web Service in java. The files can be rather large < 100MB. What approach would you suggest is best ? ...

SVG slicing

Is there any way to slice an SVG . I mean any already available lib . I need to implement this slicing component in Java. I mean , I have single SVG file and based rulers/scales i choose graphically , I want to slice the single SVG into different SVG files. Hope I am clear ...

How to integrate spring with GWT?

If I understand correctly, it's more efficient to use spring as a mediator for object persistence than using ibatis directly. There seem to be a lot of libraries which ease spring integration by implementing a dispatcher for gwt rpc calls. Would you recommend gwtrpc-spring or gwt-widgets? ...

Struts 1.2.9 reload application.properties

Hi all, in my file "struts-config.xml" I've wrote: When my application start load successfully application.properties. How I can reload this properties (because I wanna change a lot of property wrote inside file) without restart application? Thanks a lot. T. ...

Form binding a HashMap using annotation based controller in Spring 2.5

Hello, I have been hitting a brick wall with this problem for some time and no amount of searching and reading has turned up an answer. I have posted on the Spring forums, but to no avail. Maybe someone here can help? I have a bean containing a HashMap which I have bound to form using the Spring:form taglib and Spring:bind. Binding to ...

JVM heap parameters

Hi all, After reading already asked question on the subject and a lot of googling I am still not able to have a clear view of -Xms option My question is: what's the difference between java -Xms=512m -Xmx=512m and java -Xms=64m -Xmx=512m ? For now I have the following answer: The only difference is in the number of garbage collections...

What would you submit as an example of your best code for peer review?

If your company was being audited, or you were in an interview, and you were asked to provide an example of your best code for peer review, what would you submit? (I would like actual code examples for people to vote on). Try to keep the sample small (less than 100 lines) and for the purposes of this forum lets keep it limited to JAVA, ...

How can you serve a dynamically generated file w/ Tomcat & Java technology?

Having a hard time figuring out how to send dynamic data to a web-app's user without having to create a file & using a dynamic link to static content using java technology. (The main reasons for avoiding the file creation on disk are security and speed) This is something I have previously done in python, but this web-app is intended to ...

How to make a Java server HTTPS-ready?

I have a server written (self written - no Tomcat or Jetty) in Java and it works nicely, but now I want it to work with HTTPS as well, but I really don't get what I need to do. I've read some stuff online, but haven't really found a good explanation for what I need to do. Could anybody give me an useful hint (or a small outline) of what...

Horizontally flip an Area in Java

I have a concave polygon stored as an Area. How would I flip/invert/mirror the polygon about the y-axis? ...

Spring - @Transactional - What happens in background?

I want to know what actually happens when you annotate a method with @Transactional? Of course, I know that Spring will wrap that method in a Transaction. But, I have the following doubts: I heard that Spring creates a proxy class? Can someone explain this in more depth. What actually resides in that proxy class? What happens to the a...

Why is this code giving me a date 39k years in the future?

I've written a method that returns the milisecond value of a string formatted date, and for some reason it's giving me dates 39000 years in the future. any ideas why? private long getTimeInMs(String currentStartTimeString) { //String newDateString = currentStartTimeString.substring(6,10)+"-"+currentStartTimeString.substring(3, 5)+"...

Do beautiful, user-friendly Java applets exist?

When I use Java applets, they tend to be slow, don't integrate very well with the browser environment and often require a few click throughs ("No, I don't want to give this unsigned application free reign of my hard disk"). So, I'm curious. Are these problems insurmountable? Are there Java applets out there which integrate well with th...

JMS, Detect when a temp queue is destroyed

I have a "server" application receiving messages from a JMS queue. And client applications which create a temp queue, and then send a message to the server, setting the JMSReplyTo header to the temp queue. The server replies back to the client using the temp queue. However the server has a lot of replies back to the client all sent over...

Trying to read non Java primitives from a binary file

I am trying to read a binary file from a program that writes a log (of sorts) to a dat file which I have worked out reasonably well the format of using Java. I am loading it as so: DataInputStream in = new DataInputStream(new FileInputStream("file.dat")); System.out.println("Bytes skipped: " + in.skipBytes(4)); System.out.println(in.r...

Looking for a Java fuzzing library or fuzzer tool with a good API

Are there any fuzzer libraries out there for Java? I'd like to sprinkle fuzzing capabilities into existing Java web-based automated integration tests. I've done a lot of searching but I'm coming up empty for a library that supports HTTP/S. There are a lot of Python tools, but I'd like to stick with Java since that's what the programmer...

input/output with Java Web Start

I'm working on converting a very simple java desktop application to run in java web start and I'm having all kinds of trouble with the input/output files. Most specifically I can't seem to find any information on how to handle i/o in a web start application. I tried placing the input files in the same folder on my web server as the jar...

What's the difference between getPath(), getAbsolutePath(), and getCanonicalPath() in Java?

And when do I use each one? Thanks Edit: I did read the documentation but I was hoping to get a shorter / simpler explanation. ...

Java UI designer + framework similar to visual studio (drag and drop, floating controls)

I'm looking for a Java UI designer allowing me to drag and drop controls directly to the design surface in a floating mode (without the hassle of north, south etc that comes with SWT). Is there any such tool? Also, I'm only interested in tools offering a trial version. EDIT: I'm only interested in solutions allowing me to drag/drop item...

Returning A Value To a Swing Class from another Swing Class

Hi everyone. Some background on myself. Former AS/400 guy, recently downsized and unemployed. Taking this opportunity to learn java. I’m fairly new to Java and Netbeans. Since I’m unemployed and not in an organization with ‘experts’, I’m trying to find resources for help. I’m in ATLanta so I’ve joined www.ajug.org in hopes of networkin...