I make static classes in servlet, these classes are controllers for web pages. Requests are redirected to controllers by controller urls that are in static HashMap that contains all controllers. Are there any posibilities that user/session realted stuff could get messsed up with other users sessions? I will of course save all session rel...
I have an application in C# that I'm trying to convert to java. The C# app has a few variables that are of type ushort. Is there an equivalent in java?
Thank you
...
Hi
I'm developping an application using Gwt and Gxt (Ext GWT).
There isn't any widget in Gxt to attach many files in a form before posting it.
I'd like something like this widget in extJS:
http://www.extjs.com/learn/Extension:UploadForm
Does someone know a solution to add such a widget in my gxt project ?
Thanks for yours answers.
...
I'm trying to call a method from a panel class, however it does not result in anything. Can panels communicate with each other? Or is there another reason why this isn't working?
Calling the method name() in the leftInput class.
ButtonPanel class.
import model.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
publi...
I am busy with a project that requires me to read from a database and display certain results on mobile(J2ME). For example: I must list all customers in the database (SELECT * FROM CUSTOMERS) and i must display that results on mobile(J2ME). So some how i need to connect the mobile to the database.
How do i go about doing this? I really ...
I have the number 654987. Its an ID in a database. I want to convert it to a string.
The regular Double.ToString(value) makes it into scientific form, 6.54987E5. Something I dont want.
Other formatting functions Ive found checks the current locale and adds appropriate thousand separators and such. Since its an ID, I cant accept any for...
Hello,
We have a project that uses JPA/Hibernate on the server side, the mapped entity classes are in their own Library-Project and use Annotations to be mapped to the database. I want to use these classes in an Android-Project - is there any way to ignore the annotations within Android, to use these classes as standard POJOs?
...
For larger JMS deployments what are your best practice suggestions for naming conventions?
Currently we're following the suggestions in the Sun Developer Network Blueprints. For example:
jms/<resource-name>[Queue|Topic]
I am concerned about scaling this as we get more and more queues and topics in the system. I'm particularly interes...
Hello experts!
I am trying to convert a HEX-sequence to a String encoded in either, ISO-8859-1, UTF-8 or UTF-16BE. That is, I have a String looking like: "0422043504410442" this represents the characters: "Test" in UTF-16BE.
The code I used to convert between the two formats was:
private static String hex2String(String hex, String enc...
I have two Jlist in the same class each with DnD drop enable.
The problem is whatever file I DnD from my desktop to the JLists either number of or number 2 will populate ( and appear ) in JList1. Jlist2 accepts the drag and drop but it is like the content is going to Jlist1 automatically.
Any idea on how to solve that ?
...
I have a JComboBox binded to an observable list (result of a jpa query) in a java desktop application. It gets all the values from that list and displays them correctly, but I'm not able to select any particular value from the dropdown: that is, when I click on the widget the list of options gets displayed correctly, when I click on an i...
Hi,
when my Map contains key with dot in their name I cannot access the corresponding value directly with the usual code:
${recordForm.map['records.key']}
Is there a way to escape the dot? Or do I have to resort to loop through all values and check against the key? (I know the iteration works).
Thanks!
...
I'm pretty new to Java, but I'm looking for Java code that can take multi-line SQL statements, say something like this from a flat file:
CREATE OR REPLACE TRIGGER REQ.TR_INPT_STAY_DETAI_SQ_BI
BEFORE INSERT ON REQ.INPT_STAY_DETAIL
FOR EACH ROW
BEGIN
SELECT REQ.SQ_INPT_DETAIL.nextval INTO :new.INPT_STAY_DETAIL_PID from DUAL;
END;
...
I looked up how to use multiple filters on here with a regular table and the answers all pointed to GlazedLists. However, the answers didn't specify how to use it. I was able to get one filter to work but do not know how to get more than one.
For one filter I used:
// nameE is a BasicEventList containing classes (name) which
// c...
I have an interface to describe when a class can create a "next" version of itself:
public interface Prototypeable<Type extends Prototypeable<Type>> {
public Type basePrototype(); // the zeroth raw instance of Type
public Type nextPrototype(); // the next instance of Type
}
to be used with
public class Prototyper {
public static <...
I have a small JSF app and would like to keep some state on the server, without using a DB. It will just be a small string for every user so I don't see the point in deploying an RDMS for that.
...
I have a JTable with two columns and both are JComboBox, for this purpose I implemented my own Model and overrode methods. One of the method which I overrode is:
public Class getColumnClass(int index) {
return JComboBox.class;
}
Also created my own ComboBoxEditor and ComboBoxRender classes, and set cellEditor and cellRenderer:
c...
Hi,
I can't decide which approach is better for creating objects with a large number of fields (10+) (all mandatory) the constructor approach of the getter/setter. Constructor at least you enforce that all the fields are set. Java Beans easier to see which variables are being set instead of a huge list.
The builder pattern DOES NOT seem ...
My query is on what is the best way to read / write to a linux Pipe in Java? I already am using the java.io.RandomAccessFile like
RandomAccessFile file = new RandomAccessFile("/dev/zap/16", "rw");
and then passing it to worker thread which reads it after every 2ms as
byte[] buffer = new byte[16];
file.read(buffer);
It does r...
Question
Is it possible to get the version of the Java Plugin being used by the web browser, either through Javascript, or within a Java applet being run by the plugin?
Background
I'd like to run a Java applet embedded within the browser if the user is using Java Plugin2, or run it as a JWS application otherwise, because I need to contr...