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

Reply via email to