Friday, May 31, 2013

Hotel Management System Project Download in VB.Net free, Free Download Hotel Management System Project in VB.Net


Hotel Management System Project Download in VB.Net free, Free Download Hotel Management System Project in VB.Net



The Hotel Management System is used to book the Hotel's Rooms, check availability, manage staff duties, check status, bill status etc.
This Project is developed in VB.Net for achieving all above tasks.
This project is useful for Students who are going to start their final year projects.

Download this project from here, It is free and always will be.



Monday, May 27, 2013

What is PHP?, Full Form of PHP


PHP Introduction

PHP is a server side scripting language which is used to develop the Dynamic web pages to interact with the database applications and can be develop to enterprise applications. The PHP scripts is very simple and can be embed easily with the HTML.


  • The Hypertext Preprocessor (PHP) is a Server side Scripting Language for design and developing Dynamic and Interactive Web Pages.The PHP support the Databaseconnectivity with many latest Databases like MySql, Sql Server, Oracle etc.

  • PHP is widely used General purpose scripting language that is especially suited for web development and can be easily embedded into HTML code. The PHP  support HTML, CSS and JavaScript also.
  • PHP is open source and freely available.
  • PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP, JSP etc.

Privacy Policy


Our Privacy Policy

We are W3STutorial don't store any information of our visitors and no one can directly store his/her or other information on our website. If anyone has the query regarding to any topic we only read the message of that particular visitor and response back to direct his/her email id and immediately delete all the information of that particular visitor.

We are follow the international rules for individual privacy scheme and we keep in mind each and every rule.

If you have any query about the privacy policy feel free to contact us 

Contact Us


Feel Free to Contact Us



Search Engine
Link From Another Site
News Article
Televistion Ad
Word of Mouth

Daily
Weekly
Monthly
Yearly

* Required Free Contact Form

About W3S Tutorial


About Us

The W3S Tutorial is a provider of free online tutorials on programming languages like java, jsp, php, python, javascript, HTML, SEO, spring framework etc and we are provide the free IT projects for final year students. We are working on other programming languages also.
We are giving the unique content which are written by our professionals and these tutorials does not copyrighted by other online tutorials on programming. We know the all copyright low and follow the rules for creating the new tutorials.
We are providing the all services free without paying any cost and each user can come to our site and read online tutorials and there is no bounds for seeing any content every user can read and place your comments for improving our tutorials and website content..

Please Help Us to improve
Sunday, May 26, 2013

Top free Blog directory sites


Online Marketing
Praca poznań w Zarabiaj.pl
Blogadr.com - Listed (add your blog to Blogadr.com)
Saturday, May 25, 2013

JSP Actions, jsp:forword Action Tag in JSP, how to redirect the page from one page to another with parameters


JSP Actions, jsp:forword Action Tag in JSP, how to redirect the page from one page to another with parameters

The <jsp:forword> Action tag is used to redirect or forword the control or request to any other page. The <jsp:forword> Action tag is similar to the response.sendRedirect() method but the difference is with <jsp:forword> we can send the parameters to the another page but response.sendRedirect() method does not have this functionality.

Example of <jsp:forword> Tag:-

without parameter

<jsp:forword page="anotherPage.jsp"/>

with parameter

<jsp:forword page="anotherPage.jsp">
<jsp:param name="varName" value="anyValue"/>
</jsp:forword>

Note:-With the <jsp:forword> tag we can forword the request to any other page it may be jsp, html or any other resourse.


Thanks for Visiting

JSP Action Tags, Action Elements in JSP, List of Action Tags (Elements) in JSP


JSP Action Tags, Action Elements in JSP, List of Action Tags (Elements) in JSP 

The JSP Action tags are used to perform specific tasks into the JSP pages, the Action Tags are use to call the java beans, installing the required plugins, including the applets into jsp, communication b/w jsp pages etc.

The List of JSP Actions Tags are as follows:- 

<jsp:forword>
<jsp:include>
<jsp:useBean>
<jsp:setProperty>
<jsp:getProperty>
<jsp:plugin>
<jsp:param>
<jsp:fallback>

We will discuss about above tags in depth in upcomming tutorials

Thanks for visiting

Implicit Objects in JSP, exception implicit object in JSP, How to redirect a JSP page to the Exception page when an exception occured


Implicit Objects in JSP, exception implicit object in JSP, How to redirect a JSP page to the Exception page when an exception occured

exception is an object of Throwable class, It is used to print the exception occurred in a JSP page. It is only use with that JSP page which is the common error page of entire JSP application. If the page is not an error page then there is no use of exception object.
When any exception is occurred in any JSP page the page automatically redirect to the error page.

Example for exception object

<%@page language="java" isErrorPage="false" errorPage="handleError.jsp"%>
<html>
<%
int x=10;
int y=x/0;
%>
</html>

handleError.jsp

<%@page language="java" isErrorPage="true" %>
<html>
<body>
<h3>following error occured<%=exception%></h3>
</body>
</html>

The entire application has the only one errorPage for handling the errors and that particular page has the isErrorPage="true" attribute in page directive.

Implicit Objects in JSP, pageContext Implicit object in JSP, How to set,get and remove attributes to any scope in JSP


pageContext Implicit object in JSP, How to set,get and remove attributes to any scope in JSP

pageContext is an object of PageContext class, It is used to set, get and remove attribute with page, request, session and application scopes. we can set any value with setAttribute() method and also set the scope of the availability of the attribute in other pages.

Example of pageContext 

index.html

<html>
<body>
<form method="post" action="setName.jsp">
Enter Username<input type="text" name="userName">
<input type="submit" value="next">
</form>
</body>
</html>

setName.jsp

<html>
<body>
<%
String username=request.getParameter("userName");
out.write("Hello & Welcome "+username);
pageContext.setAttribute("username",username,pageContext.SESSION_SCOPE);

%>
<a href="welcomePage.jsp">next</a>
</body>
</html>

welcomePage.jsp

<html>
<body>
<%
String username=(String)pageContext.getAttribute("username",pageContext.SESSION_SCOPE);
%>
<h1>Hello <%=username%></h1>
</body>
</html>

In above example setName.jsp set the Attribute to pageContext with session scope and then get the Attribute in welcomePage.jsp because of session scope.

Friday, May 24, 2013

Implicit Objects in JSP, session object in JSP, Session Management in JSP, list of session methods in java


Implicit Objects in JSP, session object in JSP, Session Management in JSP

session is an object of HttpSession interface of Java Servlet, It is used to manage the state of an user and creating and managing the account login sessions for every user. The session object used to create a new session for an user and maintain the session till the user will not close the session explicitly, with session object we can differentiate the multiple session ID's and can be identify the session creation time etc.

The list of methods linked with session object

1. setAttribute(String sessionName, Object sessionValue):- This method is used to create a session variable and assigned the value to it.
2. getAttribute():- This method is used to get the already created session value.
3. getAttributeNames():- This method is used to get the all existing session variables names. It returns the Enumration type list of already created session variables.
4. getCreationTime():- This method is used to get the creation time of a session in Long data type.
5. getId():- This method is used to get the unique Identity for each session object.
6. getLastAccessedTime():- This method is used to get the session time in miliseconds, when a request sent associated with the current session ID.
7. getMaxInactiveInterval():- This method is used to get the max time for a session will alive to the container.
8. invalidate():- This method is used to destroy the session object.
9. removeAttribute(String attrName):- This method is used to remove any existing attribute associated with the session.
10. setMaxInactiveInterval(int intervalTime):- This method is used to set the time of the session will keep alive. After expiration of this given time limit the session will automatically invalidate.

Simple Example for creating a session and using it into another page

login.html

<html>
<body>
<form method="post" action="loginValidate.jsp">
Enter Username<input type="text" name="user"><br/>
Enter Password<input type="password" name="pass"><br/>
<input type="submit" value="login">
</form>
</body>
</html>

loginValidate.jsp

<html>
<body>
<%
String user=request.getParameter("user");
String pass=request.getParameter("pass");
if(user.equals("talib")&&pass.equals("hassan"))
{
session.setAttribute("username",user)
response.sendRedirect("welcome.jsp");
}
else
{%>
<h4>invalid username or password</h4>
<%@include file="login.html"%>
<%
}
%>
</body>
</html>


welcome.jsp

<html>
<body>
<h1>Welcome <%=session.getAttribute("user")%></h1>
</body>
</html>

we will discuss about the other methods of session in upcoming chapters.

Implicit Objects in JSP, application implicit object in JSP, How to get Value from the XML configuration file


Implicit Objects in JSP, application implicit object in JSP, How to get Value from the XML configuration file


application is an object of ServletContext class in Java Servlet, It is used to get the configuration information from an xml configuration file to all JSP pages. for example if we have an XML configuration file in our application and we have define the database connection string into the <context-param> tag and then we want to access the value of the variables which are define into the <context-param> then we are used the config.getInitParameter(String param) method of the application object.

Example:-

web.xml

<web-app>
<servlet>
<servlet-name>talibhassan</servlet-name>
<jsp-file>/hello.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>talibhassan</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>

<context-param>
<param-name>user</param-name>
<param-value>Talib Hassan</param-value>
</context-param>
</web-app>

hello.jsp

<html>
<head>
<title>Hello User</title>
</head>
<body>
<%
String user=application.getInitParameter("user");
%>
<h1>Welcome <%=user%></h1>
</body>
</html>
</html>


In above example we are using the <context-param> variable value into single JSP page but the real use of this object is to define the global values for entire application.

Implicit Objects in JSP, Config Implicit Object in JSP, How to get Configuration Information from a JSP page


Implicit Objects in JSP, Config Implicit Object in JSP,  How to get Configuration Information from a JSP page

config is an object of ServletConfig class in Java Servlet, It is used to get the configuration information from an xml configuration file to a JSP page. for example if we have an XML configuration file in our application and we have define the database connection string into the <init-param> tag and then we want to access the value of the variables which are define into the <init-param> then we are used the config.getInitParameter(String param) method of the config object.It is used to get info for a single jsp page.

Example:-

web.xml

<web-app>
<servlet>
<servlet-name>talibhassan</servlet-name>
<jsp-file>/hello.jsp</jsp-file>
<init-param>
<param-name>user</param-name>
<param-value>Talib Hassan</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>talibhassan</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
</web-app>

hello.jsp

<html>
<head>
<title>Hello User</title>
</head>
<body>
<%
String user=config.getInitParameter("user");
%>
<h1>Welcome <%=user%></h1>
</body>
</html>
</html>

The above example print the Welcome Talib Hassan

JSP Tutorials for beginners, All about JSP, Inroduction of JSP


JSP Tutorials for beginners, All about JSP, Inroduction of JSP




Java Server Pages is a Java Technology to design & Develop Dynamic web pages, It is a server side programming language which have the all facility of Java programming language like platform independence, Multi-Threading, JDBC Connectivity and all the java API's for creating the web based enterprise applications.

Steb By Step Guide of JSP

Introduction of JSP
Creating Environment for running JSP with Tomcat
Life Cycle of JSP
Tags in JSP
  1. Declaration Tag
  2. Scriptlet Tag
  3. Expression Tag




Implicit Objects in JSP, Response Implicit Object in JSP, How send back response to the client in JSP


Implicit Objects in JSP, Response Implicit Object in JSP, How send back response to the client in JSP

response is an object of HttpServletResponse Interface, It is used to send back the response to the client according to the query fired by the user. The HttpServletResponse interface has the number of methods to do the different kind of tasks like sending the response to the user, redirecting the page from one JSP to another JSP page, sending cookies information to the client, setting the content length and content type to the response page, sending the error to the client, printing the string to the client browser etc.

The most usable methods of response object are as follows-

1. setContentLength(int length):- It is used to set the length of the content which is sending to the client as a response by the server.
2. setContentType(String contenttype):- It is used to set the content type which will be displayed on the client browser as a response of the query of the user.
2. sendRedirect(String nextPageURL):- It is used to redirect the control from one page to another JSP page.
4. addCookie(Cookie c):- It is used to add the Cookies to the response object which are used to maintain the state of a user.
5. reset():- It is used to reset the response object as a new object.
6. sendError(int statusCode):- It is used to send the error code to the client if there is any error found by the server into the application. The numeric code need to be passed into it.
7. sendError(int statusCode, String errMessage):- It is also do the same task as above we have discussed but, this method has the another parameter in it eg. String errMessage, it is used to send the error message with the status code .
8. setStatus(int statusCode):- it is used to set the status to the browser.



Tuesday, May 21, 2013

Implicit Objects in JSP, Request Implicit Object in JSP, Methods of Request Objects in JSP


Implicit Objects in JSP, Request Implicit Object in JSP, Methods of Request Objects in JSP

request is the object of HttpServletRequest interface, which is used to get the request from the client and can be used to send the request from one JSP page to another JSP page. The request object has some methods to do these tasks like for getting the request from the client, the some important methods of request object are as follows-


  1. request.getParameter(String name)
  2. request.getQueryString(String querystring)
  3. request.getAttribute(String attribute) 
  4. request.setAttribute(String att_name,ObjectAtt_value) 
  5. request.getParameterNames() 
  6. request.getParameterValues()

Some of other methods are also avalable with request object but those are rarely used.

Example for getting the request from the client

client.html

<html>
<form method="post" action="printValue.jsp">
<input type="text" name="val">
<input type="submit" value="sendValue">
</form>
</html>

server.jsp

<html>
<%
String val=request.getParameter("val");
out.print("The Value you have send "+val);
%>
</html>

Thanks for Visiting
Thursday, May 16, 2013

Implicit Object in JSP, out Object in JSP, What is the Use of out Object in JSP


Implicit Object in JSP, out Object in JSP, What is the Use of out Object in JSP

out is the object of JspWriter class in JSP, it is similar to the PrintWriter class in JSP. It is used to print any string on the browser or client as a response.

Example for out Object:-


login.html
<html>
<head><title>Login Here</title></head>
<form method="post" action="loginValidate.jsp">
<input type="text" name="user"><br>
<input type="password" name="pass"><br>
<input type="submit" value="login">
</form>
</html>

loginValidate.jsp

<%
if(request.getParameter("user").equals("admin")&&request.getParameter("pass").equals("admin"))
{
out.write("Hello "+request.getParameter("user"));
}
out.write();

%>

Thanks for Visiting

Implicit objects in JSP, list of Implicit Objects in JSP, JSP Implicit Objects


Implicit objects in JSP, list of Implicit Objects in JSP, JSP Implicit Objects

The JSP provide the 9 implicit Objects for doing any specific task in JSP, these all objects has the unique meaning and each is given the facility to invoke the methods defined into the its class like the session is the object of HttpSession interfce, out is the object of PrintWriter class etc, all the methods has the power of invoking the all methods and properties of its Class or Interface.

Here is a List of 9 implicit objects provided by JSP:-

out:- out is the object of JspWrite class which is similar to the PrintWriter class which we have used in Servlets which is used to print any value on the browser.
request:- request is the object of HttpServletRequest interface which is used to get the request from the client.
response:- response is the object of HttpServletResponse interface which is used to set the response for the client.
config:- config is the object of Servlet config interface, it is used to get the configuration for a JSP page from a web.xml file. It is used to get info for a single jsp page.
application:- application is the object of ServletContext interface, it is used to get the configuration information from the web.xml file. It can be used to get info for all jsp pages of an application.
session:- session is the object of HttpSession interface, it is used to create , set, get and destroy the session variables.
pageContext:- pageContext is the object of pageContext class. It is used to store any value which can be available by the page, request, session & application scopes to the other pages.
page:- page object is the object of Object class. It is used to assign the current class reference.
exception:- exception is the object of Throwable class. It is used in error page of a JSP application.

If you want to know more about the implicit objects then visit the next tutorials of this site.


Read the all implicit objects in depth with example
  1. out object with example
  2. request object with example
  3. response object with example
  4. config object with example
  5. session object with example
  6. application object with example
  7. pageContext object with example
  8. exception object with example
Thanks for visiting

Taglib Directive in JSP, How to use Taglib Directive in JSP, What is the use of Taglib Directive in JSP


Taglib Directive in JSP, How to use Taglib Directive in JSP, What is the use of Taglib Directive in JSP

The taglib directory is used to define the many tags means the taglib is used to create the custom tags in JSP and also use the predefined JSTL tags library into the JSP page for coding the JSP without using the scriptlet tag.

Syntax for using the taglib directive:-

<%@ taglib prefix="variable name" uri="url of tag library" %>

The more tutorials on depth about the taglib into next chapter.

Thanks for visiting


Include Directive in JSP, What is the use of include directive in JSP, How to include a file into a JSP page


Include Directive in JSP, What is the use of include directive in JSP, How to include a file into a JSP page

The include directive is used to include an external page or file of any type like any HTML page, any JSP page, any image file, any text file, xml file etc into the JSP page, The include directive include the page or file into the translation time of a JSP page. you can write the include directive code anywhere into the page wherever you want.

Syntax of the include directive

<%@include file="filename"%>

Example:-

<%@include file="header.html"%>
<html>
<head><title>Welcome Page</title></head>
<body>
</body>
</html>
<%@include file="footer.html"%>

Thanks for visiting

Page Directive in JSP, Attributes of @ Page Directive in JSP, Use of Page Directive in JSP


Page Directive in JSP, Attributes of @ Page Directive in JSP, Use of Page Directive in JSP

Page Directive is used to specify the JSP page info to the Web Container like page language, page will participate in sessions or not, you can specify the API' list which are import to your JSP page, the Page directive can be placed anywhere into the JSP page but the best practice is to write it top of the page.

Syntax of Page Directive

<%@ page attribute="value"%>

List of Page Directive Attributes

language:- This attribute is used to specify the default language for the JSP page.
session:- The session attribute used to specify whether the page participate in session or not, the value for the session attribute can be true or false.
extends:- This attribute specify the super class used by the JSP page.
import:- This attribute specify the list of API's included into the JSP page.
isErrorPage:- This attribute specify the page is the error page URL or not by specify into the another JSP errorPage attribute.
errorPage:- This attribute used to specify the URL of the error handler page.
contentType:- This attribute is used to specify the content type of the particular JSP page.
isThreadSafe:- This attribute specify the threading model used by the JSP page. the default value for this attribute is true, if you set it false then the Container will serialize the multiple requests and the servlet uses the SingleThreadModel for it.
isELIgnored:- This attribute specify the Expression Language ignored by the JSP page or not. By default the Expression language is enabled by the JSP page. It means the value is false by default.
info:- This attribute is simply used to specify the information for the JSP page which is retrieved by the getServletInfo() method later.

Example of the Page Directive

<%page language="java" import="java.io.*" session="true" isErrorPage="false" info="This is the JSP Example" %>

thanks for visiting

JSP Directives Tags, What are the JSP Directives in JSP


JSP Directives Tags, What are the JSP Directives in ,JSP

JSP Directives are used to specify what will be the structure of the JSP page, the directives tags can be used to specify the language used by the JSP page, the page will participate in sessions or not, if you want to include any existing page into your JSP page, the Directives also useful, if you want to create the database connection which you want to use into the entire application then the JSP directives also useful.

There are three type of JSP directives available in JSP.


  1. <%@page %>
  2. <%@include %>
  3. <%@taglib %>
we will discuss about the above tags in depth in next tutorials

thanks for visiting

JSP Expression Tag, How to Print Value of any Variable without out.write() in JSP, How to call a method in JSP


JSP Expression Tag, How to Print Value of any Variable without out.write() in JSP, How to call a method in JSP

If you want to print the value of any variable in JSP so you can simply use the out.write(variablename) inside the scriptlet tag but, if you dont want to use scriptlet and don't want to use the out.write() method then, the JSP also provide a special tag for doing this task, you can print the value of any variable without using out.write() method, this tag called the Expression Tag, with the help of this tag you can easily call a method too.

Syntax of Expression Tag

<%= expression %>

Example of Expression Tag

<html>
<head>
<title>Handling Request</title>
</head>
<body>

<%! String username="";%><%
String user=request.getParameter("user");

String pass=request.getParameter("pass");
if(user.equlas("admin")&&pass.equals("admin"))
{
username=user;
}%>
<h1>Welcome <%= username %></h1></body>
</html>


Thanks for visiting