Multiple Submit Buttons per Form
I'm pretty new to struts so please forgive me if this question been asked before (I searched the archives and didn't find anything like it). I have an OPENSTEP / WebObjects background. Is it possible to have 2 submit buttons (or image buttons) within the same form that route to different action classes? For example if I have a page that has a popup and 2 buttons (maybe a create button and a modify button). I'd like the create button to invoke perform(blah) on a CreateAction class and the modify button to invoke perform(blah) on a ModifyAction class. 1 way to do it could be to put both buttons in different forms. However that won't work because I want to check the selection in the popup in both my create and modify classes. Another way to do it could be route both buttons to a single action class, which would conditionalize based on which button was clicked. I find this approach particularly inelegant tho. Anybody done anything like this? If so how did u set this up? thanks. -shehryar
Re: Serializing form beans
Just out of curiosity, what is the purpose of serializing and encoding the form bean? - Original Message - From: "Renaud Waldura" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 14, 2001 2:28 PM Subject: Re: Serializing form beans > Take that back. There's still an issue with the encoding. My guess is that > URLEncoder and/or String() constructor don't convert full bytes. Grr. > > At this point I think I'm going to write my own encoding...
Re: multibox and reset()
reset is currently not called if creates the form bean, which happens if you go to the JSP page directly without hitting ActionServlet first. I've submitted a patch to fix this, but it has not been committed yet. Erik - Original Message - From: "Renaud Waldura" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, September 14, 2001 10:12 AM Subject: Re: multibox and reset() > The signature for reset() is the following: > > void reset(ActionMapping, HttpServletRequest) > > I don't know whether setting the array reference is null is enough, or you > truly need to create a zero-length array like in your example below. > > I set mine to null, it seemed to work. > > > > > - Original Message - > From: "Dirk Jaeckel" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, September 14, 2001 6:26 AM > Subject: multibox and reset() > > > > Hi! > > > > > > I am having trouble resetting a StringArray that is connected to a > -tag. > > > > HTML-Example: > > > > > > > > > > > > > > > > > > > > > > Corresponding ActionForm: > > > > public class MapForm extends ActionForm { > > > > private String[] _on = new String[0]; > > > > public void reset() { > > _on = new String[0]; > > } > > > > public void setLayer(String in) { > > _on = in; > > } > > > > public String[] getLayer() { > > return _on; > > > > } > > } > > > > The Manual told me to use the reset()-method to set The Array to the > length 0, but reset() is never called. > > > > > > Dirk > > > > > >
Nested elements
I've read the several excellent messages describing deriving classes from ActionMapping and using the set-property element in struts-config.xml. One in particular was: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg08755.html What I would like to do is have a sequence of elements nested in the element which in turn have a sequence of elements. This should become a property of a type such as an ArrayList of an ArrayList in the derived ActionMapping class. It appears that the is limited to simple (name,value) pairs, although the DTD definition does specify a "id" attribute. Is that true? Is what I am trying to do possible with set-property? Or am I actually going to have to modify the struts-config_1_1.dtd? Are there any other alternatives? Thank you. Frederick N. Brier Sr. Software Engineer Multideck Corporation
Re: Serializing form beans
Take that back. There's still an issue with the encoding. My guess is that URLEncoder and/or String() constructor don't convert full bytes. Grr. At this point I think I'm going to write my own encoding... - Original Message - From: "Renaud Waldura" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 14, 2001 10:28 AM Subject: Re: Serializing form beans > Answering my own question, I found out the correct way of serializing a form > bean. > Here is code that works for me: > > > > /** > * Serialize the form bean and return it as a string suited to > * be written into a Web page. > * > * @param form the form bean instance > * @return the serialized bean data as an encoded string > * > * @throws IOException if the serialization failed > */ > public static String serializeAndEncode(ActionForm form) > throws IOException > { > byte[] serialized = serialize(form); > return java.net.URLEncoder.encode( new String(serialized) ); > } > > /** > * Decode and de-serialize a form bean. > * > * @param s the encoded and serialized form bean data > * @return a form bean instance > * > * @throws IOException if the de-serialization failed > * @throws ClassNotFoundException if the de-serialization failed > */ > public static ActionForm decodeAndDeserialize(String s) > throws IOException, ClassNotFoundException > { > byte[] serialized = java.net.URLDecoder.decode(s).getBytes(); > return deserialize( serialized ); > } > > /** > * Serialize a form bean to a byte array. > * > * @param form the form bean to be serialized > * @return the serialized bean as a byte array > * > * @throws IOException if the serialization failed > */ > public static byte[] serialize(ActionForm form) > throws IOException > { > // store the serialized instance will be written to > ObjectOutput out = null; > > // support stream to hold the serialized instance > ByteArrayOutputStream temp = new ByteArrayOutputStream(); > > try > { >out = new ObjectOutputStream(temp); >out.writeObject(form); > } > finally > { >// also closes the support stream "temp" >if (out != null) out.close(); > } > > return temp.toByteArray(); > } > > /** > * De-serialize a form bean from a byte array. > * > * @param data serialized bytes of the bean > * @return a ActionForm instance of the serialized bean > * > * @throws IOException if the de-serialization failed > * @throws ClassNotFoundException if the de-serialization failed > */ > public static ActionForm deserialize(byte[] data) > throws IOException, ClassNotFoundException > { > // store the serialized instance will be read from > ObjectInput in = null; > > // the object representation of the serialized instance > ActionForm form = null; > > try > { >in = new ObjectInputStream( new ByteArrayInputStream(data) ); >form = (ActionForm) in.readObject(); > } > finally > { >if (in != null) in.close(); > } > > return form; > } > > > > > > > - Original Message - > From: "Renaud Waldura" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, September 13, 2001 2:32 PM > Subject: Serializing form beans > > > > I'm attempting to serialize a form bean to a hidden field, but having a > hard > > time doing it right. Looks like the serialized data is not encoding > > properly. > > > > Once I have serialized my bean, what encoding should I apply, if any, to > > have it transmitted back to me in good shape? I'm using > URLEncoder.encode(), > > but I have a feeling it's losing bits. Or maybe it's the String > constructor. > > > > I know people on this list are doing this daily, what is the magic > > incantation? > > > > --Renaud > > > > > >
rowtag taglib
Folks, I recently downloaded the "rowtag" taglibrary from husted.com, I need it for displaying alternating colors in a table. However, I'm having lots of trouble deploying it. Weblogic throws up a XML parse exception saying it cannot parse the deployment descriptor. The download was not jar'd up, so I created the jar myself, along with a custom taglib.tld that other custom taglib downloads contain. Any ideas on how to get this running, or at least point to some information I can learn from. Especially to do with deploying custom tag libraries. Thanks, - Greg -- Greg Lehane Software Developer H5 Technologies Inc. 520 3rd St. No 17 San Francisco, CA 94107 415.625.6701 ext. 610 (direct) 415.625.6799 (fax) [EMAIL PROTECTED]
html:multibox
> I have used the html:multibox before to successfully group checkboxes but > now I'm trying to group text fields, I know that, or at least I think I know > that the html:text won't work. Has anyone ran into this problem before and > if so what were the solutions? Thanks in advanced. Gus
Xerces and Xalan versions
Group, Can anyone tell me the correct versions of Xerces and Xalan to use with Struts and VAJ 4.0? Should the IBM xml parser be in the classpath for the WTE? I'm getting a sax parse exception on the DTD for struts-config.xml using Steven Brand's recent instructions for struts and VAJ. Can't find any version info in his instructions or the archives... Thanks... George Phillips University of Miami Information Technology 1365 Memorial Drive Rm. 202-H Coral Gables, FL 33146 Phone: 305-284-5143 Email: [EMAIL PROTECTED]
Re: Serializing form beans
Answering my own question, I found out the correct way of serializing a form bean. Here is code that works for me: /** * Serialize the form bean and return it as a string suited to * be written into a Web page. * * @param form the form bean instance * @return the serialized bean data as an encoded string * * @throws IOException if the serialization failed */ public static String serializeAndEncode(ActionForm form) throws IOException { byte[] serialized = serialize(form); return java.net.URLEncoder.encode( new String(serialized) ); } /** * Decode and de-serialize a form bean. * * @param s the encoded and serialized form bean data * @return a form bean instance * * @throws IOException if the de-serialization failed * @throws ClassNotFoundException if the de-serialization failed */ public static ActionForm decodeAndDeserialize(String s) throws IOException, ClassNotFoundException { byte[] serialized = java.net.URLDecoder.decode(s).getBytes(); return deserialize( serialized ); } /** * Serialize a form bean to a byte array. * * @param form the form bean to be serialized * @return the serialized bean as a byte array * * @throws IOException if the serialization failed */ public static byte[] serialize(ActionForm form) throws IOException { // store the serialized instance will be written to ObjectOutput out = null; // support stream to hold the serialized instance ByteArrayOutputStream temp = new ByteArrayOutputStream(); try { out = new ObjectOutputStream(temp); out.writeObject(form); } finally { // also closes the support stream "temp" if (out != null) out.close(); } return temp.toByteArray(); } /** * De-serialize a form bean from a byte array. * * @param data serialized bytes of the bean * @return a ActionForm instance of the serialized bean * * @throws IOException if the de-serialization failed * @throws ClassNotFoundException if the de-serialization failed */ public static ActionForm deserialize(byte[] data) throws IOException, ClassNotFoundException { // store the serialized instance will be read from ObjectInput in = null; // the object representation of the serialized instance ActionForm form = null; try { in = new ObjectInputStream( new ByteArrayInputStream(data) ); form = (ActionForm) in.readObject(); } finally { if (in != null) in.close(); } return form; } - Original Message - From: "Renaud Waldura" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 13, 2001 2:32 PM Subject: Serializing form beans > I'm attempting to serialize a form bean to a hidden field, but having a hard > time doing it right. Looks like the serialized data is not encoding > properly. > > Once I have serialized my bean, what encoding should I apply, if any, to > have it transmitted back to me in good shape? I'm using URLEncoder.encode(), > but I have a feeling it's losing bits. Or maybe it's the String constructor. > > I know people on this list are doing this daily, what is the magic > incantation? > > --Renaud > >
HTML Tags indexed
I was reading through the Tag Reference on the site and it says that struts supports an indexed property for HTML tags such as select. I haven't been able to make this work using the standard jar. Do I need to download the Index addition and recompile struts, or is there another jar version that I could use that will support it? Thanks in advance, Heidi
Re: Error parsing struts-config.xml
Thank you for a fast response. Thibaud, I did look at that web site but it seems like the link is broken for the addin. Do you have the addin downloaded? And James, Yes it solves that problem, but there is another error that I still don't know why. The form bean cannot be found. I don't have any package declaration in the source files, and all the files are in the same directory, and bellow is the error message. 2001-09-14 01:05:15 - Ctx( /st ): Exception in: R( /st + /login.jsp + null) - javax.servlet.ServletException: Exception creating bean of class LoginForm: java.lang.ClassNotFoundException: LoginForm at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at _0002flogin_0002ejsplogin_jsp_1._jspService(_0002flogin_0002ejsplogin_jsp_1.java:326) 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: javax.servlet.jsp.JspException: Exception creating bean of class LoginForm: java.lang.ClassNotFoundException: LoginForm at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:568) at _0002flogin_0002ejsplogin_jsp_1._jspService(_0002flogin_0002ejsplogin_jsp_1.java:147) 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) > >This is most likely happening because you don't have a >DOCTYPE specified in your config file. This is >necessary because Struts uses a validating xml parser. > >Put the following line at the top of your config file >and you should be all set. > >Foundation//DTD Struts Configuration 1.0//EN" >"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";> > >Let us know if you still have problems. > >-james > >--- lan vo <[EMAIL PROTECTED]> wrote: > > Hello All, > > I am new to struts, and I am trying to setup the > > framework in JBuilder5 with > > a simple login test. > > I have my struts-config in the WEB-INF directory. > > Here is my struts-config > > xml file. Please give my some hints. > > Thank you so much, Lan Vo. > > > > > > > > > > > type="LoginForm"/> > > > > > > > > > type="LoginAction" > > name="loginForm" > > scope="request" > > validate="true" > > input="/login.jsp"> > > > >> path="/login.jsp"/> > > > > > > > > > > > > > > Here is the error message when I try to run the > > login page. > > > > > > 2001-09-14 12:13:16 - path="/st" :action: > > Initializing configuration from > > resource path /WEB-INF/struts-config.xml > > > > Parse Error at line 1 column 16: Element type > > "struts-config" must be > > declared. > > org.xml.sax.SAXParseException: Element type > > "stru
Re: multibox and reset()
The signature for reset() is the following: void reset(ActionMapping, HttpServletRequest) I don't know whether setting the array reference is null is enough, or you truly need to create a zero-length array like in your example below. I set mine to null, it seemed to work. - Original Message - From: "Dirk Jaeckel" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 14, 2001 6:26 AM Subject: multibox and reset() > Hi! > > > I am having trouble resetting a StringArray that is connected to a -tag. > > HTML-Example: > > > > > > > > > > > Corresponding ActionForm: > > public class MapForm extends ActionForm { > > private String[] _on = new String[0]; > > public void reset() { > _on = new String[0]; > } > > public void setLayer(String in) { > _on = in; > } > > public String[] getLayer() { > return _on; > > } > } > > The Manual told me to use the reset()-method to set The Array to the length 0, but reset() is never called. > > > Dirk > >
why 404 error?
This is probably a very simple problem, but I can't seem to figure it out. I am trying to run a minimal struts example to become familiar with it: I have an action class called loginPatron that simply forwards to a jsp without doing anything else. My web.xml, struts-config.xml and action class all look identical to the struts examples, except for the obvious modifications for my application. After looking at it all morning, I can't seem to see anything wrong, yet I get the following error from tomcat's standard output when accessing http://localhost:8080/mycontents/loginPatron.do: 2001-09-14 12:29:45 - Ctx(/mycontents) : Class not found: action 2001-09-14 12:29:45 - Ctx(/mycontents) : Status code:404 request:R( /mycontents + /loginPatron.do + null) msg:null 2001-09-14 12:29:57 - Ctx() : Status code:404 request:R( + /loginPatron.do + nu ll) msg:null 2001-09-14 12:30:05 - Ctx() : Status code:404 request:R( + /loginPatron.do + nu ll) msg:null The servlet log file does not indicate an error. It looks like the application was loaded, the mappings made, etc. >From searching this list's archives, I made sure that the following was true: -- the struts.jar file is not in the tomcat or system classpath, but it is in the WEB-INF/lib directory of the application (although it looks like tomcat does not see it when loading the application?). -- the action class is in the WEB-INF/classes directory, and does not reference any other classes, except those in the import statements as indicated in the struts example. The only other thing that looks wierd is this from tomcat's standard output: 2001-09-14 12:29:01 - AutoWebApp: Auto-Adding DEFAULT:/mycontents 2001-09-14 12:29:02 - Ctx(/mycontents) : Removing duplicate servlet action Servl etH action(SW (null CN=org.apache.struts.action.ActionServlet)) I am currently getting this error on Windows 2000 running Struts 1.0 and Tomcat 3.3 b2. I am trying this version of tomcat after receiving a very similar error with version 3.2. Any help anyone can give will be greatly appreciated. ___ Adam Smith [EMAIL PROTECTED]
RE: Error parsing struts-config.xml
Did you look at this page: http://www1.tramsasp.com/?section=dev Normally it should help you ton configure struts with jbuilder... > -Message d'origine- > De: lan vo [SMTP:[EMAIL PROTECTED]] > Date: vendredi 14 septembre 2001 18:33 > À:[EMAIL PROTECTED] > Objet:Error parsing struts-config.xml > > Hello All, > I am new to struts, and I am trying to setup the framework in JBuilder5 > with > a simple login test. > I have my struts-config in the WEB-INF directory. Here is my > struts-config > xml file. Please give my some hints. > Thank you so much, Lan Vo. > > > > >type="LoginForm"/> > > > >type="LoginAction" > name="loginForm" > scope="request" > validate="true" > input="/login.jsp"> > > > > > > > > > Here is the error message when I try to run the login page. > > > 2001-09-14 12:13:16 - path="/st" :action: Initializing configuration from > resource path /WEB-INF/struts-config.xml > > Parse Error at line 1 column 16: Element type "struts-config" must be > declared. > org.xml.sax.SAXParseException: Element type "struts-config" must be > declared. > at > org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1150) > at > org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError > (XMLValidator.java:1698) > at > org.apache.xerces.validators.common.XMLValidator.validateElementAndAttribu > tes(XMLValidator.java:3383) > at > org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValid > ator.java:1155) > at > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch( > XMLDocumentScanner.java:994) > at > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanne > r.java:381) > at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035) > at > org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) > at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) > at javax.xml.parsers.SAXParser.parse(SAXParser.java:143) > at org.apache.struts.digester.Digester.parse(Digester.java:755) > at > org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1331 > ) > at > org.apache.struts.action.ActionServlet.init(ActionServlet.java:465) > at javax.servlet.GenericServlet.init(GenericServlet.java:258) > at > org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) > at org.apache.tomcat.core.Handler.init(Handler.java:215) > at > org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) > at > org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStart > upInterceptor.java:130) > at > org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) > at > org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) > at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) > at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) > Parse Error at line 3 column 13: Element type "form-beans" must be > declared. > org.xml.sax.SAXParseException: Element type "form-beans" must be declared. > at > org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1150) > at > org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError > (XMLValidator.java:1698) > at > org.apache.xerces.validators.common.XMLValidator.validateElementAndAttribu > tes(XMLValidator.java:3383) > at > org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValid > ator.java:1155) > at > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch( > XMLDocumentScanner.java:1227) > at > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanne > r.java:381) > at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035) > at > org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) > at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) > at javax.xml.parsers.SAXParser.parse(SAXParser.java:143) > at org.apache.struts.digester.Digester.parse(Digester.java:755) > at > org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1331 > ) > at > org.apache.struts.action.ActionServlet.init(ActionServlet.java:465) > at javax.servlet.GenericServlet.init(GenericServlet.java:258) > at > org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) > at org.apache.tomcat.core.Handler.init(Handler.java:215) > at > org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) > at > org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStart > upInterceptor.java:130) > at > org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) > at > org.apache.tomcat.core.Cont
Re: Error parsing struts-config.xml
This is most likely happening because you don't have a DOCTYPE specified in your config file. This is necessary because Struts uses a validating xml parser. Put the following line at the top of your config file and you should be all set. http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";> Let us know if you still have problems. -james --- lan vo <[EMAIL PROTECTED]> wrote: > Hello All, > I am new to struts, and I am trying to setup the > framework in JBuilder5 with > a simple login test. > I have my struts-config in the WEB-INF directory. > Here is my struts-config > xml file. Please give my some hints. > Thank you so much, Lan Vo. > > > > >type="LoginForm"/> > > > >type="LoginAction" > name="loginForm" > scope="request" > validate="true" > input="/login.jsp"> > >path="/login.jsp"/> > > > > > > > Here is the error message when I try to run the > login page. > > > 2001-09-14 12:13:16 - path="/st" :action: > Initializing configuration from > resource path /WEB-INF/struts-config.xml > > Parse Error at line 1 column 16: Element type > "struts-config" must be > declared. > org.xml.sax.SAXParseException: Element type > "struts-config" must be > declared. > at > org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1150) > at > org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1698) > at > org.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3383) > at > org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1155) > at > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:994) > at > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) > at > org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035) > at > org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) > at > javax.xml.parsers.SAXParser.parse(SAXParser.java:345) > at > javax.xml.parsers.SAXParser.parse(SAXParser.java:143) > at > org.apache.struts.digester.Digester.parse(Digester.java:755) > at > org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1331) > at > org.apache.struts.action.ActionServlet.init(ActionServlet.java:465) > at > javax.servlet.GenericServlet.init(GenericServlet.java:258) > at > org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) > at > org.apache.tomcat.core.Handler.init(Handler.java:215) > at > org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) > at > org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130) > at > org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) > at > org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) > at > org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) > at > org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) > Parse Error at line 3 column 13: Element type > "form-beans" must be declared. > org.xml.sax.SAXParseException: Element type > "form-beans" must be declared. > at > org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1150) > at > org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1698) > at > org.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3383) > at > org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1155) > at > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1227) > at > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) > at > org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035) > at > org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) > at > javax.xml.parsers.SAXParser.parse(SAXParser.java:345) > at > javax.xml.parsers.SAXParser.parse(SAXParser.java:143) > at > org.apache.struts.digester.Digester.parse(Digester.java:755) > at > org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1331) > at > org.apache.struts.action.ActionServlet.init(ActionServlet.java:465) > at > javax.servlet.GenericServlet.init(GenericServlet.java:258) > at > org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) > at > org.apache.tomcat.core.Handler.init(Handler.java:215) > at > org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) > at > org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130) > at > org.apache.tomcat.core.Contex
Error parsing struts-config.xml
Hello All, I am new to struts, and I am trying to setup the framework in JBuilder5 with a simple login test. I have my struts-config in the WEB-INF directory. Here is my struts-config xml file. Please give my some hints. Thank you so much, Lan Vo. Here is the error message when I try to run the login page. 2001-09-14 12:13:16 - path="/st" :action: Initializing configuration from resource path /WEB-INF/struts-config.xml Parse Error at line 1 column 16: Element type "struts-config" must be declared. org.xml.sax.SAXParseException: Element type "struts-config" must be declared. at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1150) at org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1698) at org.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3383) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1155) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:994) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at javax.xml.parsers.SAXParser.parse(SAXParser.java:143) at org.apache.struts.digester.Digester.parse(Digester.java:755) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1331) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:465) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130) at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) Parse Error at line 3 column 13: Element type "form-beans" must be declared. org.xml.sax.SAXParseException: Element type "form-beans" must be declared. at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1150) at org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1698) at org.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3383) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1155) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1227) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at javax.xml.parsers.SAXParser.parse(SAXParser.java:143) at org.apache.struts.digester.Digester.parse(Digester.java:755) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1331) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:465) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) at org.apache.tomcat.core.Handler.init(Handler.java:215) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130) at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) Parse Error at line 5 column 35: Element type "form-bean" must be declared. org.xml.sax.SAXParseException: Element type "form-bean" must be declared. at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1150) at org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1698) at org.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3383) at org.apache.xerces.validators.c
Re: [ANNOUNCE] Struts Console
Hi James, Here is my struts-config and this is the mismatch I was talking 'bout yesterday. In Action mappings, choose 1. /AddUserForm : form bean name is set to AddUserForm 2. /changePassword : form bean name remains at AddUserForm Regards, Rakesh http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
Re: Hello..
http://husted.com/about/struts/resources.htm#tutorials "Rathikindi, Venkata" wrote: > > Hi Marcel, > > This is Venkat,I got you mail id from the Struts user subscription. > I need some help regarding startus tutorials. > I just started working on Struts framework.I a trying to find out a tutorial > for this frame work.I couldn't find it out. > If you have any idea could you plese help me how/where to find out the > tutorials. > > Thanks, > Venkat -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/
Re: [ANNOUNCE] Struts Console
James Holmes wrote: > Any ideas on what might be added/changed in the Struts > 1.1 DTD? After having spent much time working with > the DTD now I can see there are some changes that > would be nice. There's nothing specific on the list now http://jakarta.apache.org/struts/todo-1.1.html (and this *is* the one-and-only list). Though, I'm thinking of adding "Assemble struts-config elements from multiple files.", as mentioned elsewhere. > Is workflow supposed to be part of Struts 1.1? 1.1 > timeframe? At Jakarta, timeframes have no direct relationship with a calendar. There is absolutely no way to tell when Struts 1.1 might ship because there is absolutely no way to tell how much time the Committers, and other developers will have available to work on the project. From Struts 0.1 to 0.5 was about five months (I think), and 0.5 to 1.0 was another nine, if that tells you anything. As it stands, the Tiles and Validator packages slated for 1.1 can be used with 1.0 now, along with other extensions, like Nic Hobb's Security for Actions. Feedback on how people are using any of these would help speed the process along. I'll try to update the TODO list, since many items there are actually being tested, are already done, or just obsolete. Personally, I'm going to try and get some significant working applications up on the Website where people can download and dissect them. This should help generate more working code, as people see things they would like to fix, and then provide the fixes. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/
Re:
Agreed I had a similar problem with bean:write tag and looked at the source code for WriteTag. It turns out that I could write a simple custom action tags to handle DateFormat and NumberFormat of java.util.Date and java.lang.Number objects. I think they call it Helper View objects in that CORE J2EE PATTERNS book. -- Peter Pilgrim | |++44 (0)207-545-9923 \ \ ___ / / ... . - ( * ) --- -- _Cafe_Savannah,_San Antonio,Ibiza__ Message History From: "Erik Hatcher" <[EMAIL PROTECTED]> on 14/09/2001 06:50 MST Please respond to [EMAIL PROTECTED] To: <[EMAIL PROTECTED]> cc: Subject: Re:
HTTP Reply Already Emitted - File Upload - ActionServlet - Exception Handling
I am having a problem with the FileUpload provided with Struts. You can set a maximum size for the file being uploaded. The problem occurs when the FileUpload process reaches the maximum file size. A ServletException is thrown stating that the max size limit has been reached (and the upload stops); however, I can't seem to catch it in any code or even use the errorpage functionality within JSP. When I use the errorpage, I can see that my error page is being called and processed, but I get the following error message (from the SilverStream console - both business object and client logging set): AgoServletOutputStream.flush m_committed=true m_noflush=false AgoServletOutputStream.flush m_committed=true m_noflush=false AgoServletOutputStream.close AgoServletOutputStream.flush m_committed=true m_noflush=false AgoServletOutputStream.sendLastChunk AgoHttpReplyEvent.completeContent() m_redirected=false AgoServletOutputStream.close [CLI0-4ec31c19a91c4ad79c2bb3f74d6c05d3] Reply was already emitted: : idle. java.lang.RuntimeException: Bad request, no URL ! at com.sssw.shr.http.HttpRequestMessage.notifyBeginParsing(HttpRequestMessage.java:187) at com.sssw.shr.mime.MimeParser.parse(MimeParser.java:104) at com.sssw.srv.http.Client.getNextRequest(Client.java:334) at com.sssw.srv.http.Client.loop(Client.java:1194) at com.sssw.srv.http.Client.runConnection(Client.java:1421) at com.sssw.srv.http.Client.run(Client.java:1381) at java.lang.Thread.run(Thread.java:484) [CLI0-4ec31c19a91c4ad79c2bb3f74d6c05d3] Replying: HTTP/1.1 500 Internal Server Error Date: Fri, 14 Sep 2001 13:00:47 GMT Content-Length: 121 Content-Type: text/html Server: SilverStream Server/10.0 In the browser, I get a DNS not found error. I think this is from the HTTP reply already being emitted and then trying to forward to the error page. I have changed my Struts configuration to redirect instead of forwarding but to no avail. From my Action, I tried throwing a new ServletException to see if the error page is display - it is. That means there is something going on in the FileUpload process. Any ideas?? Thanks! Ricky Frank
logic:iterator Class cast exception
Hi all, I'm trying to iterate a Vector into a JSP page and I have an Class cast exception. My vector contains an Hashtable that contains String object. Here my ActionBean code for the iteration: while(rs.next()) { Hashtable table = new Hashtable(); table.put(SQLConstants.FieldName.BSP.BSP_ID,rs.getString(SQLConstants.Fi eldName.BSP.BSP_ID)); table.put(SQLConstants.FieldName.BSP.BSP_FULLNAME,rs.getString(SQLConsta nts.FieldName.BSP.BSP_FULLNAME)); vectorBsp.add(table); request.getSession().setAttribute(Constants.BSP_LIST,loadBsp(errors)); } Into my jsp, I iterate in this way. <%= (String)((java.util.Hashtable)bspList).get(SQLConstants.FieldName.BSP.BS P_ID)%> <%= (String)((java.util.Hashtable)bspList).get(SQLConstants.FieldName.BSP.BS P_FULLNAME)%> Here the error message. Location: /struts-iata/bsp.jspInternal Servlet Error: org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:630) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(J spServlet.java:258) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:268) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav a:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H ttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:50 1) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.ClassCastException: java.lang.Object at javax.servlet.jsp.tagext.TagData.getAttributeString(TagData.java:163) at org.apache.struts.taglib.logic.IterateTei.getVariableInfo(IterateTei.java:90) at javax.servlet.jsp.tagext.TagInfo.getVariableInfo(TagInfo.java:149) at org.apache.jasper.compiler.TagBeginGenerator.generateServiceMethodStatem ents(TagBeginGenerator.java:290) at org.apache.jasper.compiler.TagBeginGenerator.generate(TagBeginGenerator. java:357) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.genera te(JspParseEventListener.java:771) at org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEve ntListener.java:220) at org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspPa rseEventListener.java:175) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(J spServlet.java:258) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:268) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav a:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H ttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:50 1) at java.lang.Thread.run(Thread.java:484) Thank you in advance for your help. Regards
Re: [ANNOUNCE] Struts Console
I plan to use existing code/technology such as CodeMaker to implement the "wizard" type functionality. I have started to venture down these paths yet as I am working on trying to get what I would consider "core" functionality working. I would very much like to see a wizard that uses CodeMaker and does the auto-generation of the formbean/action classes. I'd also like to see a "Validation" wizard. This way users can quickly set up some of the generic parts of an application and then concentrate on the unique part of their application. Currently the Struts Console uses JDOM for the XML reading and writing. This is because JDOM makes it very easy to work with XML files. I'm not opposed to having it use the Digester framework in the future, but for now I'm taking the easy route. I hope to go with the ASF license as early as next week. I am going to be working a great deal on the code this weekend to get into an acceptible state. Just so that everyone knows, here is what I am currently working on: *) Sorting out the issues with the formatting of the outputted/saved files. This is big. Many people will likely want to use both the tool and hand editing. Formatting must not be altered by tool. *) Adding the ability to sort the different columns of data. This seems to be in high demand, especially for people working with large config files. *) Fixing the bug where empty elements are produced. For instance, if you add a property to a forward and then don't set it's name or value the tool generates a tag like this: . This shouldn't happen in my opinion. Not sure if it breaks Struts or not, but it's useless. *) When something is deleted from a table the previous row should be highlighted. *) Get the "Data Sources" tab/screen working. I'm sure people want to be able to edit "all" of their config files :) *) Add the ability to view (and eventually edit) the config file source from the tool. *) etc. etc. etc. Keep sending the ideas/requests! Any ideas on what might be added/changed in the Struts 1.1 DTD? After having spent much time working with the DTD now I can see there are some changes that would be nice. Is workflow supposed to be part of Struts 1.1? 1.1 timeframe? -james --- Ted Husted <[EMAIL PROTECTED]> wrote: > James Holmes wrote: > > Maybe the tool will be of more use to you when I > add > > some more functionality. Ideally I'd like to have > > "wizards" for common tasks. For instance a Wizard > to > > create a new form bean class from a JSP, etc. > > Perhaps you could join this idea with the Struts > CodeMaker. Ravi has > started work on a XML format for defining a Struts > application, and > writing the code skeleton. > > http://husted.com/about/struts/codemaker.htm > > It can also generate classes from JSPs, as you > mentioned, James. Being > able to use things like the CodeMaker from Struts > Console would super! > > We do really need to tweak the Struts configuration > format in the 1.1 > timeframe so that it is easier to merge > configuration files. We need to > specifically address team programming issues, so > that teams can work on > different parts of an application at the same time, > and not step on each > other when it comes to the config file. I just > wanted to mention that in > case it affects your design, James. > > I believe the way to do this would be to add a root > element, > and then allow multiple elements > within that. Some > initial research has been done on this, but I hear > not everyone can get > this to work. > > http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10052.html > > Meanwhile, the Digester can in fact write XML. > > Take a look at the Channel and Item beans in the RSS > package ;-) I have > in fact used these beans to write XML via the > Digester. (Praise be to > Craig!) > > I don't know what you are doing "under the hood", > but beans for each of > the elements, as done with the RSS Channel, would be > a great way to go. > > Of course, we all very much hope that you will be > able to release this a > ASF license soon. Of course, you can always change > your mind later, so > there really isn't any downside ;-) > > -- Ted Husted, Husted dot Com, Fairport NY USA. > -- Custom Software ~ Technical Services. > -- Tel +1 716 737-3463 > -- http://www.husted.com/about/struts/ __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/
RE: Struts ok in VAJ but not working in WAS 3.5.4
also have a look at this http://www7.software.ibm.com/vad.nsf/Data/Document2558?OpenDocument&SubMast= 1 Fari Partovi > -- > From: Adam Smith[SMTP:[EMAIL PROTECTED]] > Sent: 14 September 2001 16:09 > To: [EMAIL PROTECTED] > Subject: RE: Struts ok in VAJ but not working in WAS 3.5.4 > > > It looks like the following page might address your problem: > > http://jakarta.apache.org/struts/installation-was352-x.html > > > -Original Message- > From: Henry Tong [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 14, 2001 10:24 AM > To: [EMAIL PROTECTED] > Subject: Struts ok in VAJ but not working in WAS 3.5.4 > > > Hello: > > please can somebody tell me how to make a struts application work in > Websphere Application Server 3.5.4? > > I created a web application with Struts in VAJ 3.5.3, and it works > fine there with Websphere Test Environmet... so now I want to move it > to production (WAS) but all I get is error messages in stdout.log: > > "ervletInstan X Uncaught init() exception thrown by servlet {0}: {1} > "action" > javax.servlet.ServletException: > Parsing error processing resource path /WEB-INF/struts-config.xml" > > "Cannot find key org.apache.struts.MESSAGE" > > please somebody help me! > > Henry Tong > >
Hello..
Hi Marcel, This is Venkat,I got you mail id from the Struts user subscription. I need some help regarding startus tutorials. I just started working on Struts framework.I a trying to find out a tutorial for this frame work.I couldn't find it out. If you have any idea could you plese help me how/where to find out the tutorials. Thanks, Venkat
RE: Struts ok in VAJ but not working in WAS 3.5.4
It looks like the following page might address your problem: http://jakarta.apache.org/struts/installation-was352-x.html -Original Message-From: Henry Tong [mailto:[EMAIL PROTECTED]]Sent: Friday, September 14, 2001 10:24 AMTo: [EMAIL PROTECTED]Subject: Struts ok in VAJ but not working in WAS 3.5.4 Hello: please can somebody tell me how to make a struts application work in Websphere Application Server 3.5.4? I created a web application with Struts in VAJ 3.5.3, and it works fine there with Websphere Test Environmet... so now I want to move it to production (WAS) but all I get is error messages in stdout.log: "ervletInstan X Uncaught init() exception thrown by servlet {0}: {1} "action" javax.servlet.ServletException: Parsing error processing resource path /WEB-INF/struts-config.xml" "Cannot find key org.apache.struts.MESSAGE" please somebody help me! Henry Tong
Re: [ANNOUNCE] Struts Console
James Holmes wrote: > Maybe the tool will be of more use to you when I add > some more functionality. Ideally I'd like to have > "wizards" for common tasks. For instance a Wizard to > create a new form bean class from a JSP, etc. Perhaps you could join this idea with the Struts CodeMaker. Ravi has started work on a XML format for defining a Struts application, and writing the code skeleton. http://husted.com/about/struts/codemaker.htm It can also generate classes from JSPs, as you mentioned, James. Being able to use things like the CodeMaker from Struts Console would super! We do really need to tweak the Struts configuration format in the 1.1 timeframe so that it is easier to merge configuration files. We need to specifically address team programming issues, so that teams can work on different parts of an application at the same time, and not step on each other when it comes to the config file. I just wanted to mention that in case it affects your design, James. I believe the way to do this would be to add a root element, and then allow multiple elements within that. Some initial research has been done on this, but I hear not everyone can get this to work. http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10052.html Meanwhile, the Digester can in fact write XML. Take a look at the Channel and Item beans in the RSS package ;-) I have in fact used these beans to write XML via the Digester. (Praise be to Craig!) I don't know what you are doing "under the hood", but beans for each of the elements, as done with the RSS Channel, would be a great way to go. Of course, we all very much hope that you will be able to release this a ASF license soon. Of course, you can always change your mind later, so there really isn't any downside ;-) -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/about/struts/
Struts ok in VAJ but not working in WAS 3.5.4
Hello: please can somebody tell me how to make a struts application work in Websphere Application Server 3.5.4? I created a web application with Struts in VAJ 3.5.3, and it works fine there with Websphere Test Environmet... so now I want to move it to production (WAS) but all I get is error messages in stdout.log: "ervletInstan X Uncaught init() exception thrown by servlet {0}: {1} "action" javax.servlet.ServletException: Parsing error processing resource path /WEB-INF/struts-config.xml" "Cannot find key org.apache.struts.MESSAGE" please somebody help me! Henry Tong
Re:
I've subclassed the ImgTag from Struts and created my own custom tag for doing this kind of thing. I gave some code examples of it in a past message to this list that you could find in the archives. Erik - Original Message - From: "Thierry Cools" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 14, 2001 6:38 AM Subject:
Re:
I've subclassed the ImgTag from Struts and created my own custom tag for doing this kind of thing. I gave some code examples of it in a past message to this list that you could find in the archives. Erik - Original Message - From: "Thierry Cools" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 14, 2001 6:38 AM Subject:
Re: AW: [ANNOUNCE] Struts Console
The Struts Console currently only works with the standard Struts distribution code and the struts-config_1_0.dtd. You are correct in assuming that it will not work if you make your own DTD and add your own tags. I would have to think this scenario is rare, but I have been wrong in the past. I fully intend to release the source soon. I want to stabilize the software more before I do so. I also want to select the right open source license. Hopefully the ASF license. Thanks, -james --- "D. Veniseleas" <[EMAIL PROTECTED]> wrote: > Hi, > > nice tool. but some questions: > 1. the struts-GUI, how does it get the > meta-information about my personal > "mystruts-myconfig.xml"? > If I extend the basic Struts-classes and make my > own struts-config-file, with more kinds of > parameters, then this GUI would be a help? > Or would I have to extend the "Struts-GUI" also. In > that case, > you should release the source-code *early*. > > 2. From an aesthetic point of view, I would prefer a > struts-based struts-editor. > > ;-) > > > Dimitris > > > > -Ursprüngliche Nachricht- > > Von:James Holmes [SMTP:[EMAIL PROTECTED]] > > Gesendet am:Freitag, 14. September 2001 14:59 > > An: [EMAIL PROTECTED] > > Betreff:Re: [ANNOUNCE] Struts Console > > > > Good morning Jishan. Great suggestion. In fact, > I am > > working on this functionality today and this > weekend. > > Hopefully I will have a new release out Monday or > > sooner with this in it. > > > > Stay tuned. > > > > Thanks, > > > > -james > > > > > > --- Jishan Li <[EMAIL PROTECTED]> wrote: > > > Hi, James! > > > It is fine. I have a suggestion, it would be > nice if > > > you can make it sort the actions. Because the > > > actions may be a good many, to find an action in > a > > > disorder list is difficult. :) > > > > > > Regards. > > > Jishan. > > > > > > - Original Message - > > > From: <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Thursday, September 13, 2001 10:38 PM > > > Subject: Re: [ANNOUNCE] Struts Console > > > > > > > > > > I concur that this is off to a nice start and > > > should be useful to many people. > > > > > > > > If you want to tailor the EOL for the > particular > > > platform (you may already know this) you can > append > > > > System.getProperties().getProperty("line.separator") > > > to the end of each line instead of hardcoding > '\n' > > > or "\r\n". > > > > > > > > On Thu, 13 September 2001, Bill Clinton wrote: > > > > > > > > > > > > > > Hello, > > > > > It ran fine under Redhat 7.1, other > than a > > > bunch of missing font > > > > > messages. I personally did not like the way > it > > > reformatted my entire > > > > > struts-config. Could this be because it is > not > > > interpreting unix text > > > > > file format correctly, or does it do this on > > > windows too? Also, it put > > > > > a bunch of ^Ms in my file which is an > annoying, > > > but somewhat common > > > > > occurance when viewing dos/windoze text > files in > > > unix. > > > > > I personally would not have any need > for a > > > program like this. I am > > > > > more comfortable editing a well commented > xml > > > file. But everbody is > > > > > different and many people might find this > very > > > useful. It looks like > > > > > you have done a very nice job so far - keep > up > > > the good work! > > > > > > > > > > Bill > > > > > > > > > > James Holmes wrote: > > > > > > > > > > >I have put together a GUI for Struts called > > > Struts > > > > > >Console. Struts Console is a Java Swing > based > > > > > >application for managing Struts > configuration > > > files. > > > > > > > > > > > >Struts Console is availbale at: > > > > > >http://www.geocities.com/jholmes612/ > > > > > > > > > > > >Just unpack the zip file and view the > README > > > for > > > > > >details on running Struts Console. > > > > > > > > > > > >I'd like to get people's feedback and find > out > > > what > > > > > >they like/dislike, what they would > add/remove > > > or > > > > > >anything else you think about the tool. > > > > > > > > > > > >I'd like to see this tool evolve into "the" > > > struts GUI > > > > > >app and be part of the standard struts > > > distribution. > > > > > > > > > > > >Thanks, > > > > > > > > > > > >James Holmes > > > > > >[EMAIL PROTECTED] > > > > > > > > > > > > > > > >__ > > > > > >Do You Yahoo!? > > > > > >Get email alerts & NEW webcam video instant > > > messaging with Yahoo! Messenger > > > > > >http://im.yahoo.com > > > > > > > > > > > >. > > > > > > > > > > > > > > -- > > > > Steven Valin > > > > [EMAIL PROTECTED] > > > ?(¹?¡¢??·*.úÞ{&¡¢?(?§]ë,jØm¶Yÿ?¨¥É¨h¡Ê& > > > > > > __ > > Terrorist Attacks on U.S. - How can you help? > > Donate cash, emergency relief information > > http://dailynews.yahoo.com/fc/US/Emergency_Information/ __
struts-user@jakarta.apache.org
Hi, after a long absence, I'm back again in the struts world ;-) I have the following problem, I'd like to add an image on my page, where the name of this image is stored in the database ( not the image itself, just the pathlocation and the name); So I've a form bean with a 'getImagePath()' method that returns a String. But the name & property attributes in the img tag are already reserved for multiple parameters, so, the question is, how can I get my Image coming from my get method, without using scriptlets and all that stuff ? Thanks for your help, Thierry
multibox and reset()
Hi! I am having trouble resetting a StringArray that is connected to a -tag. HTML-Example: Corresponding ActionForm: public class MapForm extends ActionForm { private String[] _on = new String[0]; public void reset() { _on = new String[0]; } public void setLayer(String in) { _on = in; } public String[] getLayer() { return _on; } } The Manual told me to use the reset()-method to set The Array to the length 0, but reset() is never called. Dirk
AW: [ANNOUNCE] Struts Console
Hi, nice tool. but some questions: 1. the struts-GUI, how does it get the meta-information about my personal "mystruts-myconfig.xml"? If I extend the basic Struts-classes and make my own struts-config-file, with more kinds of parameters, then this GUI would be a help? Or would I have to extend the "Struts-GUI" also. In that case, you should release the source-code *early*. 2. From an aesthetic point of view, I would prefer a struts-based struts-editor. ;-) Dimitris > -Ursprüngliche Nachricht- > Von: James Holmes [SMTP:[EMAIL PROTECTED]] > Gesendet am: Freitag, 14. September 2001 14:59 > An: [EMAIL PROTECTED] > Betreff: Re: [ANNOUNCE] Struts Console > > Good morning Jishan. Great suggestion. In fact, I am > working on this functionality today and this weekend. > Hopefully I will have a new release out Monday or > sooner with this in it. > > Stay tuned. > > Thanks, > > -james > > > --- Jishan Li <[EMAIL PROTECTED]> wrote: > > Hi, James! > > It is fine. I have a suggestion, it would be nice if > > you can make it sort the actions. Because the > > actions may be a good many, to find an action in a > > disorder list is difficult. :) > > > > Regards. > > Jishan. > > > > - Original Message - > > From: <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Thursday, September 13, 2001 10:38 PM > > Subject: Re: [ANNOUNCE] Struts Console > > > > > > > I concur that this is off to a nice start and > > should be useful to many people. > > > > > > If you want to tailor the EOL for the particular > > platform (you may already know this) you can append > > System.getProperties().getProperty("line.separator") > > to the end of each line instead of hardcoding '\n' > > or "\r\n". > > > > > > On Thu, 13 September 2001, Bill Clinton wrote: > > > > > > > > > > > Hello, > > > > It ran fine under Redhat 7.1, other than a > > bunch of missing font > > > > messages. I personally did not like the way it > > reformatted my entire > > > > struts-config. Could this be because it is not > > interpreting unix text > > > > file format correctly, or does it do this on > > windows too? Also, it put > > > > a bunch of ^Ms in my file which is an annoying, > > but somewhat common > > > > occurance when viewing dos/windoze text files in > > unix. > > > > I personally would not have any need for a > > program like this. I am > > > > more comfortable editing a well commented xml > > file. But everbody is > > > > different and many people might find this very > > useful. It looks like > > > > you have done a very nice job so far - keep up > > the good work! > > > > > > > > Bill > > > > > > > > James Holmes wrote: > > > > > > > > >I have put together a GUI for Struts called > > Struts > > > > >Console. Struts Console is a Java Swing based > > > > >application for managing Struts configuration > > files. > > > > > > > > > >Struts Console is availbale at: > > > > >http://www.geocities.com/jholmes612/ > > > > > > > > > >Just unpack the zip file and view the README > > for > > > > >details on running Struts Console. > > > > > > > > > >I'd like to get people's feedback and find out > > what > > > > >they like/dislike, what they would add/remove > > or > > > > >anything else you think about the tool. > > > > > > > > > >I'd like to see this tool evolve into "the" > > struts GUI > > > > >app and be part of the standard struts > > distribution. > > > > > > > > > >Thanks, > > > > > > > > > >James Holmes > > > > >[EMAIL PROTECTED] > > > > > > > > > > > >__ > > > > >Do You Yahoo!? > > > > >Get email alerts & NEW webcam video instant > > messaging with Yahoo! Messenger > > > > >http://im.yahoo.com > > > > > > > > > >. > > > > > > > > > > > -- > > > Steven Valin > > > [EMAIL PROTECTED] > > ?(¹?¡¢??·*.úÞ{&¡¢?(?§]ë,jØm¶Yÿ?¨¥É¨h¡Ê& > > > __ > Terrorist Attacks on U.S. - How can you help? > Donate cash, emergency relief information > http://dailynews.yahoo.com/fc/US/Emergency_Information/
Re: HTML:OPTIONS
I figured it out. I need to have an intermediate "bean" to hold the values. Thanks for you help. I do think it would be very helpfull if an options tag where passed only collection it call the toString method. At least things wouldn't blow up. In a great many cases that would be the simplest thing. Thank you, Chris Princeton Lau wrote: > Chris, > > What sort of errors are you getting? > > Below is a reprint of a message I posted a few weeks ago. I believe it > addresses a similar question. > > Princeton > > Re: html:options not understanding collections from form beans? > > > > > From: Princeton Lau > Subject: Re: html:options not understanding collections from form beans? > Date: Fri, 17 Aug 2001 10:14:38 -0700 > > > > > Hello, > > I struggled with the options tag because I did not understand what it meant > by 'collection'. I could not pass a collection along with a request because > I was at my index page. In other words, nothing had been done yet. > > I instantiated the bean that had the collection and then used a .../> to make the collection visible to the options tag. > > This is a sample define statement for a bean named Cost, with an ArrayList > (an array of costCentre objects) called costCentres. > > > I then reference it in my form via: > . > . > . > > labelProperty="label"/> > > . > . > . > > I hope this helps. > > Princeton > > -Original Message- > From: Chris Heinemann [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 13, 2001 1:23 PM > To: Struts User Group > Subject: HTML:OPTIONS > > I have a collection of java.lang.String objects. How do I get the > html:options tag to output them? > > My code is : > <% > Collection c = reportBuilder.getAvailableStartDates(); > pageContext.setAttribute("availStartDates",c); > %> > > type='ReportBuilderActionForm' scope='session' > > value='<%=reportBuilder.getStartWeek()%>' > > <% > try{ > > //I know this is where things are breaking I have tried serval > variations to no avail > %> > > <%}catch (Exception h){ > h.printStackTrace(); //because things don't work... this might give a > clue :( > } > %> > > > > Thanks, > Chris Heinemann
Re: [ANNOUNCE] Struts Console
Good morning Jishan. Great suggestion. In fact, I am working on this functionality today and this weekend. Hopefully I will have a new release out Monday or sooner with this in it. Stay tuned. Thanks, -james --- Jishan Li <[EMAIL PROTECTED]> wrote: > Hi, James! > It is fine. I have a suggestion, it would be nice if > you can make it sort the actions. Because the > actions may be a good many, to find an action in a > disorder list is difficult. :) > > Regards. > Jishan. > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, September 13, 2001 10:38 PM > Subject: Re: [ANNOUNCE] Struts Console > > > > I concur that this is off to a nice start and > should be useful to many people. > > > > If you want to tailor the EOL for the particular > platform (you may already know this) you can append > System.getProperties().getProperty("line.separator") > to the end of each line instead of hardcoding '\n' > or "\r\n". > > > > On Thu, 13 September 2001, Bill Clinton wrote: > > > > > > > > Hello, > > > It ran fine under Redhat 7.1, other than a > bunch of missing font > > > messages. I personally did not like the way it > reformatted my entire > > > struts-config. Could this be because it is not > interpreting unix text > > > file format correctly, or does it do this on > windows too? Also, it put > > > a bunch of ^Ms in my file which is an annoying, > but somewhat common > > > occurance when viewing dos/windoze text files in > unix. > > > I personally would not have any need for a > program like this. I am > > > more comfortable editing a well commented xml > file. But everbody is > > > different and many people might find this very > useful. It looks like > > > you have done a very nice job so far - keep up > the good work! > > > > > > Bill > > > > > > James Holmes wrote: > > > > > > >I have put together a GUI for Struts called > Struts > > > >Console. Struts Console is a Java Swing based > > > >application for managing Struts configuration > files. > > > > > > > >Struts Console is availbale at: > > > >http://www.geocities.com/jholmes612/ > > > > > > > >Just unpack the zip file and view the README > for > > > >details on running Struts Console. > > > > > > > >I'd like to get people's feedback and find out > what > > > >they like/dislike, what they would add/remove > or > > > >anything else you think about the tool. > > > > > > > >I'd like to see this tool evolve into "the" > struts GUI > > > >app and be part of the standard struts > distribution. > > > > > > > >Thanks, > > > > > > > >James Holmes > > > >[EMAIL PROTECTED] > > > > > > > > >__ > > > >Do You Yahoo!? > > > >Get email alerts & NEW webcam video instant > messaging with Yahoo! Messenger > > > >http://im.yahoo.com > > > > > > > >. > > > > > > > > -- > > Steven Valin > > [EMAIL PROTECTED] > (¹¡¢·*.úÞ{&¡¢(§]ë,jØm¶ÿ¨¥É¨h¡Ê& __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/
Pro-Active Response For Our Nations Youth
Dear Educator, Columbine (Littleton, CO)Jonesboro, ARWest Paducah, KYPearl, MS... Immediately, you know why these places are linked together. The names of these schools are forever burned into our memories and the national conscience... Are you concerned about the rising number of incidents of violence in our schools? Would you like to lower the probabilty of such an incident from occuring at your school? Would you like to help our children better cope with the pressures of modern life - helping to prevent issues such as substance abuse, teen pregnancy and suicide? If you answered yes to any of these questions - then read on. The Resilient Kids CD ROM Program is used in schools, churches, and homes to teach optimism, coping skills, and personal mastery and helps to prevent depression in young people. This program, launched in April 2000, is now in over 1,000 primary and secondary schools across Australia. With its light-hearted, interactive approach, the Resilient Kids CD ROM Program strives to achieve the following objectives: - Reducing the incidence of suicide in the young by teaching primary prevention strategies. - Teaching children how to evaluate their automatic thoughts and to re-look at failures or set-backs as challenges to be reacted to with activity and hope. - Teaching parents how to help their children achieve self-esteem through personal mastery. - Creating a sense of belonging through parents and school working together for the childs well being. - Equipping older teenagers with ideas and skills for managing the transition from adolescence to adulthood and handling typical stressful situations. - Taking a serious problem and making it easy to communicate and fun to learn through interactivity. The program's success is due to: - A clear format for instant implementation - Colorful, fun-filled interactive material suitable for all reading ages and learning abilities - Practicality. It will not burden crowded curriculums or overload teachers - A built-in, prepared parent education component Resilience Training - the most effective way for both primary and secondary schools to address the serious social problems of depression, suicide and substance abuse. Take advantage of this unique program and teach your students how to "bounce back positively." Resilient Kids is a positive, effective and enjoyable prevention program for your school community. Please visit us at http://www.resilientkids.net or call for more information about ordering online, our parent/teacher resiliency seminars, or our newly released parent CD package. To order, simply go to http://www.resilientkids.net and order online. You can email [EMAIL PROTECTED] if you have any questions or to request an order form. To reach us by phone, call (501) 267-3710 or fax (501) 267-1283. We accept all major credit cards. Products may be sold within a school (e.g. Parents) at cost, but not outside the school. All Programs may be ordered on approval at no charge, to be paid for or returned (customer to pay return freight) within 2 school weeks in new condition. If not returned, full purchase price will be due and payable. ** Under Bill s.1618 TITLE III passed by the 105th US Congress this letter cannot be considered spam as long as the sender includes contact information and a method of removal. You have received this email as you are believed to be in the educational field. If you feel you received this email in error, please visit http://www.resilientkids.net/remove to have your email address permanently removed from our database.
multiple tags how to differentiate?
Hi! What are the names of the Methods in the ActionForm that are called if I have more than one in my form. I know that setX() and setY() are called if I set the property of the -tag to "". But how can I detect which button was hit? Example: The request contains the attributes: buttonImage1.x, buttonImage1.y and buttonImage2.x, buttonImage2.y. What are the names of the Methods in the ActionForm? I need to know which button was hit. Dirk
Re: AW: Implement menu into Struts ( Newbie question )
Thanks, I will have a look. Regards >> Original Message << On 9/14/01, 1:59:14 PM, juraj Lenharcik <[EMAIL PROTECTED]> wrote regarding AW: Implement menu into Struts ( Newbie question ): > hi claudio, > i think it is of course the best way to do it with your ActionBean. it > exists a struts based taglib collection named struts light > http://struts.application-servers.com/ . theres a menu implemented in struts > and jsp. i think it is exactly tat, what you need. i tried the menu some > time ago, but i had problems to run it, when you have a hierarchical > structure with a deep more than two. but for a simple use it should suffice. > juraj > -Ursprüngliche Nachricht- > Von: Claudio Parnenzini [mailto:[EMAIL PROTECTED]] > Gesendet: Freitag, 14. September 2001 13:52 > An: [EMAIL PROTECTED] > Betreff: Implement menu into Struts ( Newbie question ) > Hi all, > I would like to know how is the best way to implement a standard menu > wrote in Javascript with Struts. My web application have a top frame that > contains my menu, when you click on to an item, I would like to call a > jsp page ( Targeted into the body frame ) that display data from a DB. > Is the best way to do it by calling an Action class that take data from > the DB and after call the JSP page ? > Or is there an other way to do it??? > Any link or example are really appreciate. > Regards > Claudio Parnenzini
AW: Implement menu into Struts ( Newbie question )
hi claudio, i think it is of course the best way to do it with your ActionBean. it exists a struts based taglib collection named struts light http://struts.application-servers.com/ . theres a menu implemented in struts and jsp. i think it is exactly tat, what you need. i tried the menu some time ago, but i had problems to run it, when you have a hierarchical structure with a deep more than two. but for a simple use it should suffice. juraj -Ursprüngliche Nachricht- Von: Claudio Parnenzini [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 14. September 2001 13:52 An: [EMAIL PROTECTED] Betreff: Implement menu into Struts ( Newbie question ) Hi all, I would like to know how is the best way to implement a standard menu wrote in Javascript with Struts. My web application have a top frame that contains my menu, when you click on to an item, I would like to call a jsp page ( Targeted into the body frame ) that display data from a DB. Is the best way to do it by calling an Action class that take data from the DB and after call the JSP page ? Or is there an other way to do it??? Any link or example are really appreciate. Regards Claudio Parnenzini
ActionForm question
Title: ActionForm question I'm used to work with struts end to handle form's field value I usually build an ActionForm with the corrisponding getters and setters.. But this time I have a form to wich the user can add new fields on line, for example.. [xxx] [yy] [+] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [] [z] [+] this is the optional field - - - - - - - - - - - - - - - - - - - - - - - - - - - - - How can I build an action form that can handle this tipe of dinamic form (there is no growth limit) Thanks Filippo Fratoni Sapient Via Crocefisso 19, Milan, 20122, Italy cell:+39.338.1018462 wrk:+39.02.58217.312
Implement menu into Struts ( Newbie question )
Hi all, I would like to know how is the best way to implement a standard menu wrote in Javascript with Struts. My web application have a top frame that contains my menu, when you click on to an item, I would like to call a jsp page ( Targeted into the body frame ) that display data from a DB. Is the best way to do it by calling an Action class that take data from the DB and after call the JSP page ? Or is there an other way to do it??? Any link or example are really appreciate. Regards Claudio Parnenzini
PropertyMessageResources Err
HI all, I am getting PropertyMessageResources error. can anybody tell me why it is happening i m using Tomcat 3.2.3 struts 1.0 without any patch. Thanks in advance, Parag. Error: 500 Location: /LSPDev/jsp/index.jsp Internal Servlet Error: javax.servlet.ServletException: org.apache.struts.util.PropertyMessageResources at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at jsp._0002fjsp_0002findex_0002ejspindex_jsp_43._jspService(_0002fjsp_0002find ex_0002ejspindex_jsp_43.java:1151) 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$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherIm pl.java:222) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl .java:162) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.ClassCastException: org.apache.struts.util.PropertyMessageResources at org.apache.struts.util.RequestUtils.message(RequestUtils.java:565) at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:239) at jsp._0002fjsp_0002findex_0002ejspindex_jsp_43._jspService(_0002fjsp_0002find ex_0002ejspindex_jsp_43.java:95) 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$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherIm pl.java:222) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl .java:162) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.Co
Image Handling through Struts.
Hi Everybody, I've got an application, using struts, which has the following requirement: "It needs to upload an a image file from the user and should display on the same page." One constraint is it should not store the file in servers directory temporarily. Of course it can be store in any database/memory and retrieve the same back to page. Again while getting it back it is should not be stored temporarily anywhere. Any help or code snippets will be greatly appreciated. Thank you, Bala subrahmanyam Pasumarthy ** Sr. Consultant Zensar Technologies Ltd, Ph: 91-20-6684001 extn 612 9822114193 (mobile) ***
Re: [ANNOUNCE] Struts Console
Hi, James! It is fine. I have a suggestion, it would be nice if you can make it sort the actions. Because the actions may be a good many, to find an action in a disorder list is difficult. :) Regards. Jishan. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 13, 2001 10:38 PM Subject: Re: [ANNOUNCE] Struts Console > I concur that this is off to a nice start and should be useful to many people. > > If you want to tailor the EOL for the particular platform (you may already know >this) you can append System.getProperties().getProperty("line.separator") to the end >of each line instead of hardcoding '\n' or "\r\n". > > On Thu, 13 September 2001, Bill Clinton wrote: > > > > > Hello, > > It ran fine under Redhat 7.1, other than a bunch of missing font > > messages. I personally did not like the way it reformatted my entire > > struts-config. Could this be because it is not interpreting unix text > > file format correctly, or does it do this on windows too? Also, it put > > a bunch of ^Ms in my file which is an annoying, but somewhat common > > occurance when viewing dos/windoze text files in unix. > > I personally would not have any need for a program like this. I am > > more comfortable editing a well commented xml file. But everbody is > > different and many people might find this very useful. It looks like > > you have done a very nice job so far - keep up the good work! > > > > Bill > > > > James Holmes wrote: > > > > >I have put together a GUI for Struts called Struts > > >Console. Struts Console is a Java Swing based > > >application for managing Struts configuration files. > > > > > >Struts Console is availbale at: > > >http://www.geocities.com/jholmes612/ > > > > > >Just unpack the zip file and view the README for > > >details on running Struts Console. > > > > > >I'd like to get people's feedback and find out what > > >they like/dislike, what they would add/remove or > > >anything else you think about the tool. > > > > > >I'd like to see this tool evolve into "the" struts GUI > > >app and be part of the standard struts distribution. > > > > > >Thanks, > > > > > >James Holmes > > >[EMAIL PROTECTED] > > > > > >__ > > >Do You Yahoo!? > > >Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger > > >http://im.yahoo.com > > > > > >. > > > > > -- > Steven Valin > [EMAIL PROTECTED] ¡.a¨h gÊ«~·É¨h¡Ê&i×kz˶m§ÿæj)rj(r
Using indexes in tags
Hi all, I'm relatively new to struts, but I've managed to get a simple application going. I am passing an 'index' request parameter to a simple jsp View a Task <% int ind = Integer.parseInt(request.getParameter("index")); %> Summary: <%= tasks.getTask(ind).getSummary() %> OpenDate: <%= tasks.getTask(ind).getOpenDate() %> TargetDate: <%= tasks.getTask(ind).getTargetDate() %> Description: <%= tasks.getTask(ind).getDescription() %> This works fine. But what I wanted to be able to do was something like Summary: This fails with a complaint Error Message: Invalid indexed property 'task[ind]' Error Code: 500 Target Servlet: null Error Stack: java.lang.IllegalArgumentException: Invalid indexed property 'task[ind]' Is there a nice way to use struts tags to do this, rather than the ugly scriptlets? Or is there a totally different way to achieve this same result that is more struts friendly? Thanks, Gollo.
AW: AW: Bug in Struts validator !
no problem ;-) -Ursprüngliche Nachricht- Von: David Winterfeldt [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 13. September 2001 17:58 An: [EMAIL PROTECTED] Betreff: Re: AW: Bug in Struts validator ! My bad. I'm blind. I'll fix it and check it into CVS. David --- juraj Lenharcik <[EMAIL PROTECTED]> wrote: > when i set the locale for germany , the fromatter > object is still null after > the check. i set this line: > > formatter = > DateFormat.getDateInstance(DateFormat.SHORT, > locale); > > instead of: > DateFormat.getDateInstance(DateFormat.SHORT, > locale); > > after this the formatter object was written and is > not null. > > > juraj > > -Ursprüngliche Nachricht- > Von: David Winterfeldt > [mailto:[EMAIL PROTECTED]] > Gesendet: Donnerstag, 13. September 2001 16:41 > An: [EMAIL PROTECTED] > Betreff: Re: Bug in Struts validator ! > > > I don't see that you changed anything except to add > braces around the if statement. It already checks > if > the locale is null and uses the default locale if it > is null. Am I missing what you changed? > > David > > --- juraj Lenharcik <[EMAIL PROTECTED]> > wrote: > > hi all, > > > > In the class GenericValidator, when you use an > > another locale than the > > default you get a null pointer exception. i tried > it > > with the german locale > > settings. i fixed the bug in this lines: > > > > DateFormat formatter = null; > > if (locale != null){ > > ==> formatter = > > DateFormat.getDateInstance(DateFormat.SHORT, > > locale); > > }else{ > > ==> formatter = > > DateFormat.getDateInstance(DateFormat.SHORT, > > Locale.getDefault()); > > } > > formatter.setLenient(false); > > > > can someone change it and check it into the cvs? > > > > > > thanks & bye > > juraj > > > > > __ > Terrorist Attacks on U.S. - How can you help? > Donate cash, emergency relief information > http://dailynews.yahoo.com/fc/US/Emergency_Information/ __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/