You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Samuel Bruce <bp...@yahoo.com> on 2004/03/16 15:58:27 UTC
Cocoon App Invocation & server.xml
Hi,
I developed a cocoon app which I invoke in my browser
with:
http://localhost:8080/myapp
After development, I wanted to be able to invoke my
app from my browser with:
http://localhost:8080
I did this by editing the server.xml file in my
catalina_ home/conf directory, inserting:
<Context path="" docBase="myapp" debug="0"/>
This worked except for the problem that I have some
absoulte paths in my application which cause this to
fail.
I circumvented this problem by creating a folder in
webapps called "start" which has an index.html that
loads my app as follows:
(server.xml)
<Context path="" docBase="start" debug="0"/>
(index.html)
<html>
<body onload="document.f.submit();">
<form action="http://localhost:8080/myapp"
name="f">
</form>
</body>
</html>
This also worked but I have the problem now of
accessing pipelines like "myapp/pattern" where
(obviously) "pattern" is a pattern which is matched in
a pipeline in my sitemap.
I want to be able to invoke "myapp" and "pattern" from
my browser using
http://localhost:8080 and
http://localhost:8080/pattern
respectively. What is the best way to do this without
re-writing my app?
Thanks.
__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
AW: Passing sitemap parameters to JSP pages
Posted by Marco Rolappe <m_...@web.de>.
hi garrick,
of course you can pass parameters but not 'sitemap parameters' per se, since
JSP pages are not aware of the sitemap (how would you get at the sitemap
parameters from within a JSP?). the most straightforward IMO would be to
pass those parameters as request or session attributes which you should be
able to access without any trouble. have a look at
SessionPropagatorAction/PropagatorAction (and OutputModule's) or write your
own action(s) to do the work.
> -----Ursprüngliche Nachricht-----
> Von: users-return-64633-m_rolappe=web.de@cocoon.apache.org
> [mailto:users-return-64633-m_rolappe=web.de@cocoon.apache.org]Im Auftrag
> von Garrick Dasbach
> Gesendet: Dienstag, 16. März 2004 16:33
> An: users@cocoon.apache.org
> Betreff: Passing sitemap parameters to JSP pages
>
>
> I have seen this question asked previously on this list, but so far have
> not found any answers.
>
> I have an action, which purchases a product and, if successful, returns
> the order number to the sitemap. If the action succeeds, then I want to
> pass that order number to a JSP page to retrieve the order information
> and generate the XML necessary to display the order results page. The
> snippet below illustrates my situation.
>
> <map:match pattern="purchase">
>
> <map:act type="purchase">
>
> <!-- Successful Purchase -->
>
> <map:generate type="jsp" src="data/purchaseResults.jsp">
>
> <map:parameter name="ordernum" value="{ordernum}"/>
>
> </map:generate>
>
> ...
> ...
>
> <map:serialize type="html"/>
>
> </map:act>
>
> <!-- Failed Purchase -->
>
> <map:redirect-to uri="failure.html"/>
>
> </map:match>
>
> Unfortunately, passsing the order number to my JSP page doesn't work.
> Is there any way to accomplish this?
>
> Thanks,
>
> --
>
> ____________________________
> Garrick Dasbach
> Software Development
> Digonex Technologies, Inc.
> 317.638.4174 Fax
>
>
>
> CONFIDENTIALITY NOTICE: The information in this transmission is
> private, confidential, may be legally privileged, is property of
> the sender and is intended solely for the use of the addressee.
> If you are not the addressee, you should not read, disclose,
> distribute, copy, use or rely upon the information contained in
> this transmission. If you have received this transmission in
> error please delete or destroy it and notify DIGONEX
> TECHNOLOGIES, INC. immediately at (317) 638-4154.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Passing sitemap parameters to JSP pages
Posted by Garrick Dasbach <Ga...@musicrebellion.com>.
I have seen this question asked previously on this list, but so far have
not found any answers.
I have an action, which purchases a product and, if successful, returns
the order number to the sitemap. If the action succeeds, then I want to
pass that order number to a JSP page to retrieve the order information
and generate the XML necessary to display the order results page. The
snippet below illustrates my situation.
<map:match pattern="purchase">
<map:act type="purchase">
<!-- Successful Purchase -->
<map:generate type="jsp" src="data/purchaseResults.jsp">
<map:parameter name="ordernum" value="{ordernum}"/>
</map:generate>
...
...
<map:serialize type="html"/>
</map:act>
<!-- Failed Purchase -->
<map:redirect-to uri="failure.html"/>
</map:match>
Unfortunately, passsing the order number to my JSP page doesn't work.
Is there any way to accomplish this?
Thanks,
--
____________________________
Garrick Dasbach
Software Development
Digonex Technologies, Inc.
317.638.4174 Fax
CONFIDENTIALITY NOTICE: The information in this transmission is private, confidential, may be legally privileged, is property of the sender and is intended solely for the use of the addressee. If you are not the addressee, you should not read, disclose, distribute, copy, use or rely upon the information contained in this transmission. If you have received this transmission in error please delete or destroy it and notify DIGONEX TECHNOLOGIES, INC. immediately at (317) 638-4154.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon App Invocation & server.xml
Posted by Samuel Bruce <bp...@yahoo.com>.
Hi,
No.
Before my app was at http://localhost:8080/myapp and
once invoking my app at the above location, a pattern
in my sitemap (<map:match pattern="apattern/hello">)
worked. Since I made the previously mentioned change
in server.xml, I could invoke my app at
http://localhost:8080 but for some reason inside my
app when there was a link to
http://localhost:8080/apattern/hello, I got a 404
message.
I found out what the problem was. I assumed that since
one such pattern didn't work they all didn't. But
others did. In fact the only one that didn't was a
pattern called "admin/hello". It turns out that there
is a Tomcat application called admin and that's why
the pattern wasn't being found. It was looking in the
Tomcat application. Once I changed my code from
"admin" all was well.
Thanks for your help. Your responses led me to think
that what I was doing should have worked, so I began
to investigate why it wasn't working which led me to
try to load an "admin" app. That brought up the Tomcat
admin jsp.
Thanks again for helping me solve this problem.
--- Mark Lundquist <ml...@wrinkledog.com> wrote:
>
> On Mar 16, 2004, at 8:19 AM, Samuel Bruce wrote:
>
> > Hi,
> >
> > Thanks for responding!
> >
> > Yes, what breaks is that there would be a link
> within
> > my app that would point to
> > http://localhost:8080/apattern/hello that would
> fail.
> > In my sitemap I have a <map:match
> > pattern="apattern/hello" that worked before but it
> now
> > gives me a 404 message - the requested resource
> > /apattern/hello is not available.
>
> You mean that before, your Cocoon webapp was at
>
> http://localhost:8080/myapp
>
> and you had links URLs like this
>
> http://localhost:8080/apattern/hello
>
> and those worked?
>
> ~ mark
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon App Invocation & server.xml
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Mar 16, 2004, at 8:19 AM, Samuel Bruce wrote:
> Hi,
>
> Thanks for responding!
>
> Yes, what breaks is that there would be a link within
> my app that would point to
> http://localhost:8080/apattern/hello that would fail.
> In my sitemap I have a <map:match
> pattern="apattern/hello" that worked before but it now
> gives me a 404 message - the requested resource
> /apattern/hello is not available.
You mean that before, your Cocoon webapp was at
http://localhost:8080/myapp
and you had links URLs like this
http://localhost:8080/apattern/hello
and those worked?
~ mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon App Invocation & server.xml
Posted by Samuel Bruce <bp...@yahoo.com>.
Hi,
Thanks for responding!
Yes, what breaks is that there would be a link within
my app that would point to
http://localhost:8080/apattern/hello that would fail.
In my sitemap I have a <map:match
pattern="apattern/hello" that worked before but it now
gives me a 404 message - the requested resource
/apattern/hello is not available.
--- Mark Lundquist <ml...@wrinkledog.com> wrote:
>
> On Mar 16, 2004, at 6:58 AM, Samuel Bruce wrote:
>
> > Hi,
> >
> > I developed a cocoon app which I invoke in my
> browser
> > with:
> >
> > http://localhost:8080/myapp
> >
> > After development, I wanted to be able to invoke
> my
> > app from my browser with:
> >
> > http://localhost:8080
> >
> > I did this by editing the server.xml file in my
> > catalina_ home/conf directory, inserting:
> >
> > <Context path="" docBase="myapp" debug="0"/>
> >
> > This worked except for the problem that I have
> some
> > absoulte paths in my application which cause this
> to
> > fail.
>
> Do you mean absolute URI's? Why do those break your
> app?
> ~ Mark
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon App Invocation & server.xml
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Mar 16, 2004, at 6:58 AM, Samuel Bruce wrote:
> Hi,
>
> I developed a cocoon app which I invoke in my browser
> with:
>
> http://localhost:8080/myapp
>
> After development, I wanted to be able to invoke my
> app from my browser with:
>
> http://localhost:8080
>
> I did this by editing the server.xml file in my
> catalina_ home/conf directory, inserting:
>
> <Context path="" docBase="myapp" debug="0"/>
>
> This worked except for the problem that I have some
> absoulte paths in my application which cause this to
> fail.
Do you mean absolute URI's? Why do those break your app?
~ Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org