run php from java
Is there a way to run php server**(remote)** scripts from a java program (with secured/encrypted connection). ...
Is there a way to run php server**(remote)** scripts from a java program (with secured/encrypted connection). ...
With a code like this: <c:forEach items="${customers}" var="customer"> ${customer.name} </c:forEach> IntelliJ Idea is able to infer that the type of the "customer" variable in the ForEach loop is of the class "Customer" (given that Customers is something like List<Customer>). If I refactor the java customer class and change getNam...
Still having issues with this problem. Please help if you can. So I am trying to fix a piece of code using the Geocortex IMF framework. I get an error on line 40 which is basically pulling a null exception. It is a mix of java and html. For some reason I can't seem to find out why the error is pulling up a null. Even if I load the v...
We have many Spring web applications to make on a WebLogic server and are curious about when WARs should go in an EAR and when they should just exist as WARs. Occassionally, the WARs will need to access common logic JARs, but I don't see why these would need to go into an EAR when they could just be packaged into the WARs. From what I u...
I have a simple JMS application deployed on OC4J under AIX server, in my application I'm listening to some queues and sending to other queues on a Websphere MQ deployed under AS400 server. The problem is that my connections to these queues are terminated/closed when it stays idle for some time with the error MQJMS1016 (this is not the p...
I had to take a surveymonkey survey today, and the format was as follows: a question was asked, then after hitting the next button, the answer was displayed as "Answer: _" along with an explanation. For kicks, I'd like to make a program that could take this survey, answering any letter, then going to the next page and reading the answer,...
I'm using HttpClient 3.1 to talk to a remote server through a proxy via HTTPS and client certificate authentication. This has been working just fine for a couple of weeks now, until I started experiencing SSLHandshakeExceptions recently. I assume the root cause lies with the remote server (since I haven't changed a damn thing), but I n...
I've been debugging this problem for the last couple of hours with no success and figured I'd throw it out to SO and see where that goes. I'm developing a Java program that persists data into a MySql database using Hibernate and the DAO/DTO pattern. In my database, I have a memberprofile table with a firstLoginDate column. In the databa...
What is the best practice for retrieving an object from a collection within a domain object with a specified property? For example, we have a car insurance application which has two classes: a Person with a list of Cars. If I always needed to retrieve a Car from a Person with the specified VIN, what is the best way to implement the met...
I am working on Java API which interacts with OpenOffice(swriter) through UNO. For TextTable, I am having hard time setting TableColumn's "OptimalWidth" property. I have tried the following code and it seems that getColumns() method cannot take me to TableColumn's property and let you only insert and remove columns. XTableColumns xCol...
I have an old J2EE application (J2EE 1.3), which packages into an EAR, and in the EAR, there are WARs and EJB JARs. Now one of the EJB JARs needs to refer to some 3rd party library JARs, so what's the best place to package those JARs and how? ...
I'm trying to compile a webservice through NetBeans 6.7 using Glassfish v3 as the host is there anyway to fix this issue: 'Unexpected JAXRPC endpoint, this version is not supported 1.1' ...
I am able to debug my EJB 3.0 app on my local JBoss (4.2.2 GA) in all cases, except when I put a break point in the actual bean. That just crashes the JBoss' JVM(1.5.14). Any ideas? ...
Hi guys, I'm trying to get a regexp to solve the next problem: I have some strings with the next format "somename 1 of 20 and something else" I want to retrieve the "1" from the string I'm trying with Pattern pat = Pattern.compile("(?<!of\\s)(\\d+)\\s", Pattern.CASE_INSENSITIVE); Matcher matcher = pat.matcher(tmp); But doesn't wor...
I have a function which returns a one-sided intersection of values between two input maps: Map<Key, Value> mergeMaps(Map aKeys<CompositeKey, Key>, Map <CompositeKey, Value> aValues) { Map<Key, Value> myResult = Maps.newHashMap(); for (CompositeKey myKey : aKeys.keySet()) { if (aValues.containsKey(myKey)) { ...
I'm trying to create a simple custom validator for my project, and I can't seem to find a way of getting seam to validate things conditionally. Here's what I've got: A helper/backing bean (that is NOT an entity) @RequiredIfSelected public class AdSiteHelper { private Date start; private Date end; private boolean selected; /* g...
Anyone have or know of a java implementation of an openid relying party(consumer) for gwt/gae? openid4java and joid bring in too much baggage for my needs. ...
Sun's "Code Conventions for the Java Programming Language" was last updated April 1999. Ten years later a lot has changed in the language, as well as general usage patterns. Are there more up to date, widely adopted standards? Most guidelines omit specifying file encoding and line endings. Sun recommends mixed tabs and spaces. The E...
For more info, see my other question, here. So anyway, I'm using BigDecimals to represent currency in my application (it deducts a markdown percentage and adds sales tax), but it seems that If I use a BigDecimal for the price, everything needs to be BigDecimals. Is it OK to use a BigDecimal for the markdown percentage field (instead of a...
I'm looking at integrating an ESB into an existing Java/Maven web based product. Specifically, I'm looking at ServiceMix and Mule. The product will connect to several different services, including email, Quartz, RESTful webservices over HTTP, SMS and IM. I've only quickly glanced at the documentation and the two options seem to be pretty...