Hi -
I have a problem with a webapp I'm trying to deploy which I just can't
figure out - I was wondering if someone can help me by telling me what
happens under the hood.
Basically I have a cocoon webapp, created in the usual maven way, which has
another web application (chiba) integrated into it using an overlay.
I then have a block which contains all of my application code.
Because chiba requires a number of configuration files within the WEB-INF
directory I have some config files in WEB-INF, and a load of resources such
as javascript libraries, css stylesheets & images in a resources directory
in my webapp (in the overlay directory).
When I run mvn package jetty:run my application works fine - the stylesheets
& javascript libraries are accessed by the system, but when I do a mvn
package & deploy the resulting war file created in the target directory to
tomcat these resources aren't available.
Checking firebug it says that it's trying to load these files from the
location:
<web app context>/resources/scripts/form-utils.js
and the error code (404) is displayed next to it. But if I enter:
<web app context>/resources/resources/scripts/form-utils.js
I get access to the js file!
When I look at the exploded war file in the webapps directory I see that the
file is in the right location - i.e. it is in the <context
root>/resources/scripts/
So I checked the web.xml within the war file & it has the following lines:
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/resources/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DispatcherServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
which to me says that if the web app receives a url starting with /resources
it should load an asset using the default servlet, and all other requests
from /* should be sent to the dispatcher servlet.
Is my understanding correct?
I really don't understand what is going on at all!
I should point out that my block is not mounted at /, it's mounted at
/rmm-xforms. I have tried to mount it at / but I get the same response
I have absolutely no idea how to try and debug this issue to find out what
is going on - I've even commented out the cocoon dispatcher servlet from the
web.xml altogether and I still don't seem to be able to access the js file
with the appropriate correct url.
Can anyone give me any hints on what I should do to try and resolve this
problem.
Many thanks in advance,
Anil.
--
View this message in context:
http://www.nabble.com/deploying-cocoon-2.2-problem-tp15900785p15900785.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]