• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem regarding File Uploading on Server.

 
vikash sharma
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends... i am new to JSP.
I am trying to upload a file from user's machine to server. I am useing JSP and apache Tomcat 5.0
Here is my code.
------------------------

-----------------------------------------------------
the error i am getting---
exception

javax.servlet.ServletException: javax/servlet/http/HttpServletRequest
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.noticeboard.upload_jsp._jspService(upload_jsp.java:139)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


root cause

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
org.apache.commons.fileupload.servlet.ServletFileUpload.isMultipartContent(ServletFileUpload.java:68)
org.apache.jsp.noticeboard.upload_jsp._jspService(upload_jsp.java:55)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

---------------------------
please help me....
[BSouther: Added UBB CODE tags]

[ March 18, 2007: Message edited by: Ben Souther ]
[ March 18, 2007: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"vikash.tony sharma.sharma",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
rajesh ssh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friend! just put jar files regarding jsp, i mean jsp...jar files in common folder
 
vikash sharma
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks ramesh...
but can you elaborate what exactly do you mean by copying jar files in appropriate folder...

well i am on this project for about 3 weeks. i have completed few modules on jsp which includes access to the database which works fine.

i have downloaded Apache fileupload jar files and copied them in tomcat's common/lib folder.

please suggest me something..
 
vikash sharma
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry RAJESH.M
i mis spelled your name.. sorry for that...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic