-1

We are doing university project in JSF 2.2 with primeface framework. We want to develop the application which is hosted on live server but the request needs to be sent on local machine from which user is accessing application. This might be stupid question but I would like to know if there is any possibility where we can do such implementation.

For example: We will host application 'www.somesite.com' on server, in this application we will have multiple forms, but we want this forms to be submitted to user local machine where we will deploy required component/service which will take the input from user and also send required response to user. It means, the view will be render from host server but data will be bind from local machine.

One way to do this is, when user submit form, we will send the request to host server and from server we will send data to user local machine where we will deploy required component/service which will be listening to server request/response, but we want to eliminate this layer and want to send direct request to user local machine as soon as user submit form

I would appreciate if you can help us....

Karim Narsindani
  • 434
  • 3
  • 14
  • 38
  • On the client side in the browsere there is: no java (unless you want to rely on applets) no primefaces and no jsf. So please search if this is possible in browsers at all (I doubt it is without applets) if you find a generic solution, port it to your environment – Kukeltje Jul 20 '16 at 20:12
  • Hmmm.. my 'hope' that a website could not submit to localhost is obviously wrong, see the answer and my comment. Shame on me – Kukeltje Jul 21 '16 at 09:35

1 Answers1

1

If I understood well your request you need to change the action of the form to be able to send the request to a localhost.

I think the only way to do so is to use a pure html form and not a h:form. With an html form you can set the action attribute to a localhost.

JSF form with URL action?

But in this case you can have problem to use the jsf component, you will have a jsf warning (with javax.faces.PROJECT_STAGE set to Development)

The form component needs to have a UIForm in its ancestry. Suggestion: enclose the necessary components within

see here for BalusC explanation

Community
  • 1
  • 1
SiMag
  • 586
  • 2
  • 8
  • This indeed seems possible http://security.stackexchange.com/questions/92008/can-a-website-make-an-http-request-to-localhost-how-does-it-get-around-the-cr. I would not have expected this. – Kukeltje Jul 21 '16 at 09:34