aspose file tools*
The moose likes Tomcat and the fly likes Tomcat can not find my first JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat can not find my first JSP" Watch "Tomcat can not find my first JSP" New topic
Author

Tomcat can not find my first JSP

Nancy Lee
Greenhorn

Joined: Mar 23, 2002
Posts: 15
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

Joined: Jan 10, 2002
Posts: 61747
    
  67

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
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

Joined: Jan 10, 2002
Posts: 61747
    
  67

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

Joined: Mar 23, 2002
Posts: 15
Thank you JiaPei Jen. I put "" around the file name and now it works.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

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

Joined: Mar 14, 2003
Posts: 18
Surely you mean "pick that nit"
Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat can not find my first JSP