Hi,
What do you mean by L2 router ? I guess you meant by that a simple router (such as linksys) that configured with your ISP DSL/cable to access the internet . If that so then do the following on the EX switch
1. Configure separate pools for the two vlans. Please take a look at this KB:
http://kb.juniper.net/InfoCenter/index?page=content&id=KB11018
And then configure the vlan to l3 interface as step 1
2. Configure static route 0.0.0.0/0 to next-hop as the router internal IP