Getting host name from applet
Hi All,
How can i get the local host name from applet ( Host name where the applet running) . While i tried with InetAddress i got only the loop back address 127.0.0.1. Can anyone help me out in this regard.
Thanks in advance
V.S.Saravanan
When you say you tried the InetAddress, did you try the following?
You could try creating a Socket connection back to the host/server URL from where the Applet was downloaded (you should have permission to do this). You can then get the local address of the Socket.
Something like:
String hostName = getCodeBase();
Socket s = new Socket( hostName, portNum );
InetAddress address = s.getLocalAddress();
String hostName = address.getHostName();
Eric
Similar Messages
-
Getting Host Name From Forms 6i (deployed in 10g AS)
Hi,
I need to get the host name of client while launching my application. I am using forms6i. So I cannot use webutils.pll for the same. But in the below thread I have read that Webutil.pll has been modified to use with FORMS 6i also. Can anybody send me webutils.pll which can be used with Forms 6i
Re: Converting to Webutil? 6i and 9i equivalents.
Its an urgent requirement
Any help is appreciated.
ThanksHi,
I have tried sys_context and java class option already ..but in vain :(..
Let me explain my problem in detail.
My database server(Oracle 10g) is in HOSTA
My appserver (Oracle 10g AS)resides in HOSTB
And user launches the application from HOSTC
My requirement is to get the host name of the user while he launches the application. ie HOSTC in this case.
If I am trying with java.net.InetAddress.getLocalHost().getHostName(); I am getting the value HOSTA(Host name of Data base server)
If I am trying with SYS_CONTEXT I am getting HOSTB(Host name of appserver)
And my requirement is to get HOSTC !!!
I have read that if Webutil_clientinfo.get_host_name is used I can get the host name of client machine. But since I am working with forms 6i , I can't use Webutil.
please help me if you know any way to achieve the same in forms 6i -
How can I get the host name from Email address?
hi
When I using socket to develope an email-sending servlet,I don't know how to get the host name from emial address.can you help me,thanksStripping off the user name will give you the domain of from field in the message. This is not the same as the host. Take a look at:
http://www.stopspam.org/email/headers/headers.html
Theres a pretty good discussion about email headers and how to use the information. You probably want to check the information here against the RFC.
Sean -
Hello all,
yesterday I got one task in that I have to stored procedure for getting host name, host instance and status of that host is it running or stopped.
any body knows where exactly, In which table this details are there in BizTalk databases.
thanksStatus of the host instance is not stored in the SQL database for you to query the status using stored procedure. You have to either use Powershell or WMI to get the status.
In SQL, following table contains the details about the host like Name, LoginName, IsDisables etc but status of the host instance is not stored in the database.
SELECT * FROM BizTalkMgmtDb..adm_HostInstance
Powershell to get the status:
http://axonolympus.nl/?page_id=186&post_id=969&cat_id=6&lang=en
WMI to get the status:
https://msdn.microsoft.com/en-us/library/aa561820.aspx?f=255&MSPPError=-2147217396
https://msdn.microsoft.com/en-us/library/aa578621.aspx
Regards,
M.R.Ashwin Prabhu
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply. -
Hi all,
I have my applet which connects to a server. Obviously for security i can only download it from the machine it came from.
Currently im passing in the host name as a param.
Is there a way to find out the host name with out using a paremeter? I will always be running from the host machine the applet came from anyway.
Has any1 got any ideas?
ThanksYou can extract the host name from the URL returned by the method getDocumentBase().
-
FM for getting MONTH name from DATE.
Hi all ,
We have a requirement to get Month name from the DATE,e.g IF date is 01/01/2008 we need a FM which can generate month name as 'JANUARY'.
\[removed by moderator\]
Thanks and Regards
Kiran
Edited by: Jan Stallkamp on Jul 30, 2008 4:26 PMHi,
Here is the code u required...
REPORT ZASHU_MONTH_NAMES_GET.
data:r_code type sy-subrc.
data:mnames type standard table of T247 with header line.
CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
LANGUAGE = SY-LANGU
IMPORTING
RETURN_CODE = r_code
TABLES
month_names = mnames.
EXCEPTIONS
MONTH_NAMES_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write:/ mnames.
Thanks & Regards
Ashu Singh -
Network Error []: Cannot Get Host Name when running business rules
Guru's
We are getting the following error intermittently when we are running business rules (Planning Application >>Tools>>Business Rules) or running SmartView refreshes:
Network error []: Cannot Get Host Name
The following is then logged in the Essbase Application logs:
Local/Application/Database/admin@Native Directory/Error(1042022)
Network error []: Cannot Get Host Name.
A quick look at the Essbase Error Messages Doc says it is a network error and we have to consult the network documentation. Unfortunately this is not very descriptive so we logged an SR with Oracle but we don't seem to be getting a resolution.
The environment is 11.1.2.0 and the architecture is as follows:
Server 1 - MS Server 2008 x64:
Planning, Calc Manager, Foundation Services, Framework Web Services, EAS, APS, Web Analysis, FR Web Services
Server 2 - MS Server 2008 x64:
Essbase Server
Server 3 - MS Server 2008 x64:
Framework Services, FR Print Services
We have tried doing the following:
1. Put in the server host names into the hosts file on the Hyperion Servers
2. Applied the following TCP/IP settings on all the Hyperion Servers and one of the user machines as a test:
- Added a new DWORD Value named TcpTimedWaitDelay and set it to 30.
- Added a new DWORD Value named MaxUserPort and set it to 65534.
- Added a new DWORD Value named MaxFreeTcbs and set it to 6250
3. Confirmed that there are no packet drops by monitoring the server NICs so no packet loss could be the cause of this issue
4. The Essbase Config file has the following settings:
NETDELAY 2000
NETRETRYCOUNT 2500
Has anyone come across this issue and if you managed to resolve it, how did you go about it.
ThanxHi Rahul
The issue is happening to a number of calcs so it it not one calc specifically. I will ask the functional consultants to enhance the logging in the business rules so that we can see if the issue happens on a specific member\block etc and yes we do use Xrefs
We can run this as a calc in EAS without any issues and it's intermittent because this business rule runs 95% of the time in Planning Application >> Tools >>Business Rules without any issues.
Thanks -
Getting user name from sopa header
How should get user name from soap header in my udf...?i searched in sdn,but not get exact solution...
I din't get this with SRemoteUser
1. i've enabled " Do Not Use SOAP Envolope"
2.Enabled ASMA
3.Variable Transport Binding .
used the following code as well:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey user = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/SOAP", "SRemoteUser");
conf.get(user);
But not value in it.. Correct me if iam wrong.. -
Fix for getting track names from GraceNote.
Finally found a Windows fix for getting iTunes to get track names from GraceNote (see below). It works!!!
Fixing iTunes CDDB lookup - more details
Since Apple’s forums don’t seem to support permalinks, the hint I previously posted about fixing iTunes for Windows’ connection to CDDB isn’t complete. Here’s how to reestablish connection to CDDB if your track lookups start failing:
Quit iTunes for Windows.
In Internet Explorer, go to Tools | Internet Options, click on the Connections tab, and click on the LAN Settings button.
In the dialog that follows, uncheck the checkbox about using a proxy. Hit OK, then OK again.
Open RegEdit and look for the following key: HKEYLOCALUSER\Software\CDDB\Control\2.0. Delete this key.
Open iTunes and insert the CD. iTunes should now be able to connect to CDDB again—at least, until it forgets again later...
If necessary, reenable your proxy settings.
Microsoft —Tim Jarrett @ 2/12/04; 8:59:45 AM Discuss Comment (0) Cosmos [#]
Cheers.
Tom W.
Other OSFinally found a Windows fix for getting iTunes to get
track names from GraceNote (see below). It works!!!
Fixing iTunes CDDB lookup - more details
Since Apple’s forums don’t seem to support
permalinks, the hint I previously posted about fixing
iTunes for Windows’ connection to CDDB isn’t
complete. Here’s how to reestablish connection to
CDDB if your track lookups start failing:
Quit iTunes for Windows.
In Internet Explorer, go to Tools | Internet Options,
click on the Connections tab, and click on the LAN
Settings button.
In the dialog that follows, uncheck the checkbox
about using a proxy. Hit OK, then OK again.
Open RegEdit and look for the following key:
HKEYLOCALUSER\Software\CDDB\Control\2.0. Delete
this key.
Open iTunes and insert the CD. iTunes should now be
able to connect to CDDB again—at least, until it
forgets again later...
If necessary, reenable your proxy settings.
Microsoft —Tim Jarrett @ 2/12/04; 8:59:45 AM Discuss
Comment (0) Cosmos [#]
Cheers.
Tom W.
Other OS
I followed this exactly and it didn't work!
When I put in a CD and click on Get CD Track Names the "Accessing Gracenote CDDB" box flashes up and then disappears and nothing happens!
Any suggestions???
Thanks,
Rach -
Getting column names from cursor
Hi all
I have procedure which produces list of applied for jobs web page(using htp. package)
I got result in cursor, but have to provide dinamic sort, based on colimn pressed
procedure my_application_list
(pi_resume_num in varchar2 default null
,pi_sort_col in varchar2 default null
,pi_page_no in varchar2 default null
,pi_action in varchar2 default null
,pi_msg in varchar2 default null
is
CURSOR cur_job IS
SELECT jtl.JOB_TITLE
,jtl.COMPANY_NAME
,a.APPLY_DATE
,a.lang
,a.job_id
FROM job_tl jtl, applied_for_job a, gateway gt
WHERE a.job_seeker_id=app.job_Seeker
AND a.job_id=jtl.job_id
AND a.lang=jtl.lang
AND a.gateway=gt.gateway
AND jtl.lang=(SELECT substr(MIN(lt.order_list||jtl0.lang),2) lang
FROM job_tl jtl0
,language_tl lt
WHERE jtl0.job_id = a.job_id
AND jtl0.lang=lt.lang
AND lt.gui_lang=app.language)
ORDER BY pi_sort_col
rest of code
The columns displayed in web page are Job_title, Company_name and Applied_date
This page is displyed well, bu without column nmes at the top. I am trying to get column names from cursor in order to have ORDER BY <pi_sort_col>
can someone help how i can get those column names:Job_title, Company_name and Applied_date
User will be able to click on column and sort
Thank in advance .I appreciate any helpHi Francisco
Here is my code
CREATE OR REPLACE PACKAGE BODY cc_web_application_list
IS
TYPE COL_NAME_LIST IS TABLE OF VARCHAR2(100)
INDEX BY BINARY_INTEGER;
TYPE COL_ORDER_LIST IS TABLE OF VARCHAR2(30)
INDEX BY BINARY_INTEGER;
col_name_t col_name_list;
col_order_t col_order_list;
procedure my_application_list
(pi_resume_num in varchar2 default null
,pi_sort_col in varchar2 default null
,pi_page_no in varchar2 default null
,pi_action in varchar2 default null
,pi_msg in varchar2 default null
is
l_my_page_no PLS_INTEGER := TO_NUMBER(nvl(pi_page_no,1));
l_js_name gam_user.username%TYPE;
l_js_first_name gam_user.first_name%TYPE;
l_cnt PLS_INTEGER := 0;
l_scr_lines PLS_INTEGER := 0;
l_curline PLS_INTEGER;
l_jobs_applied PLS_INTEGER;
l_total_rec PLS_INTEGER;
l_total_pages PLS_INTEGER;
l_pos PLS_INTEGER;
l_first PLS_INTEGER :=0;
last PLS_INTEGER :=0;
l_lines PLS_INTEGER := 10;
col_name VARCHAR2(100) := col_name_t(3) ;
col_order VARCHAR2(30) := 'DESC';
str VARCHAR2(2000);
TYPE display_rec IS TABLE OF VARCHAR2(500) INDEX BY BINARY_INTEGER;
display display_rec;
TYPE page_table_type IS TABLE OF PLS_INTEGER INDEX BY BINARY_INTEGER;
page_number page_table_type;
CURSOR cur_job IS
SELECT jtl.JOB_TITLE job_title
,jtl.COMPANY_NAME company_name
,a.APPLY_DATE apply_date
,a.lang
,a.job_id
FROM job_tl jtl, applied_for_job a, gateway gt
WHERE a.job_seeker_id=app.job_Seeker
AND a.job_id=jtl.job_id
AND a.lang=jtl.lang
AND a.gateway=gt.gateway
ORDER BY a.apply_date;
This decode is a problem
decode(col_order,'ASC'
,decode(col_name
,col_name_t(1), jtl.job_title
,col_name_t(2), jtl.company_name
,col_name_t(3), TO_CHAR(a.apply_date, 'YYYYMMDDhh24miss')
,a.apply_date)
) ASC
,decode(col_order,'DESC'
,decode(col_name
,col_name_t(1), jtl.job_title
,col_name_t(2), jtl.company_name
,col_name_t(3), TO_CHAR(a.apply_date, 'YYYYMMDDhh24miss')
,a.apply_date)
) DESC
,a.apply_date
TYPE rec_one IS TABLE OF cur_job%ROWTYPE INDEX BY BINARY_INTEGER;
r rec_one;
BEGIN
BEGIN
SELECT username,first_name
INTO l_js_name,l_js_first_name
FROM gam_user
WHERE user_id = App.job_seeker;
EXCEPTION
WHEN OTHERS THEN NULL;
END;
Cc_Pkg_Elements.p_page_top_job_seeker(
'Personal Job List'
,REPLACE(Txt_Proc_My_Joblist.title_job_list
,'##first_name##',l_js_first_name),'N' ,TRUE ,'Pxx');
----- get numer of records returned by query
SELECT COUNT(1)
INTO l_total_rec
FROM job_tl jtl,applied_for_job a
,gateway gt
WHERE a.job_id = jtl.job_id
AND a.job_seeker_id = App.job_seeker
AND a.gateway = gt.gateway ;
------get number of pages
l_total_pages:=CEIL (l_total_rec/l_lines);
l_jobs_applied := 0;
col_name := pi_sort_col;
col_order := pi_sort_col;
--get first positions
l_first := (nvl(l_my_page_no,1) - 1) * l_lines + 1;
FOR rec IN cur_job LOOP
l_cnt := l_cnt + 1;
EXIT WHEN l_cnt > l_first + l_lines - 1;
IF l_cnt >= l_first THEN
l_scr_lines := l_scr_lines + 1;
r(l_scr_lines) := rec; --assign counter from loop to r index
IF rec.apply_date IS NOT NULL THEN
l_jobs_applied := l_jobs_applied + 1;
END IF;
END IF;
END LOOP;
htp.p('<FORM ACTION="'||App.gateway||'8.my_application_list" METHOD="post">');
htp.p('<table align="center">');
htp.p('<tr><td>');
IF r.COUNT = 0 THEN
Web_Pkg_Elements.doc_msg(Txt_Proc_My_Joblist.no_jobs);
END IF;
htp.p('</td></tr>');
htp.p('</table>');
--table_heading(col_name ,col_order );
htp.p('<table align=center>');
htp.p('<tr align="center"><td>');
FOR i IN 1..l_total_pages LOOP
page_number(i) := i;
IF page_number(i) = l_total_pages THEN
htp.p('');
||'');
Web_Pkg_Elements.doc_val_small(page_number(i)||'</A>');
ELSE
htp.p('');
|'||'');
Web_Pkg_Elements.doc_val_small(page_number(i)||' |'||'</A>');
END IF;
END LOOP;
htp.p('</td></tr>');
htp.p('</table>');
htp.p('<table align=center>');
FOR l_curline IN 1..l_scr_lines LOOP
display(1) := NVL(r(l_curline).job_title, '<br>');
display(2) := NVL(r(l_curline).company_name, '<br>');
display(3) := NVL(Cc_Pkg_Nls.date2char(r(l_curline).apply_date, App.date_format), '<br>');
IF MOD(l_curline, 2) = 0 THEN
Cc_Pkg_Elements.tr_even;
ELSE
Cc_Pkg_Elements.tr_odd;
END IF;
htp.p('<td>');
htp.p('');
Web_Pkg_Elements.doc_val(display(1)||'');
htp.p('</td>');
htp.p('<td>');
Web_Pkg_Elements.doc_val(display(2));
htp.p('</td>');
htp.p(' <td>');
Web_Pkg_Elements.doc_val(display(3));
htp.p(' </td>');
htp.p('</tr>');
END LOOP;
htp.p('</TABLE>');
htp.p('<TABLE width="88%" BORDER="0" CELLPADDING="0" CELLSPACING="0"
align="center">');
htp.p('<tr valign=bottom>');
htp.p('<TD colspan=2 align=right>');
IF l_my_page_no > 1 THEN
htp.p('<P>'||'<IMG SRC="'||App.image||'prev.gif" ALT="'
||Txt_Proc_My_Joblist.prev
||'"' ||' HEIGHT=20 BORDER=0 ALIGN=bottom '
||'hspace=2>');
END IF;
IF l_my_page_no < CEIL (l_total_rec/l_lines) THEN
htp.p(' <a href="'||
web_pkg_elements.link$$(App.gateway||'8.my_application_list?'
||'pi_sort_col='||Web_Pkg_Elements.replace_in_url(pi_sort_col)
||'&pi_msg=&pi_page_no='||TO_CHAR(l_my_page_no + 1)
||">'||'<IMG SRC="'||App.image||'next.gif" ALT="'
||Txt_Proc_My_Joblist.NEXT
||'"' ||' HEIGHT=20 BORDER=0 ALIGN=bottom '
||'hspace=2></a>');
END IF;
htp.p('</TD>');
htp.p('</TR>');
htp.p(' </TABLE>');
htp.formHidden('pi_sort_col', pi_sort_col);
htp.formHidden('pi_page_no', pi_page_no);
htp.p('</FORM>');
END my_application_list;
END ; --cc_pkg_application_list -
Getting host, port from the tnsnames.ora with the service name
Hi.
I think that I asked a similar question yesterday. I want to ask if there is a way to get host and port from the tnsnames.org with a given service name. Somebody answered it for getting SID in the sqlplus. so I tried it in a similar way, but it didn't work.
I have a service name, but I don't know how to get host and port. I know that I can parse the tnsnames.ora file to get it, but if possible, I want to use the more official and safe way.
I'd appreciated if somebody knows it.caesarkim wrote:
Hi.
I think that I asked a similar question yesterday. I want to ask if there is a way to get host and port from the tnsnames.org with a given service name. Somebody answered it for getting SID in the sqlplus. so I tried it in a similar way, but it didn't work.
I have a service name, but I don't know how to get host and port. I know that I can parse the tnsnames.ora file to get it, but if possible, I want to use the more official and safe way.
I'd appreciated if somebody knows it.Oracle RDBMS does not require SQL*Net to operate.
Oracle RDBMS does NOT now or care about content of any tnsnames.ora file.
Realize that each (remote) user can have their own personalized copy of tnsnames.ora
The content of tnsnames not NOT have to reflect any reality.
I could post the content of my tnsnames.ora & it would be useless to everyone reading. -
Getting host name and port number from application
Does anyone know how I would be able to get the host name
and port number from an application launched by java webstart ?
This is the host and port of the URL that this application is launched from.A couple of suggestions:
-The note is about 6.40. Doesn't fit for your server
-Don't!
-Reinstall!
Regards,
Benny -
Getting host name and port number from an application
Does anyone know how I would be able to get the host name
and port number from an application launched by java webstart ?
This is the host and port of the URL that this application is launched from.A couple of suggestions:
-The note is about 6.40. Doesn't fit for your server
-Don't!
-Reinstall!
Regards,
Benny -
Getting OS X Host Name from Cambia
We would like to configure our OS X workstations to return their hostnames when scanned with Cambia (network monitoring software). Cambia uses netbios, tcp probes, dns lookup and nmap to discover the identity of nodes on the network. Can anyone tell me how to configure OS X to return its host name when Cambia does a scan??
I know netbios is a no-go, but I manually set the host name in the /etc/hostconfig file in the hope that would do it. It doesn't.
Is there a setting or software that would return the hostname via an nmap probe????
Bob ReedWe would like to configure our OS X workstations to
return their hostnames when scanned with Cambia
(network monitoring software). Cambia uses netbios,
tcp probes, dns lookup and nmap to discover the
identity of nodes on the network. Can anyone tell me
how to configure OS X to return its host name when
Cambia does a scan??
If you run your own DNS servers, macs that use DHCP will set thier names in the DHCP request, so you should get it from there.
Are your Macs using DHCP ? Do you run your own internal name server ?
Is there a setting or software that would return the
hostname via an nmap probe????
Bob Reed -
How to Get Host Name Domain Name : Port No. for App Server From Forms
Forms 10g r2
I am looking to run various forms and reports from within a form. I am using web_show_document. I am passing the URL which includes "http://{host name . domain name : port number}/forms/frmservlet?config=schema1_schema2 form=ab0001 p_param1=151 p_param2=1409 p_x=X". My schema1_schema2 config section in formsweb.cfg contains user name, password, connection information.
All works well when the actual host_name.domain_name:port_no are hard-coded within a string that is used for the URL with web_show_document, but I need to be able to distribute the form without hard-coding the host_name, domain_name, and port_no.
I have looked in forms help for application properties, system variables, and within this forum for the built-in or system variable that returns this information, but have not found it.
Can someone please tell me how I can get this information (host_name, domain_name, and port_number for the application server on which the form is currently running) so that I can build this working URL dynamically?
I appologize if I have overlooked it within this forum.
Thanks greatly,
JamesThanks, Rosario.
As it turns out, I don't need the IAS Host_Name, Domain_name, and Port_No. Instead, I can do what I described by stripping off precisely THAT information leaving a URL that looks like:
v_url := "/forms/frmservlet?config=schema1_schema2 form=ab0001 p_param1=151 p_param2=1409 p_x=X";
WEB.SHOW_DOCUMENT(v_url,'_blank');
The original IAS Host_Name, Domain_Name, and Port_No. are assumed and the named config -- schema1_schema2 is still properly referenced so as to use the username/password and connect string to the 2nd schema. This is done by use of the relative path.
Maybe you are looking for
-
How can we retrieve the Payload information from B2B
Hello, We are trying to send the payload information back to the client for a failed BPEL Transaction from B2B's b2b_instancemessage view. We are enqueing messages to IP_OUT_QUEUE using BPEL. We see the payload coming correctly in the B2B Business Me
-
64 bit ATM deluxe actually works, you just can't install
I actually could hardly believe it. Is Adobe Really that lazy that they can't just repackage the installer so it will work on a 64bit version of windows? Well, it seems so. I went to my coworkers computer, who has the same version of the software as
-
Hi all, I've been trying to set up public key authentication for SSH recently, and have come across a problem which has left me stumped. I want to be able to SSH into computer A (iBook G4, 10.5.1) from computer B (iMac G4, 10.5.0), and vice versa. At
-
Downloading Framemaker 10 trial
I have not been able to download Framemaker 10 Trial. The browser (IE, Firefox or Chome) all give an error message that there have been too many redirections. I have tried many times over the last few months and always the same error messages. No p
-
Media editor - Browse media files from a custom location
Hi, I am using media banner cartridge, which provides a media editor for choosing media files. The media files have to be in Endeca\Apps\<application>\config\media folder for me to browse the media files from media editor. Is there a way to change th