Couple of things :
a) Why are you extending your bean class from HttpServlet. Don't think that
is required. If you want to call a servlet from the jsp there are other
mechanisms available.
b)Try Using the useBean tag.
Have a nice day.
With regards,
Sachin S. Khanna.
www.emailanorder.com

----- Original Message -----
From: cupid1 <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 03, 2000 9:39 AM
Subject: problem running jsp with bean in java web server


> Hello all,
>
> I am trying since last 2 days to run a simple jsp example in java web
server
> but no luck. I get the famous "page can not be displayed message" I think
> its sever configuration problem (why they have to make configuration so
> hard?)
> here is source code for jsp file, which I have stored in
> c:\Javawebserver2.0\public_html folder:
>
>
> <html>
> <body>
> <BEAN name="counter" scope="session"
>  type="test.SimpleJSPBean" create="yes"
>  introspect="yes">
> </BEAN>
>
> You've accessed this page
> <%= counter.getCounter() %> times
> </body>
> </html>
>
>
> Following is the code for the Java bean, which I have compiled and saved
the
> .class file in
> c:\Javawebserver2.0\classes\test folder.
>
> package test;
>
> import java.io.*;
> import javax.servlet.http.*;
> import javax.servlet.*;
>
> public class SimpleJSPBean extends HttpServlet
> implements Serializable
> {
>  private long m_counter = 0L;
>
>  public long getCounter ()
>  {
>   return m_counter;
>  }
>
>  public void service (HttpServletRequest req,
>         HttpServletResponse res)
>  throws IOException, ServletException
>  {
>   m_counter++;
>  }
> }
>
>
>
> However it did not work. Please help me if you can see the problem. Thanks
> in advance.
>
> shuaib
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to