RE: Fw: binary file upload fail
Haven't I sent this to you before? quote To remove your address from the list, send a message to: [EMAIL PROTECTED] /quote Terje K. -Original Message- From: Johnathan Smith [mailto:[EMAIL PROTECTED]] Sent: 5. juni 2001 14:19 To: [EMAIL PROTECTED] Subject: Re: Fw: binary file upload fail PLEASE GET ME OFF THIS LIST --- Hemant Singh [EMAIL PROTECTED] wrote: HI Folha: This seems some stream related problem or ... Which Env you are getting the problem? Also Send the file to which your form is submitted from the browser side. Cheers --- Joco_Folha [EMAIL PROTECTED] wrote: - Original Message - From: Joco mailto:[EMAIL PROTECTED] Folha To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2001 8:06 PM Subject: Fw: binary file upload fail - Original Message - From: Joco mailto:[EMAIL PROTECTED] Folha To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2001 8:06 PM Subject: Fw: binary file upload fail - Original Message - From: Joco mailto:[EMAIL PROTECTED] Folha To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2001 6:17 PM Subject: binary file upload fail Hi there, I am trying to upload a file from the client to the server. But the binary files fail and the text files don4t fail. I use tomcat 3.2.1 with apj12. The bean and the jsp file i use are in attachment... regards jfolha ATTACHMENT part 2 application/octet-stream name=doc_entrega_autor.jsp ATTACHMENT part 3 application/octet-stream name=upload.java __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ = If your into Body For Life, check out http://clubs.yahoo.com/clubs/bodyforlifestatenislandny __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: AW: Why doesn't this work:
Any idea on how to get rid of this error? Terje K. -- Original Message -- From: Ralph Einfeldt [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Thu, 31 May 2001 15:46:56 +0200 It looks like request.getParameterValues(paramName) returns a null value on at least one param.
Re: AW: AW: Why doesn't this work:
You have understood it perfectly. To work around it, I put the url with all the parameters in a variable, then ran include on the variable. It worked somewhat, but I got the following output: Title Piping and valve material specification Doc.no. L-SP-200 Operator Sec.no. 6 Material data sheet: VC21 Project.no. Rev.no. D Rev.date 17.03.99 Status: Page: 1 Of: 1 Title Piping and valve material specification Doc.no. L-SP-200 Operator Sec.no. 6 Material data sheet: VC22 Project.no. Rev.no. B Rev.date 01.06.94 Status: Page: 1 Of: 1 Error: 500 Location: /xsql/tek/advanced_section_result.jsp Internal Servlet Error: javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at tek._0002ftek_0002fadvanced_0005fsection_0005fresult_0002ejspadvanced_0005fsection_0005fresult_jsp_38._jspService(_0002ftek_0002fadvanced_0005fsection_0005fresult_0002ejspadvanced_0005fsection_0005fresult_jsp_38.java:129) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.NullPointerException at tek._0002ftek_0002fadvanced_0005fsection_0005fresult_0002ejspadvanced_0005fsection_0005fresult_jsp_38._jspService(_0002ftek_0002fadvanced_0005fsection_0005fresult_0002ejspadvanced_0005fsection_0005fresult_jsp_38.java:68) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Any ideas? Terje K.
Re: AW: AW: AW: Why doesn't this work:
I don't see anything wrong with it. Do you? package tek; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.PrintWriter; import java.io.IOException; import java.io.FileInputStream; import java.io.ObjectInputStream; import java.util.Vector; import org.apache.jasper.runtime.*; import java.beans.*; import org.apache.jasper.JasperException; import java.util.*; public class _0002ftek_0002fadvanced_0005fsection_0005fresult_0002ejspadvanced_0005fsection_0005fresult_jsp_42 extends HttpJspBase { static { } public _0002ftek_0002fadvanced_0005fsection_0005fresult_0002ejspadvanced_0005fsection_0005fresult_jsp_42( ) { } private static boolean _jspx_inited = false; public final void _jspx_init() throws JasperException { } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { JspFactory _jspxFactory = null; PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; String _value = null; try { if (_jspx_inited == false) { _jspx_init(); _jspx_inited = true; } _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType(text/html;charset=8859_1); pageContext = _jspxFactory.getPageContext(this, request, response, , true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); // HTML // begin [file=C:\\xsql\\tek\\advanced_section_result.jsp;from=(0,32);to=(8,0)] out.write(\r\n\r\nhtml\r\n\thead\r\n\t\ttitleLSP200 - Section Selection - Result/title\r\n\t/head\r\n\tlink rel=\STYLESHEET\ type=\text/css\ href=\includes/stylesheet.css\/\r\n\tbody style=\font-family:Tahoma;font-size:8pt;\\r\n); // end // begin [file=C:\\xsql\\tek\\advanced_section_result.jsp;from=(8,2);to=(18,4)] String opn = request.getParameter(opn); Enumeration paramNames = request.getParameterNames(); while(paramNames.hasMoreElements()) { String paramName = (String)paramNames.nextElement(); String[] paramValues = request.getParameterValues(paramName); if (paramValues.length == 1) { String paramValue = paramValues[0]; int length = paramValue.length(); String fil = advanced_result_ + paramName + .xsql?opn= + opn + + paramName + = + paramValue.substring(1,length) + + paramName + R= + paramValue.substring(0,1); // end // HTML // begin [file=C:\\xsql\\tek\\advanced_section_result.jsp;from=(18,6);to=(19,5)] out.write(\r\n\t\t\t \t); // end // begin [file=C:\\xsql\\tek\\advanced_section_result.jsp;from=(19,5);to=(19,50)] { String _jspx_qStr = ; pageContext.include( fil + _jspx_qStr); } // end // HTML // begin [file=C:\\xsql\\tek\\advanced_section_result.jsp;from=(19,50);to=(20,0)] out.write(\r\n); // end // begin [file=C:\\xsql\\tek\\advanced_section_result.jsp;from=(20,2);to=(23,3)] if (paramValue.length() == 0) { // end // HTML // begin [file=C:\\xsql\\tek\\advanced_section_result.jsp;from=(23,5);to=(23,10)] out.write(error); // end // begin [file=C:\\xsql\\tek\\advanced_section_result.jsp;from=(23,12);to=(29,4)] } } else { for(int i=0; iparamValues.length; i++) { int length = paramValues[i].length(); String fil = advanced_result_ + paramName + .xsql?opn= + opn + + paramName + = + paramValues[i].substring(1,length) + + paramName + R= + paramValues[i].substring(0,1); // end // HTML // begin [file=C:\\xsql\\tek\\advanced_section_result.jsp;from=(29,6);to=(30,5)] out.write(\r\n\t\t\t \t); // end // begin [file=C:\\xsql\\tek\\advanced_section_result.jsp;from=(30,5);to=(30,50)]
RE: newbie problem: javax.servlet.ServletException at org.apache. jasp er.runtime.PageContextImpl.handlePageException
Thanks, that did it :-) Terje K. -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: 29. mai 2001 13:16 To: '[EMAIL PROTECTED]' Subject: AW: newbie problem: javax.servlet.ServletException at org.apache. jasp er.runtime.PageContextImpl.handlePageException As I understand the spec, this is not valid: jsp:forward page=some.jsp?arg1=value1 / (See 2.13.5 and 2.5.2) Instead you can use: jsp:forward page=some.jsp jsp:param name=arg1 value=value1 / /jsp:forward This notation is a bit 'noisy' but it should work. -Ursprüngliche Nachricht- Von: Terje Kristensen [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 29. Mai 2001 12:29 An: '[EMAIL PROTECTED]' Betreff: RE: newbie problem: javax.servlet.ServletException at snip/
RE: FATAL: java.netBindException: Address in use: JVM_Bind
I got the same error when I had Oracle running its own http-server (apache) as a service. Check if you got any http services running, stop them, make them manual, then try again Hope it will help... Terje K. -Original Message- From: Jack Li [mailto:[EMAIL PROTECTED]] Sent: 29. mai 2001 22:01 To: '[EMAIL PROTECTED]' Subject: FATAL: java.netBindException: Address in use: JVM_Bind Hello, I have a problem to setup Tomcat on Windows 2000 server. When I run startup.bat, I got the error: FATAL: java.netBindException: Address in use: JVM_Bind. Any idea to solve this problem? Thanks, Jack Li
Why doesn't this work:
Could anyone tell my why the jsp:include doesn't work? I'm getting an 500 error. % String opn = request.getParameter(opn); Enumeration paramNames = request.getParameterNames(); while(paramNames.hasMoreElements()) { String paramName = (String)paramNames.nextElement(); String[] paramValues = request.getParameterValues(paramName); if (paramValues.length == 1) { String paramValue = paramValues[0]; if (paramValue.length() == 0) { %error% } } else { for(int i=0; iparamValues.length; i++) { int length = paramValues[i].length(); String fil = advanced_result_ + paramName + .jsp; % jsp:include page=%= fil % flush=true jsp:param name=opn value=%= opn %/ jsp:param name=%= paramName % value=%= paramValues[i].substring(1,length) %/ jsp:param name=%= paramName %R value=%= paramValues[i].substring(0,1) %/ /jsp:include % } } } % If I remove the in jsp:include, the text comes out all perfect: jsp:include page=advanced_result_PCS.jsp flush=true jsp:param name=opn value=3/ jsp:param name=PCS value=AC10A/ jsp:param name=PCSR value=A/ /jsp:include jsp:include page=advanced_result_PCS.jsp flush=true jsp:param name=opn value=3/ jsp:param name=PCS value=AC20A/ jsp:param name=PCSR value=A/ /jsp:include Thanks, Terje K.
Re: AW: Why doesn't this work:
I did what you asked me, and the files did get included, but it doesn't tell me much. To try an clear what I am trying to do: I want this url: http://localhost:8080/xsql/tek/advanced_section_result.jsp?opn=1PCS=0AC10APCS=AAC10A To do this: (info 1) jsp:include page=advanced_result_PCS.xsql flush=true jsp:param name=opn value=1/ jsp:param name=PCS value=AC10A/ jsp:param name=PCSR value=0/ /jsp:include jsp:include page=advanced_result_PCS.xsql flush=true jsp:param name=opn value=1/ jsp:param name=PCS value=AC10A/ jsp:param name=PCSR value=A/ /jsp:include By doing so: (info 2) %@ page import=java.util.* % % String opn = request.getParameter(opn); Enumeration paramNames = request.getParameterNames(); while(paramNames.hasMoreElements()) { String paramName = (String)paramNames.nextElement(); String[] paramValues = request.getParameterValues(paramName); if (paramValues.length == 1) { String paramValue = paramValues[0]; if (paramValue.length() == 0) { %error% } } else { for(int i=0; iparamValues.length; i++) { int length = paramValues[i].length(); String fil = advanced_result_ + paramName + .xsql; % jsp:include page=%= fil % flush=true jsp:param name=opn value=%= opn %/ jsp:param name=%= paramName % value=%= paramValues[i].substring(1,length) %/ jsp:param name=%= paramName %R value=%= paramValues[i].substring(0,1) %/ /jsp:include % } } } % This gets me an error. If i type in info 1 it works perfectly, but when i try to do info 2 gives me an error. What to do? Terje snip -- Original Message -- From: Ralph Einfeldt [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Wed, 30 May 2001 10:31:00 +0200 Are there no log messages from tomcat ? How do you know that the jsp:include ../ is not working? It might be working and the error is in the included page. To verify that, you could strip down the included page to something like: % log(this.getClass().getName() + : I'm included); % /snip
newbie problem: javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException
(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) What am I doing wrong? Terje Kristensen iSolutions AS Norway
RE: newbie problem: javax.servlet.ServletException at org.apache.jasp er.runtime.PageContextImpl.handlePageException
Oops, my error... The flow is as follows: from file1 to this: String opn = request.getParameter(opn); String pcs = request.getParameter(pcs); String vds = request.getParameter(vds); boolean no_1= request.getParameter(xsql_file).equals(Section Selection); boolean no_2= request.getParameter(xsql_file).equals(PCS Selection); boolean no_3= request.getParameter(xsql_file).equals(VDS Selection); boolean no_4= request.getParameter(xsql_file).equals(Pipe Element Selection); if (no_1) { %jsp:forward page=advanced_schema_sections.jsp?opn=%= opn %/% } if (no_2) { %jsp:forward page=advanced_schema_pcs.jsp?opn=%= opn %pcs=%= pcs %name=PCS/% } if (no_3) { %jsp:forward page=advanced_schema_vds.jsp?opn=%= opn %vds=%= vds %name=VDS/% } if (no_4) { %jsp:forward page=advanced_schema_pipe.xsql?opn=%= opn %/% } % where I try to open file 2 in my previous mail. It seems as if there is something wrong with my jsp:forward. Any clue? Will search the net... Thanks Terje K. -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: 29. mai 2001 11:53 To: '[EMAIL PROTECTED]' Subject: AW: newbie problem: javax.servlet.ServletException at org.apache.jasp er.runtime.PageContextImpl.handlePageException To get an idea what happens, you should have a look at line 72 of the generated java file _0002flsp_00032_00030_00030_0002fadvanced_0005fredirect_0002ejspadvanced_000 5fredirect_jsp_0.java to find the place in advanced_redirect.jsp which causes this problem. Try to reduce your jsp's to the bare minimum that reproduces this error. -Ursprüngliche Nachricht- Von: Terje Kristensen [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 29. Mai 2001 11:18 An: '[EMAIL PROTECTED]' Betreff: newbie problem: javax.servlet.ServletException at org.apache.jasp er.runtime.PageContextImpl.handlePageException snip/ Root cause: java.lang.IllegalArgumentException at javax.servlet.http.HttpUtils.parseName(HttpUtils.java:285) at javax.servlet.http.HttpUtils.parseQueryString(HttpUtils.java:154) at org.apache.tomcat.facade.RequestDispatcherImpl.addQueryString(RequestDispatc herImpl.java:491) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl .java:176) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:421) at lsp_00032_00030_00030._0002flsp_00032_00030_00030_0002fadvanced_0005fredirec t_0002ejspadvanced_0005fredirect_jsp_0._jspService(_0002flsp_00032_00030_000 30_0002fadvanced_0005fredirect_0002ejspadvanced_0005fredirect_jsp_0.java:72) snip/