Thursday, March 17, 2011

Name of the Server generated servlet class

Hi Guys,
Do you know the name of the Name of the web server generated servlet class???

for the test.jsp

the class file will created with the name test_jsp.class file which will be stored in  the directory



apache/work/Catalina/localhost/_/org/apache/jsp/

Thanks & Regards

Rajesh Kumar yuvaraj

Is it not possible to use System class inside JSP declarations ...

Hi Guys.....

have you ever tried to use the following code into your JSP


<%!
 System.out.println(" it is blunder");
 %>


because  jsp declarative tag is for jsp declarations only but not for the definitions


it is as simple as this


public class Demo{
System.out.println("hello world");// its is joke
public static void  main(String ar[]){
System.out.println("hello world from main");
 }

}
Thanks & Regards


Rajesh Kumar Yuvaraj

can we define the method inside of the jsp scriplet tag

Hi Guys,

Good Day....

Have you ever tried to define a method inside of the jsp scriplet tag.

what is my point is

<%
public void aMethod(){
-------------------------------
-------------------------------
-------------------------------
------------------------------


}

%>
this is not possible  try it guys....

Can we use the out (JSP implicit Object) Object in JSP declarative Tag

Hi Guys,

Have you ever tried to use the out object in the JSP Declarative Tag try it guys....

Actually you cannot use the out object directly in the JSP Declarative tag....

what i want to convey is try to understand the following code

<%!
        out.write("its a blunder");
        out.println("this is also blunder");
  %>

Thursday, March 10, 2011

Jar Signer in Java

Signing a jar is basically used to verify a trusted source. When you sign a jar with your digital signature (based on your private key), you place a mark into the jar file that could not have been done by anyone but you.

The signature is also a checksum of the Jar file, so if the jar get corrupted or modified in transit, the signature is invalid.

On the other side, your public key is placed into the keystore of the system that trust you. This will be used to verify your signature.

Currently, I believe this is mainly used for applets. Using signed jar files, and setting security properties on client browsers, applets can have access to disk, network, and other stuff that they don't normally have access to.



There are many ways by which you can sign a JAR file using jarsigner. One way would be:
jarsigner -keystore C:\working\mystore -signedjar sbundle.jar bundle.jar john 
On executing the command, you will be prompted for the store password and the private key password. Here, bundle.jar represents the jar file you'd like to sign using the private key of the user whose keystore alias is "john" in the keystore named "mystore" located in the directory c:\working. For details, see the jarsigner documentation