Hi,
This can be done in Websphere 2.0.
example:
        ((com.sun.server.http.HttpServiceRequest)
req).setAttribute("SignonMsg", " Please Log On! ");
        ((com.sun.server.http.HttpServiceResponse) res).callPage(signonjsp,
req);

If you want to be as portable as possible, create a generic base http
servlet that extends HttpServlet and has some utilities in it that can be
changed later.

example:
import javax.servlet.*;
import javax.servlet.http.*;
public class MyServlet extends HttpServlet {
        public void passAttr(Object attrName, Object attr, String
jspFilePath, HttpServletRequest req, HttpServletResponse res){
                ((com.sun.server.http.HttpServiceRequest)
req).setAttribute(attrName, attr);
                ((com.sun.server.http.HttpServiceResponse)
res).callPage(jspFilePath, req);
        }
}

Then when you write your servlets, extend MyServlet instead of HttpServlet.
This lets you change one method and recompile one class later when you
upgrade to a servlet runner that supports the newest spec.

eg:

import javax.servlet.*;
import javax.servlet.http.*;
public class LogonServlet extends MyServlet {
public void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException{
        passAttr("LogonMsg","Please Log On with your userid and password.",
"/myapp/logon.jsp", req, res);
}



John Zerbe - Mellon Bank
IM&R - Middleware Team
Phone:  412-234-1048   E-Mail:[EMAIL PROTECTED]



> -----Original Message-----
> From: neelesh salgaonkar [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, January 04, 2000 3:38 AM
> To:   [EMAIL PROTECTED]
> Subject:      Compatibility problem of jsp.091 and jsp1.1
>
> Hi,
> We are using Websphere2.0 for our development which
> only supports jsp.091.
> We are facing a problem of passing a object from a
> servlet to jsp in the Request scope.
>
> In jsp1.1 this can be simply achieved by
> setAttribute() and getAttribute() methods by calling
> the jsp with
> getServletConfig().getServletContext().getRequestDispatcher(jsp
> file path).forward(req.res).
>
> Immediate help will be highly appreciated.
>
> Neelesh
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://messenger.yahoo.com
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to