Hi Rowan,
Try putting your jsp files in a different directory. If you are
using JSWDK then it won't serve any content from the "web-inf"
directory.
Hope this helps,
Mandar.
rowan wrote:
> To All in the group:
> Please Help. I have spent 4 hours but to no success in trying to make a
> servlet call a JSP.
> I was able to call the JSP but there was no answer ..
>
> Help
>
> class Foo
> {
> String s[];
> public Foo(String s[])
> {
> this.s=s;
> }
> public String [] getList()
> {
> return s;
> }
>
> }
>
> import java.io.*;
> import java.text.*;
> import java.util.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> public class Serve extends HttpServlet {
>
> public void doPost(HttpServletRequest request,
> HttpServletResponse response)
> throws IOException, ServletException
> {
> String s[]=new String[]{"blue","red","green"};
> Foo f=new Foo(s);
>
> request.setAttribute("foo",f);
>
> getServletContext().getRequestDispatcher("/web-inf/servlets/foo.jsp").forwar
> d (request, response);
>
> }
> }
>
> <html>
>
> <jsp:usebean name=foo type=Foo lifespan=page>
> </usebean>
> <ul>
> <loop property=foo:list propertyelement=x>
> <li>My name is <display property=x>
> </loop>
> </ul>
>
> </html>
>
> all these 3 files are in the same directory .
>
> When the servlet calls the JSP , it is succesfull but nothing is display
> why????
>
> I have followed everything as the JSP FAQ of esperanto ?
>
> Thanks for all the help.
>
> ===========================================================================
> 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