Hi,
supposing my ebase url is:
http://my.domain.com:3030/myAppName/myForm.eb
how can I get the http://my.domain.com:3030 from that url?
how can I get the name of the ebase app?
Thanks in advance for the help.
how to get the domain part in the url of ebase application?
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
Have a look at system variables.
http://dev-docs.verj.io/ufs/doc/javadoc ... ables.html
http://dev-docs.verj.io/ufs/doc/script_ ... c357685858
You can also get at the client http headers
The header named 'host' should return all but the protocol ie "my.domain.com:3030"
http://dev-docs.verj.io/ufs/doc/javadoc ... ables.html
http://dev-docs.verj.io/ufs/doc/script_ ... c357685858
You can also get at the client http headers
Code: Select all
var h = client.getRequest();
var en = h.getHeaderNames();
while(en.hasMoreElements())
{
//get header name Accept,Accept-Charset,Authorization,Connection,Host etc.
var headerName = en.nextElement(); //nextElement() returns Object need type cast
//get the value of the headerName
var headerValue = h.getHeader(headerName);
}
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
There's also a lot of usefeul information in the Http request object. In your example:
client.request.contextPath will return: "/myAppName"
client.request.serverName will return: "my.domain.com"
client.request.serverPort will return: "3030"
client.request.scheme will return: "http"
Here's the javadoc for HttpServletRequest for more info http://docs.oracle.com/javaee/6/api/jav ... quest.html
client.request.contextPath will return: "/myAppName"
client.request.serverName will return: "my.domain.com"
client.request.serverPort will return: "3030"
client.request.scheme will return: "http"
Here's the javadoc for HttpServletRequest for more info http://docs.oracle.com/javaee/6/api/jav ... quest.html
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
Who is online
Users browsing this forum: No registered users and 23 guests