View previous topic :: View next topic |
Author |
Message |
kakakoka Tux's lil' helper
Joined: 14 May 2003 Posts: 147 Location: Denmark
|
Posted: Thu Apr 14, 2005 12:18 pm Post subject: Tomcat webapps folder confusing. |
|
|
I've played around with tomcat lately, involving emerge -c tomcat and removing /opt/tomcat5 and then doing emerge tomcat again.
The problem is that the page, which usually shows up under http://myip:8080, now only shows up under http:/myip:8080/ROOT (its in the /opt/tomcat5/webapps/ROOT folder).
http://myip:8080 shows a directory listing of /opt/tomcat/webapps. The content here is:
Code: | drwxr-xr-x 8 tomcat tomcat 224 Apr 14 12:58 .
drwxr-x--- 9 tomcat tomcat 264 Apr 14 12:52 ..
drwxr-xr-x 3 tomcat tomcat 248 Apr 14 12:52 ROOT
drwxr-xr-x 4 tomcat tomcat 128 Apr 14 12:53 balancer
drwxr-xr-x 21 tomcat tomcat 592 Apr 14 12:52 jsp-examples
drwxr-xr-x 4 tomcat tomcat 320 Apr 14 12:52 servlets-examples
drwxr-xr-x 12 tomcat tomcat 1288 Apr 14 12:53 tomcat-docs
drwxr-xr-x 3 tomcat tomcat 168 Apr 14 12:53 webdav
|
If I open http:/myip:8080/ROOT and click manager or administration I get a 404 since the manager and administrator is now in /opt/tomcat5/server/webapps:
Code: | mikan webapps # ls /opt/tomcat5/server/webapps/ -la
total 1
drwxr-xr-x 4 tomcat tomcat 96 Apr 14 12:52 .
drwxr-xr-x 5 tomcat tomcat 120 Apr 14 12:52 ..
drwxr-xr-x 15 tomcat tomcat 488 Apr 14 12:52 admin
drwxr-xr-x 4 tomcat tomcat 272 Apr 14 12:52 manager |
I wonder if this directory layout is natural (then I just screwed up some mapping somewhere) or not (then I or something else screwed up the directory layout).
My appbase for host myip and for host localhost is webapps. _________________ Aspiring to once become a great geek
---
"Tachikoma": AMD TB 1300 Mhz, ECS-K7S5A (SIS 735), (noname) RADEON 8500, Hercules Gametheater XP, Pinnacle PCTV pro
"Pyonpyon": Athlon 2500+ Barton, MSI K7N2-delta-ISLR (Nforce2), Sapphire Radeon 9600 Pro |
|
Back to top |
|
|
hlevyn Apprentice
Joined: 14 Jan 2005 Posts: 240 Location: Santa Clara, California
|
Posted: Thu Apr 14, 2005 4:45 pm Post subject: |
|
|
As I understand, webapps is simply a folder to hold all of your web applications. ROOT is the webapp that you should see upon loading http://myip:8080. Manager and administration are two separate web apps as well that need to be mapped. Take a look at $TOMCAT_HOME/conf/server.xml: in there should be a <Context> tag placing ROOT at /.
Code: | <Context path="" docBase="ROOT" debug="0"/> |
kakakoka wrote: | If I open http:/myip:8080/ROOT and click manager or administration I get a 404 since the manager and administrator is now in /opt/tomcat5/server/webapps |
This is natural, don't worry about it. The reason I suspect you might be getting a 404 when trying to load from http://myip:8080/ROOT/ is simply a context path issue. The link from that page is most likely relative, thus it's trying to load http://myip:8080/ROOT/admin rather than http://myip:8080/admin. Look at the path it's trying to load and then modify as needed to ensure that the webapps are indeed running.
Disclaimer: I'm comparing against an installation on a Solaris9 box in which I have changed a number of the context paths. Actual path on your machine may vary.
Good luck! _________________ Madness takes its toll. Please have exact change. |
|
Back to top |
|
|
kakakoka Tux's lil' helper
Joined: 14 May 2003 Posts: 147 Location: Denmark
|
Posted: Wed May 04, 2005 12:56 pm Post subject: |
|
|
Took me a while to get back to this
Im a little blank as to how I can correct the mappings as you mention. Do you suggest modifying the root page or adding something to server.xlm? If what you are suggesting is the latter, could you give an example as to what the actual mapping would look like? That would be of great help to me. _________________ Aspiring to once become a great geek
---
"Tachikoma": AMD TB 1300 Mhz, ECS-K7S5A (SIS 735), (noname) RADEON 8500, Hercules Gametheater XP, Pinnacle PCTV pro
"Pyonpyon": Athlon 2500+ Barton, MSI K7N2-delta-ISLR (Nforce2), Sapphire Radeon 9600 Pro |
|
Back to top |
|
|
hlevyn Apprentice
Joined: 14 Jan 2005 Posts: 240 Location: Santa Clara, California
|
Posted: Wed May 04, 2005 1:35 pm Post subject: |
|
|
Open server.xml and look for path="" inside a <Context> tag. If it's not found, add the following to server.xml:
Code: | <Context path="" docBase="ROOT" debug="0"/> |
If it is found, change the docBase on that line to ROOT. This will then place ROOT at http://myip:8080/.
Cheers! _________________ Madness takes its toll. Please have exact change. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|