Hi,
I have an Enum like this
package com.example;
public enum CoverageEnum {
COUNTRY,
REGIONAL,
COUNTY
}
I would like to iterate over these constants in JSP without using scriptlet code. I know I can do it with scriptlet code like this:
<c:forEach var="type" items="<%= com.example.CoverageEnum.values() %>">
${type}...
I have this code:
@PersistenceContext(name="persistence/monkey", unitName="deltaflow-pu")
...
@Stateless
public class GahBean implements GahRemote {
But when I use this:
try{
InitialContext ic = new InitialContext();
System.out.println("Pissing me off * " + ic.lookup("java:comp/env/persistent/monkey"));
Iterator e = ic.getEnvironm...
Two main ways to deploy a J2EE/Java Web app (in a very simplistic sense):
Deploy assembled artifacts to production box
Here, we create the .war (or whatever) elsewhere, configure it for production (possibly creating numerous artifacts for numerous boxes) and place the resulting artifacts on the production servers.
Pros: No dev tools ...
I am having troubles migrating from OC4J 10.1.2.3 to 10.1.3.1.4. The problem is for applications that have multiple EJBs (all are 2.1, no EJB 3.0). Jdeveloper will take the default ejb-jar.xml (the one required for Jdeveloper to run it on its stand-alone OC4J instance) and package it into each EJB JAR module NO MATTER what. This results...
If I do not specify the following in my web.xml file:
<session-config>
<session-timeout>600</session-timeout>
</session-config>
What will be my default session timeout? (I am running Tomcat 6.0)
...
I've looked at the java documentation and scoured the net for information on java's support for international characters with specific fonts (such as Monospace), but haven't been able to get a clear concrete answer.
There has been a change between java 1.4 and java 1.5/1.6. For example, in java 1.4 if you set the font on a JTextArea to ...
This must be a classic .NET question for anyone migrating from Java.
.NET does not seem to have a direct equivalent to java.io.StreamTokenizer, however the JLCA provides a SupportClass that attempts to implement it. I believe the JLCA also provides a Tokenizer SupportClass that takes a String as the source, which I thought a StreamTo...
I am sequentially processing a large file and I'd like to keep a large chunk of it in memory, 16gb ram available on a 64 bit system.
A quick and dirty way is to do this, is simply wrap the input stream into a buffered input stream, unfortunately, this only gives me a 2gb buffer. I'd like to have more of it in memory, what alternatives d...
I'm trying to write an automated test of an application that basically translates a custom message format into an XML message and sends it out the other end. I've got a good set of input/output message pairs so all I need to do is send the input messages in and listen for the XML message to come out the other end.
When it comes time to...
How do I locate resources on the classpath in java?
Specifically stuff that ends in .hbm.xml.
My goal is to get a List of all resources on the classpath that end with ".hbm.xml".
...
I have the following code that shows either a bug or a misunderstanding on my part.
I sent the same list, but modified over an ObjectOutputStream. Once as [0] and other as [1]. But when I read it, I get [0] twice. I think this is caused by the fact that I am sending over the same object and ObjectOutputStream must be caching them som...
Sometimes when using eclipse it loses references to the JRE.
i.e. It cannot find classes like Object or Arraylist.
Some projects report a problem while others don't and they both use the same JRE.
I have found that if you switch the installed JRE to another and then back again to the one you want to use, it will then work again
Is th...
Hi guys,
I have a method lets say:
private static String drawCellValue(int maxCellLength, String cellValue, String align) { }
and as you can notice, I have a parameter called align. Inside this method I'm going to have some if condition on whether the value is a 'left' or 'right'.. setting the parameter as String, obviously I can pass...
Is there a way to call an EJB that is served through WebSphere (iiop://host:port/ejbName) from a vanilla JRE (like Sun). A lot of people have been telling me that this type of architecture relies in a homogenous environment. Thoughts?
...
What are some methods of utilising Eclipse for Dependency Management?
...
Is there a way, given a war file, to deploy on a tomcat server. I want to do this without having to use the web interface.
...
We are currently researching ways of enhancing image quality prior to submission to OCR. The OCR engine we are currently utilizing is the Scansoft API from Nuance (v15). We were researching the Lead Tools but have since decided to look elsewhere. The licensing costs associated with Lead Tools is just too great. To start with we are l...
I'm working on an application that consists of an overall Quartz-based scheduler and "CycledJob" run using CronTriggers. The purpose of the application is to process inputs from different email inboxes based on the source country.
Based on the country that it comes in from (i.e. US, UK, FR, etc.) the application triggers one job thread...
I've been a C++ programmer for quite a while but I'm new to Java and new to Eclipse. I want to use the touch graph "Graph Layout" code to visualize some data I'm working with.
This code is organized like this:
./com
./com/touchgraph
./com/touchgraph/graphlayout
./com/touchgraph/graphlayout/Edge.java
./com/touchgraph/graphlayout/GLPane...
An existing Java site is designed to run under "/" on tomcat and there are many specific references to fixed absolute paths like "/dir/dir/page".
Want to migrate this to Java EE packaging, where the site will need to run under a context-root e.g. "/dir/dir/page" becomes "/my-context-root/dir/dir/page"
Now, the context-root can be easil...