how to redirect to a Servlet from a commandButton in xhtml

后端 未结 2 525
时光取名叫无心
时光取名叫无心 2021-01-01 07:21

I\'ve been having this trouble for a couple of days. hopefully this is cleaner and someone who\'s done this before can help me out!

I\'m building a webApp with JSF 2

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-01 08:19

    JSF is executed within the Faces servlet and with the standard navigation you can only navigate to jsf views. To open a servlet use instead. Another option is to avoid using a servlet and to serve your pdf file from an action method like it's described here: http://www.winstonprakash.com/articles/jsf/file_download_link.htm

提交回复
热议问题