• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Apache/Tomcat servlet problem

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all, I'm currently facing a problem which has really got me stumped..Really hope you all out there could help me out on this one...
I just managed to make Apache/Tomcat work together on my machine. It's processing JSP pages perfectly...but when it comes to servlets, it's a totally diffrent story..I'm getting "page cannot be found" errors from IE when I type something like http://127.0.0.1/servlet/HelloServlet
but when I type http://127.0.0.1:8080/servlet/HelloServlet
the servlet runs properly...
This has really got me stumped. Really hope you all out there can help me out on this one...Thanks everyone..
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi wong,
The point out here is tomcat server listens on a particular port when u install tomcat by default the port in the config file(Server.xml) is 8080.So ur url has to be of the type
http://address ort/servlet/servletname.You can also change the port in the config file so that the server listens on some other port e.g(80)
ur url would then be
http://address:80/servlet/servletname
 
Wong Kok Choy
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Roy,
Thanks for your reply.. I was actually wondering that since Tomcat can work alongside Apache using mod_jk, then wouldn't Apache talk to Tomcat to process the JSP and servlets?Sorry..I'm kinda new at this so I'm not really sure about the relationship between tomcat and apache...I have made Apache and Tomcat work together using mod_jk...JSP pages work fine..but servlets are not.. not really sure why..
 
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
Tomcat 4.1.12 and above do not have the invoker servlet enabled by default (the invoker is the one that responds to request of the form /servlet/* )

You must enable this in server.xml.

And this is a Tomcat config question, so it's being moved to Apache/Tomcat.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic