Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat can not find my first JSP

 
Nancy Lee
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • 0
  • Mark post as helpful
  • send pies
  • 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
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you JiaPei Jen. I put "" around the file name and now it works.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Dave Mulligan
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Surely you mean "pick that nit"
Dave
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic