Recap: My bare bones JSP throws a runtime null pointer exception...
Just to see, I took the generated servlet source from
/jsp(jrun__test2ejsp9.java), copied it into classes/, renamed it, and
recompiled it.
I then was able to successfully invoke this servlet !.
http://1.2.3.4:1130/myapp/servlet/jjj
So its not the generated servlet code that is wrong either....
======
could be the permissions of the /jrun dir....?
Doubt it, as it was able to write to it to create the generated servlet.
>ls -ltr
total 14
drwxrwxr-x 2 netscape netscape 512 Feb 1 01:49 lib
-rw-r--r-- 1 netscape netscape 1374 Mar 2 12:58 nohup.out
drwxr-xr-x 2 netscape netscape 512 Mar 6 02:08 sessions
drwxr-xr-x 2 netscape netscape 512 Mar 6 03:44 jsp
-rwxrwxr-x 1 netscape netscape 389 Mar 6 04:30 web.xml
drwxrwxr-x 3 netscape netscape 512 Mar 6 21:01 classes
======
So basically theres a null pointer exception thrown in the below code ONLY
when its run as a JSP....
Let me know if you have any ideas on this,,,
thanks again..
/*====================================================================*/
private ServletConfig config;
private ServletContext application;
private Object page = this;
private JspFactory __jspFactory = JspFactory.getDefaultFactory();
public void _jspService(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException
{
if(config == null) {
config = getServletConfig();
application = config.getServletContext();
}
response.setContentType("text/html; charset=ISO-8859-1");
PageContext pageContext = __jspFactory.getPageContext(this, request,
response, null, true, 8192, t
rue);
JspWriter out = pageContext.getOut();
HttpSession session = pageContext.getSession();
/*====================================================================*/
>Date: Tue, 06 Mar 2001 09:22:50 -0500
>From: "sid soni" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Servlets work, JSP's dont.....(null pointer error)
>Message-ID: <[EMAIL PROTECTED]>
>
>Servlets are working well....
>However, I think my JSP config is incorrect.
>Is there some inital config I've overlooked?
>Thanks for any help!!
>
>Server:myserver
>Application Name:my-app
>Application Root Directory:/opt/JRun/servers/myserver/my-app
>Application Mapping:/myapp
>
>I've created a simple HTML file, and named it:
>/opt/JRun/servers/myserver/my-app/test.jsp
>
>this JSP file simply contains:
><html><body>testing</body></html>
>
>http://1.2.3.4:1130/myapp/test.jsp
>When I invoke it, jrun finds it and compiles it, and gives the following
>runtime error when executing:
>
>500 Internal Server Error
>/myapp//test.jsp:
>
>null
>java.lang.NullPointerException
> at allaire.jrun.jsp.JSPServlet.service(Compiled Code)
> at allaire.jrun.servlet.JRunSE.service(Compiled Code)
> at allaire.jrun.servlet.JRunSE.runServlet(Compiled Code)
> at allaire.jrun.servlet.JRunRequestDispatcher.forward(Compiled Code)
> at allaire.jrun.servlet.JRunSE.service(Compiled Code)
> at allaire.jrun.servlet.JvmContext.dispatch(Compiled Code)
> at allaire.jrun.jrpp.ProxyEndpoint.run(Compiled Code)
> at allaire.jrun.ThreadPool.run(Compiled Code)
> at allaire.jrun.WorkerThread.run(Compiled Code)
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists