Hi,
I'm struggling with a little internationalization issue in one of my apps.
The story goes like this:
I have a datatable which displays records, and a selectOneMenu in order
to select a column of the dataTable to be filtered for. The selectOne is
fed with SelectItems which are filled according to the actual locale in the
backing be...
I using messaging in Flex-BlazeDS. When the AIR client starts it connects to a destination and a specific subtopic. During runtime, the user can use a combo box to subscribe to different sets of live data coming in, this combo box change event changes the subtopic by:
messagingConsumer.subtopic = subtopicComboBox.selectedLabel;
messag...
Hi, I'm trying to match the following using a regular expression in Java - I have some data separated by the two characters 'ZZ'. Each record starts with 'ZZ' and finishes with 'ZZ' - I want to match a record with no ending 'ZZ' for example, I want to match the trailing 'ZZanychars' below (Note: the *'s are not included in the string - ...
Hello!
I'm loading an animated gif into a JButton. Online the gif looks to move at a normal pace. But when I load it in java it looks like the animation is trying to run as quickly as possible! How can I atleast slow it down?
Here is my code:
public Icon getIcon(){
return new ImageIcon(getClass().getResource("images/working.gif"), ...
I have a Java program that runs on Linux and telnets into a remote server using org.apache.commons.net.telnet.TelnetClient and performs a few commands. The problem is that it hangs intermittently when it gets to an output display that asks the users to “press any key to continue…” The program hangs on this about 1 out of every 10 tims ...
If you have an enum that you are accessing via reflection how would you pass it's value into method.invoke call.
Would it be something like (shown as a static method for simplicity)
Class enumClazz = Class.forName("mypkg.MyEnum",true,MyClassLoader);
Class myReflectedClazz = Class.forName("mypkg.MyClass",true,MyClassLoader);
...
Here's some code:
Client client = new Client(Protocol.HTTP);
client.setConnectTimeout(1); //milliseconds
Response response = client.post(url, paramRepresentation);
System.out.println("timed out");
What I would expect to happen is that it prints "timed out" before the resource has time to process. Instead, nothing happens with the tim...
We're running jBoss 5.1, which in turn uses the Tomcat servlet container.
We've been seeing some cases where bad HTTP clients will open a socket, make an HTTP request, fail to read all data and fail to close the connection.
The outcome is that the tomcat threads block indefinitely trying to write to the output stream:
SocketOutputStre...
Can anyone guide me or give an example of how to insert components, or files of components, or their folder into JList. This has being an issue pending, please assist.
...
Is there a way for a servlet filter to get a list of all servlets and their mappings?
...
(I know what null is and what its is used for)
Question: OK, say we make a reference to an object in whatever language. The computer makes a little 32-bit (or other size, depending on computer's design) space in memory for that reference. That memory can be assigned to a value that represents an object's location in memory. But when I s...
We'd like to generate xml using xstream implemented with java. We'd then like to consume that xml in a .net application and have it deserialized into c# classes.
has anyone had success in doing this? is there a framework available on the C# side that will make it easier and more robust than something we'd have to roll-up?
...
I keep getting this error:
java.lang.NoClassDefFoundError: org/apache/lucene/index/memory/MemoryIndex
Is there any way i can go about making sure java/tomcat can find this class?
...
public class LoginTest {
public static void main(String[] args) {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("IRCBotPU");
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
Login lg = new Login();
lg.setPassword("password");
lg.setUserName("Rocky");
em.persist...
Is there a way to get name of the java app associated with a javaw.exe? Basically I need to write a tool, to check (daily) if a specific java app is running on our server (and if not the tool will email me).
I would like to do this in C#...but if there isn't a way I would be open to other suggestions.
I have read this question 265794 ...
Hi guys,
So my Java process communicates with a remote queue. What happens is at the end of every day, the sender channel on the receiving end is in a stopped state. Is there a way to start up that channel in Java, before accessing the remote queue?
...
I'd like to introduce Spring MVC to an application that has up till now used simple direct access to JSP files i.e www.example.com/login.jsp which contains the business logic and presentation details.
I'd like to strip out the business logic and keep only the presentation in the JSP. To do this, I've moved the jsp file from webapp/login...
I'm deploying an old app on a new box. When hitting the database for the first time I get
File input error: Cannot create PoolableConnectionFactory (Invalid handle)
I've set up my resource in context.xml, my dsn with unixODBC, and my resource-ref in web.xml. What else am I missing?
from content.xml -->
<Resource name="jdbc/MoleCo...
How come every object appears to be marked new, instead of just objects that are in the second snapshot but not in my baseline snapshot? Looking around online, I see some suggestions that I need to use hprof instead of jmap to make my memory dumps, but it appears that hprof generates dumps in exactly the same format.
This is JDK 1.6.0_...
VisualVM crashes when I try to profile our application with it, but if I could load the jmap memory dumps I've done from our application into VisualVM, I could probably get the answers I need without having to attach VisualVM to our app while it is running.
So, is there a way to do this?
...