Mythili Nair wrote
>Hi all,
>Am working on WebSphere Application Server 2.0 and am
>facing some problems because of compatiblity problems
>wrt Servlets & JSP, as it supports Servlets 2.0 & JSP
>0.91.
>Therefore I cannot use the following methods:
>a)request.setAttribute()
>b)getServletConfig().getServletContext().getRequestDispatcher("URL",request)
>c)request.getAttribute()in the JSP
>WAS 2.0 provides alternative in the following way:
>a)((com.sun.server.http.HttpServiceRequest)request).setAttribute()
>b)((com.sun.server.http.HttpServiceResponse)response).callPage("URL",request);
>c)Use beans to pass the parameter in the servlet & get
>it in the JSP
Mythili,
Extend your servlet with **com.ibm.servlet.PageListServlet** as in the
FlightsServlet example which comes with WAS. This allows you (among other
things) to :
- setRequestAttribute("flightsServletBean", flightsServletBean, request);
- callPage(getPageNameFromRequest(request), request, response)
Use Bean Tags in JSP
<....>
>The Beans(HelloBean.java),
>Servlets(WASHelloServlet.java) & the
>JSP(WASHelloJSP.jsp) have to be in the same directory,
>which will involve crouding the directory(in this case
>: WebSphere/Appserver/samples)
I don't know which web-server you're using, but if you're using the IBM HTTP
Server (or Apache), have a look in the httpd.conf file where you can define an
**alias** (fe Alias /IBMWebAS/samples/ "C:/WebSphere/AppServer/samples/"
Alias /MyAlias/ "Mypath/") and manage this way your directory.
>Could you please treat this query as urgent & reply to
>the same.
>Mythili
Hope this might help you,
Kind regards,
Peter
===========================================================================
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