New to JSP..need help to make & run a JSP program.

New to JSP..need help to make & run a JSP program.

Hi,

I have installed Tomcat 5.5 on my system.

Plz help me to make a simple JSP program. And also how to run it.

View Answers

December 1, 2010 at 12:43 PM

Hi Friend,

Have you set the classpath? Anyways, if not then do the following:

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-5.5.

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

Also out the servlet api.jar file inside the lib folder.

Now create a jsp file:'hello.jsp'

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

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

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

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

Open your browser and type the following url:

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

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

For more information, visit the following link:

JSP Tutorials

Thanks









Related Tutorials/Questions & Answers:
New to JSP..need help to make & run a JSP program.
New to JSP..need help to make & run a JSP program.  Hi, I have installed Tomcat 5.5 on my system. Plz help me to make a simple JSP program.../hello.jsp and press enter. You jsp program will then display the output
How to run JSP program inEclipse?
How to run JSP program inEclipse?  Hi, I am learning JSP. I want to run JSP in Eclipse. How to run JSP program inEclipse? Thanks   Hi, Its easy to run JSP from the Eclipse. You have to make a dynamic web application
Advertisements
How to run program in new opened cmd
How to run program in new opened cmd  Hello i have made a program in java to open command prompt, then how to run my left of the program in the new opened command prompt
how to run jdbc in jsp program - JSP-Servlet
how to run jdbc in jsp program  i want to use sql server 2005 in jsp program to store data.i know how to run simple program but this program i tried... visit the following links: http://www.roseindia.net/jsp/submit-comments
JSP:NEED RESPONSE ASAP PLEASE! - JSP-Servlet
JSP:NEED RESPONSE ASAP PLEASE!  Hi freind, If you could respond... and then sends this data in url to the next jsp page. The code works fine...){ document.getElementById(i).className=c; } function click(ide,d1,d2,d3){ var st=new
run command prompt from jsp program
run command prompt from jsp program  Hi.... Is it possible to run a command prompt from jsp? If possible please help me with some code... Thanks & Regards vanchinathan.R
How to run JSP program in Tomcat server step by step?
How to run JSP program in Tomcat server step by step?  Hi, I am.... How to run JSP program in Tomcat server step by step? Thanks   Hi, JSP technologies is used in Java to make dynamic web program that runs
make a program
make a program  GoodEmployee is defined who has ALL the following properties: He should be married. He should have 2 or less than 2 children. His middle name should start with "k" but not end with "e" The last name should have
Help with this program
Help with this program  Write a program that would do the following: 1) Read a String from the user. The String will be the following: "My grade is x" (where x is an integer between 0-9) 2) Get the String to integer by creating
Help with this program
Help with this program  Write a program that would do the following: 1) Read two Strings from the user 2) The user should input two integer numbers. 3) Convert the Strings to integers by creating objects and calling
ModuleNotFoundError: No module named 'make-help'
ModuleNotFoundError: No module named 'make-help'  Hi, My Python... 'make-help' How to remove the ModuleNotFoundError: No module named 'make... have to install padas library. You can install make-help python with following
how to make exampage in jsp ?
how to make exampage in jsp ?  how to make a online exam page in jsp and servelet
how to make a program on array
how to make a program on array  When you make a program on array that the element will move downward and upward and when you input twice 0 then thats the time that it will not move. pls. give me a formula...tnx
How to make first JSP page?
How to make first JSP page?  Hello, How I can make first JSP page? Thanks   HI, Beginner can learn JSP from writing the first Program... tutorial: How to make my first JSP page? Thanks
jsp help
with it. so that my project can run independently in any server. plz help me. am so...jsp help  Hi i am doing my project in jsp.using netbeans 6 and mysql 5.0. and i managed to complete it. and now its submission time. but am confused
make this program in java
make this program in java  given array a[1,5,3,1].want to take value from array and print star(*) that number times columm wise . output shuld
compile and run java program
compile and run java program  Hello, everyone!!! I just want to ask..._TO_REPLACE_1 how do I compile and run this file using the terminal of ubuntu... help me with this one...ADS_TO_REPLACE_2 YOUR HELP IS HIGHLY APPRECIATED
how to run java program
how to run java program  i have jar file. in jar i have so many classes.in one of file i want modify .after modifying file i want replce in jar. please help me to how to generate class and how to replace
how to run this program?
how to run this program?  how to run java swing program   Java Swing program runs same as a simple java program. There is no difference... with javac and run with java command, same as a simple java program. Learn Swing
how to run rmi program
how to run rmi program  how to run rmi program
JSP help
JSP help  Hi i am using jsp,html and mysql. I am displaying one question & their 4 options per page. For that i have one label for question &... do this? Please Help
How to compile and run the JSP
How to compile and run the JSP  Hi Kindly tell me how to run and compile JSP small Program using Tomcat as webserver. I created small program HELLO JSP in HTML and compile the program but it is saying Class o r interface
New to Java Please help
New to Java Please help  Hi I need help, can some one help me with this. I am currently doing a project. drop me an email to my email address. Thanks!   If you are new in java, then you need to learn core java
Jsp program
Jsp program  A sample program of jsp using dml quaries
How to make a new List in Java
How to make a new List in Java  Hi, I have to create list object in Java. How to make a new List in Java? Thanks (adsbygoogle... the new operator as shown below: List list = new ArrayList(); Thanks
couldnt run this program
couldnt run this program  package calculator; import java.util.Scanner; public class calculator{ public static void main(String args[]){ Scanner vin = new Scanner(System.in); Double firstnum,secondnum,sum,sub,mul
NOT ABLE TO MAKE A NEW FILE IN SERVLET
NOT ABLE TO MAKE A NEW FILE IN SERVLET  What is the error in my code? It is not making a new file which contains the string values coming from a HTML page. Any help appreciated. Code is-: package myprogram; import
Simple JSP program example
Simple JSP program example  Hi, How to make simple jsp program...;%= new java.util.Date()%> Above is simple JSP program which prints current... with the simple JSP example program. Give me simple jsp program example. Thanks
run jsp file
run jsp file  how to run the jsp file in varies web servers ... the class path also. The jsp file is to be saved into the web application folder.Let...:8080/examples/abc.jspADS_TO_REPLACE_2 For more information on JSP visit to : JSP
jsp help - JSP-Servlet
jsp help  hai friends i am using videos,which will play on my webpage using flowplayer.my doubt is where will i store my videos whether in the database or in another local folder. please help me as soon as possible thanks
How to make first JSP page?
How to make first JSP page?  Hello, How I can make first JSP page? Thanks
JSP run problem
JSP run problem  type Exception report message description... this request. exception org.apache.jasper.JasperException: Exception in JSP...) root cause java.lang.NullPointerException org.apache.jsp.bb_jsp
how to creat a new program
how to creat a new program  what is use of abs class in realtime projects.. how to creat the program step by step
How To Make This Program - Java Beginners
How To Make This Program  How To Make Java Calculation program I want to Write a program in Java that calculates the sum of digits of an input number, prints it, then calculates the sum... output: 59 14 5 please help to make
how to compile and run servlet program
how to compile and run servlet program   hello sir/mam i hve installed tomcat5.5 version and also have jdk1.6.0_14 installed but not able to run it or compile i m doing it first tyme pls help me in sorting out this problem. i hve
jsp help - JSP-Servlet
jsp help  In below code value got in text box using 'ID' Attribute... showState(str){ if (typeof XMLHttpRequest != "undefined"){ xmlHttp= new XMLHttpRequest(); } else if (window.ActiveXObject){ xmlHttp= new ActiveXObject
Help with Temperature program
Help with Temperature program  I need help to write a GUI program to calculate the temperature. and here is the format Application that converts... The application should allow the user to make conversions between any two scales.
jsp program
jsp program  sir how we can load the data on the server in the on line project
jsp help - JSP-Servlet
jsp help  i want to add n remove rows dynamically and also want to add data in database in jsp ....  Hi Friend, Try the following code: 1)table.jsp: Add/Remove dynamic rows in HTML table function
Need help with console program?
Need help with console program?  Write a console program that repeatedly prompts the user to enter data until they type done (any case, Upper, Lower... Exception { BufferedReader br=new BufferedReader(new InputStreamReader
jsp help - JSP-Servlet
jsp help  i got below code for dynamically add n delete row... but in my table there are 17 colum in 1 row..i want to add whole row with 17 cloum.. so which changes are required??? 1)table.jsp: Add/Remove dynamic
need help with program
need help with program  To write a program to read a set of words from a file and return the following 1)Each word in the file against its frequency 2) the frequency should be in the descending order of the frequencies
help in java program
help in java program  please could you help me with my assignment I have to submit it on Monday 29 October please help me :( Write a program to test the Person class defined below. Your test program should
java program run on thml page?
java program run on thml page?  how to run java program on html page using text area
jsp program
jsp program  for example assume four user u1,u2,u3,u4 having the passwords pwd1,pwd2,pwd3,pwd4 respectively.write a servlet for doing the following 1.create a cooki and add these four user id's and passwords to this cookies
need help with a program - Java Beginners
need help with a program   Part I An algorithm describes how... by the user. The output of the program should be the length and width (entered.... First you would need to make up the "test data". For this algorithm, the test data
multithreaded program help!!!!
multithreaded program help!!!!  Write a multithreaded program that calculates various statistical values for a list of numbers. This program... value. For example, suppose your program is passed the integers 90 81 78 95 79
need help with program
need help with program  To write a program where we can take two integer array as input,Find the missing number from array"B" has all the numbers from array"A" except one,and find the fastest way in doing
Jsp error when i run this a jsp file
Jsp error when i run this a jsp file  hi I got this error when i run the jsp file in IDE and outside also please help me java.lang.NullPointerException org.apache.jsp.insertjsp.jspInit(insert_jsp.java:22
please help - JSP-Servlet
please help   i am making a program by this i can find out... problem how i make the query which send for class 1 to 10 , assume subject values... with others combox values. Here is JSP's files: display.jsp

Ads