Hi Tommi,
Thanks for the code, it worked without any errors. But How do I implement a
dynamic set of parameters
like my url could contain 1 parameters to 6 parameters or even more.
When I tried accessing the page with 1 or 2 parameters I got a 404 error.
Can you suggest solution for dynamic parameters.
Dexter
On Fri, Feb 4, 2011 at 4:16 AM, Tommi Mäkitalo <[email protected]> wrote:
> Am Donnerstag, Februar 03, 2011, 07:19:59 schrieb DEXTER MCCONNELL:
> > Hi,
> > How do I map url parameters to a single component index.ecpp
> > ex http://localhost:8000/xyz/abc/view/1
> >
> >
> > I tried inserting MapUrl /(.*)/(.*)/(.*) $3@$2@$1@index in tntnet.conf
> but
> > I got an
> > Error
> >
> > Not Found
> > This is what I want to do I want all requests to be routed through a
> index.
> > Inside index I will apply logic to load other components
> >
> > In my component I want to use request.getPathInfo(); and seperate
> > xyz/abc/view/1 as independent fields
> >
> > Any help would be appreaciated
> > Dexter
>
> Try:
> MapUrl /(.*)/(.*)/(.*) index@myapp $0 $1 $2 $3
>
> Using this as index.ecpp:
>
> ------------------BEGIN
>
> pathInfo=<$request.getPathInfo()$>
> <%cpp>
>
> for (unsigned n = 0; n < request.getArgsCount(); ++n)
> {
> </%cpp>
> arg[<$n$>]=<$request.getArg(n)$><br>
> <%cpp>
> }
> </%cpp>
> -----------------END
>
> you get using the above url:
>
> -----------------BEGIN
> pathInfo=/xyz/abc/view/1
> arg[0]=xyz/abc<br>
> arg[1]=view<br>
> arg[2]=1<br>
> ------------------END
>
> Tommi
>
>
> ------------------------------------------------------------------------------
> The modern datacenter depends on network connectivity to access resources
> and provide services. The best practices for maximizing a physical server's
> connectivity to a physical network are well understood - see how these
> rules translate into the virtual world?
> http://p.sf.net/sfu/oracle-sfdevnlfb
> _______________________________________________
> Tntnet-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tntnet-general
>
--
...at the entrance gate of Heaven!
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general