I want to show content to any user that is logged in and to hide if they are not logged in. I'm using jsp's and spring security.
Obviously a home grown solution is easily done. But what's the cleanest standard way of achieving this?
Spring security tags don't seem to have nice way that will allow for the addition of new roles in the ...
How do you enable debug logging for OpenJPA when running an application in WebLogic 11g? I tried the steps given by http://stackoverflow.com/questions/792741/logging-jpa-sql-with-weblogic-10-3, but no OpenJPA log statements appear in the server log. I have also poured over the WebLogic documentation regarding the configuration of loggi...
I'm accessing an internal database using Matlab's urlread command, everything was working fine until the service was moved to a secure server (i.e. with an https address rather than an http address). Now urlread no longer successfully retrieves results (It gives an error: "Error downloading URL. Your network connection may be down or you...
Hi every one,
I'm trying to configure seam/ehcache following the tutorial from jboss page:
http://docs.jboss.org/seam/2.1.2/reference/en-US/html/cache.html
I put the ehcache.1.2.3.jar in project.ear/lib and injected CacheProvider as especified, but the CacheProvider always return null. The documentation doesn't show any aditional conf...
Are there any good books on the subject worth reading and still up-to-date with current technologies?
I'm mostly interested in back-end architecture and things I should consider choosing clustering and database solution as I plan to use GWT for the front-end therefore won't be able to control a lot there.
I'm looking for a book which w...
Hi, I'm trying to create a Thread that keeps netsh windows command-line tool open so I can execute netsh commands without open it every single time.
The thing is, once I've created the Thread, just the first command call works... the subsequent calls seems to have no effect.
Here is my code:
public class NetshThread implements Runnabl...
Hi. I have a tr:table with the rowSelection property set to "single". It draws a extra column with a radio buttons inside. But I want to change the text displayed at that column's header. I don't find any property that allow me to accomplish this. I guess I should overwrite some properties file but I haven't found anything on this topic ...
Okay this is the problem
I have a Java application running on top of Apache Tomcat & I have this other application too with its own war file running on the same server.
Now I want to authenticate user once & pass that session to the other application.
We can say cross domain session sharing on same Apache Tomcat .. how should I go abo...
So in my current project I use the JAXB RI with the default Java parser from Sun's JRE (which I believe is Xerces) to unmarshal arbitrary XML.
First I use XJC to compile an XSD of the following form:
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
xmlns:xs="http://...
I have an old EJB (2.1) project that uses xdoclet (1.2.3) to generate the EJB interfaces. Unfortunately xdoclet makes it impossible to use generics in the method signatures.
Is there a substitute or other way to to allow generics in the parameters?
Here is the minimum type of generics use I'm looking for:
public Object ejbMethod(Coll...
Motivation
Recently I searched for a way to initialize a complex object without passing a lot of parameter to the constructor. I tried it with the builder pattern, but I don't like the fact, that I'm not able to check at compile time if I really set all needed values.
Traditional builder pattern
When I use the builder pattern to creat...
How should model class's equals and hashcode be implemented in Hibernate? What are the common pitfalls? Is the default implementation good enough for most cases? Is there any sense to use business keys?
It seems to me that it's pretty hard to get it right to work in every situation, when lazy fetching, id generation, proxy, etc are take...
I am using a search library which advises keeping search handle object open for this can benefit query cache. Over the time I have observed that the cache tends to get bloated (few hundred megs and keeps growing) and OOMs started to kick in. There is no way to enforce limits of this cache nor plan how much memory it can use. So I have in...
I'm rolling J2EE code that adheres to Servlet 2.5 and am wondering what the major differences are between 2.5 and 3. Pointers to official Sun docs and personal experiences most appreciated.
If I shouldn't be concerning myself with 3 for the time being, just say so. Thanks!
...
I was assigned to make an animated screensaver as a programming project for my Advanced Programming course. The objective is to have several moving components inside an undecorated, fullscreen frame, but I'm going step-by-step and doing it one component at a time.
Here's my source code so far:
http://pastebin.com/dc722188
Feel free to...
I am using Spring annotations in my code to do the DI. So lets say I have a class class1 that depends on another class class2, I define class1 as below:
@Component
public class class1 {
@Resource
private interface2 object2;
}
class2 is an implementation of interface2.
Now lets say I want to mock class2 and pass it to class1, I don...
Hi all,
I have been tearing my hair out all day trying to solve this...
I have an objective-c client running on the iPhone, connecting to a Java server. The iPhone is encrypting data using AES but I cannot decrypt it on the server. I am using a known passphrase and message (single string) and am generating the byte array on the iPhone...
Is there a solution available to subscribe for domain object changes for Hibernate or any other mainstream O/R mapping framework? For example if I have a table in a database called "Apple" I'd like to be able to say "notify me when any Apple object changed" or "notify me when field "colour" of any Apple object changed". Of course I'd exp...
Some modern network cards support Direct Memory Access for improved performance. How can I utilize this feature from Java?
Does the JVM provide this automatically, or do I need to do an allocateDirect on the ByteBuffers that I am using to talk to that NIC?
Does anyone have documentation that discusses this?
...
Hi.
With the regular statement (just statement) I can put java enums into the queries and it works just fine. With prepared statement I can't do this ?
...