I have an application that using ldap acegi-security-1.0.2.jar . I able to authenticate the user with active directory. I wanted to add NTLM auto login feature for my application. May i know what extra acegi library do i need to do this? is there any example on acegi+nltm on this?
...
I have a Spring application that publishes some RESTful web services using Apache CXF (using jax-rs). I would like to secure access to those services using HTTP basic authentication. The username and password should be in a Spring configuration file. The main application already uses Spring Security and I would prefer not to mess with th...
This might seem simple but it's just stumbled me and my friends...
lets take the following piece of code-
in java
//........
int a=10;
a= a-- + a--;
System.out.print("a="+a);
//........
in c
//........
int a=10;
a= a-- + a--;
printf("a= %d",a);
//.......
where in the former case you get output as 19 in C you get it as 18.
the lo...
Is it possible to use a server certificate to sign a java web start app? What I want to know is if will it work. I have a trusted certificate for my server, and I would like to reuse the same certificate to sign an app.
Right now, I have this warning:
This jar contains entries whose signer certificate's ExtendedKeyUsage extension doesn...
I have a standalone application in which I have a Jtable. In my table, when I type the text, the height of the Textarea should increase dynamically with the text. How can I do this?
Can someone help me with an example how to do this?
Thanking You
Chaithanya
...
Today, I came across quite strange problem. I needed to calculate string length of a number, so I came up with this solution
// say the number is 1000
(int)(log(1000)/log(10)) + 1
This is based on mathematical formula
log10x = lognx/logn10 (explained here)
But I found out, that in C,
(int)(log(1000)/log(10)) + 1
is NOT equal to
...
Hi,
I'm using Maven's exec:java to run jline for one of my projects (current POM attached below). The project used to be a single component, so all dependencies were in the same POM as the exec:java plugin definition. This worked great and all the dependencies were picked up and put on the classpath when I ran 'mvn exec:java'. Howeve...
I have an SQL script file which contains 40-50 SQL statements. Is it possible to run this script file using JDBC?
...
Is there any free decent program to do code documentation for java?It's hard enough to get the coding project done and then need to spend time writing documentation as well.If you know, please tell me.
...
Hi all,
I'm currently working on getting a Java application (JRE 1.5+) to talk to a Windows 2008 OCSP Responder, and I'm getting a strange error on trying to read the Responder's signing cert.
I get the following exception on trying to perform an OCSP validation.
Caused by: java.security.cert.CertificateParsingException: java.io.IOExc...
Hi guys,
What is the best practice way to do unit testing with Spring? I assume the combination TestNG & jmockit with Spring 3 isn't bad, so that's what I'm doing right now, but if I'm off course selecting the tools for my fresh Spring project, please tell me right away. :-)
Anyways, I've created an entity that I want to test, but I'm n...
I have a java application which uses JPA.
Say I have an entity called Product with name and price attributes (all entities have an id attribute).
Naturally I can get a List<Product> fairly easily (from a query or another entity), but often I want a List<String> (list of product names) or List<Long> (list of product prices or list of pr...
Freemarker has two collection datatypes, lists and hashmaps
Is there a way to iterate over hashmap keys just as we do with lists?
so if i have a var with data lets say
user : {
name : "user"
email : "[email protected]"
homepage : "http://nosuchpage.org"
}
i would like t print all the user's properties with their value.
This...
I use this code snippet to obtain a file as an input stream. The file version.txt is packaged in my app's jar, in the upper-most folder.
InputStream resource = getClass().getClassLoader().getResourceAsStream("version.txt");
This works almost all of the time. But for one user, it's picking up another version.txt, that's not in my jar. ...
I draw many triangle polygons and store it in Linked List. My problem is that, when I store the drawing in a Notepad file, the data is unreadable (weird symbol). When I try to print it using println the output is like this java.awt.Polygon@1d6096.
How to store the coordinate of the polygon in Notepad?
...
java.util.List<Polygon> tri...
Hi
In the documentation of the HSQLDB is a command line statement to start a HSQLDB server (HSQLDB Doc). But there is this "file:mydb" property, so I assume its not in memory-only mode.
How do I run a memory-only HSQLDB server?
I runned the following but get no clue.
java -cp ../lib/hsqldb.jar org.hsqldb.Server -?
...
Hey everyone,
I have built a two-player tic tac toe game in Java, using sockets (no threads). I have it working, except for terminating the clients when the game is over. Basically, I have it set up so that once a game is over (the server recognizes a win or a draw), then the server will send a message to the two clients. If the clients...
Hi all.
I have recently been setting up SVN in eclipse using the subversive plugin (still a bit lost but that's another issue).
Been using this guide (http://soledadpenades.com/2008/12/10/add-svn-support-to-your-eclipse-installation/) and finally got it working!
Only problem now is, I cant seem to find the Package Explorer, which is the ...
lo.
first time posting on stack.
im trying too just do some past exam questions but its proving difficult so sorry if this sounds noobish.
i need too pass a 1d array that isnt defined in a method.
i need too create a testclass then make the arrays myself.
im just not sure about the syntax.
example
heres my company class
public clas...
Given the string "<table><tr><td>Hello World!</td></tr></table>", what is the (easiest) way to get a DOM Element representing it?
...