Archive for Java Hosting

Introduction to Struts

Introduction to Struts
Apache Struts is a free open-source framework for creating Java web applications.
Web applications differ from conventional websites in that web applications can create a dynamic response. Many websites deliver only static pages. A web application can interact with databases and business logic engines to customize a response.
Web applications based on JavaServer Pages sometimes commingle database code, page design code, and control flow code. In practice, we find that unless these concerns are separated, larger applications become difficult to maintain.
One way to separate concerns in a software application is to use a Model-View-Controller (MVC) architecture.
· The Model represents the business or database code,
· View represents the page design code, that means jsp,html pages
· Controller represents the navigational code.i.e.servlet.

Basic idea behinds MVC architecture is to separate your business logic and presentation part separate.so if design changes it does not affect business logic.
The Struts framework is designed to help developers create web applications that utilize a MVC architecture.
The framework provides three key components:
· A “request” handler provided by the application developer that is mapped to a standard URI.
· A “response” handler that transfers control to another resource which completes the response.
· A tag library that helps developers create interactive form-based applications with server pages.
The framework’s architecture and tags are buzzword compliant. Struts works well with conventional REST applications and with technologies like SOAP and AJAX.

This framework enables design and implementation of large web applications to be handled by different groups of people. In other words, page designers, component developers and other developers can handle their own bit of the project, all in tandem and in a decoupled manner. It features I18N(internationalization), a powerful custom tag library, tiled displays and form validation. It also supports a variety of presentation layers, including JSP, XMl/XSLT,Java Server Faces (JSF), as well as a variety of model layers, includingJava Beans and EJB.

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Related Posts:

  • No Related Posts

JavaBeans Architecture

JavaBeans Architecture

Java Bean is a reusable software component that can be manipulated visually in a builder tool.

JavaBeans is an architecture for both using and building components in Java. This architecture supports the features of software reuse, component models, and object orientation. One of the most important features of JavaBeans is that it does not alter the existing Java language. If you know how to write software in Java, you know how to use and create Beans. The strengths of Java are built upon and extended to create the JavaBeans component architecture.
Although Beans are intended to work in a visual application development tool, they don’t necessarily have a visual representation at run-time (although many will). What this does mean is that Beans must allow their property values to be changed through some type of visual interface, and their methods and events should be exposed so that the development tool can write code capable of manipulating the component when the application is executed.
Creating a Bean doesn’t require any advanced concepts. So before here is some code that implements a simple Bean:
public class MyBean implements java.io.Serializable
{
protected int theValue;

public MyBean()
{
}

public void setMyValue(int newValue)
{
theValue = newValue;
}

public int getMyValue()
{
return theValue;
}
}
This is a real Bean named MyBean that has state (the variable theValue) that will automatically be saved and restored by the JavaBeans persistence mechanism, and it has a property named MyValue that is usable by a visual programming environment. This Bean doesn’t have any visual representation, but that isn’t a requirement for a JavaBean component.
JavaSoft is using the slogan “Write once, use everywhere.” Of course “everywhere” means everywhere the Java run-time environment is available. But this is very important. What it means is that the entire run-time environment required by JavaBeans is part of the Java platform. No special libraries or classes have to be distributed with your components. The JavaBeans class libraries provide a rich set of default behaviors for simple components (such as the one shown earlier). This means that you don’t have to spend your time building a lot of support for the Beans environment into your code.
*Some features of java bean
1) Properties, Methods, and Event
2) Introspection
3) Customization
4)Persistence
5)Visibility
6) Multithreading
7)Security

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Related Posts:

  • No Related Posts

Web Application Development with Java Server Pages (JSP)

Web Application Development with Java Server Pages (JSP)

120x600

JSP technology speeds the development of dynamic web pages in a number of ways:

* Separating content generation from presentation

Using JSP technology, web page developers use HTML or XML tags to design and format the results page. They use JSP tags or scriptlets to generate the dynamic content (the content that changes according to the request, such as requested account information or the price of a specific bottle of wine). The logic that generates the content is encapsulated in tags and JavaBeans components and tied together in scriptlets, all of which are executed on the server side. If the core logic is encapsulated in tags and beans, then other individuals, such as web masters and page designers, can edit the JSP page without affecting the generation of the content.

On the server, a JSP engine interprets JSP tags and scriptlets, generates content (for example, by accessing JavaBeans components, accessing a database with JDBCTM technology, or including files), and sends the results back in the form of an HTML (or XML) page to the browser. This helps authors protect proprietary code while ensuring complete portability for any HTML-based web browser.

* Emphasizing reusable components

Most JSP pages rely on reusable, cross-platform components (JavaBeans or Enterprise JavaBeansTM components) to perform the more complex processing required of the application. Developers can share and exchange components that perform common operations, or make them available to larger user or customer communities. The component-based approach speeds overall development and lets organizations leverage their existing expertise and development efforts for optimal results.

* Simplifying page development with tags

Web page developers are not always programmers familiar with scripting languages. The JavaServer Pages technology encapsulates much of the functionality required for dynamic content generation in easy-to-use, JSP-specific XML tags. Standard JSP tags can access and instantiate JavaBeans components, set or retrieve bean attributes, download applets, and perform other functions that are otherwise more difficult and time-consuming to code.

The JSP technology is extensible through the development of customized tag libraries. Over time, third-party developers and others will create their own tag libraries for common functions. This lets web page developers work with familiar tools and constructs, such as tags, to perform sophisticated functions.

728x90 new

// By Ricky

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Related Posts:

  • No Related Posts

Why Move to Java 2 Enterprise Edition

Why Move to Java 2 Enterprise Edition?

Java Platform, Enterprise Edition is a platform for developing robust, scalable enterprise applications. Here are some highlights:

* Easier development. The focus in Java EE is ease of development. With Java EE , there is less code to write — much of the boilerplate code has been removed, defaults are used whenever possible, and annotations are used extensively to reduce the need for deployment descriptors.

* Enhanced web services. Java EE includes simplified web services support and the latest web services APIs, making it an ideal implementation platform for Service-Oriented Architectures (SOA).

* EJB -- simpler, better. EJB 3.0 makes programming with Enterprise JavaBeans technology simpler through the use of Plain Old Java Objects (POJOs), it also introduces a new persistence API.

468x60euk

* JSF, JSTL, AJAX, and more. Constructing web applications is made easier with JavaServer Faces (JSF) technology and the JSP Standard Tag Library (JSTL). Java EE supports rich thin-client technologies such as AJAX, technologies that are crucial for building applications for Web 2.0.

// By Ricky

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Related Posts:

  • No Related Posts

Security provided by applets

Security provided by applets

banner1

Web applets have popularized the idea of downloading and executing untrusted compiled code on the personal computer running the Web browser, without user’s approval or intervention.

Obviously, this raises major security issues: without appropriate security measures, a malicious applet could mount a variety of attacks against the local computer, such as destroying data (e.g. reformatting the disk), modifying sensitive data (e.g. registering a bank transfer via a home-banking software [5]), divulging personal information over the network, or modifying other programs (Trojan attacks).

Beyond Web services, the applet model is now being transferred to high-security embedded devices such as smart cards: the Java Card architecture [6] allows for post-issuance downloading of applets on smart cards. Smart cards are used as security tokens in sensitive application areas such as payment, mobile telephony, and authentication. This makes the security issues with applets even more acute.

The solution put forward by the Java programming environment is to execute the applets in a so-called “sandbox”, which is an insulation layer preventing direct access to the hardware resources and implementing a suitable access control policy [18, 54, 34]. The security of the sandbox model relies on the following three components:

1. Applets are not compiled down to machine executable code, but rather to bytecode for a virtual machine. The virtual machine manipulates higher-level, more secure abstractions of data than the hardware processor, such as object references instead of memory addresses.

2. Applets are not given direct access to hardware resources such as the serial port, but only to a carefully designed set of API classes and methods that perform suitable access control before performing interactions with the outside world on behalf of the applet.

euk 728x90 1

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Related Posts:

  • No Related Posts

Last updated by at .

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »