> hi all,
> i have problem with servlet, when i r,
February 19, 2007 at 4:12 PM
> hi all, > i have problem with servlet, when i run the following code in > weblogic server , > > > import java.io.*; > import javax.servlet. *; > > public class FirstServlet extends GenericServlet > { > public void service(ServletRequ est req,ServletResponse res) > throws IOException, ServletException > { > res.setContentType( "text/html" ); > PrintWriter pw=res.getWriter( ); > int i=100; > pw.println(" This is First Generic Servlet" + i); > } > } > > > > im gettin the following error , please tel me how i can resolve this > problem.. > > > > Error 500--Internal Server Error > java.lang.NoClassDe fFoundError: java/lang/StringBui lder > at FirstServlet. service(FirstSer vlet.java: 11) > at > weblogic.servlet. internal. ServletStubImpl$ ServletInvocatio nAction.run > (ServletStubImpl. java:996) > at weblogic.servlet. internal. ServletStubImpl. invokeServlet > (ServletStubImpl. java:419) > at weblogic.servlet. internal. ServletStubImpl. invokeServlet > (ServletStubImpl. java:315) > at > weblogic.servlet. internal. WebAppServletCon text$ServletInvo cationAction > .run(WebAppServletC ontext.java: 6452) > at weblogic.security. acl.internal. AuthenticatedSub ject.doAs > (AuthenticatedSubje ct.java:321) > at weblogic.security. service.Security Manager.runAs > (SecurityManager. java:118) > at > weblogic.servlet. internal. WebAppServletCon text.invokeServl et > (WebAppServletConte xt.java:3661) > at weblogic.servlet. internal. ServletRequestIm pl.execute > (ServletRequestImpl .java:2630) > at weblogic.kernel. ExecuteThread. execute > (ExecuteThread. java:219) > at weblogic.kernel. ExecuteThread. run(ExecuteThrea d.java:178) > > > > and also tel me what are the environment variables i need to set when > i am using WEBLOGIC 8.1 server > > thanks in advance.. >
what i observed is write separate println method to print i.don't write along with the string. there are no environment settings for using weblogic. enjoy with weblogic.
View All Comments
| View Tutorial