Coldfusion MX7 error with file upload
Hi all, I am using coldfusion mx7 server. While upload an excel file with(97-2003) format, I am getting the following error: Unable to construct record instance, the following exception occured: null
I am getting this error when I enters some data and save in my desktop with the format(97-2003) and after using a cfx tag to dump the uploaded data, I am getting this error. But if I just upload the template only without entering any data it will shows/dump the column names in template..
Is there any way to upload the same excel file with MX7?
Thanks in advance
To answer your final question: yes of course it's possible to upload any file type with any version of CF. One has no dependency on the other.
As for the rest of it: without seeing some code, it's impossible to really:
a) understand what you're asking;
b) work out what might be causing the problem.
Adam
Similar Messages
-
Problem with file upload in JDeveloper 10.1.2 version
Hi,
My application is running in JDveloper 10.1.2.1 version with BC4J Struts. Now, I want to do a module with file upload. I am getting an error in the uploading section as
java.lang.NullPointerException
at oracle.jbo.html.struts11.MultipartUtil.populate(MultipartUtil.java:227)
at oracle.jbo.html.struts11.BC4JRequestProcessor.processPopulate(BC4JRequestProcessor.java:433)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:673)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
Please suggest me an option to resolve the issue.
Regards,
Jobz....I remember that there was a bug in the MultipartHandler of the BC4JRequestProcessor in one of the 10.1.2.x version, however I'm nit sure which one. I found the old fix we implemented back then
Try this request processor and see if this helps:
package xx.yy.zz.common;
import javax.servlet.http.HttpServletResponse;
import oracle.jbo.html.struts11.BC4JActionMapping;
import org.apache.struts.Globals;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.MultipartRequestHandler;
import org.apache.struts.upload.MultipartRequestWrapper;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import oracle.jbo.html.HtmlServices;
import oracle.jbo.html.struts11.BC4JRequestProcessor;
import oracle.jbo.html.struts11.MultipartUtil;
* RequestProcessor for Apache Struts based applicartions
* Fix for a bug in <code>BC4JRequestProcessor</code> Multipart-Requests (e.g. Upload).
* @projekt common
public class HvbgBC4JRequestProcessor extends BC4JRequestProcessor {
* Override to fix a bug. Note that this works only if all ActionMappings in the project
* are of the type BC4JActionMapping.
* @see oracle.jbo.html.struts11.BC4JRequestProcessor#processMultipart(HttpServletRequest) processMultipart
protected HttpServletRequest processMultipart(HttpServletRequest request)
// Overide only if the action mapping is a BC4JActionMapping.
BC4JActionMapping mapping = (BC4JActionMapping) request.getAttribute(Globals.MAPPING_KEY);
if (HtmlServices.isMultipartPost(request)) {
MultipartRequestHandler handler = MultipartUtil.retrieveMultipartHandler(request);
if (handler == null) {
try {
request = MultipartUtil.parseMultipartRequest(request, servlet);
catch (ServletException se) {
throw new RuntimeException(se.getMessage());
else {
// This is a forward from a Multipart Post upload
if (!(request instanceof MultipartRequestWrapper)) {
request = new MultipartRequestWrapper(request);
MultipartUtil.setWrapperParams(handler, (MultipartRequestWrapper) request);
else {
// do nothing
return (request);
Don't forget to set this new class in your struts-config.xml file!
Timo -
Newbie : memory problem with file uploading
Hello
I'm exdending a web app based on jsf and , being new to it and java in general, i'm having a problem with file uploading.
The customer needs to upload large file (more than 30 MB). The application accomplish this using a fileupload component, to let the user select the file, and passing the array of bytes to a web service method.
I'm using netbeans 6, tomcat 5.5.
When i try to upload a file too large i got an outofmemory on the local tomcat. So i've rised jvm memory and going on with tests i've found that growing the size i got an http 500 error from the service (the developer of the service has found an out of memory too ).
I think the service is not modifiable, so i were asking if threre were a way to optimize the file uploading process (a component, a library, a pattern ...) or my only chioice is to rise available memory on both sides.
I've notice the wsdl declares as base64binary type the data parameter , while netbeans 6 generates a client proxy with a byte[] parameter. Is correct or is a netbeans problem?
searching with google i've found few thing i haven't fully understood due to my lack of experience:
the mtom , how can evaluate if it's suitable to help in my problem (i suppose it involves more the web service rather than the client)
something about the size of a soap body.
thank you in advance
StefanoWhich component exactly are you using? Declaring the stream as a raw byte[] is certainly not efficient. Write code yourself, don't let it autogenerate.
I can highly recommend you the Tomahawk t:inputFileUpload component. It is easy to integrate in Mojarra. You can find here an useful article: [http://balusc.blogspot.com/2008/02/uploading-files-with-jsf.html]. -
I am getting this error while file uploading
Hi!
I am getting this error while file uploading,I can't find any solution.
SRVE0026E: [Servlet Error]-[org.apache.commons.fileupload.FileUpload: method setSizeMax(I)V not found]: javax.servlet.ServletException: org.apache.commons.fileupload.FileUpload: method setSizeMax(I)V not found
at com.honeywell.sdm.base.controller.SDMActionServlet.service(SDMActionServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
Please help me.I have attached the bean,action ,jsp pages
uploadInfo.jsp
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<HEAD>
<script>
function submitting(){
document.uploadForm.operation.value = "uploadOrgAdj";
document.uploadForm.action = "/uploadRecAction.do";
document.uploadForm.submit();
</script>
</HEAD>
<body>
<html:form action="/uploadRecAction" method="post" enctype="multipart/form-data">
Select the .xls File to upload data
<html:file property="fileName"></html:file>
<html:hidden property="operation" value=""/>
<html:button property="btn" value="Submit" onclick="submitting()"></html:button>
</html:form>
</body>
</html:html>
uploadAdjForm :
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.FormFile;
public class uploadAdjForm extends ActionForm{
private FormFile fileName;
* @return
public FormFile getFileName() {
System.out.println("getFileName"+fileName);
return fileName;
* @param string
public void setFileName(FormFile string) {
System.out.println("setileNmame"+string);
fileName = string;
Action:
public class uploadFinancialAdjAction extends DispatchAction{
public org.apache.struts.action.ActionForward uploadOrgAdj(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception {
String sForward = "UploadInfo";
HttpSession session = request.getSession();
String sStartIndex = null;
String sEndIndex = null;
try
uploadFinancialAdjForm UploadForm=(uploadFinancialAdjForm)form;
System.out.println(UploadForm.getFileName().getContentType().toString());
String file=UploadForm.getFileName().toString();
uploadFinancialAdjManager businessManager = new uploadFinancialAdjManager();
ArrayList fileName = new ArrayList(); fileName = businessManager.getOrgAdjDetails(file);
boolean isMultipart = FileUpload.isMultipartContent(request);
if(isMultipart){
// Create a new file upload handler
DiskFileUpload upload = new DiskFileUpload();
// Parse the request
List items = upload.parseRequest(request);
//Process the uploaded items
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
if (item.isFormField()) {
//processFormField(item);
if(item.getFieldName().equalsIgnoreCase("txtStartIndex")){
sStartIndex = item.getString();
else if(item.getFieldName().equalsIgnoreCase("txtEndIndex")){
sEndIndex = item.getString();
uploadFinancialAdjForm UploadForm=(uploadFinancialAdjForm)form;
String file=UploadForm.getFileName().toString();
uploadFinancialAdjManager businessManager = new uploadFinancialAdjManager();
ArrayList fileName = new ArrayList();
fileName = businessManager.getOrgAdjDetails(file);
}else{
if(item.getName()!=null && !item.getName().toUpperCase().endsWith(".XLS")){
throw new Exception("Please browse an excel file and Upload");
session.setAttribute("fileItem",item);
}//end of while
session.setAttribute("startIndex",sStartIndex);
session.setAttribute("endIndex",sEndIndex);
request.setAttribute("FileUploadStatus","true");
else{
throw new Exception("Error:Form is not multipart");
catch(Exception e)
System.out.println(e);
return mapping.findForward(sForward);
}Plz answer for my question
-
Problem with File Uploading.
Hi,
I have one problem with File Upload component.
JSP
<ui:upload binding="#{NewProblem.fileUpload1}" columns="#{SessionBean1.uploadedFile}" id="fileUpload1" labelLevel="3"
style="left: 24px; top: 24px; position: absolute" validator="#{NewProblem.fileUpload1_validate}"/>
Java
UploadedFile uploadedFile = getSessionBean1().getUploadedFile();
Variable uploadedFile is NULL :(((((((((((
web.xml
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<filter>
<filter-name>UploadFilter</filter-name>
<filter-class>com.sun.web.ui.util.UploadFilter</filter-class>
<init-param>
<param-name>maxSize</param-name>
<param-value>10000000</param-value>
</init-param>
<init-param>
<param-name>sizeThreshold</param-name>
<param-value>10024</param-value>
</init-param>
</filter>
Thanks.check out the fileUpload article
Using the File Upload Component
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/file_upload.html -
Getting error while file uploading in struts
Hi!
I am getting this error while file uploading,I can't find any solution.
SRVE0026E: [Servlet Error]-[org.apache.commons.fileupload.FileUpload: method setSizeMax(I)V not found]: javax.servlet.ServletException: org.apache.commons.fileupload.FileUpload: method setSizeMax(I)V not found
at com.honeywell.sdm.base.controller.SDMActionServlet.service(SDMActionServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
Please help me.I have attached the bean,action ,jsp pages
uploadInfo.jsp
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<HEAD>
<script>
function submitting(){
document.uploadForm.operation.value = "uploadOrgAdj";
document.uploadForm.action = "/uploadRecAction.do";
document.uploadForm.submit();
</script>
</HEAD>
<body>
<html:form action="/uploadRecAction" method="post" enctype="multipart/form-data">
<b>Select the .xls File to upload data </b>
<html:file property="fileName"></html:file>
<html:hidden property="operation" value=""/>
<html:button property="btn" value="Submit" onclick="submitting()"></html:button>
</html:form>
</body>
</html:html>
uploadAdjForm :
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.FormFile;
public class uploadAdjForm extends ActionForm{
private FormFile fileName;
* @return
public FormFile getFileName() {
System.out.println("getFileName"+fileName);
return fileName;
* @param string
public void setFileName(FormFile string) {
System.out.println("setileNmame"+string);
fileName = string;
Action:
public class uploadFinancialAdjAction extends DispatchAction{
public org.apache.struts.action.ActionForward uploadOrgAdj(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception {
String sForward = "UploadInfo";
HttpSession session = request.getSession();
String sStartIndex = null;
String sEndIndex = null;
try
uploadFinancialAdjForm UploadForm=(uploadFinancialAdjForm)form;
System.out.println(UploadForm.getFileName().getContentType().toString());
String file=UploadForm.getFileName().toString();
uploadFinancialAdjManager businessManager = new uploadFinancialAdjManager();
ArrayList fileName = new ArrayList(); fileName = businessManager.getOrgAdjDetails(file);
boolean isMultipart = FileUpload.isMultipartContent(request);
if(isMultipart){
// Create a new file upload handler
DiskFileUpload upload = new DiskFileUpload();
// Parse the request
List items = upload.parseRequest(request);
//Process the uploaded items
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
if (item.isFormField()) {
//processFormField(item);
if(item.getFieldName().equalsIgnoreCase("txtStartIndex")){
sStartIndex = item.getString();
else if(item.getFieldName().equalsIgnoreCase("txtEndIndex")){
sEndIndex = item.getString();
uploadFinancialAdjForm UploadForm=(uploadFinancialAdjForm)form;
String file=UploadForm.getFileName().toString();
uploadFinancialAdjManager businessManager = new uploadFinancialAdjManager();
ArrayList fileName = new ArrayList();
fileName = businessManager.getOrgAdjDetails(file);
}else{
if(item.getName()!=null && !item.getName().toUpperCase().endsWith(".XLS")){
throw new Exception("Please browse an excel file and Upload");
session.setAttribute("fileItem",item);
}//end of while
session.setAttribute("startIndex",sStartIndex);
session.setAttribute("endIndex",sEndIndex);
request.setAttribute("FileUploadStatus","true");
else{
throw new Exception("Error:Form is not multipart");
catch(Exception e)
System.out.println(e);
return mapping.findForward(sForward);
}ORA-06512: at "PREPRD.OIM_SP_RECONARCHIVAL", line 722
ORA-00942: table or view does not exist
ORA-01031: insufficient privileges
(1) Check whether the OIM_SP_RECONARCHIVAL table or view exists or not...
(2) If it exists, check whether the DEV_OIM user has enough privilege to view this table or not...
If not, give it all privilege by login as sys as sysdba
GRANT ALL PRIVILEGES TO DEV_OIM;
COMMIT; -
Sign on problems within Elements 10; plus cannot backup, writing files error with file catalog.pse10db. No indication what the problem is. How do I get adobe help with these problems?
Sign on problems within Elements 10; plus cannot backup, writing files error with file catalog.pse10db. No indication what the problem is. How do I get adobe help with these problems?
-
Hello,
we do have a problem with file upload ! We're using the o'reilly class, but every
time we add ENCTYPE="multipart/formdata" in the html, we're unable to correctly get
the request. ?
any idea ? Is there something to configure ?
thx
The request is in the form of multipart data and is parsed by the
Oreilly class only. To access other information from the request
the Oreilly class has provided you with the methods for getting
the other data. You have to access the data from the request using
the Oreilly class methods
"Cameron Purdy" <[email protected]> wrote:
>Be careful what methods you call on the request object.
> They can prevent
>you from later asking for that all-important input stream.
>
>--
>Cameron Purdy
>Tangosol, Inc.
>http://www.tangosol.com
>+1.617.623.5782
>WebLogic Consulting Available
>
>
>"Laurent Andre" <[email protected]> wrote
>in message
>news:3a88184c$[email protected]..
>>
>> Hello,
>>
>> we do have a problem with file upload ! We're using
>the o'reilly class,
>but every
>> time we add ENCTYPE="multipart/formdata" in the html,
>we're unable to
>correctly get
>> the request. ?
>> any idea ? Is there something to configure ?
>>
>> thx
>>
>
>
-
ColdFusion MX7 Error When Starting Apache2Triad
I just installed the ColdFusion MX7 trial on my local
machine. When I try to start the Apache2Triad (uses Apache 2.2.0)
service it fails to start and the following error is written to the
system log file:
quote:
The Apache service named Apache2Triad Apache 2 Service
reported the following error:
>>>httpd.exe: Syntax error on line 1116 of
C:/apache2triad/conf/httpd.conf: Cannot load
C:/CFusionMX7/runtime/lib/wsconfig/1/mod_jrun20.so into
server: The specified procedure could not be found.
The following was written to the Apache conf file by
ColdFusion when installed:
quote:
# JRun Settings
LoadModule jrun_module
"C:/CFusionMX7/runtime/lib/wsconfig/1/mod_jrun20.so"
<IfModule mod_jrun20.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore
"C:/CFusionMX7/runtime/lib/wsconfig/1/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51011
#JRunConfig Errorurl <optionally redirect to this URL on
errors>
#JRunConfig ProxyRetryInterval 600
#JRunConfig ConnectTimeout 15
#JRunConfig RecvTimeout 300
#JRunConfig SendTimeout 15
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr
.cfswf
</IfModule>
My Apache service starts with the following command line (in
case this is important):
quote:
"C:\apache2triad\bin\httpd.exe" -n Apache2 -k runservice
I posted this on the Apache2Triad forum and the response was:
quote:
this means that apache has problems with a library needed by
that module , it can be anything , missing file , conflicting
version
So, is this an Apache problem or is this something similar to
this post:
CFMX
7 installation problemI just installed the ColdFusion MX7 trial on my local
machine. When I try to start the Apache2Triad (uses Apache 2.2.0)
service it fails to start and the following error is written to the
system log file:
quote:
The Apache service named Apache2Triad Apache 2 Service
reported the following error:
>>>httpd.exe: Syntax error on line 1116 of
C:/apache2triad/conf/httpd.conf: Cannot load
C:/CFusionMX7/runtime/lib/wsconfig/1/mod_jrun20.so into
server: The specified procedure could not be found.
The following was written to the Apache conf file by
ColdFusion when installed:
quote:
# JRun Settings
LoadModule jrun_module
"C:/CFusionMX7/runtime/lib/wsconfig/1/mod_jrun20.so"
<IfModule mod_jrun20.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore
"C:/CFusionMX7/runtime/lib/wsconfig/1/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51011
#JRunConfig Errorurl <optionally redirect to this URL on
errors>
#JRunConfig ProxyRetryInterval 600
#JRunConfig ConnectTimeout 15
#JRunConfig RecvTimeout 300
#JRunConfig SendTimeout 15
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr
.cfswf
</IfModule>
My Apache service starts with the following command line (in
case this is important):
quote:
"C:\apache2triad\bin\httpd.exe" -n Apache2 -k runservice
I posted this on the Apache2Triad forum and the response was:
quote:
this means that apache has problems with a library needed by
that module , it can be anything , missing file , conflicting
version
So, is this an Apache problem or is this something similar to
this post:
CFMX
7 installation problem -
Issue with file upload to Microsoft One Drive
Hi,
My uploaded file(25.6MB, 44 seconds long) from Adobe Premier Elements 9 will not play on Microsoft One Drive(MOD),
Is anyone else have problems using MOD?
I created the file I uploaded on my new HP Envy Computer(x64 proccessor with 8 gig of RAM).
I created this file on the Adobe Premier Elements 9 software, saved to my computer, and then uploaded to MOD.
I created it from my project by choosing the MPEG category Then within the MPEG category I chose the HD 720p 30 footprint as the smallest and fastest option to upload.
. I saved as a file in a folder on my computer. Don't know if this makes a difference but when I right clicked I chose "Windows Media Player" as the "Opens With" option.Don't think "Opens With" option really matter? Doesn't MOD automatically convert the file to whatever they want to use to open the file anyway?
So that is the file I uploaded to MOD using the MOD "Upload" button.
When I clicked to play, after waiting for what I assume was a "buffering process" , I got a "Sorry, This video can't be played." message.
Also, FYI , i uploaded to Google Drive . It plays but pauses to buffer about 30 seconds in.
You Tube is the another drive I uploaded to. It plays perfectly there. But I would preferr to play on MOD. You feedback appreciated.
Thanks,
Ed'sAPE9Hi,
Are you facing this error with specific browser. Test it in another browser.
If yes, check below SAP Note
1900896 - Browser: IE Restrictions for Portal and NWBC content - IE Quirks and Standards Document Modes -
Error on File upload. Error processing wwv_flow.accept.
Hi,
I'm developing an application to upload and download files using Oracle XE 10g and APEX 3.2.0.00.27 on OS Windows XP.
The file upload page is very simple: one file browse item, a submit button and a report based on the wwv_flow_files table.... and an extra button to save the uploaded files in the DB.
Sometimes (almost everytime) when I press the submit button, the wwv_flow.accept process fails and I'm redirected to a page saying Internet Explorer cannot display the webpage.
I'm forced to refresh the page and then I get the following message:
Expecting p_company or wwv_flow_company cookie to contain security group id of application owner.
Error ERR-7621 Could not determine workspace for application (:) on application accept.
I recreated the same page in the apex.oracle.com environment and it works, but it fails in my local environment.
I have read some posts int his forum, but I haven't found an answer yet.
Please help!!!
AUJvarad acharya wrote:
Download the standalone OHS.
http://www.oracle.com/technology/software/products/database/oracle11g/111060_win32soft.html
varadSorry about this...old post and off topic.
Can anyone point me to a standalone version of OHS for linux x86-64? I'm having troubles finding this, it doesn't appear to have installed with 11g Enterprise Edition and I cannot find it in the available packages when I re-run the installer. I'm running 11g EPG now and want to convert to Apache.
Thanks!!! -
Problems with file uploading servlet, the form action doesnt capture url
Hi, i have one problem. I am working on a project , i have created a servlet that takes uploaded files and processses them and links them back to user to download. The servlet works perfectly from my computer, I am using apache-tomcat-6.0.16 and java 1.6 , I have two forms called encrypt.html and decrypt.html, I will post both of them, now the problem is when somebody access it on the internet while i am running apache, they get a connection was reset on a firefox browser and same stuff on Internet Explorer.
i have checked my server logs and saw nothing unusual there, So please if you can help me, it is my project.
I am pasting html file and error message that other users where getting remotely.
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>Stego Form</title>
<link rel='STYLESHEET' type='text/css' href='encrypt.css'>
</head>
<body>
<center>
<form name='encrypt' enctype='multipart/form-data' method='POST' action='http://localhost:8080/examples/temp2
' accept-charset='UTF-8'>
<input type='hidden' name='sfm_form_submitted' value='yes'>
</input>
<input type='hidden' name='eord' value='e'>
<select name='encryption' size='1'>
<option value='Select an encryption' selected>
Select an encryption
</option>
<option value='DES'>
DES
</option>
<option value='Tripple DES'>
Tripple DES
</option>
</select>
<input type='file' name='overt' size='20'>
<input type='file' name='covert' size='20'>
<input type='submit' name='submit' value='Submit'>
</form>
</center>
</body>
</html>so it works for me even if i access the page with my ip , but for others it doesnt work,
now the user got this xhtml page that i will show, i cant find attach button so i am pasting here.
here is the servlet coding
import java.io.*;
import java.util.*;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import org.apache.commons.fileupload.*;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
public class temp2 extends HttpServlet
FileInputStream fin;
String filenames[] = new String[2],fieldname,fieldval;
String keyfile,IVfile;
String names[] = new String[2];
public temp2()
super();
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost(request, response);
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
String eord="";
List lst = null;
boolean isMultiPart = ServletFileUpload.isMultipartContent(request);
if (!isMultiPart) // check whether the post request is actually multipart
System.out.println("ERROR NOT MULTIPART");
System.exit(0);
DiskFileItemFactory fif = new DiskFileItemFactory();
ServletFileUpload sfu = new ServletFileUpload(fif);
sfu.setSizeMax(10000000);
try { lst = sfu.parseRequest(request); }
catch (FileUploadException ex)
{ System.out.println("ERROR IN PARSING FILES" + ex); System.exit(0); }
if(lst.isEmpty()) // check whether request is empty
System.out.println("ERROR LIST SIZE NOT GOOD : " + lst.size());
System.exit(0);
Iterator x = lst.iterator();
int i = 0;
FileItem f = (FileItem)x.next();
f = (FileItem)x.next();
System.out.println(f.getFieldName());
if(f.getFieldName().equalsIgnoreCase("eord")) // check hidden field to know the case : encrypt or decrypt
eord = f.getString();
System.out.println(f.getString());
else // if it is not first field exit
System.out.println("Invalid FORM");
System.exit(0);
f = (FileItem)x.next(); // next field
if(f.getFieldName().equalsIgnoreCase("encryption")) // type of encryption des / tdes
fieldname = f.getFieldName();
fieldval = f.getString();
System.out.println(f.getString());
if(eord.equalsIgnoreCase("e")) // if it is encryption form only file required
while(x.hasNext())
f = (FileItem)x.next();
if(!f.isFormField())
int check = f.getName().lastIndexOf(File.separator);
System.out.println(File.separator);
if(check==-1)
System.out.println(f.getName());
System.out.println("Unsupported browser : " + check);
System.exit(0);
File ff = new File("e:\\apache\\webapps\\temp\\"+f.getName().substring(check));
names[i] = ff.getName(); // original file names
try
f.write(ff);
filenames[i] = ff.getAbsolutePath();
// renamed
ff.deleteOnExit();
}catch(Exception e) {System.out.println("Error writing file"+ ff.getAbsolutePath()); System.exit(0);}
i++;
try { System.in.read(); } catch(Exception e) {}
}// endwhile
if(fieldval.equalsIgnoreCase("DES"))
System.out.println("DES 1"+filenames[1]);
javades o = new javades(filenames[1]); // the file to be encrypted
filenames[1] = "e:\\apache\\webapps\\temp\\files\\" + names[1];
System.out.println("should be original" + filenames[1]);
else if(fieldval.equalsIgnoreCase("Tripple DES"))
javatdes o = new javatdes(filenames[1]);
filenames[1] = "e:\\apache\\webapps\\temp\\files\\" + names[1];
System.out.println(filenames[1]);
System.out.println("Calling stego");
filenames[0] = "e:\\apache\\webapps\\temp\\" + names[0];
System.out.println("file 1 "+ filenames[0]);
System.out.println("file 2"+ filenames[1]);
try { System.in.read(); } catch(Exception e) {}
stego s = new stego(filenames[0],filenames[1]);
System.out.println("mainext " + s.mainext);
// encryption done, and new files are loaded, now lets hide
if(s.mainext.equalsIgnoreCase("wav"))
s.encodewav();
System.out.println("Encoded wave");
else if(s.mainext.equalsIgnoreCase("bmp"))
System.out.println("Encoded bmp");
s.encodebmp();
System.out.println("done !");
PrintWriter pr = response.getWriter();
pr.println("Greetings , Your work is done and saved, now download the following files");
pr.println("The secret key file is needed for getting back your hidden file, so download that too");
pr.write("<a href=\"/temp/files/IV.txt\">click here</a>");
pr.write("<br/><a href=\"/temp/files/key.txt\">click here</a>");
pr.write("<br/><a href=\"/temp/files/"+names[0]+"\">click here</a>");
return;
// if it is decryption case
else if(eord.equalsIgnoreCase("d"))
while(x.hasNext())
f = (FileItem)x.next();
if(!f.isFormField())
int check = f.getName().lastIndexOf(File.separator);
System.out.println(File.separator);
if(check==-1)
System.out.println(f.getName());
System.out.println("Unsupported browser : " + check);
System.exit(0);
File ff = new File("e:\\apache\\webapps\\temp\\"+f.getName().substring(check));
// else if ladder to store paths of stegofile keyfile and IVfile
if(f.getFieldName().equalsIgnoreCase("stegofile"))
filenames[0] = ff.getAbsolutePath();
else if(f.getFieldName().equalsIgnoreCase("keyfile"))
keyfile = ff.getAbsolutePath();
else if(f.getFieldName().equalsIgnoreCase("IVfile"))
IVfile = ff.getAbsolutePath();
try
f.write(ff); // writes whole file at once
}catch(Exception e) {System.out.println("Error writing file"); System.exit(0);}
}// endwhile
System.out.println("Calling stego");
System.out.println("file 1 "+ filenames[0]);
stego s = new stego(filenames[0]);
System.out.println("mainext " + s.mainext);
if(s.mainext.equalsIgnoreCase("wav"))
s.decodewav();
System.out.println("Encoded wave");
else if(s.mainext.equalsIgnoreCase("bmp"))
s.decodebmp();
System.out.println("Encoded bmp");
System.out.println("done !");
////// hidden file has been retrieved , now lets decrypt it
System.out.println("ext " + s.ext);
filenames[0] = "e:\\apache\\webapps\\temp\\"+s.filename;
System.out.println(filenames[0]);
System.out.println(keyfile);
System.out.println(IVfile);
if(fieldval.equalsIgnoreCase("DES"))
javades o = new javades(filenames[0],keyfile,IVfile); // the file to be encrypted
filenames[0] = "e:\\apache\\webapps\\temp\\" + ( new File(filenames[0]).getName());
System.out.println("should be original" + filenames[0]);
else if(fieldval.equalsIgnoreCase("Tripple DES"))
javatdes o = new javatdes(filenames[0],keyfile,IVfile);
filenames[0] = "e:\\apache\\webapps\\temp\\" + ( new File(filenames[0]).getName());
System.out.println(filenames[0]);
PrintWriter pr = response.getWriter();
pr.write("Greetings, you have successfully retrieved your hidden file, now download it from here <br>");
pr.write("<a href=\"http://localhost:8080/temp/files/" + (new File(filenames[0]).getName())+"\">Click here</a>");
}and here is the xhtml file the user receives, whe he clicks the submit button,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html [
<!ENTITY % htmlDTD
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
%htmlDTD;
<!ENTITY % netErrorDTD
SYSTEM "chrome://global/locale/netError.dtd">
%netErrorDTD;
<!ENTITY loadError.label "Problem loading page">
<!ENTITY retry.label "Try Again">
<!-- Specific error messages -->
<!ENTITY connectionFailure.title "Unable to connect">
<!ENTITY connectionFailure.longDesc "&sharedLongDesc;">
<!ENTITY deniedPortAccess.title "This address is restricted">
<!ENTITY deniedPortAccess.longDesc "">
<!ENTITY dnsNotFound.title "Server not found">
<!ENTITY dnsNotFound.longDesc "
<ul>
<li>Check the address for typing errors such as
<strong>ww</strong>.example.com instead of
<strong>www</strong>.example.com</li>
<li>If you are unable to load any pages, check your computer's network
connection.</li>
<li>If your computer or network is protected by a firewall or proxy, make sure
that &brandShortName; is permitted to access the Web.</li>
</ul>
">
<!ENTITY fileNotFound.title "File not found">
<!ENTITY fileNotFound.longDesc "
<ul>
<li>Check the file name for capitalization or other typing errors.</li>
<li>Check to see if the file was moved, renamed or deleted.</li>
</ul>
">
<!ENTITY generic.title "Oops.">
<!ENTITY generic.longDesc "
<p>&brandShortName; can't load this page for some reason.</p>
">
<!ENTITY malformedURI.title "The address isn't valid">
<!ENTITY malformedURI.longDesc "
<ul>
<li>Web addresses are usually written like
<strong>http://www.example.com/</strong></li>
<li>Make sure that you're using forward slashes (i.e.
<strong>/</strong>).</li>
</ul>
">
<!ENTITY netInterrupt.title "The connection was interrupted">
<!ENTITY netInterrupt.longDesc "&sharedLongDesc;">
<!ENTITY netOffline.title "Offline mode">
<!ENTITY netOffline.longDesc "
<ul>
<li>Uncheck "Work Offline" in the File menu, then try again.</li>
</ul>
">
<!ENTITY netReset.title "The connection was reset">
<!ENTITY netReset.longDesc "&sharedLongDesc;">
<!ENTITY netTimeout.title "The connection has timed out">
<!ENTITY netTimeout.longDesc "&sharedLongDesc;">
<!ENTITY protocolNotFound.title "The address wasn't understood">
<!ENTITY protocolNotFound.longDesc "
<ul>
<li>You might need to install other software to open this address.</li>
</ul>
">
<!ENTITY proxyConnectFailure.title "The proxy server is refusing connections">
<!ENTITY proxyConnectFailure.longDesc "
<ul>
<li>Check the proxy settings to make sure that they are correct.</li>
<li>Contact your network administrator to make sure the proxy server is
working.</li>
</ul>
">
<!ENTITY proxyResolveFailure.title "Unable to find the proxy server">
<!ENTITY proxyResolveFailure.longDesc "
<ul>
<li>Check the proxy settings to make sure that they are correct.</li>
<li>Check to make sure your computer has a working network connection.</li>
<li>If your computer or network is protected by a firewall or proxy, make sure
that &brandShortName; is permitted to access the Web.</li>
</ul>
">
<!ENTITY redirectLoop.title "The page isn't redirecting properly">
<!ENTITY redirectLoop.longDesc "
<ul>
<li>This problem can sometimes be caused by disabling or refusing to accept
cookies.</li>
</ul>
">
<!ENTITY unknownSocketType.title "Unexpected response from server">
<!ENTITY unknownSocketType.longDesc "
<ul>
<li>Check to make sure your system has the Personal Security Manager
installed.</li>
<li>This might be due to a non-standard configuration on the server.</li>
</ul>
">
<!ENTITY sharedLongDesc "
<ul>
<li>The site could be temporarily unavailable or too busy. Try again in a few
moments.</li>
<li>If you are unable to load any pages, check your computer's network
connection.</li>
<li>If your computer or network is protected by a firewall or proxy, make sure
that &brandShortName; is permitted to access the Web.</li>
</ul>
">
<!ENTITY % globalDTD
SYSTEM "chrome://global/locale/global.dtd">
%globalDTD;
]>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
- The Original Code is mozilla.org code.
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 1998
- the Initial Developer. All Rights Reserved.
- Contributor(s):
- Adam Lock <[email protected]>
- William R. Price <[email protected]>
- Henrik Skupin <[email protected]>
- Jeff Walden <[email protected]>
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
- ***** END LICENSE BLOCK ***** -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Problem loading page</title>
<link rel="stylesheet" href="temp2_files/netError.css" type="text/css" media="all"/>
<!-- XXX this needs to be themeable -->
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAICSURBVHjaYvz//z8DJQAggJhwiDPvnmlzc2aR0O+JGezt+AwACCCsBhxfYhn59N41FWtXIxZOLu70niRGXVwGAAQQNgNYHj96O8HaWYdJW5ubwd4/mI2Ng7sblwEAAYRhwMm1URk/vn4SUNWVYGD8+YZBXZOZm5OLzRjoCmNsBgAEEKoBN82Y7l851GLrqMjM8Oc7A8O/3wwMP54wuAQFCXNycUzGZgBAAKEYcOaKZO2/f//5FbUVgBrfMoRVcgHpNwyKGjKMXDwCan0prFboBgAEELIBzDcvXyy2cVZhYPj9GWj7H4jo/38MDJ9OMDj7O/KzsjH3oxsAEEBwA/bNNipiZf7FI6cqwcDw8x2qqp8fGORUpVn4BEXlgGHhhCwFEEAwA9gfP3hdZ+Oizcjw+wvCdjgAuuLrFQbXIH9hTm7uqcgyAAEENuD4ctcebm5mbikFYRTbV7V/Q6j88Z5BSuY7q4CQgAjQFR4wYYAAAhtw89L5ZFsnRaDtn4CW/YXrAQcisit+PGVwDgrnZ2NnnwATBQggpsNLvGYLCAmxi8tLARWg+h3FBVBXSEj/ZZWQkRcCuiIQJAQQQCyvnj5KMDTkZ2JgYmRg4FchnHv+vmEwttLmeXT3VjKQtx4ggFgk5TXebV63UfT3ijOMxOZAVlZWdiB1EMQGCCBGSrMzQIABAFR3kRM3KggZAAAAAElFTkSuQmCC"/>
<script type="application/x-javascript"><![CDATA[
// Error url MUST be formatted like this:
// moz-neterror:page?e=error&u=url&d=desc
// Note that this file uses document.documentURI to get
// the URL (with the format from above). This is because
// document.location.href gets the current URI off the docshell,
// which is the URL displayed in the location bar, i.e.
// the URI that the user attempted to load.
function getErrorCode()
var url = document.documentURI;
var error = url.search(/e\=/);
var duffUrl = url.search(/\&u\=/);
return decodeURIComponent(url.slice(error + 2, duffUrl));
function getDescription()
var url = document.documentURI;
var desc = url.search(/d\=/);
// desc == -1 if not found; if so, return an empty string
// instead of what would turn out to be portions of the URI
if (desc == -1) return "";
return decodeURIComponent(url.slice(desc + 2));
function retryThis()
// Session history has the URL of the page that failed
// to load, not the one of the error page. So, just call
// reload(), which will also repost POST data correctly.
try {
location.reload();
} catch (e) {
// We probably tried to reload a URI that caused an exception to
// occur; e.g. a non-existent file.
function initPage()
var err = getErrorCode();
// if it's an unknown error or there's no title or description
// defined, get the generic message
var errTitle = document.getElementById("et_" + err);
var errDesc = document.getElementById("ed_" + err);
if (!errTitle || !errDesc)
errTitle = document.getElementById("et_generic");
errDesc = document.getElementById("ed_generic");
var title = document.getElementById("errorTitleText");
if (title)
title.parentNode.replaceChild(errTitle, title);
// change id to the replaced child's id so styling works
errTitle.id = "errorTitleText";
var sd = document.getElementById("errorShortDescText");
if (sd)
sd.textContent = getDescription();
var ld = document.getElementById("errorLongDesc");
if (ld)
ld.parentNode.replaceChild(errDesc, ld);
// change id to the replaced child's id so styling works
errDesc.id = "errorLongDesc";
// remove undisplayed errors to avoid bug 39098
var errContainer = document.getElementById("errorContainer");
errContainer.parentNode.removeChild(errContainer);
]]></script>
</head>
<body dir="ltr">
<!-- ERROR ITEM CONTAINER (removed during loading to avoid bug 39098) -->
<!-- PAGE CONTAINER (for styling purposes only) -->
<div id="errorPageContainer">
<!-- Error Title -->
<div id="errorTitle">
<h1 id="errorTitleText">The connection was reset</h1>
</div>
<!-- LONG CONTENT (the section most likely to require scrolling) -->
<div id="errorLongContent">
<!-- Short Description -->
<div id="errorShortDesc">
<p id="errorShortDescText">The connection to the server was reset while the page was loading.</p>
</div>
<!-- Long Description (Note: See netError.dtd for used XHTML tags) -->
<div id="errorLongDesc">
<ul>
<li>The site could be temporarily unavailable or too busy. Try again in a few
moments.</li>
<li>If you are unable to load any pages, check your computer's network
connection.</li>
<li>If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.</li>
</ul>
</div>
</div>
<!-- Retry Button -->
<xul:button xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="errorTryAgain" label="Try Again" oncommand="retryThis();"/>
</div>
<!--
- Note: It is important to run the script this way, instead of using
- an onload handler. This is because error pages are loaded as
- LOAD_BACKGROUND, which means that onload handlers will not be executed.
-->
<script type="application/x-javascript">initPage();</script>
</body>
</html>thank you for your prompt reply in advance,
Regards,
Mihir PandyaHi, thank you for your replies, I found out few things about my servlet, and its portability
and i have few questions, although i marked this topic as answered i guess its ok to post
I am using javax.servlet.context.tempdir to store my files in that servletcontext temporary directory. But i dont know how to give hyperlink
of the modified files to the user for them to download the modified files.
What i am using to get the tempdir i will paste
File baseurl = (File)this.getServletContext().getAttribute("javax.servlet.context.tempdir");
System.out.println(baseurl);
baseurl = new File(baseurl.getAbsolutePath()+File.separator+"temp"+File.separator+"files");
baseurl.mkdirs();so i am storing my files in that temp/files folder and the servlet processes them and modifies them, then how to present them as
links to the user for download ?
and as the servlet is multithreaded by nature, if my servlet gets 2 different requests with same file names, i guess one of them will be overwritten
And i want to create unique directory for each request made to the servlet , so file names dont clash.
one another thing is that i want my servlet to be executed by my <form action> only, I dont want the user to simply type url and trigger the servlet
Reply A.S.A.P. please..
Thanks and regards,
Mihir Pandya -
Problem facing with file upload in webdynpro
hi
this is sathya, i very thank ful to your answers, coming to my problem
i have written the code for file upload action method, in this below code there is no syntax problem.
but there is a run time error , i.e convt_no_number
kindly rectify that.
data: lt_final type table of zalvtab,
ls_final type zalvtab,
"t_table1 TYPE STANDARD TABLE OF str_itab,
"fs_table TYPE str_itab,
i_data TYPE STANDARD TABLE OF string,
lo_nd_zalvtab TYPE REF TO if_wd_context_node,
lo_el_zalvtab TYPE REF TO if_wd_context_element,
l_string TYPE string,
l_xstring TYPE xstring,
fields TYPE string_table,
lv_field TYPE string.
DATA : t_table TYPE if_main=>elements_sel_node,
data_table TYPE if_main=>elements_sel_node.
" get single attribute
wd_context->get_attribute(
EXPORTING
name = `upload`
IMPORTING
value = l_xstring ).
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
in_xstring = l_xstring
IMPORTING
out_string = l_string.
SPLIT l_string AT cl_abap_char_utilities=>newline INTO TABLE i_data.
" Bind With table Element.
LOOP AT i_data INTO l_string.
SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
READ TABLE fields INTO lv_field INDEX 1.
ls_final-ebeln = lv_field.
READ TABLE fields INTO lv_field INDEX 2.
ls_final-ekorg = lv_field.
READ TABLE fields INTO lv_field INDEX 3.
ls_final-bukrs = lv_field.
READ TABLE fields INTO lv_field INDEX 4.
ls_final-ebelp = lv_field.
READ TABLE fields INTO lv_field INDEX 5.
ls_final-menge = lv_field.
READ TABLE fields INTO lv_field INDEX 6.
ls_final-netpr = lv_field.
READ TABLE fields INTO lv_field INDEX 7.
ls_final-aedat = lv_field.
READ TABLE fields INTO lv_field INDEX 8.
ls_final-waers = lv_field.
READ TABLE fields INTO lv_field INDEX 9.
ls_final-description = lv_field.
APPEND ls_final TO lt_final.
ENDLOOP.
lo_nd_zalvtab = wd_context->get_child_node( 'sel_node' ).
lo_nd_zalvtab->bind_table( lt_final ).Hi Sathya,
I guess you are trying to upload data from excel file(XLS format).
If it is correct then you cannot do this in webdynpro, first you save the excel file as tab delimited.
Open your excel file->save as->other formats->give file type as TEXT(Tab delemited).
Now use this file to upload. It should work perfectly. -
Help with file uploader, php script, Windows Authentication
I am trying to setup a really basic web-based file uploader that I will expand upon later. I have the flex application working well enough (very basic). However, I have a php script in a secure folder using windows authentication. When I try to send the file to the script, it doesn't seem to like my credentials, and refuses to do anything. I do not get an error message; just nothing happens.
My questions are:
Does anybody know where I should've looked before posting this thread?
Do I even have PHP set up correctly? (At first I just made a txt file and put a .php extension on it, then I tried to setup PHP on the server, but it was a little confusing for me)
Is Windows Authentication the problem?
I do plan on implementing SQL Server in the future (to keep track of Files and user-defined attributes for files), but I do not want to store the files in SQLserver, just their pathnames.
Is there a simple way to use ColdFusion (for free) to acheive this end?
I am somewhat experienced at coding applications, but am totally new to server-side scripts.
This is my php script:
<?php
$tempFile = $_FILES['Filedata']['tmp_name'];
$fileName = $_FILES['Filedata']['name'];
$fileSize = $_FILES['Filedata']['size'];
move_uploaded_file($tempFile, "./" . $fileName);
?>
This is my flex application:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
private var fileRef:FileReference
private var uploadFilePath:String
private function selectFile():void
fileRef = new FileReference();
fileRef.addEventListener(Event.SELECT, fileRef_select);
fileRef.browse();
private function fileRef_select(evt:Event):void
fileRef.upload(new URLRequest("http://SERVERLOCATION/PDFUploader.php"));
]]>
</fx:Script>
<s:Button top="30" left="5" label="Browse" click="selectFile()"/>
</s:Application>
Thanks to any who take the time to respond.Hey, so far all I have found is this tutorial.. I'm about to try it out
http://www.smartwebby.com/Flash/external_data.asp -
Error while file upload by FM "TEXT_CONVERT_XLS_TO_SAP"
HI all,
I need to upload an excel file to SAP system ,for the same i am using the FM TEXT_CONVERT_XLS_TO_SAP in following way.
TYPE-POOLS truxs.
DATA: lv_raw TYPE truxs_t_text_data.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X' "is an .xls file
i_line_header = 'X' "has a header line
i_tab_raw_data = lv_raw
i_filename = v_file
TABLES
i_tab_converted_data = etd_itab
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
But i get sy-subrc = 1,which is conversion error.
The structure of the etd_itab is same as the excel file ,even the field names are same ,still i wonder why should the conversion error been encountered .
Am i missing on anything ?
Please comment.
Thanks,
SwatiHi ,
The structure of my excel file and the data is as follows
PO_NO Item Div Material Vend PO_Date PO Bal.
4400000001 10 C SVC-PART-01 BCCS 2006.10.29 12
4500000348 10 L BA41-00383A BCCS 0
Following is the program flow
TYPES : BEGIN OF gt_etd ,
po_no LIKE ekpo-ebeln,
item LIKE ekpo-ebelp,
div LIKE mara-spart,
material LIKE kondd-smatn,
vend LIKE ekko-lifnr,
po_date LIKE ekpo-aedat,
po_bal LIKE ekpo-menge,
delivery_date LIKE ekes-eindt,
END OF gt_etd.
DATA: etd_itab TYPE STANDARD TABLE OF gt_etd WITH HEADER LINE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pcfile.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = '.xls'
def_path = 'C:\'
mask = ',.txt;.xls,.txt;.xls.'
mode = 'O'
title = ' '
IMPORTING
filename = pcfile
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
IF pcfile IS INITIAL.
WRITE: / 'SELECT UPLOAD FILE !'.
ELSE.
MOVE pcfile TO v_file.
ENDIF.
*ETD file upload
CLEAR: lv_raw, etd_itab[].
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = ' ' "is an .xls file
i_line_header = ' ' "has a header line
i_tab_raw_data = lv_raw
i_filename = v_file
TABLES
i_tab_converted_data = etd_itab
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
Please advice ,why am i getting conversion error.
Thanks a lot .
Maybe you are looking for
-
Run time error while creating sales order in VA01
Dear all, In our develpment server(ecc 6.0),while creating sales order in VA01 for a sales area, when ever entering material number and quantity and press enter, it is giving error and taking to Runtime error long text showing syntax error in program
-
How do I input a specific color value for a shape?
I've been trying to figure out why I cannot input a specific color that I want for a shape. I'm not just choosing a color that looks nice, I'm trying to match it to a solid color in the next clip. Ive tried to use the eye dropper to get the color fro
-
Java Studio Enterprise 8.1 and jdk1.6 - cannot find symbol
Hi, I am using subj. The problem I have is that I declared 2-3 classes with methods in one package. I made an object of the class and use intellisense to navigate to the method I need but when I try to compile the code I have "cannot find symbol" err
-
I have a 13" macbook from 2009 and for some reason can no longer change my desktop image by just clicking on an image in system prererences>I-Photo. Does anyone know what the problem could be?
-
I'm searching AC-adapter for Satellite A110
I would like to purchess a AC-adapter for my notebook (Satellite A110-178). Where can I find it?