Hi Mayank, You likely need a templating engine and you should pass parsed and validated parameters to it. One option is swirl, which is the template engine of Play (https://github.com/playframework/twirl), or there is scalatags (https://github.com/lihaoyi/scalatags) which uses a DSL to generate HTML compared to raw HTML.
-Endre On Sat, May 7, 2016 at 5:26 PM, Mayank Bairagi <may...@knoldus.com> wrote: > Hi there , > I have a use case. Here is an akka-http route. > > get { > pathPrefix("someRoute") { > pathEndOrSingleSlash { > getFromResource("index.html") > } > } } > > my index.html is as follows > <!DOCTYPE html> > <html> > <head> > <script type="text/javascript"> > alert('QUERY PARMS : '+window.location.search) > </script> > </head> > </html> > > When I call index.html from browser > file:///index.html?email=may...@knoldus.com > Here I got alert > *"*QUERY PARMS : ?email=may...@knoldus.com*"* > > > > *Is there any way in akka-http so that I can supply some dynamic query > parameters while loading index.html?* > Thanks in advance!! > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to akka-user+unsubscr...@googlegroups.com. > To post to this group, send email to akka-user@googlegroups.com. > Visit this group at https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.