What exactly do you mean by call?
If you mean 'forward a request' and you are using Servlets 2.1+ then you can
use a RequestDispatcher object to reference the URL you are forwarding to,
this works for both JSPs and servlets, remember that the URL has to be
relative to the servlet context.
If you mean HTML anchors within a page then this
<A HREF=http:\\localhost\somepage.jsp>page</A> works fine.
Using FORM actions should also work, although I've never tried that :-)
Kevin Jones
DevelopMentor
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Vivek Ojha
> Sent: 21 January 2000 04:36
> To: [EMAIL PROTECTED]
> Subject: Calling other JSP file
>
>
> In HTML page or a JSP page if we want to call a
> servlet we can call that as follows
> "/servlet/Spack.Serv/otherpack/file.htm"
> This will cause the servlet Serv in package Spack to
> be called and within that servlet we can use
> "request.getPathInfo()"
> to get the path "/otherpack/file.htm" supplied with
> the call.
>
> This is all possible if the Serv is a servlet.
>
> My question is if instead of a servlet I have to call
> a JSP file ie Serv is not a servlet but a JSP file as
> Serv.jsp and I have to call this file either from a
> servlet or Html or a JSP file can I pass
> the "/otherpack/file.htm" as follows
> "mypack/Serv.jsp/otherpack/file.htm"
> Can I do this or NOT? If I in what way?
> I have checked this, it doesn't work if Serv is a JSP
> file but works
> fine if Serv is a servlet.
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html