[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3824: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3826: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3827: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3828: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
Next Framework • Ver Tópico - Exibir imagem - Resolvido
Página 1 de 1

Exibir imagem - Resolvido

MensagemEnviado: Seg Out 18, 2010 9:16 pm
por tchaco

Re: Exibir imagem

MensagemEnviado: Ter Out 19, 2010 6:05 pm
por rogelgarcia
É necessário ter permissão para acessar as imagens.. caso contrário o servidor não irá retorná-las mesmo não. Isso é uma questão de segurança.

A forma mais simples de informar ao servidor que o usuário pode ver a imagem.. é colocar um <t:property> para ela.. exemplo:

<t:property name="foto"/>

Isso irá exibir um link para download exatamente como o que vc mostrou no seu código e também irá liberar a permissao no servidor para exibir a imagem.

Imagino que você não deseje mostrar esse llink.. e sim o <img>.. nesse caso.. utilize comentários de HTML ao redor do <t:property>.. ele será executado (liberando a permissao).. mas não será mostrado...

O seu jsp completo ficaria da seguinte forma (o n:panel não é obrigatório, mas ajuda caso as propriedades estejam sendo renderizadas em duas colunas..):

<n:panel>
<!--
<t:property name="foto"/>
-->
<img src="/sis/DOWNLOADFILE/${estoque.foto.cdfile}" height="75px" width="100px" />
</n:panel>

Re: Exibir imagem

MensagemEnviado: Ter Out 19, 2010 6:35 pm
por tchaco
Valeu Rogel, funcionou.

Obrigado.