Na tentativa de erro e acerto para configurar o HTML_DB, segui os seguintes passos:
1o. - Criei um usuario;
2o. - Adicionei a minha rede em uma rede doméstica no windows 7;
3o. - Em seguida, criei um diretório virtual via Windows Explorer, no caminho
c:\pls
e compartilhei na minha rede doméstica;4o. - Após criado o usuário e o diretório virtual, executei o seguinte script:
SELECT * FROM dba_epg_dad_authorization;
-----
vazio
begin
dbms_epg.create_dad (dad_name => 'tinho', path => '/pls/*');
dbms_epg.authorize_dad (dad_name => 'tinho', user => 'TINHO');
dbms_epg.set_dad_attribute(dad_name => 'tinho', attr_name => 'default-page' , attr_value => 'home');
dbms_epg.set_dad_attribute(dad_name => 'tinho', attr_name => 'database-username', attr_value => 'TINHO');
end;
SELECT * FROM dba_epg_dad_authorization;
-----
DAD_NAME USERNAME
tinho TINHO
create or replace procedure home
as
begin
htp.p('Hello, world!');
end home;
exec dbms_xdb.setlistenerlocalaccess(false);
Que significa: Se l_access é FALSE, setListenerLocalAccess permite o acesso ao servidor de DB XML HTTP tanto no localhost e as
interfaces não localhost.
Tente executar assim:
http://127.0.0.1:8080/pls/home ou
http://localhost:8080/pls/home
Pesquisando em outro site (http://www.oracle-base.com/articles/10g ... _10gR2.php), percebi que é feita uma alteração no arquivo
listener.ora, mas não sei ao certo onde e como alterar. A alteração é a seguinte:
The embedded HTTP server should register itself automatically with the listener. The XML DB documentation suggests that port 8080 should be presented for HTTP access automatically. In my experience this does not seem to be the case, so I was forced to added the following entries into the DESCRIPTION_LIST of the listener.ora file. The listener should be reloaded or restarted before any tests are performed.
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=8080))(Presentation=HTTP)(Session=RAW)
)
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=2100))(Presentation=FTP)(Session=RAW)
)
The DAD can now be tested by calling the following URL from a browser.
http://<server-name>:8080/my_epg_dad/home
Once you'vê convinced yourself that the DAD works you ar3 ready to develop PL/SQL web applications using the PL/SQL Web Toolkit or PL/SQL Server Pages.
acima. Ou seja, está correta a forma que eu fiz ao criar o diretório virtual? Ou eu preciso utilizar o recurso CREATE DIRECTORY do oracle?
Deve salvar fisicamento o objeto (procedure) na pasta criada? O endereço do server-name é o meu localhost mesmo? Tenho de fato que alterar
o arquivo listener.ora?
Desde já agradeço.