java

How do I assocaite a tree node object in java with an image?

I have a Tree node. I want an image to be displayed beside the node name when the tree is viewed. How do I go about? ...

Spring Faces Error faces:flow-builder-services

Hi. I have this java web app running on spring framework with web flow. I tried integrating it with spring faces but I get this error in my config file org.xml.sax.SAXParseException: The prefix "flow" for element "flow:flow-executor" is not bound. Here's the stack trace org.xml.sax.SAXParseException: The prefix "flow" for element "flo...

how to run .java file or execute a java application in iphone simulator?

I have an application made in java.I have .jar and also the complete source of the project.I want to use it's classes in xcode means i want to use function in objective-c without converting them.Or is there a way to execute the whole app in iphone simulator or device.please tell me step by step.I have SDK 3.0 and xcode 3.1.4 ...

uploading and downloading a file in jsp

i want a code for uploading and downloading a file in jsp..urgently needed ...

java int comparation

How does Java know/evaluate the comparison of two int values; for example: int a=5; int b=10; How does it evaluates whether a > b or a == b or a < b Please give an elaborate explanation. ...

Can you set a background imaged to a PdfPTable when using iText

I am using iText to generate Pdf Reports for data in a database... The header of the pages of the pdfs is an image with some text on the image added dynamically, say for example date generated.. Anyone knows if we can set background images to Tables of type PdfPTable in itext.. Thanks ...

Installers for windows

Hi! I am trying to find a native installer for windows to install an enterprise java application. The most important feature I want is the ability to upgrade existing installations in an rpm kind of way (distinguish between configuration files and files to be upgraded/replaced). I am currently using IZPack which as far as I can see lack...

Getting the last inserted record id of a database table in java?

I have a database table A which stores records, A has a primary key (recordid) with auto_increment, each time i insert a record in to A, i get the inserted recordid and store it in another masterTable. I am using a select statement as soon i do an insert into A to get the recordid like this: select recordid from A order by recordid ...

What is correct Java naming convention for id?

If I have user id variable, what is correct java naming convention for it? userId or userID ...

Can anybody tell me why is so?

class D { public static void main(String args[]) { Integer b2=128; Integer b3=128; System.out.println(b2==b3); } } output ::::false class D { public static void main(String args[]) { Integer b2=127; ...

how to know which port my Application is using

hi how can i know on which port my application is running thanks in advance ...

java and excel question

is it possible to create a java application that will import excel files . execute excel macros and give the output in java gui. please give any advice u can on creating such an application. i will start creating the application after your input ...

How to force a Java thread to close a thread-local database connection

When Using a thread-local database connection, closure of the connection is required when the thread exists. This I can only do if I can override the run() method of the calling thread. Even that is not a great solution, since at time of exit, I don't know if a connection has ever been opened by that thread. The problem is in fact more...

after submiting form data it show's the following problem

An Exception has occurred! com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 1. ...

Where to set JDK to be used for SunOne server?

Where to set the JDK to be used by the SunOne server on Solaris? Is it all configured via an environment variable like JDK_HOME or JAVA_HOME, or is there a config file for the SunOne server somewhere where the path to the JDK is being set? ...

Java Bean Validation (JSR303) constraints involving relationship between several bean properties.

Say I have the following simple java bean: class MyBean { private Date startDate; private Date endDate; //setter, getters etc... } Is there a mechanism in JSR 303 to create a custom validator that validates the constraint that startDate must be before endDate? It seems to me to be a common use case, yet I cannot find any exa...

Doubt in jxl API?

While practicing the jxl API, i cant extract details from certain Excel sheet its throwing the following exception Unable to recognize OLE stream at jxl.read.biff.CompoundFile.(CompoundFile.java:116) at jxl.read.biff.File.(File.java:127) at jxl.Workbook.getWorkbook(Workbook.java:221) at jxl.Workbook.getWorkbook(Workbook...

Best option for Session management in Java

Best way managing session in Java. I heard that cookies are not reliable option for this as they gets stored into browser and can be accessed later on? Is this correct. If possible please come up with the answers with the coding example. Which is the best among URL Rewriting: Server will add an additional parameter at the end of URL link...

Java/Jsp WEB-INF/classes cant import

Hi, Its been a while since I had to do some Java/Jsp... I have a java class in WEB-INF/classes/MyClass.java The build in Netbeans is successful and I can see MyClass.class in the classes folder. In my jsp page, I've got <%@ page import="MyClass" %> Tomcat says that the import cannot be resolved... I tried to put MyClass in a package...

Why is my Bundle inside android.os.Message being reset ?

In an Activity, I have some snippet of code that fires off a Message: Message m = _handler.obtainMessage( UPDATE_PROGRESS ); Bundle bundle = new Bundle(); bundle.putInt( BUNDLE_KEY, 50 ); m.setData( bundle ); Log.d( LOG_TAG, "value " + bundle.getInt( BUNDLE_KEY, 0 ) ); // prints 50 Log.d( ...