Parametros Errados JSP + BEAN

Por favor, estou tendo um problema de passagerm de parametro para o meu TLD que comunica com o Bean.

estou tentando passar assim:

<%
String tem = (String) request.getParameter(“chave”);
String state = (String) request.getParameter(“uf”);

if (tem != null && !tem.equals(""))

{
%>
<br><br>
<table align=center width=“70%”>
<th bgcolor="#CCDDEE" colspan=3 align=center>
Resultado
</th>
<pesquisa:mostremidias chave=’<%= tem %>’ uf=’<%=state%>’>

<tr bgcolor="#E3E3E3">
<td align=center>
Nome: <%= nome %>
</td>
<td align=center>
Cnpj: <%= cnpj %>
</td>
</tr>
<tr bgcolor="#F7F7F7">
<td align=center>
<%= ddd %>
</td>
<td align=center>
<%= telefone %>
</td> </tr> <tr> <td colspan=“2” bgcolor="#FFFFFF"> &nbsp; </td>
</tr>
</pesquisa:mostremidias>
</table>

mas acredito que to passando errado
a minha tag do meu XMl ta assim

<tag>
<name>mostremidias</name>
<tagclass>tags.TagMidia</tagclass>
<teiclass>tags.TagTEIMidia</teiclass>
<bodycontent>JSP</bodycontent>
<info>Tag que mostra o conteudo do BD</info>

&lt;attribute&gt;
	&lt;name&gt;chave&lt;/name&gt;	
	&lt;required&gt;false&lt;/required&gt;
	&lt;rtexprvalue&gt;true&lt;/rtexprvalue&gt;
&lt;/attribute&gt;

&lt;attribute&gt;
	&lt;name&gt;uf&lt;/name&gt;	
	&lt;required&gt;false&lt;/required&gt;
	&lt;rtexprvalue&gt;true&lt;/rtexprvalue&gt;
&lt;/attribute&gt;

</tag>

e na classe java ta certo

o que ta faltando?

Rodrigo

Oi

joey, seja bem vindo ao PJ :):):slight_smile:

Olhe só, nem terminei de ver seu código, mas onde está

if &#40;tem != null && !tem.equals&#40;&quot;&quot;&#41;&#41; 

deve ser assim

if &#40; &#40;tem != null&#41; && &#40;!tem.equals&#40;&quot;&quot;&#41;&#41; &#41; 

Ta dando alguem erro aí? POsta ele.

T+

Javeaux, ele nao da erro nenhum, simplesmente nao apaece o resultado da pesquisa na tela. (tenho certeza que existe na tabela o que estou procurando).

vou postar aki o codigo todo da page JSP

preciso de ajuda na passagem dos parametros para o TLD que comunica com a classe java.

obrigado

<%@ taglib uri="/WEB-INF/tld/TagLib.tld" prefix=“pesquisa” %>
<html>
<body>
<center>
<table align=center width=“50%”>
<form method=“post” action=“pesquisa.jsp”>
<th bgcolor="#CCDDEE" colspan=3>
Digite a(s) palavra(s) chave(s) para a pesquisa
</th>
<tr bgcolor="#f7f7f7">
<td align=center>
Nome: <input type=“text” name=“chave” size=30> <BR><BR>
Estado: <input type=“radio” name=“uf” value=“SC” checked> SC
<input type=“radio” name=“uf” value=“pr”> PR
<input type=“radio” name=“uf” value=“rs”> RS

&nbsp;&nbsp;
<input type=submit value=“Pesquisar >>”> &nbsp;&nbsp;
<input type=reset value=“Limpar”>
</td>
</tr>
</form>
</table>
<%
String tem = (String) request.getParameter(“chave”);
String state = (String) request.getParameter(“uf”);

if (tem != null && !tem.equals(""))

{
%>
<br><br>
<table align=center width=“70%”>
<th bgcolor="#CCDDEE" colspan=3 align=center>
Resultado
</th>
<pesquisa:mostremidias chave=’<%= tem %>’ uf=’<%=state%>’>

<tr bgcolor="#E3E3E3">
<td align=center>
Nome: <%= nome %>
</td>
<td align=center>
Cnpj: <%= cnpj %>
</td>
</tr>
<tr bgcolor="#F7F7F7">
<td align=center>
<%= ddd %>
</td>
<td align=center>
<%= telefone %>
</td> </tr> <tr> <td colspan=“2” bgcolor="#FFFFFF"> &nbsp; </td>
</tr>
</pesquisa:mostremidias>
</table>

<% } %>

</center>
</body>
</html>