I'm interested in a learning a java web development framework and I'm looking for some recommendations/suggestions on which one I should learn (and why).
Ideally, I'd like the framework to:
Be MVC based.
Have minimal if any configuration
Have an easy to use ORM
Have decent session management
Be easy to pickup
I'm fam...
I have couple of ANTLR rules that I don't know how to make them work
The first rule is:
STRING_LITERAL
: '"' ( EscapeSequence | ~('\\'|'"') )* '"'
;
The second rule is:
element
: name '=' math_formula ;
math_formula
: '"' expression '"';
The expression is a regular C like expression
Example for the sy...
hello
In order to be able to substitute a specific implementation, it is commonly known to write
List<AnyType> myList = new ArrayList<AnyType>();
instead of
ArrayList<AnyType> myList = new ArrayList<AnyType>();
This is easy to understand, this way you might change the implementation from ArrayList to LinkedList or any other kind o...
Hi all,
I have a Java project X has dependency (in pom file) on project Y.
I was modifying in Y and build X,Y with Maven tool then runing X (on JBoss) without problems.
When I added new class in Y then building with Maven (without problems), then running X, it throws java.lang.NoClassDefFoundError for the new class.
I think its a Mav...
I have a Java Tomcat web application built in IntelliJ that calls code in another module called "Stuff". I've attached the source of the relevant code to "Stuff" so I can step into it and hit breakpoints, but I cannot see variables or their values. Watches don't work either. All I get is "Debug info unavailable".
How do I see the deb...
Is there a way to sort a JTable programmatically?
I have my JTable's sort working (with setRowSorter) so that when the user presses any of the columns, the table gets sorted.
I know, SWingX JXTable would probably work, but I'd rather not go through the hassle because everything else is pretty much working now and I don't know how wel...
Is main() (or Main()) in C, C++, Java or C#, a user-defined function or a built-in function?
...
In Java, if int is enough for a field, and if I use long for some reason, would that cost me more memory? Does that vary on types?
...
Apart from using (byte[]) in streaming I don't really see byte and short used much. On the other hand I have seen long used where the actual value is |100| and byte would be more appropriate. Is this a consequence of the relative inexpensive nature of memory now or is this just minutia that developers needn't worry about?
...
Hi,
How can I add an library to a seam project?
Do I need to copy them manually somewhere or edit the build.xml to do it for me?
Or is there an automatic way provided by seam to add new libraries?
BR,
Cleber
...
Hi, is there a limit on how many queues I can have open within a single connection and single session? I can currently open up 128 queues and send messages to them. If I try to open up 129 I get the following error...
Thanks
Error:
com.ibm.msg.client.jms.DetailedResourceAllocationException: JMSWMQ2008: Failed to open MQ queue 'TestQ...
Why does Swing JComponent class implement the interface Serializable? The way I've implemented my views, they are stateless, all the state data is stored in a Presentation Model. So I don't need to serialize my views. I've used a @SuppressWarnings("serial") annotation to remove the warnings. Are there better ways to remove them?
...
I'd like to implement a software licensing scheme. I like the looks of the TrueLicense package in Java, but it's overkill, and I need to validate a license file not just in Java, but in C on both Windows and Linux.
Can anyone suggest an approach and/or libraries or tools to validate an encrypted file across Java and C, Linux and Wind...
Hello,
Is there a way in Java to use Unsigned numbers like in (My)SQL?
For example: I want to use an 8-bit variable (byte) with a range like: 0 -> 256; instead of -128 -> 127.
...
Hi guys,
I succesfully created a project using seam credentials for authentication, but right now some requirements has change (as usual) and i need authenticate the user automatic. See example bellow:
user call the page: http://server%3Aport/project/index.jsp?parameter=xyz. This page has to call a seam component and get the parameter ...
Using Spring 1.2.1 and oracle.jdbc.pool.OracleDataSource 10.2.0.3.0 I sometimes get a stack trace like below. I think it is caused by the connection pool being full. Does anyone know the cause for sure? Also do newer versions of spring or Oracle JDBC handle this better?
java.lang.NullPointerException
at org.springframework.jdbc.c...
Given a simple entity relationship:
@Entity
public class Single {
@OneToMany
public Set<Multiple> multiples;
}
How does Hibernate find out that the generic type of multiples is Multiple? This information is impossible to find with the standard Reflection API.
I'm looking through the source code, but don't really know where to st...
Given a simple POJO does it really make a difference or are there possible side effects in using either one of the following:
total = getPriorAmount() + getCurrentAmount();
OR
total = this.priorAmount + this.currentAmount;
When used within the POJO.
...
I am trying to implement a generic sort utility method for a List of objects of any class that implements MyInterface. Per Java API (http://java.sun.com/javase/6/docs/api/java/util/Collections.html), Collections.sort() method signature is:
public static <T> void sort(List<T> list, Comparator<? super T> c)
I am not sure if List with a ...
How can you refer to the index of an array in the foreach?
My code
String[] name = { "hello", "world" };
for ( int k : name[k] ) {
--- cut ---
}
I expecting that the foreach -loop will
1. set k = 0 in first iteration so that name[0] works correctly
2. set k = 1 in the next iteration...
I get the error message
foreach not a...