Re: Problem with html:img.. Please Help !!
Hi Use img src=image.logotop instead of html:img srcKey=/ Bartek Debasish Ghosh wrote: Hi all - This is my second attempt at the problem. I could not fix it. Please help !! I am using Tomcat 3.2.2. When I use an html tag as html:img srcKey=image.logotop/ (I am using Struts), the first time the page comes, the tag gets a sessionId. The cookies are enabled in my browser. For all subsequent requests, the session id never comes. I guess this is the expected behavior of encodeURL() (for URL rewriting), which is used by the html:img tag. In fact the tag is rendered as: img src=images/logotop.gif;jsessionid=7flhvbc4f1. The problem is that the image is not rendered on the page. For all subsequent requests (when I hit the Refresh button), the session id stops coming (since cookies are enabled) and the images are rendered properly. In fact if I disable cookies, then the image never gets rendered. I know this may not be a problem of Struts directly, but I really cannot find any pointer to the solution ... Please help !! Regards. - Debasish __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com
problem with logic:forwrad
Hi all I have a problem with logic:forward In my jsp file are the following lines: logic:notPresent name=profilesSession logic:forward name=indexClient/ /logic:notPresent It causes following exception: javax.servlet.ServletException: Exception forwarding for name indexClient: java.lang.IllegalStateException: Cannot forward as OutputStream or Writer has already been obtained at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at jsp.client._0002fjsp_0002fclient_0002factList_0002ejspactList_jsp_0._jspService(_0002fjsp_0002fclient_0002factList_0002ejspactList_jsp_0.java:424) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) Please help Bartek Poland
why bean:write converts etc?
Hi I have a problem I put in the vector: vector.addElement(bble ble/b); vector.addElement(bble ble/b); request.setAttribute(actList, result); next in the jsp page: logic:iterate id=doc name=actList type=adwokaci.resources.DocumentAttributes bean:write name=doc property=desc/ /logic:iterate in page source i revceive lt;bgt;ble blelt;/bgt; lt;bgt;ble blelt;/bgt; How can I solve it? Please help!!! Bartek Poland
Problem with html:select multiple=true and enctype=multipart/from-data
Hi everyone I have the following in a form in a jsp: html:form action=/searchDocument.do html:select property=keys style=width: 200px; multiple=true size=5 html:options collection=keysWord property=id labelProperty=val/ /html:select /html:form In ActionFrom I have following methods: public void setKeys(Object[] keys) { this.keys = keys; } public Object[] getKeys() { return this.keys; } and when I hit submit everything is OK. i.e. keys.length = 0,1,2,3,4,5,6, but when I add method=post enctype=multipart/form-data keys.length always equals 0 or 1 why? could someone point me to the solution, please ? Thanx Bartek Poland
Re: how to define a datasource in struts?
Hi, You can do it like that: data-sources data-source set-property property=autoCommit value=false/ set-property property=description value=MySQL/ set-property property=driverClass value=org.gjt.mm.mysql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=pass/ set-property property=url value=jdbc:mysql://localhost:3306/test/ set-property property=user value=servlet/ /data-source /data-sources Bartek Poland Satyan Nair wrote: Hi everyone, i m new to struts.. if anyone can tell me where to find the archive of the mailing lists then the problems already discussed won't come again and again... anyway i would like to know how to define datasource in struts... i tried using the example given with struts... but i must be missing something to be configured.. i configured the struts-config.xml file... for defining the datasource... but it gives me ActionMapping errors... take care everyone
test - no need to read
test
Problem with html:form enctype=multipart/form-data/
Hi again I have created multipart form html:form action=/upload enctype=multipart/form-data html:file property=theFile styleClass=form2/ html:submit/ /html:form When I submit it, I receive following exception: java.lang.ArrayIndexOutOfBoundsException at javax.servlet.http.MultipartHandler.readLine(MultipartHandler.java:139) at javax.servlet.http.MultipartHandler.readLine(MultipartHandler.java:103) at javax.servlet.http.MultipartHandler.gotoBoundary(MultipartHandler.java:160) at javax.servlet.http.MultipartHandler.nextPart(MultipartHandler.java:315) What do I wrong? thanks
Re: problem with upload file
Bar³omiej Paw³owski wrote: Thanx, for answer but when I change my form and add enctype='multipart/form-data' I receive another exception: Internal Servlet Error: java.lang.ArrayIndexOutOfBoundsException at javax.servlet.http.MultipartHandler.readLine(MultipartHandler.java:139) at javax.servlet.http.MultipartHandler.readLine(MultipartHandler.java:103) at javax.servlet.http.MultipartHandler.gotoBoundary(MultipartHandler.java:160) at javax.servlet.http.MultipartHandler.nextPart(MultipartHandler.java:315) at javax.servlet.http.HttpUtils.parseMultiData(HttpUtils.java:204) at org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:137) at org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691) at org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259) at org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250) at org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRequestFacade.java:222) Any idea? Mark Schenk wrote: Hi I have created multipart form: [snipsnip] br html:form action=/upload File html:file property=file / Hi, the problem is, that you didn't create a multipart form! Change your form tag to read html:form action='/upload' enctype='multipart/form-data'. After this the populate will work OK. Mark Mark Schenk | Ceci n'est pas une signature Blackboard Project Manager | Delft University of Technology |E-mail: [EMAIL PROTECTED] Dept.: DTO |Phone: +31 152785448 (85448) Room: LB00.680 |Fax:+31 152786359 -
Re: problem with upload file
Thanx, for answer but when I change my form and add enctype='multipart/form-data' I receive another exception: Internal Servlet Error: java.lang.ArrayIndexOutOfBoundsException at javax.servlet.http.MultipartHandler.readLine(MultipartHandler.java:139) at javax.servlet.http.MultipartHandler.readLine(MultipartHandler.java:103) at javax.servlet.http.MultipartHandler.gotoBoundary(MultipartHandler.java:160) at javax.servlet.http.MultipartHandler.nextPart(MultipartHandler.java:315) at javax.servlet.http.HttpUtils.parseMultiData(HttpUtils.java:204) at org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:137) at org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691) at org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259) at org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250) at org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRequestFacade.java:222) Any idea? Mark Schenk wrote: Hi I have created multipart form: [snipsnip] br html:form action=/upload File html:file property=file / Hi, the problem is, that you didn't create a multipart form! Change your form tag to read html:form action='/upload' enctype='multipart/form-data'. After this the populate will work OK. Mark Mark Schenk | Ceci n'est pas une signature Blackboard Project Manager | Delft University of Technology |E-mail: [EMAIL PROTECTED] Dept.: DTO |Phone: +31 152785448 (85448) Room: LB00.680 |Fax:+31 152786359 -
problem with FormFile
Hi, I have created file upload.jsp: %@ page contentType=text/html; charset=ISO-8859-2 % %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-2 META NAME=Author CONTENT=Bartlomiej Pawlowski titleupload/title /head body html:form action=/upload File html:file property=file maxlength=30 styleClass=form2/ html:submitUpload/html:submit /html:form /body /html:html and ActionForm bean: public class UploadForm extends ActionForm { private FormFile file; public UploadForm() { } public void setFile(FormFile file) { this.file = file; } public FormFile getFile() { return file; } } when I submit this form I receive following exception: Internal Servlet Error: javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:486) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:1910) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1521) Root cause: java.lang.IllegalArgumentException: argument type mismatch at java.lang.reflect.Method.invoke(Native Method) at org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java:825) at org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java:756) at org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:782) What is wrong? Who can help me?