943,936 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Marked Solved
  • Views: 813
  • JSP RSS
Oct 9th, 2009
0

.jsp file

Expand Post »
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---->

JSP Syntax (Toggle Plain Text)
  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).
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
neeraj20gupta is offline Offline
3 posts
since Oct 2009
Oct 11th, 2009
-1
Re: .jsp file
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
    XML Syntax (Toggle Plain Text)
    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
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 873
Code tags enforcer
peter_budo is offline Offline
6,656 posts
since Dec 2004
Oct 11th, 2009
0
Re: .jsp file
thanks a lot peter_budo ......... it worked..........
Reputation Points: 10
Solved Threads: 0
Newbie Poster
neeraj20gupta is offline Offline
3 posts
since Oct 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: JSP XML parser
Next Thread in JSP Forum Timeline: problem in comparision of dropdown value and database vale





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC