Re: Tomcat 5.5 - Virtualhost - context configuration for the zero path

2007-11-20 Thread Schadler Johann
I have moved the docBase to /vhosts/past-int/PaST and I have modified the
CATALINA_BASE/conf/EngineName/HostName/ROOT.xml to direct docBase to
the new phyiscal path. After stopping the JVM, deleting the
CATALINA_BASE/work/EngineName/HostName/_ and starting up the JVM again
I get a NullPointer Exception:

 

Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWra
pper.java:506)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
95)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 

root cause

java.lang.NullPointerException

org.apache.struts.util.RequestUtils.pageURL(RequestUtils.java:1596)

org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:541)

org.apache.struts.taglib.html.RewriteTag.doStartTag(RewriteTag.java:99)

org.apache.jsp.administration.index_jsp._jspx_meth_html_rewrite_0(index_jsp.
java:149)

org.apache.jsp.administration.index_jsp._jspService(index_jsp.java:82)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
34)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I have controlled all settings again to avoid a mistake, so I am sure I have
done the suggested settings right.

 

Maybe there is another setting needed to be considered?

 

@Martin, who wrote:

 What is context-root  specified as?

 

I am not sure what you mean with context-root, for me it is path=.

 

 

Johann

 

 

- Original Message -

From: Mark Thomas [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org

Sent: Sunday, November 18, 2007 4:43 PM

Subject: Re: Tomcat 5.5 - Virtualhost - context configuration for the zero
path

 

 

 Schadler Johann wrote:

 I would prefer to use an explicit method to define a context, not only

 the

 implicit possibility by naming the WAR file to something which doesn't

 refer

 anyway to the service provided in the physical directory ROOT. Is there

 a

 possibility to do this in may way?

 

 Place your directory outside of a host's appBase. Place ROOT.xml in

 CATALINA_BASE/conf/EngineName/HostName and then the docBase

 attribute

 of the Context element inside ROOT.xml will be honoured. You should not

 specify a path as this is inferred from the name of the xml file.

 

 Mark

 

 

 

 -

 To start a new topic, e-mail:  mailto:users@tomcat.apache.org
users@tomcat.apache.org

 To unsubscribe, e-mail:  mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED]

 For additional commands, e-mail:  mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED]

 

 

 

 



Tomcat 5.5 - Virtualhost - context configuration for the zero path

2007-11-18 Thread Schadler Johann
We usually use Tomcat instances without Apache connector and we could do
this without problems with Tomcat 4.x until now by defining a docBase to the
path= in a context located in the server.xml. (Usually we configure
virtualhosts for a service with the default path  - no additional context
must be entered by the user).

 

In Tomcat 5.5 (we didn't use Tomcat 5.0, so I don't know if there are
similiar changes) there seems to be only one possibility to configure a
context with path : to rename the WAR file to ROOT.war and place it in
the appBase of the virtualhost.

 

The expected equivalent to configure the -path explicitly seems not to
work. I tried to create the file:

 

CATALINA_BASE/conf/EngineName/HostName/ROOT.xml as follows:

 

Context
  override=true
  displayName=PaST2
  docBase=/opt/jakarta5_jvm2/webapps3/PaST
  path=

 !-- other settings, like log valves and so on --
/Context

Requesting the URL  http://%3cHostName%3e[/ http://HostName[/] results
in an HTTP 404 error, Resource Not Found.

 

After renaming the directory PaST to ROOT in the
appBase=/opt/jakarta5_jvm2/webapps3 the service is reachable with the URL
above.

 

I would prefer to use an explicit method to define a context, not only the
implicit possibility by naming the WAR file to something which doesn't refer
anyway to the service provided in the physical directory ROOT. Is there a
possibility to do this in may way?

 

Johann

 



Re: Tomcat 5.5 - Virtualhost - context configuration for the zero path

2007-11-18 Thread Mark Thomas
Schadler Johann wrote:
 I would prefer to use an explicit method to define a context, not only the
 implicit possibility by naming the WAR file to something which doesn't refer
 anyway to the service provided in the physical directory ROOT. Is there a
 possibility to do this in may way?

Place your directory outside of a host's appBase. Place ROOT.xml in
CATALINA_BASE/conf/EngineName/HostName and then the docBase attribute
of the Context element inside ROOT.xml will be honoured. You should not
specify a path as this is inferred from the name of the xml file.

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: Tomcat 5.5 - Virtualhost - context configuration for the zero path

2007-11-18 Thread Martin Gainty
Johann-
What is context-root  specified as?
Martin--
- Original Message -
From: Schadler Johann [EMAIL PROTECTED]
To: 'Tomcat Users List' users@tomcat.apache.org
Sent: Sunday, November 18, 2007 9:31 AM
Subject: Tomcat 5.5 - Virtualhost - context configuration for the zero path


 We usually use Tomcat instances without Apache connector and we could do
 this without problems with Tomcat 4.x until now by defining a docBase to
the
 path= in a context located in the server.xml. (Usually we configure
 virtualhosts for a service with the default path  - no additional
context
 must be entered by the user).



 In Tomcat 5.5 (we didn't use Tomcat 5.0, so I don't know if there are
 similiar changes) there seems to be only one possibility to configure a
 context with path : to rename the WAR file to ROOT.war and place it in
 the appBase of the virtualhost.



 The expected equivalent to configure the -path explicitly seems not to
 work. I tried to create the file:



 CATALINA_BASE/conf/EngineName/HostName/ROOT.xml as follows:



 Context
   override=true
   displayName=PaST2
   docBase=/opt/jakarta5_jvm2/webapps3/PaST
   path=

  !-- other settings, like log valves and so on --
 /Context

 Requesting the URL  http://%3cHostName%3e[/ http://HostName[/] results
 in an HTTP 404 error, Resource Not Found.



 After renaming the directory PaST to ROOT in the
 appBase=/opt/jakarta5_jvm2/webapps3 the service is reachable with the
URL
 above.



 I would prefer to use an explicit method to define a context, not only the
 implicit possibility by naming the WAR file to something which doesn't
refer
 anyway to the service provided in the physical directory ROOT. Is there
a
 possibility to do this in may way?



 Johann






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