Click here to Skip to main content
15,916,180 members
Home / Discussions / Java
   

Java

 
GeneralRe: Memory usage for requested rows from database Pin
jschell17-Jan-23 3:24
jschell17-Jan-23 3:24 
AnswerRe: Memory usage for requested rows from database Pin
RedDk17-Jan-23 7:15
RedDk17-Jan-23 7:15 
QuestionHow to found a file by utilizing a variable for 'Startswith' in JAVA? Pin
MOHAMMAD ZAINUL ABIDEEN3-Jan-23 0:32
MOHAMMAD ZAINUL ABIDEEN3-Jan-23 0:32 
AnswerRe: How to found a file by utilizing a variable for 'Startswith' in JAVA? Pin
Richard MacCutchan3-Jan-23 1:22
mveRichard MacCutchan3-Jan-23 1:22 
Questionhow to discover a file by utilizing a variable for 'Startswith' in java? Pin
MOHAMMAD ZAINUL ABIDEEN3-Jan-23 0:22
MOHAMMAD ZAINUL ABIDEEN3-Jan-23 0:22 
AnswerRe: how to discover a file by utilizing a variable for 'Startswith' in java? Pin
Richard MacCutchan3-Jan-23 0:25
mveRichard MacCutchan3-Jan-23 0:25 
GeneralRe: how to discover a file by utilizing a variable for 'Startswith' in java? Pin
MOHAMMAD ZAINUL ABIDEEN3-Jan-23 1:11
MOHAMMAD ZAINUL ABIDEEN3-Jan-23 1:11 
QuestionDisplay BLOB image in JSP Pin
simoneguidi0130-Dec-22 5:09
simoneguidi0130-Dec-22 5:09 
Hello everyone, I have a list of Objects, whose attributes include a BLOB object, taken from a database, how can I display the image in JSP?

This is the servlet code with which I take objects from the DB

<pre lang="Java">				
               while(rs.next()) {
			    	Rapportino rapp = new Rapportino();
					String nome_operaio = rs.getString("nome_operaio");
					String cognome_operaio = rs.getString("cognome_operaio");
					String ruolo_operaio = rs.getString("ruolo_operaio");
					Date data = rs.getDate("data");
					String luogo = rs.getString("luogo");
					Blob foto = rs.getBlob("file");
					

					rapp.setNome_operaio(nome_operaio);
					rapp.setCognome_operaio(cognome_operaio);
					rapp.setRuolo_operaio(ruolo_operaio);
					rapp.setData(data);
					rapp.setLuogo(luogo);
					rapp.setFoto(foto);
					
					rapportini.add(rapp);
				}

				request.setAttribute("rapportini", rapportini);
		        request.getRequestDispatcher("rapportino.jsp").forward(request,response);

And this is the jsp, for now I have not implemented the code for the BLOB


HTML
<pre lang="HTML"><pre>
<% List<Rapportino> rapportini = (List<Rapportino>)request.getAttribute("rapportini");%>
<!DOCTYPE html>
<html>
	<head>
	<meta charset="ISO-8859-1">
	<title>Rapportini</title>
	</head>
	<body>
		<h1>Rapportino:</h1>
		<table>
		  <c:forEach items="${rapportini}" var="rapp">
		    <tr>
		      <td><c:out value="${rapp}" /></td>
		    </tr>
		  </c:forEach>
		</table>
		<a href="homepage_admin.jsp">Torna alla home</a>
	</body>
</html>

AnswerRe: Display BLOB image in JSP Pin
jschell2-Jan-23 13:29
jschell2-Jan-23 13:29 
QuestionWhich coding language is best for developing web apps? Pin
nithin sethu14-Dec-22 2:18
nithin sethu14-Dec-22 2:18 
AnswerRe: Which coding language is best for developing web apps? Pin
Richard MacCutchan14-Dec-22 2:41
mveRichard MacCutchan14-Dec-22 2:41 
GeneralRe: Which coding language is best for developing web apps? Pin
Richard Deeming14-Dec-22 2:48
mveRichard Deeming14-Dec-22 2:48 
GeneralRe: Which coding language is best for developing web apps? Pin
Richard MacCutchan14-Dec-22 2:58
mveRichard MacCutchan14-Dec-22 2:58 
AnswerRe: Which coding language is best for developing web apps? Pin
Gerry Schmitz14-Dec-22 9:10
mveGerry Schmitz14-Dec-22 9:10 
QuestionPor favor alguien q me ayude con estos ejercicios en netbenas en formulario jframe Pin
Joel Jordan3-Dec-22 13:00
Joel Jordan3-Dec-22 13:00 
AnswerRe: Por favor alguien q me ayude con estos ejercicios en netbenas en formulario jframe Pin
PIEBALDconsult3-Dec-22 13:16
mvePIEBALDconsult3-Dec-22 13:16 
QuestionHow to put the condition if the array may be empty? Pin
Cris29M26-Nov-22 2:37
Cris29M26-Nov-22 2:37 
AnswerRe: How to put the condition if the array may be empty? Pin
Richard MacCutchan26-Nov-22 3:04
mveRichard MacCutchan26-Nov-22 3:04 
GeneralRe: How to put the condition if the array may be empty? Pin
Cris29M26-Nov-22 3:43
Cris29M26-Nov-22 3:43 
GeneralRe: How to put the condition if the array may be empty? Pin
Richard MacCutchan26-Nov-22 4:41
mveRichard MacCutchan26-Nov-22 4:41 
GeneralRe: How to put the condition if the array may be empty? Pin
Cris29M26-Nov-22 4:53
Cris29M26-Nov-22 4:53 
QuestionAddress Book System Help Pin
Ghost 717-Nov-22 19:19
Ghost 717-Nov-22 19:19 
SuggestionRe: Address Book System Help Pin
Richard MacCutchan17-Nov-22 20:38
mveRichard MacCutchan17-Nov-22 20:38 
AnswerRe: Address Book System Help Pin
CHill6018-Nov-22 0:02
mveCHill6018-Nov-22 0:02 
QuestionTravel Salesman Problem find itinerary with highest visited sites attractiveness score Pin
Faroug Tifratene16-Nov-22 0:36
Faroug Tifratene16-Nov-22 0:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.