Friday, March 27, 2015

What is JSP action ?

JSP Action :

To talk on JSP action , it can be defined as components that  are used to  construct XML syntax to control the behavior of the servlet engine. These components can be used for dynamically inserting of a file, reuse JavaBeans components, forward the user to another page, or generate HTML for the Java plugin.

The syntax for the Action element, as it conforms to the XML standard:
<jsp:action_name attribute="value" />

Action elements are predefined functions and there are following JSP actions available in JSP:

Syntax
Purpose
jsp:include
It includes a file at the time the page is requested
jsp:useBean
It finds or instantiates a JavaBean
jsp:setProperty
This sets the property of a JavaBean
jsp:getProperty
This inserts the property of a JavaBean into the output
jsp:forward
This forwards the requester to a new page
jsp:plugin
Generates browser-specific code that makes an OBJECT or EMBED tag for the Java plugin
jsp:element
It defines XML elements dynamically.
jsp:attribute
This defines dynamically defined XML element's attribute.
jsp:body
Defines dynamically defined XML element's body.
jsp:text
Use to write template text in JSP pages and documents.

Common Attributes:

There are two common attributes that are used for all Action elements: the id attribute and the scope attribute.

  1. Id attribute: This attribute uniquely identifies the Action element, and it allows the action to be referenced inside the JSP page. If the Action creates an instance of an object the id value can be used to reference it through the implicit object PageContext.
  2. Scope attribute: This attribute identifies the lifecycle of the Action element. The id attribute and the scope attribute are directly related, as the scope attribute determines the lifespan of the object associated with the id. The scope attribute has four possible values: (a) page, (b) request, (c)session, and (d) application.


Example:

JSP File (index.jsp)

 <%@page contentType="text/html" pageEncoding="UTF-8"%>  
 <!DOCTYPE html>  
 <html>  
 <head>  
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
 <title>Nirajanghimirey.blogspot.com</title>  
 </head>  
 <body>  
 <center>  
 <h2>This is the example of action.</h2>  
 <jsp:include page="link.jsp" flush="true" />  
 </center>  
 </body>  
 </html> 

JSP File (link.jsp)

<p>Current Time: <%= (new java.util.Date()).toLocaleString()%></p>

Sunday, March 22, 2015

Well in Bootstrap

Well is a container that helps the content to present sunken or an inset effect on the pages. Well can be created easily by wrapping the content that is to be presented in the well with a <div> element by adding a class .well. The size of the well can also be changed by using some optional class like well-lg. 

Syntax:
<div class = "well" > content </div>  

Example:

 <!DOCTYPE html>  
 <html>  
 <head lang="en">  
   <meta charset="UTF-8"/>  
   <title>joeandy's workshop</title>  
   <meta name="viewport" content="width=device-width, initial-scale=1">  
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">  
 </head>  
 <body>  
 <div class="container">  
 <h1> Example of a well</h1>  
 <div class="well well-lg">Hi, am in large well feed me some content !!</div>  
 <div class="well well-sm">Hi, am in small well feed me some content !!</div>  
 </div>  
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>  
 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>  
 </body>  
 </html> 

SEO Content Submission, the key points that should be remembered while submitting your contents for SEO

There are some key points that you should not forget while the process of Content submission.. Following them you will meet the purpose of both  your targeted audience and search engines crawlers.

  1. Your articles should be original and information rich so it can provide more reliable information to it's readers.
  2. Content should be keyword rich but not more till the point of keyword stuffing.
  3. The average length of articles should be between 500 and 700 sometimes it can also be less.
  4. Providing  unique title to your article with main keyword into it so as to make it easy for web crawlers to identify and classify the topic of your article.
  5. Writing subheadings, bullets and numbering to articles make it presentable and easy to read for potential customers.


Both Google and Bing recommend that you set-up Webmaster accounts with them as they are the most used search engines world wide. Doing so allows them to communicate to you any problems with, or recommendations for, your website. Whilst you should therefore be setting up these accounts with them at some point, doing it straight after creating your site is equivalent to submitting your website to them. Some of the options and tools within both Webmaster Tools accounts may seem complicated; however, you don’t need to concern yourself with those if you don’t want to. Simply setting up the accounts and linking them to your website is sufficient for getting instantly included in their search results.

A brief history about SEO (Search Engine Optimization)

The process of affecting the visibility of a website or a webpage in search engine is referred to SEO (Search Engine Optimization). In mod-1990 the trend of Search Engine Optimization came into its early life, those days crawl and SPIDER were used to search and load the contents of the web page or a website. An industry analyst Danny Sullivan said "Search Engine Optimization came probably came into use in 1997".
It was May2nd2007 when Jason Gambert attempted the trademark of SEO by convincing the Trademark Office Arizona that SEO is a "process" involving manipulation of keywords and not a "marketing service". By 2004 the leading search engine like Google, Bing and Yahoo came in highlight. Google was more preferred by user as its interface was easy to use and low space taking and fast loading. This companies like Google, Yahoo, Bing never disclosed the algorithm that they use for page ranking and the earlier theory of keyword manipulation was neglected after that the strategy for ranking page became a hard nut to crack. At this time there was a rapid development in SEO, on February 2011 Google implemented  a new system introducing "Panda Update" which started punishing the sites who's contents are not unique and whose content contained  many spamming links by not listing them in ranking by Google. There are lots of discoveries to be made in SEO yet, however many of them are discovered and are brought into uses.

SEO helps webpage/website to get better position in listing from search engines. SEO optimization is done in order to make your website or webpage search engine friendly and understandable.
Some of features of SEO:
  1. Search Engine Optimization helps search engines understand you site well.
  2. Search Engine Optimization helps users to get the exact content they are looking for.
  3. Search Engine Optimization helps in gaining audience for your site.
  4. Search Engine Optimization helps in internet marketing.
  5. Search Engine Optimization helps in maintaining site health.
  6. Search Engine Optimization helps users or readers to gain knowledge of your content or site when s/he views the indexed pages in search engine.
  7. Search Engine Optimization helps in customization and optimization of images.
  8. Search Engine Optimization helps in verifying your website.






A brief History in SVG


SVG was developed by W3C SVG Working Group in the year 1998. Chris Lilley was the former chairman of that group. SVG 1.0 became was the first version of SVG and it became W3C Recommended in the year 2001 on 4th of September. Another version of SVG which was the SVG 1.1 became the W3C Recommendation in the year 2003 on the 14th of January. Mobile SVG Profiles which were the SVG Tiny and the SVG Basic that came across after its version 1.1 and it became the W3C Recommendation in the year 2003 on the same date as the SVG 1.1. SVY Tiny 1.2 and SVG 1.1 Second Edition became the W3C Recommendation in the date 22nd December 2008 and 16th August 2011 respectively.

SVG was furious technology introduced in late 1998 and which got very eagerly and popularly familiar to new developers that helped them with many aspect of web development, as SVG was used to replace the high resolution large images from the web which made websites more fast and accurate in design.


What is SVG?
SVG stands for Scalable Vector Graphics and it is an XML-based vector image format which is wdely used over web platforms these days.
SVG is two-dimensional graphics providing support for animation and also for interactivity. SVG was initially released in 2001 on 4th of September but it got more highlighted by 2003 when it came with its new version 1.1 and SVG Tiny. SVG was originally developed by W3C and it is an open standard free to use and consume. Every popular browsers in globe like Chrome, Safari and Mozilla contains at least some degree of SVG rendering support.

XSLT Browser compatibility
All the latest version of browsers like  Apple Safari, Google Chrome, Mozilla Firefox, Opera and all browsers supports SVG features and also SVG functionality are supported by internet explorer 9.0.



 Features of SVG:

Paths: SVG path  has compact coding and in all kind of cases the coordinates which are absolute following capital letter commands are used after the lower-case letters.   

Basic Shapes: The rectangles in SVG are the standard elements.

Text: The Unicode character which is included in the SVG file has the expression as a XML character data.

Painting: This shapes can be filled or outlined in SVG.

Color: All the elements can be applied with the color in SVG.

Gradients and patterns: The shapes can be filled with the patterns which can be repeating as well in SVG.

Clipping, masking and composting: Graphic elements can be outlined to define the regions which can be painted in SVG.

Filter effects: It can apply filter effects to the elements. 

Interactivity: The SVG images have the feature to interact with users in different possible ways.

Linking: The images can contain hyperlinks which will lead to other documents.

Scripting: Scripts can be used for accessing SVG documents.

Animation: Built-in animation can be used to animate the contents.  

Fonts: Text can use external font files.

Metadata: The metadata of content is provided to the authors.