Re: Problems with jsp include files in sub-directories

2008-07-10 Thread Andrew Connick

Hello Mark Thomas

Thanks for your reply

I forwarded it to my web hosting company. They have followed the
instructions. I now find that I have to use
www.windsor-chamber.co.uk/ROOT/index.jsp
My hosting company says it's not possible to change this (to
www.windsor-chamber.co.uk/index.jsp ) without re-introducing the original
problem.
Can you offer any more help ? I suspect this isn't a tomcat issue, however I
am running out of options here.

Andrew

- Original Message - 
From: Mark Thomas [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, July 09, 2008 10:17 PM
Subject: Re: Problems with jsp include files in sub-directories



 Andrew Connick wrote:
  Hello Mark Thomas
 
  Thanks for your reply.
 
  I have got some information from my hosting company, my setup is:
  Host name=windsor-chamber.co.uk appBase=/home/andrew42/public_html
  Aliaswww.windsor-chamber.co.uk/Alias
  Context path= reloadable=true docBase=/home/andrew42/public_html
  debug=1/
  /Host
 
  Which doesn't quite fit with your example, although I suspect that as
  appBase equals docBase I will have similar or same problem ?

 Yep it is the same issue. appBase == docBase is not a valid configuration
 and will, as you are seeing, break all sorts of things.

  One further question, could you clarify your correct configuration
example,
  I am not sure what the first line means
  ( mv .../webapps/yourApp .../webapps/ROOT )

 Using the setup above the configuration should be:
 Host name=windsor-chamber.co.uk appBase=/home/andrew42/public_html
 Aliaswww.windsor-chamber.co.uk/Alias
 /Host

 You then need to add a directory called ROOT under public_html and all of
 your content needs to be copied from public_html to public_html/ROOT

 Any settings you want for your context (debug, reloadable, etc) should be
 added to public_html/ROOT/META_INF/context.xml eg
 Context reloadable=true debug=1
 /Context

 Mark



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 No virus found in this incoming message.
 Checked by AVG - http://www.avg.com
 Version: 8.0.138 / Virus Database: 270.4.7/1541 - Release Date: 7/8/2008
7:50 PM





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with jsp include files in sub-directories

2008-07-10 Thread Mark Thomas

Andrew Connick wrote:

Hello Mark Thomas

Thanks for your reply

I forwarded it to my web hosting company. They have followed the
instructions. I now find that I have to use
www.windsor-chamber.co.uk/ROOT/index.jsp
My hosting company says it's not possible to change this (to
www.windsor-chamber.co.uk/index.jsp ) without re-introducing the original
problem.
Can you offer any more help ? I suspect this isn't a tomcat issue, however I
am running out of options here.


Find a hosting company that actually knows what it is doing?

This is definitely a configuration issue at their end. If you can get the 
relevant Host and Context configurations we can figure out which bit 
the have messed up this time.


Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with jsp include files in sub-directories

2008-07-10 Thread Mark Thomas

Andrew Connick wrote:

Hello Mark Thomas

Thanks for your reply

I forwarded it to my web hosting company. They have followed the
instructions. I now find that I have to use
www.windsor-chamber.co.uk/ROOT/index.jsp
My hosting company says it's not possible to change this (to
www.windsor-chamber.co.uk/index.jsp ) without re-introducing the original
problem.
Can you offer any more help ? I suspect this isn't a tomcat issue, however I
am running out of options here.


Find a hosting company that actually knows what it is doing?

This is definitely a configuration issue at their end. If you can get the
relevant Host and Context configurations we can figure out which bit
the have messed up this time.

Mark




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with jsp include files in sub-directories

2008-07-10 Thread Andrew Connick

Thanks Mark

They have set the host to:
Host name=windsor-chamber.co.uk appBase=/home/andrew42/public_html
Aliaswww.windsor-chamber.co.uk/Alias
Context path= reloadable=true docBase=/home/andrew42/public_html
debug=1/
/Host

and the context in public_html/ROOT/META_INF/context.xml is :
Context docBase=ROOT path=/   reloadable=true debug=1
/Context

There is also a  public_html/META_INF/context.xml, which is:
Context reloadable=true debug=1
/Context

Thanks
Andrew

- Original Message - 
From: Mark Thomas [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, July 10, 2008 5:44 PM
Subject: Re: Problems with jsp include files in sub-directories



 Andrew Connick wrote:
  Hello Mark Thomas
 
  Thanks for your reply
 
  I forwarded it to my web hosting company. They have followed the
  instructions. I now find that I have to use
  www.windsor-chamber.co.uk/ROOT/index.jsp
  My hosting company says it's not possible to change this (to
  www.windsor-chamber.co.uk/index.jsp ) without re-introducing the
original
  problem.
  Can you offer any more help ? I suspect this isn't a tomcat issue,
however I
  am running out of options here.

 Find a hosting company that actually knows what it is doing?

 This is definitely a configuration issue at their end. If you can get the
 relevant Host and Context configurations we can figure out which bit
 the have messed up this time.

 Mark




 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 No virus found in this incoming message.
 Checked by AVG - http://www.avg.com
 Version: 8.0.138 / Virus Database: 270.4.7/1543 - Release Date: 7/9/2008
6:32 PM





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problems with jsp include files in sub-directories

2008-07-10 Thread Caldarale, Charles R
 From: Andrew Connick [mailto:[EMAIL PROTECTED]
 Subject: Re: Problems with jsp include files in sub-directories

 They have set the host to:
 Host name=windsor-chamber.co.uk
 appBase=/home/andrew42/public_html
 Aliaswww.windsor-chamber.co.uk/Alias
 Context path= reloadable=true
 docBase=/home/andrew42/public_html
 debug=1/
 /Host

The Context element above must be removed.

 and the context in public_html/ROOT/META_INF/context.xml is :
 Context docBase=ROOT path=/   reloadable=true debug=1
 /Context

Both the path and docBase attributes above must be removed.

I suspect things will work properly after that's done.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with jsp include files in sub-directories

2008-07-10 Thread Mark Thomas

Andrew Connick wrote:

Thanks Mark

They have set the host to:
Host name=windsor-chamber.co.uk appBase=/home/andrew42/public_html
Aliaswww.windsor-chamber.co.uk/Alias
Context path= reloadable=true docBase=/home/andrew42/public_html
debug=1/
/Host

and the context in public_html/ROOT/META_INF/context.xml is :
Context docBase=ROOT path=/   reloadable=true debug=1
/Context

There is also a  public_html/META_INF/context.xml, which is:
Context reloadable=true debug=1
/Context


OK. Closer, but still wrong. If they insist on including the Context/ in
the Host/ then get them to use the following:

Host name=windsor-chamber.co.uk appBase=/home/andrew42/public_html
Aliaswww.windsor-chamber.co.uk/Alias
Context path= reloadable=true docBase=ROOT debug=1/
/Host

Delete:
public_html/ROOT/META_INF/context.xml
and
public_html/META_INF/context.xml

If you need to make changes to the context configuration then you'll need
to get them made to the Context/ element in the Host/ and Tomcat will
need to be restarted for them to take effect.

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with jsp include files in sub-directories

2008-07-10 Thread David Smith


Host name=windsor-chamber.co.uk appBase=/home/andrew42/public_html
Aliaswww.windsor-chamber.co.uk/Alias
Context path= reloadable=true docBase=/home/andrew42/public_html
debug=1/
/Host


As they like to say on Mythbusters after blowing something up, There's 
your problem.  A host's appBase and a context's docBase cannot be the 
same.  The configuration has never been valid.  Remove the whole 
Context ...  element from inside the server.xml.  Also remove the 
docBase and path attributes from your 
public_html/ROOT/META-INF/context.xml.  They are automatically 
configured by tomcat.


--David

Andrew Connick wrote:

Thanks Mark

They have set the host to:
Host name=windsor-chamber.co.uk appBase=/home/andrew42/public_html
Aliaswww.windsor-chamber.co.uk/Alias
Context path= reloadable=true docBase=/home/andrew42/public_html
debug=1/
/Host

and the context in public_html/ROOT/META_INF/context.xml is :
Context docBase=ROOT path=/   reloadable=true debug=1
/Context

There is also a  public_html/META_INF/context.xml, which is:
Context reloadable=true debug=1
/Context

Thanks
Andrew

- Original Message - 
From: Mark Thomas [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, July 10, 2008 5:44 PM
Subject: Re: Problems with jsp include files in sub-directories


  

Andrew Connick wrote:


Hello Mark Thomas

Thanks for your reply

I forwarded it to my web hosting company. They have followed the
instructions. I now find that I have to use
www.windsor-chamber.co.uk/ROOT/index.jsp
My hosting company says it's not possible to change this (to
www.windsor-chamber.co.uk/index.jsp ) without re-introducing the
  

original
  

problem.
Can you offer any more help ? I suspect this isn't a tomcat issue,
  

however I
  

am running out of options here.
  

Find a hosting company that actually knows what it is doing?

This is definitely a configuration issue at their end. If you can get the
relevant Host and Context configurations we can figure out which bit
the have messed up this time.

Mark




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.4.7/1543 - Release Date: 7/9/2008


6:32 PM
  






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with jsp include files in sub-directories

2008-07-09 Thread Hassan Schroeder
On Wed, Jul 9, 2008 at 6:45 AM, Andrew Connick [EMAIL PROTECTED] wrote:
 I'm having problems with the jsp includes directive where the jsp is in a 
 sub-directory.
 I have 2 subdirectories:
 /admin

uh-oh :-)

 I suspect the issue is that Tomcat now sees sub-directory /admin as a 
 separate context.

I suspect your hosting company installed the Tomcat admin app --
which *is* a separate context. Did you try your getContextPath() test
within /segments?

-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with jsp include files in sub-directories

2008-07-09 Thread Mark Thomas

Andrew Connick wrote:

I'm having problems with the jsp includes directive where the jsp is in a 
sub-directory.
I have 2 subdirectories:
/admin
/segments

index.jsp contains the line %@ include file=/segments/setup.jsp % which is 
fine

admin/index.jsp also contains the line %@ include file=/segments/setup.jsp % 
This is fine in my test environment, and used to work in my live environment (hosted by an external company) but has recently stopped working.


I suspect the issue is that Tomcat now sees sub-directory /admin as a separate 
context. I believe I have proved this by running a simple admin/test.jsp that 
displays the results of request.getContextPath(). This shows blank in test and 
/admin in live.

Given that it used to work and has now stopped, I think the hosting company 
should be able to correct this. However I am having considerable difficulty 
with this approach. As I cannot re-create the situation in my testing, I am not 
too sure how to proceed.

So, I suppose my real questions are: 
- Is the way I have structured my code correct ?

- How do I stop Tomcat treating each sub-directory as a different context (more 
specifically, how do Instruct the hosting company) ?


This sounds like you have a setup of the form:
Host ... appBase=.../webapps/yourApp ...
  Context ... docBase= ... /
/Host

Is this the case? If you are on an older Tomcat version this will work (due 
to a bug that has since been fixed) but it won't work on newer Tomcat 
versions. The correct configuration (that works on all Tomcat versions) 
should be:

mv .../webapps/yourApp .../webapps/ROOT
Host ... appBase=.../webapps ...
/Host

HTH,

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with jsp include files in sub-directories

2008-07-09 Thread Andrew Connick

Hello Mark Thomas

Thanks for your reply.

I have got some information from my hosting company, my setup is:
Host name=windsor-chamber.co.uk appBase=/home/andrew42/public_html
Aliaswww.windsor-chamber.co.uk/Alias
Context path= reloadable=true docBase=/home/andrew42/public_html
debug=1/
/Host

Which doesn't quite fit with your example, although I suspect that as
appBase equals docBase I will have similar or same problem ?

One further question, could you clarify your correct configuration example,
I am not sure what the first line means
( mv .../webapps/yourApp .../webapps/ROOT )

Regards
Andrew Connick

- Original Message - 
From: Mark Thomas [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, July 09, 2008 3:34 PM
Subject: Re: Problems with jsp include files in sub-directories


 Andrew Connick wrote:
  I'm having problems with the jsp includes directive where the jsp is in
a sub-directory.
  I have 2 subdirectories:
  /admin
  /segments
 
  index.jsp contains the line %@ include file=/segments/setup.jsp %
which is fine
 
  admin/index.jsp also contains the line %@ include
file=/segments/setup.jsp %
  This is fine in my test environment, and used to work in my live
environment (hosted by an external company) but has recently stopped
working.
 
  I suspect the issue is that Tomcat now sees sub-directory /admin as a
separate context. I believe I have proved this by running a simple
admin/test.jsp that displays the results of request.getContextPath(). This
shows blank in test and /admin in live.
 
  Given that it used to work and has now stopped, I think the hosting
company should be able to correct this. However I am having considerable
difficulty with this approach. As I cannot re-create the situation in my
testing, I am not too sure how to proceed.
 
  So, I suppose my real questions are:
  - Is the way I have structured my code correct ?
  - How do I stop Tomcat treating each sub-directory as a different
context (more specifically, how do Instruct the hosting company) ?

 This sounds like you have a setup of the form:
 Host ... appBase=.../webapps/yourApp ...
Context ... docBase= ... /
 /Host

 Is this the case? If you are on an older Tomcat version this will work
(due
 to a bug that has since been fixed) but it won't work on newer Tomcat
 versions. The correct configuration (that works on all Tomcat versions)
 should be:
 mv .../webapps/yourApp .../webapps/ROOT
 Host ... appBase=.../webapps ...
 /Host

 HTH,

 Mark



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 No virus found in this incoming message.
 Checked by AVG - http://www.avg.com
 Version: 8.0.138 / Virus Database: 270.4.7/1541 - Release Date: 7/8/2008
7:50 PM





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problems with jsp include files in sub-directories

2008-07-09 Thread Caldarale, Charles R
 From: Andrew Connick [mailto:[EMAIL PROTECTED]
 Subject: Re: Problems with jsp include files in sub-directories

 Host name=windsor-chamber.co.uk
 appBase=/home/andrew42/public_html
 Aliaswww.windsor-chamber.co.uk/Alias
 Context path= reloadable=true
 docBase=/home/andrew42/public_html
 debug=1/
 /Host

 Which doesn't quite fit with your example

Actually, it does.  You must not have the appBase equal to the docBase; that 
has never been correct, although some older versions of Tomcat tolerated it 
accidentally.

The proper way to set this up is to have appBase=/home/andrew42 and remove 
the Context element from server.xml.  Rename your public_html directory to 
ROOT to have it be the default webapp for the Host.  Then create a file named 
/home/andrew42/ROOT/META-INF/context.xml containing the following:

Context reloadable=true debug=1/

Note that the path and docBase attributes are not used.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with jsp include files in sub-directories

2008-07-09 Thread Mark Thomas

Andrew Connick wrote:

Hello Mark Thomas

Thanks for your reply.

I have got some information from my hosting company, my setup is:
Host name=windsor-chamber.co.uk appBase=/home/andrew42/public_html
Aliaswww.windsor-chamber.co.uk/Alias
Context path= reloadable=true docBase=/home/andrew42/public_html
debug=1/
/Host

Which doesn't quite fit with your example, although I suspect that as
appBase equals docBase I will have similar or same problem ?


Yep it is the same issue. appBase == docBase is not a valid configuration 
and will, as you are seeing, break all sorts of things.



One further question, could you clarify your correct configuration example,
I am not sure what the first line means
( mv .../webapps/yourApp .../webapps/ROOT )


Using the setup above the configuration should be:
Host name=windsor-chamber.co.uk appBase=/home/andrew42/public_html
Aliaswww.windsor-chamber.co.uk/Alias
/Host

You then need to add a directory called ROOT under public_html and all of 
your content needs to be copied from public_html to public_html/ROOT


Any settings you want for your context (debug, reloadable, etc) should be 
added to public_html/ROOT/META_INF/context.xml eg

Context reloadable=true debug=1
/Context

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]