You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Paul Grimwood <pa...@yahoo.com> on 2005/02/11 09:49:56 UTC

External Link Question

I need to create a link to be placed in an email that
will take the recipient into a 'ProTrack' Tapestry app
to the page that displays info about a particular item
(or set of items) stored in a DB - similar to the VLib
ViewBook page. However, my attempts so far have
failed. Briefly, i have Item.html - Item.java
implements IExternalPage and the activateExternalPage
method strips out the parameter and uses it to
retrieve the Item from the DB and display it. I am
trying to call this page with the URL below. However,
I just get automatically sent to the home page. Any
pointers?

http://localhost:8080/ProTrack?service=external&context=Item&sp=178


		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: External Link Question

Posted by Kent Tong <ke...@cpttm.org.mo>.
Markus Eberle <markus.eberle <at> tngtech.com> writes:
> I think you URL is wrong, it should look like:
> http://localhost:8080/ProTrack?service=external/<pagename>&context=Item&sp=178
> as otherwise the external service does not know which page should be displayed

It should be 
http://localhost:8080/ProTrack?service=external/Item&sp=178

The context is just the page name.



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: External Link Question

Posted by Paul Grimwood <pa...@yahoo.com>.
It was the URL that caused the problem, but i needed
to specify:

http://localhost:8080/ProTrack/app?service=external/Info&sp=S178

i.e leave out the context parameter and specify the
app servlet to get it to work. Leaving out app always
sends me to the Home page. Specifying the
&context=Info always threw an error
org.apache.tapestry.ApplicationRuntimeException 
Service external requires exactly one context
parameter. 

For reference my web.xml contains:

    <filter>
        <filter-name>redirect</filter-name>
       
<filter-class>org.apache.tapestry.RedirectFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>redirect</filter-name>
        <url-pattern>/</url-pattern>
    </filter-mapping>
    <servlet>
        <servlet-name>ProTrack</servlet-name>
       
<servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
        <init-param>
        
<param-name>org.apache.tapestry.visit-class</param-name>
        
<param-value>nz.cri.gns.protrack.Visit</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>ProTrack</servlet-name>
        <url-pattern>/app</url-pattern>
    </servlet-mapping>
 

Cheers

paul


--- Markus Eberle <ma...@tngtech.com> wrote:

> On Friday 11 February 2005 09:49, Paul Grimwood
> wrote:
> > I need to create a link to be placed in an email
> that
> > will take the recipient into a 'ProTrack' Tapestry
> app
> > to the page that displays info about a particular
> item
> > (or set of items) stored in a DB - similar to the
> VLib
> > ViewBook page. However, my attempts so far have
> > failed. Briefly, i have Item.html - Item.java
> > implements IExternalPage and the
> activateExternalPage
> > method strips out the parameter and uses it to
> > retrieve the Item from the DB and display it. I am
> > trying to call this page with the URL below.
> However,
> > I just get automatically sent to the home page.
> Any
> > pointers?
> >
> >
>
http://localhost:8080/ProTrack?service=external&context=Item&sp=178
> 
> I think you URL is wrong, it should look like:
>
http://localhost:8080/ProTrack?service=external/<pagename>&context=Item&sp=178
> as otherwise the external service does not know
> which page should be displayed
> 
> Cheers,
>  Markus
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 
> 



	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: External Link Question

Posted by Markus Eberle <ma...@tngtech.com>.
On Friday 11 February 2005 09:49, Paul Grimwood wrote:
> I need to create a link to be placed in an email that
> will take the recipient into a 'ProTrack' Tapestry app
> to the page that displays info about a particular item
> (or set of items) stored in a DB - similar to the VLib
> ViewBook page. However, my attempts so far have
> failed. Briefly, i have Item.html - Item.java
> implements IExternalPage and the activateExternalPage
> method strips out the parameter and uses it to
> retrieve the Item from the DB and display it. I am
> trying to call this page with the URL below. However,
> I just get automatically sent to the home page. Any
> pointers?
>
> http://localhost:8080/ProTrack?service=external&context=Item&sp=178

I think you URL is wrong, it should look like:
http://localhost:8080/ProTrack?service=external/<pagename>&context=Item&sp=178
as otherwise the external service does not know which page should be displayed

Cheers,
 Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org