Unable to execute JSP page

Unable to execute JSP page

I have written one jsp file. It contains html tags and jsp directives. I have saved the file with the extension .jsp. The tomcat server is already running onto my machine. I have saved the jsp file within demo-examples which is again within webapps folder of apache-tomcat-6.0.14 folder.

But I could not execute the JSP page. Please help me.

View Answers

February 14, 2011 at 12:17 PM

How to run JSP page:

Follow these steps:

1)Go to the Control Panel>>System>>Environment Variable And the set the variable CATALINA_HOME and put the path of your apache tomcat as a value like: C:\apache-tomcat-6.0.14.

2)Like that create another variable classpath and put the path of apache-tomcat lib as a value like C:\apache-tomcat-6.0.14\lib.*;

3)Also put the servlet api.jar file inside the lib folder.

4)Now create a jsp file:'hello.jsp'

<%@page language="java"%>
<%String st="Hello World";
%>
Message is <%=st%>

5)Put this jsp file inside the apache-tomcat>>webapps>>web application folder>>

6)You have to give appropriate name to web application folder like examples and put jsp file into it.

7)Then start the tomcat server by clicking startup.bat from the bin folder of your tomcat.

8)Open your browser and type the following url:

http://localhost:8080/examples/hello.jsp and press enter.

9)You jsp program will then display the output on the browser.









Related Tutorials/Questions & Answers:
Unable to execute JSP page
Unable to execute JSP page  I have written one jsp file. It contains html tags and jsp directives. I have saved the file with the extension .jsp... folder. But I could not execute the JSP page. Please help me
unable to execute the examples
unable to execute the examples  unable to execute the examples given for struts,ejb,or spring tutorials.Please help I am a beginner
Advertisements
Unable to run the jsp page - JSP-Servlet
Unable to run the jsp page  Expert:Naga Hi, I need solution... page is shipping and billing details and the next page is payment details. What... on the textbox of the payment.jsp page and also calculate the tax payment and shipping
unable to display table data on JSP page that is coming from mysql and servlet.
unable to display table data on JSP page that is coming from mysql and servlet.  I am unable to show table data on JSP page using servlet and mysql. only two rows data i showing but in my database I have five fields
unable to display table data on JSP page that is coming from mysql and servlet.
unable to display table data on JSP page that is coming from mysql and servlet.  I am unable to show table data on JSP page using servlet and mysql. only two rows data i showing but in my database I have five fields
unable to display table data on JSP page that is coming from mysql and servlet.
unable to display table data on JSP page that is coming from mysql and servlet.  I am unable to show table data on JSP page using servlet and mysql. only two rows data i showing but in my database I have five fields
Unable to compile class for JSP - WebSevices
Unable to compile class for JSP  org.apache.jasper.JasperException: Unable to compile class for JSP When I am trying to access a java file kept under src folder under a package from a jsp page placed under web directory, I am
how to execute jsp and servlets with eclipse
how to execute jsp and servlets with eclipse  hi kindly tell me how to execute jsp or servlets with the help of eclipse with some small program
unable to connect to server - JSP-Servlet
unable to connect to server  thank you for the program code for inserting and reteriving the image but i am unable to deploy these two programs..., create a web application folder inside the webapps folder and put the jsp file
how to execute this code - JSP-Servlet
how to execute this code  hi guys can any help me in executing this bank application http://www.roseindia.net/jsp/bank.shtml, i need to use any database plz tell me step-to-step procedure for executing this,i need to create
how to execute jsp and servlets with eclipse
how to execute jsp and servlets with eclipse  hi kindly tell me how to execute jsp or servlets with the help of eclipse with some small program... http://www.roseindia.net/jsp/crud-application.shtml This will help you in how
Unable to connect servet, jsp to oracle 10g database.. Unable to retrieve data..
Unable to connect servet, jsp to oracle 10g database.. Unable to retrieve data..  I have a class file AbstractDataAccessObject with the below code.... If I use it also, unable to connect to backend oracle database. Let me
Unable to run jsp files on internet explorer - JSP-Servlet
Unable to run jsp files on internet explorer  Hi, I am Akhilesh Shrivastav. I am new to jsp and a new member of this site. My problem is i wrote...-tomcat-6.0.16/webapps/jsp i am sending simple program of jsp. Hello World JSP Page
Unable to call .jrxml file from jsp
import="java.text.*" %> JSP Page...; ***And it output**** Here output display in browser. JSP Page...Unable to call .jrxml file from jsp  Hi, I am doing web application
Struts2...problem in JSP..unable to get the values for menuTitle!!!
Struts2...problem in JSP..unable to get the values for menuTitle!!!  ... Jsp is displaying the menuId from database but not the menuTitle...where as its... dao=new DAO(); public String execute() { menulistlist=dao.fetch
which version of eclipse is used to execute Servlet or JSP
which version of eclipse is used to execute Servlet or JSP  Hi Can any body tell me which version of eclipse i have to use inorder to execute Servlet or JSP. previosuly i installed eclipse 3.1 .i am having j2se 5.0 with which i
unable to compile class file - JSP-Servlet
unable to compile class file  I wrote database connection in jsp file. I have form in html. In html form i put drop down list box in that form...("/jsp/Combobox.jsp"); dispatcher.forward(request, response
Unable to bind to a hashmap from jsp using spring tags - Spring
Unable to bind to a hashmap from jsp using spring tags  Hi, I am unable to bind a hashmap from my jsp page. Here is what i want to do: I have an arraylist in a jsp page. As i loop through the array list, for each element i
how to execute the below servlet with html page
how to execute the below servlet with html page  //vallidate user n pwd by validservlet package active; import javax.servlet.*; import...))){ response.sendRedirect("Admin"); } else{ response.sendRedirect("/examples/jsp
unable to get value returned from javascript variable in page
jsp page..what i want is to store the value returned from the js function... '';} TEST: PRODUCTION: ACCEPTANCE: 2nd page is a normal jsp page...unable to get value returned from javascript variable in page  Hi, I
jsp page - JSP-Servlet
jsp page  what are elemets and template data in jsp page??  Hi Friend, Template Data is a parameterized content that allows the JSP document to generate a response stream of characters. JSP Elements provides
jsp page
jsp page  <%@page contentType="text/html" pageEncoding="UTF-8"%>...;%@page import="java.sql.Statement"%> <%@page import="java.sql.DriverManager"%> <%@page import="java.sql.Connection"%> <%@page import
JSP Tutorials - Page 3
JSP Tutorials - Page 3
jsp page
jsp page  <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
jsp page connectivity with oracle - SQL
jsp page connectivity with oracle  I am unable to database connectivity jsp with oracle. Please send the code for solving problem. thanks ...)write query and execute the query: ResultSet rs = st.executeQuery("SELECT
Easily create JSP page
Easily create JSP page  Hi, How I can easily create JSP page? Where to run the JSP page easily? Thanks   Hi, JSP stands for Java Server Pages and its easy to create a simple JSP page. Check the tutorial: How
The Page Directive in JSP Page
The Page Directive in JSP Page     ... of the JSP page which works for the entire JSP page. These directives apply different... and explanation one-by-one. This is the directive of the JSP page which defines
jsp page submitting
jsp page submitting  whenever i am submitting the jsp page it downloads some unknown file on tomcat server
create a folder in jsp page
create a folder in jsp page  i want to create a folder in jsp page And it can be delete aslo
export jsp page - JSP-Servlet
export jsp page  i want to export jsp page in word and pdf format... code that export my jsp page in word and pfd format....  Hi Friend, Try the following code: 1)pdf.jsp: Name Address Contact
JSP error page - JSP-Servlet
JSP error page  Hi i have 1000 of JSP. but we coded it without adding the . but now i have to forward the page to the specific page when the exception occured in JSP. is there any short cut i can do? do not want to add this line
refresh jsp page - Ajax
refresh jsp page  Code for refresh a web page in jsp.  Hi friend, function refreshpage() { window.location.reload
JSP Hindi Page - JSP-Servlet
JSP Hindi Page  I need to provide users with option to print a Certificate in English or Hindi. This is an html page generated by JSP Code. Depending upon the button clicked english or hindi version of the Certificate should
Search Page in jsp
Search Page in jsp  search page in jsp   Please go through the following links: http://www.roseindia.net/jsp/user-search.shtml http://www.roseindia.net/servlets/search.shtml
jsp login page
jsp login page  hi tell me how to create a login page using jsp and servlet and not using bean... please tell how to create a database in sql server... please tell with code
Search page form in jsp
Search page form in jsp  search form in jsp   Please go through the following links: http://www.roseindia.net/jsp/user-search.shtml http://www.roseindia.net/servlets/search.shtml
Page object - JSP-Servlet
Page object  Hello friends, How can we make use of PAGE object of implicit JSP object. If this is possible explain me about.......  Hi friend, Implicit Objects in JSP are objects
jsp page tags - JSP-Servlet
jsp page tags  Hi, Can anyone please explain me how to use Pager tags (http://jsptags.com/tags/navigation/pager/index.jsp). After getting the data from the database, how should we use that in these tags. Can you please
JSP page directive tag
JSP page directive tag  What is page directive tag in JSP?.   Hi, The answer given below:ADS_TO_REPLACE_1 The page directive applies to an entire JSP file and any of its static include files, which together are called
Sorting a jsp page. - JSP-Servlet
Sorting a jsp page.  Hi there, It's me again. I tried to use Ajax... is process the code in the servlet. Here's the code in the jsp below: JSP Page Universal Books Home Page
list to be displayed in jsp page.
list to be displayed in jsp page.  Can any one help me? Am developing the code in struts.I have a list in action class that has to be printed in the dropdownlist in another jsp page.Please help me in the code.. Thank u
jsp login page
jsp login page  Hi All, can any one tell me how to create Login page using JSP and Beans. A simple log in page. Please reply ASAP.ADS...:ADS_TO_REPLACE_2 JSP Login Using Bean Thanks   Hi,ADS_TO_REPLACE_3
Parameter passing from jsp page to jsp page - JSP-Servlet
Parameter passing from jsp page to jsp page  Hi I intends to pass the parameters that I received from previous page through query String. I get all... Welcome :  For more information on JSP visit
JSP Page Directive
JSP Page Directive  Defined JSP Page Directive ?   The <%@ page %> directive applies to an entire JSP file and any of its static... is a file whose content becomes part of the calling JSP file.The <%@ page %>
page refresh - JSP-Servlet
page refresh  Hi All, I've done a login application using Ajax. I wrote jsp page having sign in option. when i click the sign in,pop up window... up window has to close and jsp page has to refresh. how can i solve
Forward a Jsp Page
Forward a Jsp Page In this example program we will show you how to use the <jsp:forward tag in your jsp program. The <jsp:forward tag is used... is the use of <jsp:forward tag: <jsp:forward page="
JSP LOGIN Page
JSP LOGIN Page  sir....i have two user types usercategory and user and both user have userid and password in two different table and now i am making login page for which i have to retrieve usertype,userid and password from two
download or save jsp page
download or save jsp page  hii.., this is my jsp page .. This page is theater ticket. i want to download this page. so i need to save this page...="text/html" pageEncoding="UTF-8"%> JSP Page
download or save jsp page
download or save jsp page  hii.., this is my jsp page .. This page is theater ticket. i want to download this page. so i need to save this page...="text/html" pageEncoding="UTF-8"%> JSP Page
Error page in JSP
Error page in JSP In this section we will discuss about "Error page... an exception occurs that redirects programmer to error page. When you execute the JSP page a runtime error may occur inside the page or outside the page. JSP

Ads