Buonasera,
All'interno della pagina JSP che segue:
codice:<html> <head> <title>SELECT Operation</title> </head> <body> <sql:setDataSource var="snapshot" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/" user="root" password=""/> <sql:query dataSource="${snapshot}" var="result"> SELECT * from msg where id=${id}; </sql:query> <table border="1" width="100%"> <tr> <th>Mittente</th> </tr> <c:forEach var="row" items="${result.rows}"> <tr> <td><c:out value="${row.id_utente_mitt}"/></td> <td><c:out value="${row.oggetto}"/></td> </tr> </c:forEach> </table> </body> </html>
Vorrei, nella colonna che ne risulta in "${row.id_utente_mitt}", sostituire un carattere con un altro, nel dettaglio "1" con "alfa", "2" con "beta" e così via fino a "7" con "eco"....
Consigli sulla funzione da utilizzare?
Grazie.