You can use the include directive:

<jsp:include page="/servlet/com.mimer.fredrik.Servlet" flush="true">
  <jsp:param name="optionOne" value="adsf" />
  <jsp:param name="optionTwo" value="adsf" />
</jsp:include>

This will call the Servlet and pass the optionOne and optionTwo to the
servlet in the request objekt. In the servlet you can thus get the value of
optionOne with request.getParameter("optionOne")

Regards,
Fredrik �lund

  ********************************************
      Fredrik �lund
      Mimer Information Technology AB
      +46 (0)18 18 50 00
      [EMAIL PROTECTED]
      http://www.mimer.com

  ********************************************
----- Original Message -----
From: "Khalid Loubane" <[EMAIL PROTECTED]>
To: "JRun-Talk" <[EMAIL PROTECTED]>
Sent: Monday, February 12, 2001 5:38 PM
Subject: Re: servlet in JSP file


> hi Younas,
> thanks for ur help.
> but i want to "include" (not call or redirect) the result of my servlet
> into the JSP file.
>
> Khalid
>
> At 08:58 PM 2/12/01 +1000, you wrote:
> >Khalid Loubane
> >
> >You can call servlet in jsp in a form  like
> ><form action"/servlet/ServletName" method="get">
> >
> >You can also make link of servlet like <a
href="/servlet/ServletName">Test</a>
> >
> >You can also redirect to servlet like
> ><% response.sendRedirect("/servlet/ServletName"); %>
> >
> >Regards
> >
> >Younas Aamir
> >
> >
> >
> >
> >
> >
> > > Hi everybody,
> > > i'm new :o), and i'm happy to join ur group.
> > > my question is : how can i include a servlet in JSP file ?
> > > thanks.
> > >
> > >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm


Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebarRsts

Reply via email to