• 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

Enable JSP on a user a/c

 
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I just set up the tomcat4.0.4. I had a user under /home/user on my redhat 7.3.
How can I enable the jsp page to be reviewed properly if I type http://localhost/~user/index.jsp?
It displayed the jsp code only, not the html page.
How can I set the tomcat and apache to enable user to use jsp and servlet?
Thanks
Andrew
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's functionality provided by Web servers (such Apache Web Server), where the incomming request is remapped to another directory based on the incomming format eg ~name gets converted to /usr/name
Dave
 
Andrew Parker
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, how do I edit the httpd.conf and map to the var/tomcat4/webapps/ROOT/WEB-INF?
or I need to edit web.xml, server.xml and add mod_webapp module to apache?
Thanks for help
Andrew
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now you got me beat. I know how it happens, I know what it looks like, but as to how you actually achieve it, you'd have to go have a look at the Apache docs.
I remember seeing an example on this, but it was mapping to user directories rather than a user context. There might be some differences.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like this conversation is now being continued here
 
Andrew Parker
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I removed the mod_webapp.so and install mod_jk.so. But, httpd shows an error and cannot be started now.
Loaded DSO modules/mod_jk.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with - DEAPI).
What does it mean and how should I do it now?
According to http://www.yolinux.com/TUTORIALS/LinuxTutorialTomcat.html#APACHETOMCAT, here were my steps (Please tell me which part I was wrong):
1. I installed mod_jk-1.3-1.0-1.4.0.2.i386.rpm which was downloaded from http://jakarta.apache.org/builds/jakarta-tomcat-4.0/archives/v4.0.2/rpms/
2. I downloaded http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3/bin/linux/i386/mod_jk-3.3-ap13-eapi.so, rename it to mod_jk.so and replace the one located under /usr/lib/apache/mod_jk.so.
3. Modify: /etc/httpd/conf/workers.properties
4. Add to: /var/tomcat4/conf/server.xml
5. Add to: /etc/httpd/conf/httpd.conf
6. Modify: /etc/httpd/conf/mod_jk.conf
Thanks for any advice.
 
Andrew Parker
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The apache can connect to tomcat now.
When I run http://localhost/examples/servlet/MyHelloWorld, it works now.
I did not setup Virtualhost. However, I have many users like localhost/~userA.
I tried to add JkMount /*.jsp ajp13, JkMount /servlet/* ajp13 to httpd.conf in-between <Directory /home/*/html> </Directory>.
However, the apache cannot be started because they cannot be added in-between <Directory>.
I also tried to add <Host name="localhost/~userA">
<Context path="" docBase"/home/userA/html" /></Host> to server.xml.
But, it still did not work.
So, how should I configure httpd.conf and server.xml or other files in order to make it work?
And advice?
reply
    Bookmark Topic Watch Topic
  • New Topic