wood burning stoves 2.0*
The moose likes Tomcat and the fly likes problem regarding File Uploading on Server. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "problem regarding File Uploading on Server." Watch "problem regarding File Uploading on Server." New topic
Author

problem regarding File Uploading on Server.

vikash sharma
Greenhorn

Joined: Mar 17, 2007
Posts: 3
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

Joined: Jan 10, 2002
Posts: 61241
    
  66

"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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
rajesh ssh
Greenhorn

Joined: Aug 23, 2006
Posts: 11
hi friend! just put jar files regarding jsp, i mean jsp...jar files in common folder


Regards<br />RAJESH.M
vikash sharma
Greenhorn

Joined: Mar 17, 2007
Posts: 3
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

Joined: Mar 17, 2007
Posts: 3
sorry RAJESH.M
i mis spelled your name.. sorry for that...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem regarding File Uploading on Server.