Showing posts with label tutorials. Show all posts
Showing posts with label tutorials. Show all posts

Security Issues in Java

Security Issues : "Servlet Sandbox" security model is used to run servlets built using JDK1.1. In this security model servlets are either trusted or untrusted. A trusted servlet has full access to server machine while untrusted servlets have limited access to server resources.The restrictions to untrusted servlets are imposed by the security manager. This model is very similar to "Applet SanBox" security model, where untrusted applets are given limited access to the client resources.
A Sand box is a security mechanism for safely running programs.It is often used to execute untrusted code,or programs from unverified third parties , and untrusted users. The sandbox typically provides a lightly controlled set of resources for guest programms to run in . Network access , the ability to inspect the host system or read from input devices is usally disallowed or heavily restricted.Servlets built JDK1.1 use the same technology as used by Applets to implement security issues.Hence local servlets are trusted to run without a security manager.Servlets loaded from a remote source,on the other hand,are by nature untrusted,so they run in a very restrictive environment where they cannot access the local file system , establish network connections and so on.

Highlighting Features of Java Bean

Features of Java Bean: Java supports the properties to allow an application to perform read and write operations on its values and Java Bean support events to allow its vendors to develop distinct events and also supports the Bean Info interface,which allow its vendors to specify the available properties and methods.Also,the icons which can be displayed on a toolbar are specified.Java Beans are highly configurable in a way that their state can be easily saved and restored using serialization.
It allows properties to be customized at design time.JB use events for interbeans communication.

Characteristics of a Java Bean:
1. Its capability spans from simple functions for example it can be used as a spell checker to complex functions to forecast the stock exchange performance.
2.It may be visible it may act as a button on a GUI or invisible for example it may be used as a decoder for stream of multimedia information to a user.
3.It may work autonomously on a user computer or it may cooperate on some task with other components.

What is Java Beans ?

Java Beans : The specification by Sun Micro system defines Java Beans as reusable software components that can be manipulated visually in a builder tool.

The Java Beans architecture is based on a component model which enables developers to create software units called components.Components are self-contained,resusable software units that can be visually assembled into composite components,applets,applications and servlets using visual application builder tool.Java Beans components are known as Beans.Every Java Bean component should follow java Bean specification ,which define the way by which different components can communicate with each others,interact with a builder tool,save/restore their configuration etc,in addition to this it also defines the architecture of single class in the software component.

A Java bean is a Simple Java class ,adhering to certain conventions about method naming.Constructors and behaviors.The required convention for Java Beans are,
1.It should have no argument constructor so that its object can be created without knowing anything about the Bean.
2.Its Properties must be accessible using getter/setter/and other methods (collectively known as accessor/methods) following a standard naming convention.As the name implies getter method is used to obtain the value of property.