Re: Adding a parameter to a URL + can I use the JSTL expression language with struts?
Hi, Why don't you just use an input of type hidden? If you are using an ActionForm add the property objID and use html:hidden property=objID / if not then you can just use input type=hidden name=objID value=${param.objID} A Dimecres 06 Novembre 2002 07:03, Jim Collins va escriure: Sorry to be a pain but has anyone got any idea how to fix this problem? Also can I use the JSP expression language with struts? Thanks Jim Hi, I have a JSP called upload.jsp with a form and file tag like this: html:form action=/uploadAction.do enctype=multipart/form-data Please Input The File You Wish to Upload:br/ html:file property=myFile/br / html:submit / /html:form The page that calls upload.jsp also passes a parameter called objID, I would like to add this parameter to the action URL but I don't know how to. I did try using a normal html form tag and jstl to add the paramerer like this: c:url value=/uploadAction.do var=myUrl c:param name=objID value =${param.objID}/ /c:url form action=c:out value=${myUrl}/ !--same code as above -- /form This sets the correct action url in the generated html but I get a bean utils exception when I press the submit button. Any help would be appreciated. Thanks Jim. PS I don't want to use a scriptlet if I can help it. I have seen previous postings from Craig where he advises against using scriptlets. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Adding a parameter to a URL + can I use the JSTL expression language with struts?
Sorry to be a pain but has anyone got any idea how to fix this problem? Also can I use the JSP expression language with struts? Thanks Jim Hi, I have a JSP called upload.jsp with a form and file tag like this: html:form action=/uploadAction.do enctype=multipart/form-data Please Input The File You Wish to Upload:br/ html:file property=myFile/br / html:submit / /html:form The page that calls upload.jsp also passes a parameter called objID, I would like to add this parameter to the action URL but I don't know how to. I did try using a normal html form tag and jstl to add the paramerer like this: c:url value=/uploadAction.do var=myUrl c:param name=objID value =${param.objID}/ /c:url form action=c:out value=${myUrl}/ !--same code as above -- /form This sets the correct action url in the generated html but I get a bean utils exception when I press the submit button. Any help would be appreciated. Thanks Jim. PS I don't want to use a scriptlet if I can help it. I have seen previous postings from Craig where he advises against using scriptlets. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Adding a parameter to a URL + can I use the JSTL expression language with struts?
Jim == Jim Collins [EMAIL PROTECTED] writes: Jim Sorry to be a pain but has anyone got any idea how to fix this problem? Also Jim can I use the JSP expression language with struts? If you are using the nightly build, you can use the contributed Struts-EL library, along with the JSTL (and Struts itself). The Struts-EL library is a port of the Struts tag library, where the attribute values are evaluated with the JSTL EL engine, instead of runtime scriptlets. Search the struts-user list for Struts-EL for more information about this. There is a very small set of documentation in the user's guide on Struts-EL (in the nightly build). Using Struts-EL, it seems concievable (I haven't tried this, specifically) you could do this: c:url value=/uploadAction.do var=myUrl c:param name=objID value =${param.objID}/ /c:url html-el:form action=${myUrl} ... /html-el:form -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Adding a parameter to a URL + can I use the JSTL expression language with struts?
Thanks David, I'll check that out. Jim. - Original Message - From: David M. Karr [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 06, 2002 6:53 AM Subject: Re: Adding a parameter to a URL + can I use the JSTL expression language with struts? Jim == Jim Collins [EMAIL PROTECTED] writes: Jim Sorry to be a pain but has anyone got any idea how to fix this problem? Also Jim can I use the JSP expression language with struts? If you are using the nightly build, you can use the contributed Struts-EL library, along with the JSTL (and Struts itself). The Struts-EL library is a port of the Struts tag library, where the attribute values are evaluated with the JSTL EL engine, instead of runtime scriptlets. Search the struts-user list for Struts-EL for more information about this. There is a very small set of documentation in the user's guide on Struts-EL (in the nightly build). Using Struts-EL, it seems concievable (I haven't tried this, specifically) you could do this: c:url value=/uploadAction.do var=myUrl c:param name=objID value =${param.objID}/ /c:url html-el:form action=${myUrl} ... /html-el:form -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org