Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 13th, 2005, 06:38 AM
Registered User
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default run jsp on tomcat


I have installed jdk and tomcat on my pc and set path to
C:\Program Files\Java\jdk1.5.0\bin;C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin;

i created one jsp page with the contents
<%@page import="java.util.date" %>
 the current date is <% = (new Date()).toString() %>

I saved this file into c:\Program files\Apache Software Foundation\Tomcat 5.5\Webapps\javacode\displaydate.jsp

directory. and type the following url in browser


its not showing me output.
shall i set classpath ?

thanks in advance

Old June 13th, 2005, 10:57 PM
Registered User
Join Date: Jun 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

hai this is ramesh!
        suppose u installed tomcat in c:\tomcat
        and u installed in d:\j2se
        ur working dir e:\ramesh
        u first set path ie in environment variable
         similarly to classpath
        %classpath%;d:\j2se\src.zip or d:\j2se\lib;
        set catalina-home

             and make sure ur placing ur jsp in
                | Web-inf\
                | ur.jsp
                            |tld\*.tld (for useage of Custom Tag)
in browser tpye http://urhost:portnumber/urdir/ur.jsp
meaning is this requset reaches to urdir ie public area of
webserver,ur jspfiles is under public area from WEB-INF onwords
private area to users so they cannot use /call directly
only they are suppose to call(access) files in public area
if u want to use private area it is possible only mapping on web.xml
urdir acts as small website

 if u have any clarificationf contact me on dlnr01@yahoo.co.in

Old July 1st, 2005, 07:44 AM
Registered User
Join Date: Jul 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Satishhhh

Problem is with your classpath.... check it... set classpath to the libraries of java and tomcat lib

Old July 4th, 2005, 05:26 AM
Authorized User
Join Date: Apr 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jmukesh Send a message via Yahoo to jmukesh

Hi Dev...,

Well since your starting to develop those jsp for the first time.
I would suggest to browse through the default application coming
with tomcat.

just check the url on ur local machine.
you will find link to examples. then check jsp examples.

there will be examples such as calender etc.

you can put your file there and check whether its running.

then we take it from there.


Similar Threads
Thread Thread Starter Forum Replies Last Post
I WANT TO RUN JSP ON TOMCAT! reddikishore BOOK: Beginning Java 2 0 July 1st, 2007 08:17 AM
jsp & tomcat aruna_k_2006 JSP Basics 1 March 23rd, 2007 07:16 AM
jsp in tomcat damo Apache Tomcat 1 February 15th, 2005 01:32 PM
Iam still in JSP 1.2 and using Tomcat 4.1 dotnetwhizkid JSP Basics 1 August 9th, 2004 07:40 AM
Chapter 1 - First JSP is not seen by Tomcat aesposito JSP Basics 1 July 29th, 2004 11:56 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.