To the best of my knowledge. You can't include a servlet in a JSP page. You
can do a submit to a servlet, or have a servlet forward data to a JSP page.

-----Original Message-----
From: Raju Lokhande [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 1:06 PM
To: [EMAIL PROTECTED]
Subject: Calling a servlet from a jsps page


Greetings everyone,
 I have a .jsps page as follows:
===============Begin==================
<html>
<head><title>Times!</title></head>
<body>
The current time here is:
<jsp: include page="/rajapp/mypkg.CurrentTime.class" flush="true" />
<P>
</body>
</html>
=============End=====================
My application web.xml entries are as follows
===============Begin==================
<servlet>
        <servlet-name> CurrentTime </servlet-name>
        <servlet-class> mypkg.CurrentTime </servlet-class>
</servlet>

<servlet-mapping>
        <servlet-name> CurrentTime </servlet-name>
        <url-pattern> /CurrentTime </url-pattern>
</servlet-mapping>
==========End============
I invoke this page as http://my-local-host-name/rajapp/times.jsps
I get no output from the servlet.
The Servlet class compiled fine. I followed the advice from my searches in
the archives for this list server.
Any idea about what is wrong here. I am using jakarta-tomcat-4.0.3 on
Win2000.
Thanks in advance
Raju Lokhande




*************************************************************************
This message, together with any attachments, is intended only
for the use of the individual or entity to which it is addressed. It
may contain information that is confidential and prohibited from
disclosure.  If you are not the intended recipient, you are
hereby notified that any dissemination or copying of this
message or any attachment is strictly prohibited. If you have
received this message in error, please notify the original sender
immediately by telephone or by return e-mail and delete this
message along with any attachments, from your computer.
Thank you.
*************************************************************************


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to