This post was updated on .
Hi,
I am running orbeon PE 4.2 and using Liferay form runner portlet. In the code of my forms I have a button that make a submission to a page in the same tomcat where orbeon is deployed. <xf:submission id="sendToPage1" action="http://localhost:8080/web/guest/dashboard" method="get"/> I would like to replace localhost with the IP address of the machine orbeon is currently running. How can I get it? thank you |
This post was updated on .
It's quite urgent to have an answer.
Please, no one has idea how to get IP address of the machine where orbeon is running? |
Hi,
There may be simpler way ... the best idea I have is the java processor. You can write your own processor (you don't need to compile it into/with Orbeon, and it could call the Java Servlet API function getLocalAddr(). Sorry, I don't have any code that tries this, http://wiki.orbeon.com/forms/doc/developer-guide/processors-java Regards, Hank On Mon, Sep 2, 2013 at 7:33 AM, r.pecori <[hidden email]> wrote: > It's quite urgent to have an answer. > > Please, no one has idea how to get IP address of the machine where orbeon > is running? > > -- > View this message in context: http://discuss.orbeon.com/Get-IP-address-of-form-runner-with-xform-command-tp4657205p4657238.html > Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com. > > -- > You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. > To post to this group, send email to [hidden email]. -- Hank Ratzesberger XMLWerks.com -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
In reply to this post by r.pecori
Here is an example that works for me:
https://gist.github.com/ebruchez/6418393 (Note that there is no guarantee that this will remain compatible, because that's using internal classes.) Out of curiosity, why would using localhost (or another local name) not work? In general, that is preferred, isn't it? -Erik On Mon, Sep 2, 2013 at 7:33 AM, r.pecori <[hidden email]> wrote: > It's quite urgent to have an answer. > > Please, no one has idea how to get IP address of the machine where orbeon > is running? > > -- > View this message in context: http://discuss.orbeon.com/Get-IP-address-of-form-runner-with-xform-command-tp4657205p4657238.html > Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com. > > -- > You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. > To post to this group, send email to [hidden email]. -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Mmh, actually that is wrong. That's returning the remote address, and
you want the local address. If you manage to do this with Java, you should be able to call the same Java code from XPath in a way similar to the one I show in my example. But, it doesn't look like it's that easy: http://stackoverflow.com/questions/8765578/get-local-ip-address-without-connecting-to-the-internet -Erik On Mon, Sep 2, 2013 at 5:15 PM, Erik Bruchez <[hidden email]> wrote: > Here is an example that works for me: > > https://gist.github.com/ebruchez/6418393 > > (Note that there is no guarantee that this will remain compatible, > because that's using internal classes.) > > Out of curiosity, why would using localhost (or another local name) > not work? In general, that is preferred, isn't it? > > -Erik > > On Mon, Sep 2, 2013 at 7:33 AM, r.pecori <[hidden email]> wrote: >> It's quite urgent to have an answer. >> >> Please, no one has idea how to get IP address of the machine where orbeon >> is running? >> >> -- >> View this message in context: http://discuss.orbeon.com/Get-IP-address-of-form-runner-with-xform-command-tp4657205p4657238.html >> Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com. >> >> -- >> You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. >> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. >> To post to this group, send email to [hidden email]. -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
In reply to this post by Erik Bruchez
Because connecting to my machine from another machine in our local network and clicking close causes going to the correct page but Liferay loses logged in user. Is this because I am running e development licence and not a production licence?
If I indicate the IP address of my machine in the form code for the close button Liferay does not log out. I f I indicate localhost, it logs out. So if I have various forms on a machine I need to change the code of the forms if I have to change the machine where orbeon forms and liferay are installed. |
Administrator
|
I see, thanks for the explanation.
Bottom line of my explanation was: if you have a piece of Java code able to get the correct local IP, then you can fairly easily call that from XForms with XPath. -Erik On Tue, Sep 3, 2013 at 2:17 AM, r.pecori <[hidden email]> wrote: > Because connecting to my machine from another machine in our local network > and clicking close causes going to the correct page but Liferay loses logged > in user. Is this because I am running e development licence and not a > production licence? > > If I indicate the IP address of my machine in the form code for the close > button Liferay does not log out. I f I indicate localhost, it logs out. > > So if I have various forms on a machine I need to change the code of the > forms if I have to change the machine where orbeon forms and liferay are > installed. > > -- > View this message in context: http://discuss.orbeon.com/Get-IP-address-of-form-runner-with-xform-command-tp4657205p4657252.html > Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com. > > -- > You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. > To post to this group, send email to [hidden email]. -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Free forum by Nabble | Edit this page |