You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jason Pyeron <ja...@pyeron.com> on 2003/01/19 01:35:55 UTC

JSTL quickie [ot]


           <td><pre><c:out value="${indx.exceptiontxt}"/></pre>

is giving a [B@19c4091, thats a byte array, how do I burp this out as 
text?

-jason
	

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                   http://www.pyerotechnics.com   -
- Owner & Lead                  Pyerotechnics Development, Inc. -
- +1 410 808 6646 (c)           500 West University Parkway #1S -
- +1 410 467 2266 (f)           Baltimore, Maryland  21210-3253 -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JSTL quickie [ot]

Posted by Jason Pyeron <ja...@pyeron.com>.
thanks, i was having mental blocks on this one:

its a page to list the exceptions thrown by tomcat for a web app. We never 
display an exception to a user, instead we give them a message like :

 We are sorry that you are having trouble with this application. If you 
require assistance with this application please contact our support 
department. For your reference you have been assigned an incident number 
of #112048. 

and then look them up ourselves.

<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %><%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %><html>
<sql:setDataSource dataSource="jdbc/DB" />
<sql:query var="result" >SELECT * FROM exceptions ORDER BY id DESC</sql:query>
<table border="1">
<c:forEach var="indx" items="${result.rows}"><tr>
<td><c:out value="${indx.id}"/>
<td><c:out value="${indx.ts}"/>
<td><pre><%= new String((byte[])((java.util.Map)pageContext.findAttribute("indx")).get("exceptiontxt"))%></pre>
</c:forEach>
</table>
</html>

On Sat, 18 Jan 2003, Kris Schneider wrote:

Don't think that's gonna happen with JSTL. Something like the following 
expression element should work:

<td>
   <pre>
     <%= new 
String(((ClassOfIndx)pageContext.findAttribute("indx")).getExceptiontxt()) 
%>
   </pre>

> On Sat, 18 Jan 2003, Jason Pyeron wrote:
> 
> 
> 
>            <td><pre><c:out value="${indx.exceptiontxt}"/></pre>
> 
> is giving a [B@19c4091, thats a byte array, how do I burp this out as 
> text?
> 
> -jason




-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                   http://www.pyerotechnics.com   -
- Owner & Lead                  Pyerotechnics Development, Inc. -
- +1 410 808 6646 (c)           500 West University Parkway #1S -
- +1 410 467 2266 (f)           Baltimore, Maryland  21210-3253 -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JSTL quickie [ot]

Posted by Kris Schneider <kr...@dotech.com>.
Don't think that's gonna happen with JSTL. Something like the following 
expression element should work:

<td>
   <pre>
     <%= new 
String(((ClassOfIndx)pageContext.findAttribute("indx")).getExceptiontxt()) 
%>
   </pre>

Jason Pyeron wrote:
>            <td><pre><c:forEach var="c" items="${indx.exceptiontxt}"><c:out 
> value="${c}"/></c:forEach></pre>
> 
> yields
> 
>            
> <td><pre>1069711897461089711010...
> ...1041141019710046106971189758535154411310</pre>
> 
> 
> 
> On Sat, 18 Jan 2003, Jason Pyeron wrote:
> 
> 
> 
>            <td><pre><c:out value="${indx.exceptiontxt}"/></pre>
> 
> is giving a [B@19c4091, thats a byte array, how do I burp this out as 
> text?
> 
> -jason


-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


packages

Posted by puneet sachar <pu...@yahoo.com>.
hey....

can anyone tell me wwhat is the standard package in
java
and which package wich we don't have to explictly
mention and what are the conditions we have to mention
them..

regards


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JSTL quickie [ot]

Posted by Mike Zeitlin <mi...@ns.pyerotechnics.com>.
<%=indx.getExceptiontxt()%>


On Sat, 18 Jan 2003, Jason Pyeron wrote:

> 
>            <td><pre><c:forEach var="c" items="${indx.exceptiontxt}"><c:out 
> value="${c}"/></c:forEach></pre>
> 
> yields
> 
>            
> <td><pre>1069711897461089711010...
> ...1041141019710046106971189758535154411310</pre>
> 
> 
> 
> On Sat, 18 Jan 2003, Jason Pyeron wrote:
> 
> 
> 
>            <td><pre><c:out value="${indx.exceptiontxt}"/></pre>
> 
> is giving a [B@19c4091, thats a byte array, how do I burp this out as 
> text?
> 
> -jason
> 	
> 
> 
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JSTL quickie [ot]

Posted by Jason Pyeron <ja...@pyeron.com>.
           <td><pre><c:forEach var="c" items="${indx.exceptiontxt}"><c:out 
value="${c}"/></c:forEach></pre>

yields

           
<td><pre>1069711897461089711010...
...1041141019710046106971189758535154411310</pre>



On Sat, 18 Jan 2003, Jason Pyeron wrote:



           <td><pre><c:out value="${indx.exceptiontxt}"/></pre>

is giving a [B@19c4091, thats a byte array, how do I burp this out as 
text?

-jason
	



-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                   http://www.pyerotechnics.com   -
- Owner & Lead                  Pyerotechnics Development, Inc. -
- +1 410 808 6646 (c)           500 West University Parkway #1S -
- +1 410 467 2266 (f)           Baltimore, Maryland  21210-3253 -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>