0

I am using HTTPservlet to handle requests from a user

this is the content of the doget method

RequestDispatcher requestDispatcher = request.getRequestDispatcher("/Blog.jsp");

Blog.jsp file

<body>
   <h1><%= "Hello World!" %></h1>
   <br/>
   <img src="">
</body>

I have a image in my Oracle database that I want to upload it into that img element.

And to be more specific I don't want to upload it into a file in my project and than put that file path inside that img element

is that possible?

Mehdi Rahimi
  • 808
  • 12
  • 23
  • Did you consider making a separate servlet for the image file? That way you can point your image src to that servlet, and have it return the byte stream. – Kraylog Apr 24 '22 at 06:01
  • @Kraylog Yes, I thought about that, and it really helps me. The problem is that I did not find the correct code for that servlet i tried so many time, can you help me if you have the code please – just study Apr 24 '22 at 08:57

1 Answers1

-1

I think u can’t, need create temp storage. And if that’s real - it be resource consuming, bad practice

Kazbo
  • 1