Tags » Java 2

Java for Web Scrapping !!

Java is mainly famous for its awesomeness in Enterprise software and multi-threaded applications. But when you decide to use “java-for-everything”, an efficient implementation can always be done. 458 more words

Java

How to calculate MD5 hash in Java?

MD5 is a cryptographic hash function that takes in arbirtary data and produces a 128-bit hash from it. This hash can be used to verify the integrity of data. 386 more words

Java

CS106A Assignment 3.2

Code for random circles part of Assignment 3:
I wanted to remove the outlines but I’ve forgotten how to do that and didn’t want to go through the hassle of looking it up. 141 more words

Coding

Important Maven Tips

Printing the extra logs while running a maven goal.


-X clean install

Java

Sample Jmeter - HAPI integration


package org.apache.jmeter.protocol.java.test;

import java.io.IOException;
import java.io.Serializable;
import java.io.StringReader;
import java.util.Iterator;

import org.apache.jmeter.config.Arguments;
import org.apache.jmeter.protocol.java.sampler.AbstractJavaSamplerClient;
import org.apache.jmeter.protocol.java.sampler.JavaSamplerContext;
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.log.Logger;

import ca.uhn.hl7v2.DefaultHapiContext;
import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.HapiContext;
import ca.uhn.hl7v2.app.Connection;
import ca.uhn.hl7v2.hoh.sockets.CustomCertificateTlsSocketFactory;
import ca.uhn.hl7v2.hoh.util.HapiSocketTlsFactoryWrapper;
import ca.uhn.hl7v2.llp.LLPException;
import ca.uhn.hl7v2.llp.MinLowerLayerProtocol;
import ca.uhn.hl7v2.model.Message;
import ca.uhn.hl7v2.util.Hl7InputStreamMessageIterator;

public class SendMLLPTest extends AbstractJavaSamplerClient implements Serializable {

	private static final Logger LOG = LoggingManager.getLoggerForClass();
	
	private static final long serialVersionUID = 1L;
	
    /** The label to store in the sample result. 1,548 more words
SOA

Struts 2 ActionError & ActionMessage

1. ActionError – is used to send error feedback message to user –  Syntax: <s:actionerror/>.

<s:if test="hasActionErrors()">
   <div class="errors">
      <s:actionerror/>
   </div>
</s:if>

2. ActionMessage… 395 more words