AW: File upload from JSP with "multipart/form-data" does not work on Weblogic v12c
I finally opened a service request at Oracle. They pointed me to Bug#13657792: "SERVLET 3.0 FILE UPLOAD BREAKS OTHER FILE UPLOAD FRAMEWORKS" With Multipart file handling/upload now being covered as a standard nature of the Servlet 3.0 specification, it looks like the WLS 12c web container is eagerly gobbling the data before the framework gets a chance to see it. According to Oracle support, the engineers are working on a solution. Regards, Peter -Ursprüngliche Nachricht- Von: peter.kel...@meteoswiss.ch [mailto:peter.kel...@meteoswiss.ch] Gesendet: Mittwoch, 1. Februar 2012 13:47 An: user@struts.apache.org Betreff: AW: File upload from JSP with "multipart/form-data" does not work on Weblogic v12c I just tested the upload actions in the Struts 2 showcase and the findings are the same: the file upload is broken in Weblogic v12.1.1. Who will fix that? Thanks, Peter -Ursprüngliche Nachricht- Von: peter.kel...@meteoswiss.ch [mailto:peter.kel...@meteoswiss.ch] Gesendet: Dienstag, 31. Januar 2012 15:14 An: user@struts.apache.org Betreff: File upload from JSP with "multipart/form-data" does not work on Weblogic v12c Dear list File upload from JSP with "multipart/form-data" does not work on Weblogic v12c which supports Java Servlet specification v3.0. The same code worked as expected for Weblogic v10.3.X which supports Java Servlet specification v2.4. The same code does NOT work with Struts v2.1.8 on Weblogic v12c. Debugging the application with Weblogic running in Eclipse I found out, that ALL parameters given in the JSP form (data, contextTx) are simply ignored. The "method" attribute in the tag is also ignored and therefore Struts always invokes the execute() method of the Struts action. Please find the setup below. Is this is a bug? Or is something wrong with the setup? Thanks, Peter web.xml: http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4"> Datadispatcher Console Datadispatcher Web Tiles configuration file org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG /WEB-INF/tiles.xml org.apache.struts2.tiles.StrutsTilesListener tiles org.apache.tiles.web.startup.TilesServlet 2 tiles-dispatch org.apache.tiles.web.util.TilesDispatchServlet tiles-dispatch *.tiles struts org.apache.struts2.dispatcher.FilterDispatcher struts /* struts.xml: http://struts.apache.org/dtds/struts-2.3.dtd";> upload.page upload.page JSP: <%@ taglib prefix="s" uri="/struts-tags" %> Upload Content Id Import File Java Action: package ch.meteoswiss.datadispatcher.console; public class UploadAction extends ActionSupport { private static final Logger logger = Logger.getLogger(UploadAction.class); private String contentTx; private File data; private String dataContentType; private String dataFileName; public String execute() { logger.info(" execute "); return super.execute(); } public String upload() throws Exception { logger.info(" upload "); logger.info("data = "+data); logger.info("contentTx = "+contentTx); return SUCCESS; } public void setContentTx(String contentTx) { this.contentTx = contentTx; } public String getContentTx() { return contentTx; } public void setData(File data) { this.data = data; } public File getData() { return data; } public void setDataContentType(String dataContentType) { this.dataContentType = dataContentType; } public String getDataContentType() { return dataContentType; } public void setDataFileName(String dataFileName) { this.dataFileName = dataFileName; } public String getDataFileName() { return dataFileName; } } - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org --
AW: File upload from JSP with "multipart/form-data" does not work on Weblogic v12c
I just tested the upload actions in the Struts 2 showcase and the findings are the same: the file upload is broken in Weblogic v12.1.1. Who will fix that? Thanks, Peter -Ursprüngliche Nachricht- Von: peter.kel...@meteoswiss.ch [mailto:peter.kel...@meteoswiss.ch] Gesendet: Dienstag, 31. Januar 2012 15:14 An: user@struts.apache.org Betreff: File upload from JSP with "multipart/form-data" does not work on Weblogic v12c Dear list File upload from JSP with "multipart/form-data" does not work on Weblogic v12c which supports Java Servlet specification v3.0. The same code worked as expected for Weblogic v10.3.X which supports Java Servlet specification v2.4. The same code does NOT work with Struts v2.1.8 on Weblogic v12c. Debugging the application with Weblogic running in Eclipse I found out, that ALL parameters given in the JSP form (data, contextTx) are simply ignored. The "method" attribute in the tag is also ignored and therefore Struts always invokes the execute() method of the Struts action. Please find the setup below. Is this is a bug? Or is something wrong with the setup? Thanks, Peter web.xml: http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4"> Datadispatcher Console Datadispatcher Web Tiles configuration file org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG /WEB-INF/tiles.xml org.apache.struts2.tiles.StrutsTilesListener tiles org.apache.tiles.web.startup.TilesServlet 2 tiles-dispatch org.apache.tiles.web.util.TilesDispatchServlet tiles-dispatch *.tiles struts org.apache.struts2.dispatcher.FilterDispatcher struts /* struts.xml: http://struts.apache.org/dtds/struts-2.3.dtd";> upload.page upload.page JSP: <%@ taglib prefix="s" uri="/struts-tags" %> Upload Content Id Import File Java Action: package ch.meteoswiss.datadispatcher.console; public class UploadAction extends ActionSupport { private static final Logger logger = Logger.getLogger(UploadAction.class); private String contentTx; private File data; private String dataContentType; private String dataFileName; public String execute() { logger.info(" execute "); return super.execute(); } public String upload() throws Exception { logger.info(" upload "); logger.info("data = "+data); logger.info("contentTx = "+contentTx); return SUCCESS; } public void setContentTx(String contentTx) { this.contentTx = contentTx; } public String getContentTx() { return contentTx; } public void setData(File data) { this.data = data; } public File getData() { return data; } public void setDataContentType(String dataContentType) { this.dataContentType = dataContentType; } public String getDataContentType() { return dataContentType; } public void setDataFileName(String dataFileName) { this.dataFileName = dataFileName; } public String getDataFileName() { return dataFileName; } } - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
File upload from JSP with "multipart/form-data" does not work on Weblogic v12c
Dear list File upload from JSP with "multipart/form-data" does not work on Weblogic v12c which supports Java Servlet specification v3.0. The same code worked as expected for Weblogic v10.3.X which supports Java Servlet specification v2.4. The same code does NOT work with Struts v2.1.8 on Weblogic v12c. Debugging the application with Weblogic running in Eclipse I found out, that ALL parameters given in the JSP form (data, contextTx) are simply ignored. The "method" attribute in the tag is also ignored and therefore Struts always invokes the execute() method of the Struts action. Please find the setup below. Is this is a bug? Or is something wrong with the setup? Thanks, Peter web.xml: http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4"> Datadispatcher Console Datadispatcher Web Tiles configuration file org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG /WEB-INF/tiles.xml org.apache.struts2.tiles.StrutsTilesListener tiles org.apache.tiles.web.startup.TilesServlet 2 tiles-dispatch org.apache.tiles.web.util.TilesDispatchServlet tiles-dispatch *.tiles struts org.apache.struts2.dispatcher.FilterDispatcher struts /* struts.xml: http://struts.apache.org/dtds/struts-2.3.dtd";> upload.page upload.page JSP: <%@ taglib prefix="s" uri="/struts-tags" %> Upload Content Id Import File Java Action: package ch.meteoswiss.datadispatcher.console; public class UploadAction extends ActionSupport { private static final Logger logger = Logger.getLogger(UploadAction.class); private String contentTx; private File data; private String dataContentType; private String dataFileName; public String execute() { logger.info(" execute "); return super.execute(); } public String upload() throws Exception { logger.info(" upload "); logger.info("data = "+data); logger.info("contentTx = "+contentTx); return SUCCESS; } public void setContentTx(String contentTx) { this.contentTx = contentTx; } public String getContentTx() { return contentTx; } public void setData(File data) { this.data = data; } public File getData() { return data; } public void setDataContentType(String dataContentType) { this.dataContentType = dataContentType; } public String getDataContentType() { return dataContentType; } public void setDataFileName(String dataFileName) { this.dataFileName = dataFileName; } public String getDataFileName() { return dataFileName; } } - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org