Data type used in action forms
Hi can somebody explain that if i declare variables of other types (except string) in the form beans what problems I might face ? ...
Hi can somebody explain that if i declare variables of other types (except string) in the form beans what problems I might face ? ...
Hi all, I have implemented a RMI Server and now I wanted to test if the method to start and stop this server are correcly implemented, using a JUnit test. Here is the (simplified) code of my RMI server: public void startServer() { try { ... registry = LocateRegistry.createRegistry(serverPort); registry.rebi...
I have a DOM Document created from scratch and I need to serialize it to an output stream. I am using DOM level 3 serialization API, like in the following example: OutputStream out; Document doc; DOMImplementationLS domImplementation = (DOMImplementationLS) DocumentBuilderFactory.newInstance().newDocumentBuilder().getDOMImplement...
Hi all, When I try to access a webservice hosted in Tomcat from C# code, I get error message like this. There was an error in serializing body of message searchRepositoriesRequest: ' Unable to generate a temporary class (result=1). error CS0266: Cannot implicitly convert type 'object' to 'object[]'. An explicit conversion exists (are y...
Hi According to the docs, Displaytag can be configured to put a paginator before or after the generated table element via the "paging.banner.placement" property. However, I would like to place the paginator in it's own row in the table footer. Does anyone have an idea how to do this within the displaytag framework? The only solutio...
I have a project which works fine. bookstore example I didn't understand where it initialize JSP's variable? There is no beans. All we have is Java class. JSP calls java class's variable but how? I searched into all the configuration files but nothing found. public class Bookstore { private final Map<String, Item> items = new Tr...
We are doing FTP connection through our applicaion which is a JAVA aplication. We have set timeout for connection using Socket.connect(Adreess,timeout) method before calling FTPClient.connect() method. During retriving files from the FTP site under same connection we havent set any timeout. Is it mandatory to call method FTPClient.setSo...
We have a java application running as a windows service. A particular functionality needs to execute a binary but with a different user then which started the application. Is there any way by which we can invoke an exe with 'Run as a different user' style. I checked API of ProcessBuilder but didn't found anything related to user. Is th...
Hi, clientside I have some scripts that send to the server some strings... one of which comes from a Javascript Date object. Now, it has it own formatting and I was just wandering if is there a class that does the right conversion, as I am experiencing problems with SimpleDateFormatter... ...
Let's say I have a class Foo with some primitive instance variables. I initialize these with properties in XML files. Now every Foo also has a Bar as a variable, which in turn has its own properties. Since these are tied to the enclosing object, it would make sense to keep them in the same file. How should I format the XML so that it can...
I would like to extract items from this sample html, more specificly, i would like to isolate the following ones: algp1, PRODUCTION 50733 GEN_APPL KANTOOR <table width="95%" border="1"> <tr><td colspan=3><a name="algp1"></a><img src="menu/db2inst.jpg"> <font color="#FF0000" size="+1">algp1</font> (PRODUCTION, 50733)</td></tr> <tr><...
We have a J2ME application that needs to read hex numbers. The application is already too big for some phones so We try not to include any other codec or write our own function to do this. All the numbers are 64-bit signed integers in hex, when we use Long.ParseLong(hex, 16), it handles positive numbers correctly but it throws exception...
Is it possible to test for multiple exceptions in a single JUnit unit test? I know for a single exception one can use, for example @Test(expected=IllegalStateException.class) Now, if I want to test for another exception (say, NullPointerException), can this be done in the same annotation, a different annotation or do I need to wr...
I'm using Oracle's JDBC thin driver (10.2.0.3) for connecting to an Oracle 10g database. I'd like to get information about the database columns, so I use ResultSetMetaData. The most important information I need is the type of the column and the length, so I use getColumnType, getPrecision, and getScale methods. It works for a simple que...
Hi all, Well I am a junior java programmer, in the last week I've been facing the following problem: I've got an image and a panel. Both image and panel are inside a ScrollPane, and they both need to move in the same time. When I try moving them together I get a flickering effect. Moving each of them alone though, works fine. I've read ...
Hello everyone, How can I create a manifest file for a group of .jar file I' ve already created. I used eclipse to create my .jar file, is there any better way of creating a .jar file that has a manifest? Thanks ...
I have an environment where 2 load-balanced clustered tomcats pointing to same application. When they run under sticky session and not shared session, they works fine. Now I am implementing failover for tomcat. ie If one one fails other handles the sessions that handled by the failed one. And I am trying in-memory session replication. ...
Hey guys, I am working on a Natural Language parser which examines a sentence in english and extracts some information like name, date etc. for example: "Lets meet next tuesday at 5 PM at the beach." So the output will be something like : "Lets meet 15/09/2009 at 1700 hr at the beach" So basically, what i want to know is that is ther...
Only JSF 1.1_01+ and 1.2 sources seems to be available. Links are dead for 1.1 and 1.0 sources : javaserverfaces.dev.java ...
In one of codes I am using Jetty. I am using the Jetty jar and imports the Classes from my Java code. Jetty's default log level is INFO if not configured specifically. We can enable DEBUG mode by code. The logger seems to be a log4j one. org.mortbay.log.Logger jettyLogger = org.mortbay.log.Log.getLog(); jettyLogger.setDebugEnabled(true...