java tcp ip socket programming regardless of proxy type
How to write TCP IP socket programming in java. If the client is behind any type of proxy (may be http or socks or no proxy). Thanks Bapi ...
How to write TCP IP socket programming in java. If the client is behind any type of proxy (may be http or socks or no proxy). Thanks Bapi ...
I'm trying to get spring-security to work with a project where there is both a form login component needed (for website access) and a http-basic or http-digest component for web services. Now we started out with the namespace based configuration, e.g. a spring-security.xml file with stuff like: <http auto-config="true"> <intercept-u...
I am very new to the whole J2EE architecture. Could somebody help me out? I have a Swing client with Login, Password fields on machine A. Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); p.put(Conte...
Is it a bad idea to use the annotations from the javax.persistence package instead of using the org.hibernate.annotations annotations I know that using javax.peristence does introduce yet another dependency. But if I ignore that, what are the pros/cons? ...
I have a problem with my jboss configuration on eclipse ide : I had to change the Jboss configuration in jboss-service.xml because the default port used was already in use (1099 port). A server configuration change on eclipse wasn't taken into account : It seems to me that jndi port in server properties isn't taken into account on start ...
Hi, how to compare value in an array? I have array named list which contains 12 elements. I see if value in index 0 is equal or not equal to value in index 2. I have tried this code but it doesnt seems to work. if ((list.get(0)==list.get(2) && list.get(1)==list.get(3)) { System.out.println("equal") } ...
If I execute: System.out.println("Formatter: " + String.format("%1$tH:%1$tM:%1$tS %1$tz %1$tZ", now)); System.out.println("SimpleDF : " + new SimpleDateFormat("HH:mm:ss Z z").format(now)); I expect the result to be the same. If I check the automatically adjust for daylight savings time the values start to vary: without dst (as expec...
Today, I found myself coding something like this ... public class LocalEnums { public LocalEnums() { } public void foo() { enum LocalEnum { A,B,C }; // .... // class LocalClass { } } } and I was kind of surprised when the compiler reported an error on the local enum: The member enum Lo...
Are there any in-memory/caching solutions for java that allow for a form of Querying for specific attributes of objects in the Cache? I realize this is something that a full blown database would be used for, but I want to be able to have the speed/performance of a cache with the Querying ability of a database. ...
What are some of the best practices in designing a JMX MBean? Any examples of ones you feel are especially useful? ...
In Java 1.4, is there any better way of getting a Thread's ID than using Thread.getName()? I mean, getName() in unit tests returns something like "Thread-1", but in WebLogic 10 I get "[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'.xml". ...
Hi all, I want to know how to create a data validation field(list) in excel sheet through java code...Is there any method in jxl package that can create a data validation field.? ...
Duplicate: Where can I find a Java to C# converter? How should I convert Java code to C# code? How can I convert Java code to C#? All I really want is to convert JavaDocs from the Java source, though the entire source would be fine too. I am using Visual Studio 2005. ...
Hey, I wish to determine the 2D screen coordinates (x,y) of points in 3D space (x,y,z). The points I wish to project are real-world points represented by GPS coordinates and elevation above sea level. For example: Point (Lat:49.291882, Long:-123.131676, Height: 14m) The camera position and height can also be determined as a x,y,z poi...
What are the best practices in designing UI for hardware appliances? Are there any frameworks in Java that are particularly suited to this task? ...
I want to understand how the dynamic proxy stub implementation is actually done behind the scene. According to what I read, by the time a remote object is exported if no pre-generated stub class is found, the RMI runtime would generate a dynamic proxy to act as the stub. That stub is then bound to the RMI Registry and later accessible ...
Hi there. I want to make a Servlet filter that will read the contents of the Response after it's been processed and completed and return that information in XML or PDF or whatever. But I'm not sure how to get any information out of the HttpServletResponse object. How can I get at this information? ...
I have a POJO that I would like to expose as XML from a web service, preferably with JAX-B. The fields that need to be exposed in XML depend on what type of user is making the request. For instance, we have a role for HumanResources and Finance users. A User might be defined as: @XmlRootElement public class User { @XmlElement public ...
Hello, I am new using java and netbeans. I want to make a swing gui, and I already followed this step (http://www.netbeans.org/kb/60/java/quickstart-gui.html#top) but when I run this, nothing happens and I don't see anything. What should I fill in here? public void main (string args[]) { ??????????????? } ...
Is it possible to set up context help for Java API & language in NetBeans. For example something like pressing F1 on ServletContextListener (for API) or on word while (for language) in source code and obtain help on these words. (something like in Visual Studio for instance) I am using NetBeans 6.5. ...