How does your custom service implement IEngineService.getLink()?
If you are closely adhering to the code outlined at
then this method
should look something like this:
public static final String SERVICE_NAME = "EnrollmentReportService";
public ILink getLink(IRequestCycle cycle, IComponent component,
[] parameters)
{
String suffix =
cycle.getEngine().getSpecification().getProperty("");
// This ILink implementation refers to the one outlined at
return new Link(cycle, SERVICE_NAME + suffix, null, parameters);
}
All custom services should also override
() like so:
protected String[] getServiceContext(RequestContext requestContext)
{
return
requestContext.getParameters();
}
Assuming your service-url-suffix = ".do", this will generate urls that
look like:
Much prettier
Paul
Skriloff, Nicholas wrote:
>We are using friendly URLs within the confines of Tapestry 3.0.3. I
>have a service called EnrollmentReportService declared in our
>application file. The service's job is to return the list of courses for
>which a student is enrolled as a pdf. IT is working fine most of the
>time except for when I run my automated web test.
>
<service name="EnrollmentReportService"
>class=""/>
>
>Web.xml has the following
>
<servlet-mapping>
<servlet-name>registrar-student</servlet-name>
<url-patterntap</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>registrar-student</servlet-name>
<url-patternsvc</url-pattern>
</servlet-mapping>
>
>If I am at working directly in firefox and click the submit button, I
>get a url generated like follows
>
>tService&sp=
>However, when I run my automated Selenium test, where the test clicks
>the submit button, I get
>
>tService&sp=
>
>THIS CAUSES MY HME PAGE T CME UP INSTEAD F MY REPRT. NTICE THE
>DIFFERENCE BETWEEN HME.TAP? AND HME.SVC.
>
>NCE THAT HAPPENS, EVEN IF I G BACK INT FIREFX AND ACT AS A USER
>AGAIN, THE PRBLEM PERSISTS.
>
>Any Thoughts?
>
>
>To unsubscribe, e-mail: tapestry-user-unsubscribe (AT) jakarta (DOT) apache.org
>For additional commands, e-mail: tapestry-user-help (AT) jakarta (DOT) apache.org
>
To unsubscribe, e-mail: tapestry-user-unsubscribe (AT) jakarta (DOT) apache.org
For additional commands, e-mail: tapestry-user-help (AT) jakarta (DOT) apache.org