posted 12 years ago
Hi
I have change my code into jsp+ servlet files but now iam facing some error please help me to solve, if iam doing mistake please intimate me.It is a file uploading concept.
Jsp Code:
My servlet file is Upload.java
If you say that ServletContext context = pageContext.getServletContext(); in this line its showing error while compiling time cannot find symbol. then i kept
private GenericServlet pageContext;
ServletContext context = pageContext.getServletContext();
now its not showing error compilation fine but while running time its shows the error as
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
Upload.doPost(Upload.java:39)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.33 logs.
in eclipse.
web.xml:
If we wrote java code inside jsp file by scripting is not a good so i change my code please help me to solve my problem
Thanks in advance.