doumi2106 2012-09-29 19:15 采纳率: 100%
浏览 76
已采纳

如何使用curl提交jsf表单

I am new to Java and JSF,

I was looking for some way to send a query term to toysrus.co.uk

I have already worked on php curl and I can handle it at my own, and I have coded my function which sends query term...

My issue is I am unable to create the query term and and I cant find a way to create a url in which I can add my query parameter so that I can curl this page.....

can somebody guide me how I can create the search url for toysrus.co.uk

what I want is, I will add my parameter in URL and the curl script will send this request to the site and I will get the searched product...

I want something like

http://www.toysrus.co.uk/index.jsf?seach=MYTERM

this is just an example what I want...

can somebody help me create the search URL for the said web site? being totally new to JSF, I am unable to do it...

also, when I googled on JSF and tried searching for helping material, I found not enough stuff on JSF

thanks for help..

  • 写回答

1条回答 默认 最新

  • duanleiming2014 2012-09-29 20:19
    关注

    You should be able to search the site just by changing the search term in the URL query string.

    I went to the main page and typed "seriously" into the search box. Here's the address it sent me to:

    http://www.toysrus.co.uk/index.jsf?fh_eds=%3f&fh_view_size=10&fh_start_index=0&fh_location=%2f%2ftrus%2fen_GB%2fcategories%3C%7btrus_trus%7d%2fitemtype%3dproduct%2f%24s%3dseriously&media=web

    See where the search term shows up there? You can change that to any other word and it will search for that. Want to search for multiple terms, or a phrase? Try typing them into the search box and see how they're encoded in the URL. You can probably also remove or change some of those other parameters if you experiment with it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置