Using SSL in tomcat – Enabling https
Using SSL in tomcat – Enabling https
Using keytool utility of JDK
Creating self signed ssl key:
On Windows:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
On Unix:
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSAIf you have set the environment variable you can skip %JAVA_HOME%\bin\
When you run this command the keytool p [...]
Creating Web Service and a test clien...
Creating a web service in eclipse.
Creating a simple Hello World webservice using eclipse indigo, jdk7, tomcat 7 and axis.
In eclipse -> New -> Dynamic Project
Enter project name: HelloServer
Target runtime : Tomcat 7
Dynamic Web Module version: <=2.5
Click Finish.
Create class HelloServer.java
package org.np.message;
public class [...]
Creating a self-signed certificate
How to create a self-signed certificate?
Creating CER file:
Use makecert.exe with the “-pe” option to create and store the certificate with an exportable private key:
Located in C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin
makecert -r -pe -n “CN=np.com” -b 01/01/2012 -e 01/01/2014 -eku 1.3.6.1.5.5.7.3.3 -ss new.ce [...]
Using https – CertificateExcept...
When you are using java code to call https and you get this error:
CertificateException: No subject alternative names matching IP
Use below code to by pass verification.
if using eclipse for test (import rt.jar from jre lib)
try{
System.setProperty("javax.net.ssl.trustStore", "C:\\Users\\nileshp2\mykey.jks");
final String TEST_URL="http [...]
Mirth Connect – comprehensive i...
Mirth is an open source clinical data repository that can organize and aggregate clinical data across multiple sources, and deliver it to one or more destinations based on defined routing information.
So does it mean:
It is the tool for transformation of data, it reduces the code level implementation of connectivity between source and destina [...]
Creating dll or exe for c sharp code
Go to the below path as the csc.exe is located there, and when it is not there in enviornment path. c:\Windows\Microsoft.NET\Framework64\v3.5 > To create dll for your application, use below command.
csc /target:library /out:d:\dll\MyLibrary.dll d:\code\*.cs OR csc /target:library /out:d:\dll\MyLibrary.dll d:\code\File1.cs d:\code\File [...]
Marquee effect using jQuery
marqueeDemo.html
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready(function(){
caller();
});
function caller()
{
$(".toBeAnimated").animate({
left: "+=1000px",
}, 9000, function(){
$(".toBeAnimated").animate [...]
Database Connectivety Matlab – ...
Create a addData.m file with following content
function addData(adminName,adminPwd)
conn = database('nhkbsDsn','','');
%checks the connection
a = isconnection(conn);
if a==1
exdata = {adminName,adminPwd};
coladminNames = {'AdminName','AdminPwd'};
insert(conn, 'TLogin', coladminNames, exdata);
commit(conn);
close(conn);
uiwait(msgbox('A [...]
Database connectivity in Matlab ̵...
Create a checkData.m file with following content
function status = checkData( adminName, adminPwd)
conn=database('databaseDsn','','');
a = isconnection(conn);
checkTPersonal=0;
if a==1
curs=exec(conn, ['select * from TLogin where user=''',adminName,''' and pass=''',adminPwd,'''']);
curs=fetch(curs,1);
norows=rows(curs)
if norows==1 [...]
The Three Exceptions
a. checked exception:
These are exceptional conditions that a well-written application should anticipate and recover from. Eg: You ask user for a file name to read and he provides non existent file name. In this case FileNotFoundException is thrown by the FileReader class. A well-written program will catch this exception and notify the user. [...]