Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 13th, 2005, 06:38 AM
Registered User
Join Date: Feb 2005
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old June 13th, 2005, 10:57 PM
Registered User
Join Date: Jun 2005
Location: , , .
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

Reply With Quote
  #3 (permalink)  
Old July 1st, 2005, 07:44 AM
Registered User
Join Date: Jul 2005
Location: Chennai, TamilNadu, India.
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

Reply With Quote
  #4 (permalink)  
Old July 4th, 2005, 05:26 AM
Authorized User
Join Date: Apr 2005
Location: Pune, MH, India.
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.


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 04:53 AM.

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