.jsp file

Thread Solved

Join Date: Oct 2009
Posts: 3
Reputation: neeraj20gupta is an unknown quantity at this point 
Solved Threads: 0
neeraj20gupta neeraj20gupta is offline Offline
Newbie Poster

.jsp file

 
0
  #1
Oct 9th, 2009
i m a stater with jsp .... have installed Tomact 5.0.28. Its displaying server page when i type http://localhost:8080

now i have made a simple context.jsp file---->

  1. <HTML>
  2. <HEAD>
  3. <TITLE>
  4. Context
  5. </TITLE>
  6. </HEAD>
  7. <BODY>
  8. <%
  9. out.println("First JSP APPLICATION");
  10. %>
  11. </BODY>
  12. </HTML>


placed it in a folder ch in webapps folder of tomcat...

when i try to run it by
http://localhost:8080/ch/context.jsp

it shows the error

type Status report

message /Context.jsp

description The requested resource (/Context.jsp) is not available.



please help....
Last edited by peter_budo; Oct 11th, 2009 at 10:54 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks).
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,190
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 483
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer
 
-1
  #2
Oct 11th, 2009
You got general direction of the wind that files that you wish to deploy should be placed in webapps folder, unfortunately it is not full truth.
You need to provide your "ch" folder with minimal Tomcat deployment directory structure.
  1. Create new project folder in directory webapps (you already did this with creating new folder named ch)
  2. Place context.jsp in "ch" folder (you already did)
  3. In project folder create another folder called WEB-INF where you will save web.xml
  4. Create web.xml
    1. <?xml version="1.0" encoding="ISO-8859-1"?>
    2.  
    3. <!DOCTYPE web-app
    4. PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    5. "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
    6.  
    7. <web-app>
    8. <welcome-file-list>
    9. <welcome-file>context.jsp</welcome-file>
    10. </welcome-file-list>
    11. </web-app>
  5. Start server and call your JSP
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 3
Reputation: neeraj20gupta is an unknown quantity at this point 
Solved Threads: 0
neeraj20gupta neeraj20gupta is offline Offline
Newbie Poster
 
0
  #3
Oct 11th, 2009
thanks a lot peter_budo ......... it worked..........
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC