Hi. I'm new to JBoss and have installed version 4.2.3.GA on my WinXP Pro system
to match our server. The Java servlet needs to write an uploaded file to a
folder on my machine. The app's is located in this folder:
C:\jboss\jboss-4.2.3.GA\server\default\deploy\premupload.war
Its structure is like this:
...\premupload.war
| \uploads\
| \WEB-INF\
| upload.jsp
The upload folder (which is off the root of the app) is defined in the web.xml
file as this:
<context-param>
| <param-name>UploadDirectory</param-name>
| <param-value>/uploads/</param-value>
| </context-param>
I try to fetch the upload folder using this line in the servlet:
String uploadDirectory =
this.getServletContext().getInitParameter("UploadDirectory");
The app blows up with the following error referring to the above line:
java.lang.NullPointerException
| org.unctv.fileupload.UploadHandler.doPost(UploadHandler.java:47)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
|
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
How do I refer to the upload directory? Does it need to be outside of the
premupload.war folder? Your guidance is much appreciated. Thanks.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214947#4214947
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214947
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user