Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Tomcat can not find my first JSP

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use Window XP, Tomcat 4.0.4 and j2sdk1.4.1.
All the samples JSPs and servlet files that I downloaded works fine.
I try to use Notepad to create a simplest JSP file(Test.jsp) and store it at the same subdirectory where those working smples JSPs are stored. But the Tomcat gave me an error message "The requested resource(Test.jsp) is not available."
I do notice that those working samples JSPs have different file type icon from my. Theirs are compiled java .class file type and my is notepad file type. Isn't that the JSP page will be translated into a servlet and compiled when I first request it? Is there something else that I need to do before I can request it from Tomcat?
Thanks for any reply.
 
Sheriff
Posts: 67498
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where are you putting the JSP files exactly? There shouldn't be any .class files there which makes me suspect that you are dropping the JSP pages in the wrong place.
bear
 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you save your xyz.jsp file using the Notepad, please put doulbe quote (") around it; for example, "xyz.jsp". Otherwise, your xxx.jsp file will be saved as a text file and the tomcat will not be able to find your file.
 
Bear Bibeault
Sheriff
Posts: 67498
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ummm, JSP files are text files.
I think what JiaPei is trying to convey is to make sure that Notepad (not exactly the best tool you could be using for the job) is not putting a spurious .txt file extension on the end of your file name.
bear
[ March 17, 2003: Message edited by: Bear Bibeault ]
 
Nancy Lee
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you JiaPei Jen. I put "" around the file name and now it works.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
regarding the differentiation between "as a text file" and "a file with a .txt extension"

When people say "The kettle is boiling" I think they all understand the speaker means "the water inside the kettle is boiling".

I could be wrong, but I thought I'd nitpick that nitpick.
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Surely you mean "pick that nit"
Dave
 
Sometimes you feel like a nut. Sometimes you feel like a tiny ad.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic