• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Problem With Installing Tomcat 4.1 17 In The Windows 98

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have run a Google search at the JavaRanch on the subject of installing Tomcat, but still cannot solve my problem.
I tried to install the Tomcal 4.1.17 in my Windows 98. I have been through the following steps:
1. http://localhost:8080/ and got Tomcat welcome page (i.e. index.jsp)
2. http://localhost:8080/Hello.html and got the HTML output
However, I got "error 404, page not found" when I tested the Hello.jsp. I am sure that I put Hello.jsp in the same directory where the Hello.html is, i.e. C:/install_dir/webapps/Root
I put both jakarta-tomcat-4.1.17 and j2sdk1.4.0_01 in the C:\ directory. I copied the servlet.jar file from the C:\jakarta-tomcat-4.1.17\common\lib directory to the C:\j2sdk1.4.0_01\lib directory and my autoexec.bat is like:

What should I do?
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any suggestions? What mistakes did I make?
[ December 20, 2002: Message edited by: JiaPei Jen ]
 
Ranch Hand
Posts: 2379
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may have a look at this
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I have read the web link that you provided and other posts on the subject. The problem persists.
When I got the Tomcat welcome page, I tried the "JSP examples" given in that page. All the given JSP samples worked. Only when I put my testing JSP Hello.jsp in the c:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\Root and typed http://localhost:8080/Hello.jsp, I got error 404, file not found problem.
I have the Windows 98.
1. I downloaded j2sdk1.4.0_01 and I have been using it for a while.
2. I downloaded the "binary" --> Release Builds ---> tomcat-4.1.18-LE-jdk14.zip, unzipped and installed it.
3. I am able to start the web server because I got both the Tomcat welcome page, Hello.html, and HelloServlet.java.
4. I have read the previous posts regarding the settings. I simply cannot get Hello.jsp. I got error 404. May be there are problems with my eyes. I do not see my settings are different from what people have suggested.
Let me post my autoexec.bat again:

[ December 22, 2002: Message edited by: JiaPei Jen ]
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did some tests:
I opened the
c:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\Root\index.jsp
(which works without problem) and used "File --> Save As" to save it as anyname.jsp
I then went to the IE browser and typed
http://localhost:8080/anyname.jsp in the address bar. It was error-404.
I did another test. I first selected a JSP file, numguess.jsp, that came with the Tomcat 4.1.18 server. This file is located in the
c:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\examples\jsp\num
directory and I typed
http://localhost:8080/examples/jsp/num/numguess.jsp in
the address bar. This file worked well.
I added my name at several places in the source code of that file (numguess.jsp). And I used "File --> Save". I then went the browser and typed http://localhost:8080/examples/jsp/num/numguess.jsp in
the address bar, I got error-404.
This problemm is driving me crazy.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's my 2 cents:

All those JSP samples in the ...\webapps\examples directory worked
without any problem. I always get error-404 when I run my own
filename.jsp.


If those examples work, there is nothing wrong with your setup, just the way you're trying to implement your jsp's.
You might just need to change the way you're approaching things.
My suggestion is that instead of setting up a project from scratch, look closely at how those examples work, and set your own examples up the same way.
You could even copy the entire examples "project" into another directory so you can manipulate it and experiment while leaving the original intact.
Look closely at server.xml and web.xml for that "examples" project. As I remember, the configuration for those is a clear case of overkill, but they DO have jsp's working.
Good luck!
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK. I will read those JSP samples in the "examples" folder.
But, why my little Hello.jsp in the ...\webapps\Root directory gives me error-404 when I typed http://localhost:8080/Hello.jsp in the IE address bar?
 
Michael Mendelson
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

But, why my little Hello.jsp in the ...\webapps\Root directory gives me error-404 when I typed http://localhost:8080/Hello.jsp in the IE address bar?


Well, 404 means "not found". Offhand check the server.xml. Check the directory and make sure that the jsp landed in the same directory as the default Tomcat index file.
Is the capitalization of your directories and the jsp file consistent with the url? Even if you're working on a windows platform, it could matter.
It's really hard to tell. Try approaching the problem as I suggested earlier, and eventually I have a feeling you'll stumble upon the answer you seek.
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Check the directory and make sure that the jsp landed in the same directory as the default Tomcat index file.


The answer is YES.


Is the capitalization of your directories and the jsp file consistent with the url? Even if you're working on a windows platform, it could matter.


The answer is YES. I understand the case sensitiveness issue.
As I said in the previous post:
I opened the
c:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\Root\index.jsp
(which works without problem) and used "File --> Save As" to save it as anyname.jsp
I then went to the IE browser and typed
http://localhost:8080/anyname.jsp in the address bar. It was error-404.
I did another test. I first selected a JSP file, numguess.jsp, that came with the Tomcat 4.1.18 server. This file is located in the
c:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\examples\jsp\num
directory and I typed
http://localhost:8080/examples/jsp/num/numguess.jsp in
the address bar. This file worked well.
I added my name at several places in the source code of that file (numguess.jsp). And I used "File --> Save". I then went the browser and typed http://localhost:8080/examples/jsp/num/numguess.jsp in
the address bar, I got error-404.
[ December 24, 2002: Message edited by: JiaPei Jen ]
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to all of you for your attention to my problem with the Tomcat. Let me give the answer.
The problem has noting to do with settings, ..., etc. The problem is unique to the machine I am using.
Somehow, the machine cannot save files as JSP files. I always get files saved as TXT files. For example, after I typed a JSP program using the editor, I click on
File -- > Save As
and I choose
Save As type: All File (*.*) and I give
File name: anyname.jsp
then click on the Save button. What I get is anyname.txt. The Tomcat server cannot find anyname.jsp and reports error-404.
 
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're using notepad for JSP develoopment, you need to save the file in quotes like this:
File...SaveAs..."SomeFile.jsp".
Then notepad won't append a .txt to the file name.
-- Mike
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic