java

Is it possible to reuse the pre-defined controllers in spring annotation configured mvc projects?

Is it possible to reuse the predefined controllers, like the SimpleFormController, with annotation configured spring mvc projects? I downloaded a project that looks like what I want; however, the writer did not use the annotations that are predefined in Spring. The controller of the downloaded project: package net.sourceforge.sannotat...

How to retreive row in DB Table just added now in Java

Table id int(11) No auto_increment Change Drop Primary Index Unique Fulltext email varchar(45) latin1_swedish_ci No Change Drop Primary Index Unique Fulltext billpayment tinyint(1) No Change Drop Primary Index Unique Fulltext dispatch tin...

SMTP Settings Not working for Hotmail

Username : [email protected] Password : yyyyyyyy Pop3: pop3.live.com Port: 995 SSL : TRUE sMTP : smtp.live.com Port : 587 SSL : TRUE (Pott : 25 also not working) These are the details i gave: POP3 settings accepted and SMTP settings throw Exception: "javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?" I g...

What acts in the role of the 'main method' in a servlet?

Hi Servlet is also java program but there is no main method in servlet.Who will take role of main method on servet. ...

What is jar signing in java?

what is jar signing? can we customize it? i mean having our own signature. ...

Does Java have the '@' character to escape string quotes?

My string has double quotes in it, in C# I would do: string blah = @"this is my ""text"; how would I do that in Java? ...

Parsing Objects from String in Java

I am trying to write a general method to parse objects from strings. To be clear, I have the following not-so-elegant implementation: public static Object parseObjectFromString(String s, Class class) throws Exception { String className = class.getSimpleName(); if(className.equals("Integer")) { return Integer.parseInt(s); } e...

Using HtmlUnit, I have a HtmlTableRow, how can I get all its content as a string value?

I am using HtmlUnit. I have an object of HtmlTableRow type, and I want to dump all of the content to a variable, how can I do this? i.e. just want to get the HTML like: <tr><td>....</td></tr> ...

how can I add movable images to my GUI ?

I want to add an image which can move like when you sign in,you will see an image of yahoo messenger that moves suddenly. thanks ** I also work with NetBeans** ...

Generating all IP addresses in the IPv4 Range

What would be a efficient way to generate all possible IP v4 addresses? other than iterating all bytes in a one giant nested for loop. ...

How to make a stubless Web Service Client in Java?

We are using Axis2 in our enterprise currently. Our project involves making call to multiple webservices for fault diagnostics. The problem is that very frequently we have changes in WSDLs (which are non-life threatening as in new data-types and services just get added, very rarely is something dropped) due to which we have to upgrade ou...

Why is JavaScript called JavaScript, if it has nothing to do with Java?

The title pretty much explains it. If JavaScript is not derived from Java, why does it have "Java" in the name? ...

Cygwin/Xming : Running Java application with drag and drop support in x-server

I have a Java application using jTree with 'drag and drop' support. When I run it on a SuSE box (Server details below ) and redirect the GUI interface using xming x-server (version details below) to a windows box , the drag and drop functionality in jTree stops working. After analyzing a bit I found that X-server is able to recognize th...

JAVA_HOME variable under OSX... what is it exactly?

I've been trying to build evaldictator on OSX. Unfortunately I have little to no idea of what ant or scons actually do. My main question is when I do something like export JAVA_HOME='/lab/speech/java/jdk1.5.0_06' what am I doing. Thanks in advance ...

creating inner classes with spring

What is the best aproach to create a non-static inner class in Spring? class A { public class B {} B b; public void setB(B b) {this.b = b;} } this seems to work, but i want to avoid the need for a constructor argument: <bean id="a" class="A"> <property name="b"> <bean id="b" class="A$B"> <constructor-arg ref="a"/> ...

DocumentBuilder.parse(InputStream) returns null

Hi, I am fixing a bug on an existing code concerning DocumentBuilder.parse. I have the below code: String theOutput; theOutput = response.encodeURL(prefix + "/include/sampleForConversion.jsp?" + request.getQueryString(); StreamSource xmlSource = new StreamSource(new URL(theOutput).openStream(), "http://sampleApps.net/static/da...

how to password protect xls file using java code ?

Please can anybody help me out for this...Thanks in advance ...

Can i customize PMD of my eclipse?

We know that PMD is integrated with eclipse. And i want to customize it. say suppose i want all variables to start with small letter or say i want all method name to be more than 8 characters or so on. is it possible to do that? And does anyone know what PMD stands for? ...

Using Hibernate to 'order by' a column which having a expression(sum, max, ...)?

select CONTRACT_ID, sum(PO_SPEND) from V_CONTRACT_ANALYSIS_202 group by CONTRACT_ID order by sum(PO_SPEND) desc ...

Seam application Architecture

I need to implement quite big system in Seam. I'm considering the way of designing the architecture. If it's good to use page controllers or application controllers or front controller or every each of them. If it's helpful to use backend bean or maybe there's no need to do that. If you have any suggestion or link to helpful article I wi...