Include a Servlet into web page body

M

Muzzy

Hello,

I just have a problem with following: i have a .jsp file containing a static
html menu and a table cell where i need to include a servlet call result.
Servlet is called with the same parameters as the .jsp file.

<table>
<tr>
<td>
<!-- Here i need to include a call to the servlet with
parameters, eg
"MyServlet?param1=10&param2=3".
-->
</td>
</tr>
</table>

I tried <jsp:include page="MyServlet" > </jsp:include> but it doesn't work.

Any ideas would be appreciated!

Thnk you,
Andrey aka MuZZy
 
L

Luis Crespo

Have you tried <jsp:include page="/MyServlet" > </jsp:include>?
(notice the "/" before "MyServlet).

Regards,
Luis.
 
H

hiwa

Muzzy said:
Hello,

I just have a problem with following: i have a .jsp file containing a static
html menu and a table cell where i need to include a servlet call result.
Servlet is called with the same parameters as the .jsp file.

<table>
<tr>
<td>
<!-- Here i need to include a call to the servlet with
parameters, eg
"MyServlet?param1=10&param2=3".
-->
</td>
</tr>
</table>

I tried <jsp:include page="MyServlet" > </jsp:include> but it doesn't work.

Any ideas would be appreciated!

Thnk you,
Andrey aka MuZZy

Have the servlet do them all.
 
B

Berlin Brown

Muzzy said:
THANKS A LOT!!! It works now!!!
A more fun way and I havent tried it, use an iframe

<td>
<iframe src="news/SomeServlet?doGet" frameborder="0" width="100%"
height="110" scrolling="auto"
name="text" target="top">
</iframe>
</td>
</tr>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top