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
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
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.
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?