My Louisville Marathon
Well 2nd marathon in 2 weeks and i improved my time by 15 min :)
Check out the pics
http://picasaweb.google.com/sporanki
Welcome to my blog I am trying to share my experiences which I faced in my professional career as a Java/J2EE Consultant, hope it’s helpful. Please do send me you feed back if you find any discrepancies.
Well 2nd marathon in 2 weeks and i improved my time by 15 min :)
Check out the pics
http://picasaweb.google.com/sporanki
Posted by
Surendra
at
11:15 AM
0
comments
I can't believe it my self i just completed a Marathon hehehee........ 13.1 Miles baby.
Yesterday I ran the Nashville Country Music Half Marathon in about 2:50, I know it’s not a great but I was happy to complete it, Hope fully will be able to improve my timing in couple of weeks in the Louisville Half Marathon so stay glued........
I thank my teammates with whom I trained Sree, shyam and Chandu. I am grateful to my wife Rajani for supporting me, thanks to Suman and Priyusha for driving from bowling green and cheering for me.
Here are the Pics
http://picasaweb.google.com/sporanki
Posted by
Surendra
at
3:18 PM
0
comments
An Applet is a client side components so in order to have access to the resources on the server side components it needs to be signed.
I had this issue in which i had to access pdf files on the server and print them so
a signed applet was required in order to allow my printer applet to request permission from the user to perform activities normally restricted by the Java VM’s security sandbox.
here is an easy way to create a signed applet using a batch file
CLS
@ECHO ON
ECHO This is the Batch file for creating Signed Applet Jar.
// setting the path so that when compiling and creating jar it uses the right jvm //
set PATH=%PATH%;C:\j2sdk1.4.2_12\bin
// here u mention all the classes you want to jar and other other external classes which you want to use in ur signed jar here i am using jpedal to create pdf so i am using two folders org and com. The -cvf option to the jar command creates a new archive (c), using verbose mode (v), and specifies the archive file name (f). //
jar cvf SignedApplet.jar TestApplet.class TestException.class org com
// Generating Keys and storing them in the keystore with a password test1 and distinguished name cn = test . If we want to make the key valid more than 180 days we need mention the number of day with -validity noofdays. Here i am using the validity for a year or 365 days. //
keytool -genkey -alias signFiles -keystore teststore -keypass test1 -dname "cn=test" -storepass test1 -validity 365
// Creating a signed jar using the keystore and password//
jarsigner -keystore teststore -storepass test1 -keypass test1 -signedjar SSignedApplet.jar SignedApplet.jar signFiles
// export the key store and password into a certificate file //
// This certificate file needs to be installed on the server. //
keytool -export -keystore teststore -storepass test1 -alias signFiles -file SignedApplet.cer
ECHO The Batch file is created.
EXIT
Put the above commands in a .bat file you are good to go.
To install the certificate manually of programmatically move the certificate on to the server and double click on it to install it.
This website is extremely helpful.
http://java.sun.com/developer/technicalArticles/Security/Signed/
Posted by
Surendra
at
8:02 AM
0
comments
Define a property in you presentation bean (ie the bean used on the jsf page) ex applet
public String getApplet() { applet = applet codebase="." height="400" archive="SSignedPrinterApplet.jar" width="400" code="PrinterApplet.class" name="PrinterApplet">"+ /applet"; return applet; }
Now after we define we need to refer in the jsf page like below
escape="false" parameter makes the html reder and embed the applet into the jsf page or else it will display plain text like applet code=PrinterApplet.class .... etc.
Posted by
Surendra
at
7:31 AM
3
comments