here are couple of ideas:

1.  according to the 2.1 api request.setAttribute takes a string and an
object.  you are passing in two strings.  certainly string is derived from
object, but that may be the problem.   try assigning that string value to a
variable (maybe try casting it to object) and pass that in.

2.  getRequestDispatcher seems to be a 2.2 method only.  i can find it in
the 2.2 api but not in 2.1.  i believe you said that you are using jsdk2.1,
so that may be your problem on that one.

maybe someone who knows more than i could give you better help.  this,
however, is where i would start.  btw, i certainly applaud the goal of your
project ;-)

bradley mclain


>From: Thomas Heller <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
>        Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Servlet calling JSP
>Date: Sat, 18 Mar 2000 17:11:46 +0100
>
>Hi there!
>
>I'm currently planning to write one servlet thats provides me with some
>dynamic Informations about "Quake"-Servers online. The Servlet itself runs
>and compiles fine, but I'd like to divide my Design and Logic, so I tried
>the JSP Concept. I thought that I have my servlet that does all the logic
>(form processing, data collecting, ...) and then i have some JSP Pages that
>provide the output. I'd like to do it so that the servlet does everyting
>and at the end of the process I'd like it to forward the retrieved data to
>a JSP Page.
>
>To do so I tried the sample that comes with the JWSDK/JSDK (servlettojsp).
>
>[---snip---]
>request.setAttribute ("servletName", "servletToJsp");
>getServletConfig().getServletContext().getRequestDispatcher("/jsp/jsptoserv/hello.jsp").forward(request,
>response);
>[---snip---]
>
>Now that I want to compile my servlet all I get is an error:
>
>[---snip---]
>E:\development-data\TestServlet.java:202: Method
>setAttribute(java.lang.String, java.lang.String) not found in interface
>javax.servlet.http.HttpServletRequest.request.setAttribute ("servletName",
>"servletToJsp");
>
>E:\development-data\TestServlet.java:203: Method
>getRequestDispatcher(java.lang.String) not found in interface
>javax.servlet.ServletContext.
>getServletConfig().getServletContext().getRequestDispatcher("/jsp/jsptoserv/hello.jsp").forward(request,
>response);
>[---snip---]
>
>Without these statements the servlet compiles fine without any errors. Im
>currently using the JSDK2.0 but I also tried the JSDK2.1 and the
>JWSDK1.0.1.
>What classes do I need to have in my CLASSPATH to execute statements like
>the ones above?
>
>Thanks in advance,
>Thomas
>
>_______________________________________________________________________
>1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
>[EMAIL PROTECTED], 8MB Speicher, Verschluesselung - http://freemail.web.de
>
>___________________________________________________________________________
>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

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.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

Reply via email to