Posts

Showing posts from July, 2017

JSP - Internationalization| i18n| l10n

In this chapter, we will discuss the concept of Internationalization in JSP. Before we proceed, let us understand the following three important terms − Internationalization (i18n)  − This means enabling a website to provide different versions of content translated into the visitor's language or nationality. Localization (l10n)  − This means adding resources to a website to adapt it to a particular geographical or cultural region for example Hindi translation to a web site. locale  − This is a particular cultural or geographical region. It is usually referred to as a language symbol followed by a country symbol which are separated by an underscore. For example, " en_US " represents english locale for US. There are a number of items which should be taken care of while building up a global Website. This tutorial will not give you complete detail on this but it will give you a good example on how you can offer your Webpage in different languages to the internet...

JSP - Security

JavaServer Pages and servlets make several mechanisms available to Web developers to secure applications. Resources are protected declaratively by identifying them in the application deployment descriptor and assigning a role to them. Several levels of authentication are available, ranging from basic authentication using identifiers and passwords to sophisticated authentication using certificates. Role Based Authentication The authentication mechanism in the servlet specification uses a technique called  role-based security . The idea is that rather than restricting resources at the user level, you create roles and restrict the resources by role. You can define different roles in file  tomcat-users.xml , which is located off Tomcat's home directory in conf. An example of this file is shown below − <? xml version = '1.0' encoding = 'utf-8' ?> <tomcat-users> <role rolename = "tomcat" /> <role rolename = ...