RE: Problems with iterate
Here is a working example of nested properties in an iterator. All I need is an indexed getter and setter for address in my testBean.( getAddress(int index) ) % String propertyValue = null;% logic:iterate id=address name=testBean property=addresses indexId=addressIndex tr td valign=top Index #[bean:write name=addressIndex/] /td td table border=0 tr thStreet:/th td % propertyValue = address[ + addressIndex + ].street; % html:text property=%=propertyValue%/ /td /tr tr thZip Code:/th td % propertyValue = address[ + addressIndex + ].zipCode; % html:text property=%=propertyValue%/ /td /tr /table /td /tr /logic:iterate /Peter -Original Message- From: Torsten Terp [mailto:[EMAIL PROTECTED]] Sent: den 1 juli 2001 20:01 To: Struts user list Subject: Problems with iterate Hi, Sorry if this has been answered before, but i havent been able to find an answer! Im using iterate to display a vector containg valueobjects, i.e., html:form action=showContacts logic:iterate id=contacts name=form property=contactDataVector html:hidden name=contacts property=contactId/ tr td width=150 html:text name=contacts property=firstName size=20/ /td td width=150 html:text name=contacts property=lastName size=20/ /td /tr ... ... 'form' is my struts form bean, 'contactDataVector' is a vector of 'contactData' objects each containing (among others) the variables 'firstName' and 'lastName'. There is no problem in displaying the data, all goes well, but updating fields in the form is not working, when i want to save the changes in the struts action the vector is null! I can see that making a variable 'firstName' in the form, results in a call to its setter method, i.e., i can make it work when updating a single row, but i cant manage to get the update to work on the actual contactData objects in the vector. ?!?! Any advices out there?? ^terp
RE: Re: Error - MultipartIterator: no multipart request data sent
Hello, It seems to work like that. But as you wrote, if the redirect attribute is set to 'true', it is cleaning all the attributes in request. I had put my attributes in session instead of request. Anyway, Thanks a lot. Regards Nuray -Original Message- From: mikael.eriksson [mailto:[EMAIL PROTECTED]] Sent: Montag, 2. Juli 2001 00:18 To: struts-user Subject: Re: Error - MultipartIterator: no multipart request data sent Hello I noticed the same problem when moving to 1.0. It seems that the requesthandler notices that the request is a multi-part and tries to find the multi-part data, even when the request are already handled and you are only forwarding to the next action. (I only got the problem when going to another action.) The way I handled it was to set redirect=true in struts-config.xml for the action that I forwarded to, this made the multi-part info go away from the request (and all other parameters too of course, so if you are expecting request parameters in the next action this will not work.) I guess this could be fixed in the code too, maybe by having the request reader setting a request attribute so that it knows the next time that it already has gotten the data. But I did not go deep enough into the code to know if that is feasible or not. Regards Mikael [EMAIL PROTECTED] wrote: Hi everbody, I am writing a program that needs to process form data. I have an uploadForm (that is an insatance of org.apache.struts.action.ActionForm). I have no problem with uploading a file via this form. After uploading the file, I am executing a couple of procedures inside the uploadAction(instance of org.apache.struts.action.Action) and afterwards forwarding the request to another page. While it is forwarding the request, it gives the following error: javax.servlet.ServletException: MultipartIterator: no multipart request data sent java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) javax.servlet.ServletException(java.lang.String) void org.apache.struts.upload.MultipartIterator.parseRequest() org.apache.struts.upload.MultipartIterator(javax.servlet.http.HttpServletRequest , int, long, java.lang.String) void org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(javax.servlet .http.HttpServletRequest) void org.apache.struts.util.RequestUtils.populate(java.lang.Object, java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest) void org.apache.struts.action.ActionServlet.processPopulate(org.apache.struts.action. ActionForm, org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletReq uest, javax.servlet.http.HttpServletResponse) void com.ubs.cristal.actions.CristalActionServlet.process(javax.servlet.http.HttpServ letRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequ est, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response) void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response) void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response) void org.apache.tomcat.facade.RequestDispatcherImpl.forward(javax.servlet.ServletRequ est, javax.servlet.ServletResponse) void org.apache.struts.action.ActionServlet.processActionForward(org.apache.struts.ac tion.ActionForward, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletReq uest, javax.servlet.http.HttpServletResponse) void com.ubs.cristal.actions.CristalActionServlet.process(javax.servlet.http.HttpServ letRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequ est, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
Set html:option value with bean:write
Hi all, i want to set the value of html:option to the corresponding currency.id as in the following (broken) jsp segment html:select size=1 property=currency value=bean:write name='merchantForm' property='currency'/ logic:iterate id=currency name=currencyList html:option value=bean:write name='currency' property='id'/bean:write name='currency' property='id'/ /html:option /logic:iterate /html:select Please help ! Quan
RE: Set html:option value with bean:write
Assuming your form is already associated with 'merchantForm' FormBean, and that 'currencyList' is a Collection, try: html:select property=currency html:options collection=currencyList property=id labelProperty=id/ /html:select Mark -Original Message- From: Pham Thanh Quan [mailto:[EMAIL PROTECTED]] Sent: 02 July 2001 09:04 To: [EMAIL PROTECTED] Subject: Set html:option value with bean:write Hi all, i want to set the value of html:option to the corresponding currency.id as in the following (broken) jsp segment html:select size=1 property=currency value=bean:write name='merchantForm' property='currency'/ logic:iterate id=currency name=currencyList html:option value=bean:write name='currency' property='id'/bean:write name='currency' property='id'/ /html:option /logic:iterate /html:select Please help ! Quan *** This email message contains confidential information for the above addressee only. If you are not the intended addressee you must not disclose or use the information in any manner whatsoever. Any opinion or views contained in this email message are those of the sender, do not represent those of the Company in any way and reliance should not be placed upon its contents. Unless otherwise stated this email message is not intended to be contractually binding. Where an Agreement exists between our respective companies and there is conflict between the contents of this email message and the Agreement then the terms of that Agreement shall prevail. Abbey National Treasury Services plc. Registered in England. Registered Office: Abbey House, Baker Street, London NW1 6XL. Company Registration No: 2338548. Regulated by the SFA ***
Re: Set html:option value with bean:write
Hi Mark, I followed your instruction and use the following code but didn't succeed. html:select size=1 property=currency html:options collection=currencyList property=id//html:options /html:select I have the following error: /admin/CreateMerchant.jsp(138): Non-matching extension tags probably occurred due to an error in /admin/CreateMerchant.jsp line 138: html:options name=currency collection=currencyList property=id labelProperty=id//html:options If I use currency.id instead of currency in html:select, I have the same error. I think I should clarify my previous message. html:select size=1 property=currency value=bean:write name='merchantForm' property='currency'/ logic:iterate id=currency name=currencyList html:option value=bean:write name='currency' property='id'/bean:write name='currency' property='id'/ /html:option /logic:iterate /html:select In this JSP segment I want to have select options which are populated by the collection currencyList. This currencyList is actually an Enumeration, not a Collection but I think Enumeration is also supported by Struts. The default value for select is the value of property currency of merchantForm (which is a subclass of ActionForm). What should be done? Thanks in advance. Quan - Original Message - From: Geddes, Mark (ANTS) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 3:05 PM Subject: RE: Set html:option value with bean:write Assuming your form is already associated with 'merchantForm' FormBean, and that 'currencyList' is a Collection, try: html:select property=currency html:options collection=currencyList property=id labelProperty=id/ /html:select Mark -Original Message- From: Pham Thanh Quan [mailto:[EMAIL PROTECTED]] Sent: 02 July 2001 09:04 To: [EMAIL PROTECTED] Subject: Set html:option value with bean:write Hi all, i want to set the value of html:option to the corresponding currency.id as in the following (broken) jsp segment html:select size=1 property=currency value=bean:write name='merchantForm' property='currency'/ logic:iterate id=currency name=currencyList html:option value=bean:write name='currency' property='id'/bean:write name='currency' property='id'/ /html:option /logic:iterate /html:select Please help ! Quan *** This email message contains confidential information for the above addressee only. If you are not the intended addressee you must not disclose or use the information in any manner whatsoever. Any opinion or views contained in this email message are those of the sender, do not represent those of the Company in any way and reliance should not be placed upon its contents. Unless otherwise stated this email message is not intended to be contractually binding. Where an Agreement exists between our respective companies and there is conflict between the contents of this email message and the Agreement then the terms of that Agreement shall prevail. Abbey National Treasury Services plc. Registered in England. Registered Office: Abbey House, Baker Street, London NW1 6XL. Company Registration No: 2338548. Regulated by the SFA ***
RE: Struts Templates Example in VAJ 3.5.3/WTE - Problem
Hi Martin, Did you get to the bottom of this? Which browser are you using? Are any exceptions thrown to your console? It seems strange as I have had templates working fine in the WTE. Jon. -Original Message- From: Martin [mailto:[EMAIL PROTECTED]] Sent: 01 July 2001 21:04 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Struts Templates Example in VAJ 3.5.3/WTE - Problem I have installed the Struts Templates example into VAJ 3.5.3/WTE environment. Have all the required pages and links working, the problem is that the page is not rendered as per the template. The Header, content and footer show up after the Sidebar and start at the left of the page and overlap the bottom of the Sidebar. A sample is attached. Would appreciate feeback on this porblem. Thanks
Re: Struts with different User-Agents
Hi Sean, Check the multi-channel example in Components Framework. It could give you some ideas. In your case, a channel will be the browser type. In this example, a same url map to different views according to user privilege. Mapping is specified in configuration files. There is one default configuration file, and one file for each 'channel' (like for i18n). Channel files can extends default one, allowing to rewrite only what is needed. To adapt the example to your case, you need to write your own DefinitionFactory. You can simply copy or extends the one provided in channel example. Then, overload method getDefinitionsFactoryKey(...), in order to return a String identifying your channel (ex : mozilla_6.0). This string will be used to name your configuration file. This later contains definitions of views, themselves containing real jsp url. Hope this help, Cedric Components sites : http://www.lifl.fr/~dumoulin/components/ (mirror) : http://www.geocities.com/cedricdumoulin/components/ Sean wrote: Hello All, Had a few questions I was looking for some possible help on. I am in the process of developing a web application that needs to render different views based on the users browser type and the version number of that browser. It is pretty easy to parse out the User-Agent field of the HTTP header to get the version and number (with some obvious rules as to parsing order etc. like in the Cocoon Sitemap) The question I have is, does anyone have a redirection/servlet or objects/examples on how this can be done easily from within struts ... after the Form object is created, the action is create, the backend business logic is performed (which will be the same irreguardless of browser), I need to redirect to a different view based on the browser but I still want to submit actions to be common and not reference the new type does anyone have any ideas on this? Obviously this only needs to be done once (determine what view heirarchy to be used) like at login. I was thinking of defining something like this /views/ /default/ /mozilla/6.0 /msie/5.5 /msie/5.0 /mspie/2.0 /avantgo/1.0 etc etc ... if a browser was not explicitly supported it would goto /default ... The input would be somewhere like /control /send/... /retreive/... /login /logout etc etc ... obviously this is the same irreguardless of browser type. Has anyone tried to do this? Have any examples? Or maybe can direct me to something with functionality simular to what I am trying to do? I appreciate the help and can give more detail if needed. Sean P.S. If custom development is needed I would be interested in submitting a reusable framework back into struts if people are interested.
RE: String indexing in beans (was: Global values as Tag parameters... .How???)
I though about using curly braces as well. What stopped me using them was the possible conflict with MessageFormat arguments. It may not be a strong argument, but I still preferred using another pair of symbols. The other reason is because when accessing a Map you call a method and use normal brackets, so I though I would keep the simple idea of [] for arrays and () for maps (even though the semantic is different, one being a real index, and the other a method call). This is actually more or less what you advocate by saying ()=method call, isn't it? I'd love to see this extension incorporated into the commons as well. I think it would just take a few developers/committers supporting this idea. Any other opinion on both of these topics (standardization + integration)? Fr. -Original Message- From: Immanuel, Gidado-Yisa [mailto:[EMAIL PROTECTED]] Sent: 29 June 2001 18:01 To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subject: String indexing in beans (was: Global values as Tag parameters... .How???) For Rey's extensions to PropertyUtils, if I want to traverse my bean-object, I should be able to do something like this: property=report.matrix(Accounts).column(DateCreated).row[1] Rey's extension is great. I would suggest however, replacing the '(' and ')' parenthesis with curly braces: '{' '}'. Just because, I tend to think: () - method/function [] - array index {} - perl-style hash-association My question to the community is, Can we standardise on the convention for string indexing (namely, with regards to delimiters), so that when some of these extensions find there way into tag hanlders like bean:write and bean:define, there will not be any backward compatibility issues? On a related note, any idea what it would take to get extensions such as these incorporated into JakartaCommons.BeanUtils? I'm assuming that Struts will be using the JakartaCommons.BeanUtils as soon as it becomes available; any clarification on this would be helpful. Thanks, Gidado -Original Message- From: Rey Francois [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 2:48 PM To: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Subject: RE: Global values as Tag parametersHow??? I have extended the PropertyUtils so that it can support as well what we call 'string keyed' properties. It's part of the mapper framework I made publicly available recently ( http://www.husted.com/about/struts/resources.htm#extensions http://www.husted.com/about/struts/resources.htm#extensions ). Have look at it and you may be able to do what you want. Fr. -Original Message- From: Calvin Yu [mailto:[EMAIL PROTECTED]] Sent: 27 June 2001 20:51 To: [EMAIL PROTECTED]; Jonathan Subject: Re: Global values as Tag parametersHow??? I imagine you'll have to parse that attribute yourself and use reflection to get that value. I don't think Struts has support for this. It might be difficult to keep it generic however, since I don't think there is way you can access the imports that are declared in a JSP page. Of course, there's always this: html:userTargetedMessages messagesObjectKey=%= Globals.MESSAGES_OBJECT %/ Calvin - Original Message - From: Jonathan mailto:[EMAIL PROTECTED] To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 10:03 AM Subject: Global values as Tag parametersHow??? I am creating a custom Struts tag which needs to search for an object in a HashMap. I want the 'key for the object in the HashMap to be some agreed upon, pre-defined, final global value defined in a file available to the whole application. How do I refer to this value in a Tag attribute? eg. html:userTargetedMessages messagesObjectKey=Globals.MESSAGES_OBJECT/ where Globals.MESSAGES_OBJECT is some static final variable in a file The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com *** The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
RE: Fast Hashmap doubt .
That is not quite correct, since the FastHashMap class delegates all calls to the underlying Hashmap, there are two levels of synchronization, or more accurately, two different object locks that are being manipulated in order to optimize the instance for fast read lookups which won't affect the underlying hash structure. In "fast mode", the get() operation simply calls the get() method on the underlying HashMap instance. Also in fast mode, the put() operation obtains the lock on the FastHashmap instance, not the underlying Hashmap that is being used. Just a guess, but this is to prevent concurrent threads from accessing this particular operation in fast mode, which does simply this: 1) obtain the lock for the FastHashMap instance, 2)clone the underlying java.util.HashMap--this is a shallow clone only, an important point since the put() operation will most likely alter the underlying structure of the hashmap itself including its internal bucket structure, then 3)reassign the internal Hashmap instance to the clone. To answer the original question, 2 and 3 above are done so that threads other than the one executing the put() operation can continue to call the get() method without blocking, which is in essence, a "snapshot" of the hashmap. Since reference assignmentsare atomic within the jvm, you will not get into a situation where a call to get() in one thread is being garbled by the put() in another. The key point is that in fast mode, the get() does not block at all, while the put() locks only the FastHashMap wrapper instance. As soon as the temporary clone assignment back to this.map is executed, all future get() calls will operate on the updated Hashmap. Of course, lots of put() calls will block in fast mode, thus the need to call setFast(true) after you have finished initialization :). Jin -Original Message-From: Calvin Yu [mailto:[EMAIL PROTECTED]]Sent: Monday, July 02, 2001 8:15 AMTo: [EMAIL PROTECTED]; suhasSubject: Re: Fast Hashmap doubt . If you look at FashHashMap.get(Object key), you'll notice that the call tomap.get() is not synchronized. If FashHashMap.put() isn't implemented like this, you'll run into a race condition when one thread calls map.put() and another calls map.get(). Calvin - Original Message - From: suhas To: [EMAIL PROTECTED] Sent: Saturday, July 01, 2000 5:47 AM Subject: Fast Hashmap doubt . I was going through put ( ) and putAll ( ) methods in Fast HashMap code in the struts . But did not get why we need to clone the HashMap and add a entry to that cloned map then move that cloned map to original HashMap . In multi- threaded enviornment anyway we synchronized the code that accesses the HashMap in the put method .. ? public Object put(Object key, Object value) { if (fast) { synchronized (this) { // IF Usynchronize the code like this theneasily only one thread can manipulate the HashMap HashMap temp = (HashMap) map.clone(); // What thisdo then ? Object result = temp.put(key, value); // map = temp;// return (result); } } else { synchronized (map) { return (map.put(key, value)); } } }
pls Help Invalid Package Declartions .java File Wont compile
Hi, Can anyone suggest why i might be recieving the following invalid package declarations. My Path as follows- C:\jakarta-tomcat-3.2.1\webapps\bbnpa\ thus continued- WEB-INF\classes\org\breconbeacons\it\java(classes). Thus i am aware that they haven't compiled to .class file any help would be extremly recieved this has been posted a few times so i assume this is a difficult enquiry . I have ensured the jar files ,tld ( xml ),package title and declarations are in order. So if anyone out there has got a poniters giv's us some hlep Cheers Chuckie -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
Re: pls Help Invalid Package Declartions .java File Wont compile
What is it exactly are you trying to do? Compile? Run a webapp? What is the exact error output you are getting? Calvin - Original Message - From: Chuck Amadi To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 8:30 AM Subject: pls Help Invalid Package Declartions .java File Wont compile Hi, Can anyone suggest why i might be recieving the following invalid package declarations. My Path as follows- C:\jakarta-tomcat-3.2.1\webapps\bbnpa\ thus continued- WEB-INF\classes\org\breconbeacons\it\java(classes). Thus i am aware that they haven't compiled to .class file any help would be extremly recieved this has been posted a few times so i assume this is a difficult enquiry . I have ensured the jar files ,tld ( xml ),package title and declarations are in order. So if anyone out there has got a poniters giv's us some hlep Cheers Chuckie -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
SV: pls Help Invalid Package Declartions .java File Wont compile
Try removing all the .java files from the WEB-INF dirtomcat doesnt like having them there for some reason... Mikkel -Oprindelig meddelelse-Fra: Calvin Yu [mailto:[EMAIL PROTECTED]]Sendt: 02 July 2001 15:19Til: [EMAIL PROTECTED]Emne: Re: pls Help Invalid Package Declartions .java File Wont compile What is it exactly are you trying to do? Compile? Run a webapp? What is the exact error output you are getting? Calvin - Original Message - From: Chuck Amadi To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 8:30 AM Subject: pls Help Invalid Package Declartions .java File Wont compile Hi, Can anyone suggest why i might be recieving the following invalid package declarations. My Path as follows- C:\jakarta-tomcat-3.2.1\webapps\bbnpa\ thus continued- WEB-INF\classes\org\breconbeacons\it\java(classes). Thus i am aware that they haven't compiled to .class file any help would be extremly recieved this has been posted a few times so i assume this is a difficult enquiry . I have ensured the jar files ,tld ( xml ),package title and declarations are in order. So if anyone out there has got a poniters giv's us some hlep Cheers Chuckie -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Help, security problem
Hi! When I try to run the example with TOMCAT, I get the following error: java.lang.SecurityException: sealing violation at java.net.URLClassLoader.defineClass(URLClassLoader.java:234) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:297) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java: 154) at org.apache.struts.digester.Digester.getParser(Digester.java:275) 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.initServlet(ServletWrapper.java :315) at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java :276) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOn StartupInterceptor.java:132) at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java :227) at org.apache.tomcat.core.ContextManager.init(ContextManager.java:201) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:156) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163) Can you help me? Thanks a lot! Nguyen Gilbert * Ce message et toutes les pieces jointes (ci-apres le message) sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. This message and any attachments (the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. *
Re: pls Help Invalid Package Declartions .java File Wont compile
Hi, all i have been using struts MVC for a short period of time, thus in simple terms a newbie. Any way i have managed to create a connection (datasource URI) to our PostgreSql db retrieve data and display the result onto a planningdb.jsp form.Thus the general public can analysis the several planning applications and make their comments regarding the one their interested in by clicking on a submit button within a nested table , that takes them to a html/javascript submit.jsp (comment) form that contains the application number (Primary Key) from the planningdb.jsp. Thus on submitting the submit.jsp form it gets processed by the processform.jsp which contains the SQL insert statement . As follows sql:query> insert into comments (first_name,last_name,address.post_code,app_code,email,observation) values('sql:escapeSql>%=request.getParameter("first_name")%>/sql:escapeSql>' etc.etc. The applicant_id is a SERIAL pk for comments table wereby on inserting their comments intialise's a unique(applicant_id) pk in my PostgeSql db thus i haven't declared it in the insert statement as i wont the db to creat it.on recieveing comments data. Thus the name of my table/relation is comments . When i insert values into the comments sql statement ie ( first_name,last_name,address,post_code,app_code,email , observation ),on enquiring/checking the PostgreSql DB the only values or records our null values no data from the submit.form. Note that i do not recieve any errors through this process. I have used the data type SERIAL,ie create table comments( applicant_id SERIAL, Any suggestions what i have done wrong. Cheers Chuck Chuck Amadi wrote: Part 1.1 Type: Plain Text (text/plain) Encoding: 8bit -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
Re: SV: pls Help Invalid Package Declartions .java File Wont compile
Hi, mate were then should i locate them as oppose to WEB-INF\classes\ Cheers Chuck Mikkel Bruun wrote: Part 1.1Type: Plain Text (text/plain) Encoding: quoted-printable -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
How to use struts with WEBSPHERE
Hello! I try to use struts with WEBSPHERE 3.5.3. I would like to know the directories I must create and the files they must contain. Thanks. MIKAEL
SV: SV: pls Help Invalid Package Declartions .java File Wont compile
Ehh, i dont know...;-) my point is that the WEB-INF tree shouldn't contain any .java files...just .class, properties, etc... Mikkel -Oprindelig meddelelse- Fra: Chuck Amadi [mailto:[EMAIL PROTECTED]] Sendt: 02 July 2001 15:55 Til: [EMAIL PROTECTED] Emne: Re: SV: pls Help Invalid Package Declartions .java File Wont compile Hi, mate were then should i locate them as oppose to WEB-INF\classes\ Cheers Chuck Mikkel Bruun wrote: Part 1.1Type: Plain Text (text/plain) Encoding: quoted-printable -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: pls Help Invalid Package Declartions .java File Wont compile
Hi i have sent u a visual , i have been trying to create my packages as follows- C:\jakarta-tomcat-3.2.1\bbnpa\WEB-INF\classes\org\breconbeacons\it\.java classes. These classes wont compile from .java to .class thus i can't utilise them they once worked albiet not now. I would like to create beans and packages within my MVC but this has grouned ne to a halt . Pls HELP. Cheers Chuck Calvin Yu wrote: Part 1.1Type: Plain Text (text/plain) Encoding: quoted-printable -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re:SV: pls Help Invalid Package Declartions .java File Wont compile
Hi, Again were would you create your .java files hence before compiling, as i assume that the .java files had to be in the sub directory classes beneath WEB-INF file structure in order for my web application to locate them.I am aware that the container will look for deployment information about my bbnpa -web app there and as the WEB-INF is practicaly top-tier there is noware else i can think of. Hence i find it remarkable that all by one are invalid package declarations and the other error parsing which i'll take another look at. I understand your concept that once they are compiled there wouldn't be any .java files ONLY .class files within the WEB-INF\classes dir. So i must assume that it my problem stems from compiling a java file from within a invalid path declaration. but my path isn't that complexed. Mikkel Bruun wrote: Ehh, i dont know...;-) my point is that the WEB-INF tree shouldn't contain any .java files...just .class, properties, etc... Mikkel -Oprindelig meddelelse- Fra: Chuck Amadi [mailto:[EMAIL PROTECTED]] Sendt: 02 July 2001 15:55 Til: [EMAIL PROTECTED] Emne: Re: SV: pls Help Invalid Package Declartions .java File Wont compile Hi, mate were then should i locate them as oppose to WEB-INF\classes\ Cheers Chuck Mikkel Bruun wrote: > Part 1.1 Type: Plain Text (text/plain) > Encoding: quoted-printable -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
RE: validation
There would a few pros and cons for each of the approaches you mention, making the choice difficult. A third approach is to have the validation extracted into another set of classes, so that neither the ActionForm nor the Action itself contain the real validation logic. The mapper framework I'm working on does such a thing. I've made an early release available on Ted Husted site (http://www.husted.com/about/struts/resources.htm#extensions) if you're curious. Fr. -Original Message- From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]] Sent: 29 June 2001 18:45 To: '[EMAIL PROTECTED]' Subject: RE: validation On second thoughts ...I guess if there is some validation common to all the actions its probably better to place it in the actionform even if it means looking at information outside the view/form itself? -Original Message- From: Gogineni, Pratima Sent: Friday, June 29, 2001 9:41 AM To: '[EMAIL PROTECTED]' Subject: validation Hi, I have a design question about validation in struts. So far I had been doing most of my validation in my action classes rather than in my actionform. I was just looking into moving some of the validation into the validate method of the action form and find that I have to access some information in the servlet context to do this since the action form itself does not have all the information to do the complete validation. I was thinking that this has a couple of problems - 1. performance since I have to access the same info again in the action classes. 2. I feel it is messy because I am making my actionform which is just a piece/view of the whole picture access information that is outside the view itself ... All of the above leads me to believe that most of the heavy duty validation should happen in the action class. The actionform only does some minor validation like maybe checking for null (basically just using the information it knows). I which case should we not have a validate method in the action classes too? Please let me know if I am missing something / got something wrong ... Thanks Pratima The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
Pre-populate text fields
I need help knowing how to prepopulate a html:text tag without it being set to null when the jsp is compiled and instantiated. In the calling action class, I prepopulate the form with the right information, but when the jsp is displayed the input fields get set to null(empty). I can display the attribute with the bean:message tag on the same jsp page, but the html:text tag is empty for the same attribute. After reviewingthe server log, the form for the jsp page is getting instatiated twice for some reason, even when the form is stored in the session. Appreciate any help on this problem, Kent
SV: SV: pls Help Invalid Package Declartions .java File Wont compile
My current setup consists of VAJ 3.5, running tomcat internally... If your are running this combo,I would suggests that you compiled your .java files in another location, and then had a script (ant?) to copy the compiled clss files to the WEB-INF tree... Try reading the developer guide lines in the tomcat documentation, where they suggests a src tree among other things... Mikkel -Oprindelig meddelelse-Fra: Chuck Amadi [mailto:[EMAIL PROTECTED]]Sendt: 02 July 2001 16:43Til: [EMAIL PROTECTED]Emne: Re:SV: pls Help Invalid Package Declartions .java File Wont compileHi, Again were would you create your .java files hence before compiling, as i assume that the .java files had to be in the sub directory classes beneath WEB-INF file structure in order for my web application to locate them.I am aware that the container will look for deployment information about my bbnpa -web app there and as the WEB-INF is practicaly top-tier there is noware else i can think of. Hence i find it remarkable that all by one are invalid package declarations and the other error parsing which i'll take another look at. I understand your concept that once they are compiled there wouldn't be any .java files ONLY .class files within the WEB-INF\classes dir. So i must assume that it my problem stems from compiling a java file from within a invalid path declaration. but my path isn't that complexed. Mikkel Bruun wrote: Ehh, i dont know...;-) my point is that the WEB-INF tree shouldn't contain any .java files...just .class, properties, etc... Mikkel -Oprindelig meddelelse- Fra: Chuck Amadi [mailto:[EMAIL PROTECTED]] Sendt: 02 July 2001 15:55 Til: [EMAIL PROTECTED] Emne: Re: SV: pls Help Invalid Package Declartions .java File Wont compile Hi, mate were then should i locate them as oppose to WEB-INF\classes\ Cheers Chuck Mikkel Bruun wrote: Part 1.1 Type: Plain Text (text/plain) Encoding: quoted-printable -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: SV: SV: pls Help Invalid Package Declartions .java File Wont compile
Hi , I wll take time -out 2 night 4 a quite tomcat doc read , Cheers for your input. Mikkel Bruun wrote: Part 1.1Type: Plain Text (text/plain) Encoding: quoted-printable -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Help Weblogic 6.0 install
Hi Folks, Does anyone have procedure for installing struts in weblogic 6.0 env on HP UX Thanks Mahesh
RE: Help Weblogic 6.0 install
Hi Mahesh, You should just have to drop the war file (struts-example.war) into your applications directory. WLS should pickup the new war and deploy it for you. What errors are you getting? Jon. -Original Message- From: Mahesh Bhagia [mailto:[EMAIL PROTECTED]] Sent: 02 July 2001 16:46 To: Apache Struts (E-mail) Subject: Help Weblogic 6.0 install Hi Folks, Does anyone have procedure for installing struts in weblogic 6.0 env on HP UX Thanks Mahesh
Multiple Struts-config files
My struts-config file is beginning to get a bit unwieldy. Is it possible to callmultiple *-config files from web.xml? ex: init-param param-nameconfig/param-name param-value/WEB-INF/meaningfulName1-config.xml/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/meaningfulName2-config.xml/param-value /init-param or will"config" be overwritten each time? D
Re: validation
The general thinking is that there are at least two levels of validation. First, there is the simple domain-type checking, such as fields that are suppose to be numeric should contain only numerals. Second, there is business-logic checking, like invoice numbers are all greater than 1000 or no start dates should occur before 1984, or that the username and password match. The first type is easy to automate and doesn't require access to the business logic, so we have a standard method that you can override if you want to do that as part of your ActionForm. With that method, there would not be a good place for you to plug-in simple validations. The second type gets to be application specific, and is usually handled in the Action perform method. Since you are already overriding perform, there didn't seem to be much value in providing a yet another method to override here. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Gogineni, Pratima wrote: Please let me know if I am missing something / got something wrong ... I which case should we not have a validate method in the action classes too? On second thoughts ...I guess if there is some validation common to all the actions its probably better to place it in the actionform even if it means looking at information outside the view/form itself? I which case should we not have a validate method in the action classes too? Thanks Pratima
RE: Multiple Struts-config files
Thanks D -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 12:11 PM To: [EMAIL PROTECTED] Subject: Re: Multiple Struts-config files People are working on that, but it hasn't made it into a build let. For more see, http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10052.html -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ DHarty wrote: My struts-config file is beginning to get a bit unwieldy. Is it possible to call multiple *-config files from web.xml? ex: init-param param-nameconfig/param-name param-value/WEB-INF/meaningfulName1-config.xml/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/meaningfulName2-config.xml/param-value /init-param or will config be overwritten each time? D
jsp vs do
I am still in the early stages of understanding struts and would like to know a bit more about the jsp vs do extensions. In looking at the index.jsp page of the struts-example, you see two links. Register with the MailReader Demonstration Application links to editRegristration.do (***DO***) Log on to the MailReader Demonstration Application links to login.jsp (***JSP***) Why was the register page linked to a do instead of a jsp page? Why was the login page linked to a jsp instead of a do? I do understand that the do takes you through the struts actions, but don't understand why the login link was set to login.jsp instead of login.do initially. (I am not asking What it does so much as I am asking Why was the decision made to do it that way.) Thank You, Bob Byron __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
RE: jsp vs do
This is how I understand it. A .do maps to an action then to a .jsp. If you link directly to a .jsp, the action never executes. Actions are mapped to a .jsp in the struts-config.xml file. I'm sure there are more clear explanations to follow. Anthony -Original Message- From: Bob Byron [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 9:56 AM To: struts-user Subject: jsp vs do I am still in the early stages of understanding struts and would like to know a bit more about the jsp vs do extensions. In looking at the index.jsp page of the struts-example, you see two links. Register with the MailReader Demonstration Application links to editRegristration.do (***DO***) Log on to the MailReader Demonstration Application links to login.jsp (***JSP***) Why was the register page linked to a do instead of a jsp page? Why was the login page linked to a jsp instead of a do? I do understand that the do takes you through the struts actions, but don't understand why the login link was set to login.jsp instead of login.do initially. (I am not asking What it does so much as I am asking Why was the decision made to do it that way.) Thank You, Bob Byron __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: jsp vs do
Anthony Martin [EMAIL PROTECTED] wrote: This is how I understand it. A .do maps to an action then to a .jsp. If you link directly to a .jsp, the action never executes. Actions are mapped to a .jsp in the struts-config.xml file. I'm sure there are more clear explanations to follow. Anthony DO takes you to an action which needs some input from your currently displayed from. If you don't have yet the data necessary for the action, you cannot go to the action. In such case you can go to HTML or JSP, which contains the input fields you can fill out and submit to a DO action. In the example application, the link goes to login.jsp, since it is the place where you can enter the credentials. They are then validated in a action (DO). You cannot go to the action directly, since you do not have the username/password yet. -- gR
Compiled JSP got too big and produced this Error/ Anyone know of a Solution/Fix?
Have any of you ever seen anything like this before? I think that compiled code for this JSP got too big. Error: 500 Location: /eCMS/CareManager/PfPatientSummaryBody.jsp Internal Servlet Error: javax.servlet.ServletException: (class: CareManager/_0002fCareManager_0002fPfPatientSummaryBody_0002ejspPfPatientSum maryBody_jsp_0, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletRespo nse;)V) Illegal target of jump or branch at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399) 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:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.VerifyError: (class: CareManager/_0002fCareManager_0002fPfPatientSummaryBody_0002ejspPfPatientSum maryBody_jsp_0, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletRespo nse;)V) Illegal target of jump or branch at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.load(JspServlet.java: 116) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:154) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:164) 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:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) 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)
proposal: splitting struts mailing list
hi, the daily mails in this mailinglist incrased a lot past the last month. what do you think about to split the mailinglist into two. eg. into a beginner and advanced one. perhaps this could fit everybodys needs. norman . . . . . . . . . . . . . . . . . . . . . . . . . Norman Timmler application developer neteye GmbH Alsterchaussee 3 20149 Hamburg Tel +49-(0)40 85 40 26 -40 Fax +49-(0)40 85 40 26 -10 [EMAIL PROTECTED] http://neteye.de
RE: Compiled JSP got too big and produced this Error/ Anyone know of a Solution/Fix?
Unfortunately I've seen it. :-( -Chris Here is a previous reply on this subject from Mr. Cooper: I am, unfortunately, intimately familiar with this problem. The problem is that there is a limit on the size of a compiled method in a Java class file, and that limit is what we're running up against. Recall that a JSP page is compiled into a servlet, and into essentially only one method in that servlet. Hence, if your page contains many, many tags, that method becomes too big, and up comes the exception that you're seeing. There are a couple of (partial) solutions. 1) Break your giant page up into multiple smaller pages and bring them together at run time using jsp:include. Note that %@include won't work, because that's a compile-time include, which will get you straight back to the original problem. 2) Look for places to save on tags. For example, the html:option tag was recently extended to allow the specification of the text to display, so that you can replace this: html:option ... bean:message key=foo//html:option with this: html:option ... key=foo/ If you have a lot of cases of this pattern, it can help quite a bit. In addition to the html:option tag, some other Struts tags allow the same shortcut to including the text. Also, you might consider replacing html:option sequences with html:options if you can build an appropriate collection up front. Unfortunately, we can't use solution (1), because our giant page is almost entirely one html:form. (Please don't ask... :-} ) Many of the html:* tags won't work if they are on a separate page from the html:form tag itself. That means I've spent quite some time on option (2). We have several of our own tags, too, so that was the next place for me to look. I discovered that changing some frequently used tags from extending BodyTagSupport to extending TagSupport, and marking them with bodycontentempty/bodycontent in the .tld file, made a significant reduction in generated code size. Of course, this is not always feasible, but it helped us quite a bit. One other trick is to create custom tags for frequently used groups of related elements. For example, I created a simple DatePickerTag which is a Struts-like tag that combines three drop-down boxes for month, day and year, with the localized strings obtained from the JVM, and the current values pulled from a bean. That's about all I can think of that I've tried so far. All our pages are now within the limit, but one is very close to breaking it. I really want to put a do not touch notice on that file! Hope this helps. -- Martin Cooper -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 1:32 PM To: [EMAIL PROTECTED] Subject: Compiled JSP got too big and produced this Error/ Anyone know of a Solution/Fix? Have any of you ever seen anything like this before? I think that compiled code for this JSP got too big. Error: 500 Location: /eCMS/CareManager/PfPatientSummaryBody.jsp Internal Servlet Error: javax.servlet.ServletException: (class: CareManager/_0002fCareManager_0002fPfPatientSummaryBody_0002ejspPfPatientSum maryBody_jsp_0, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletRespo nse;)V) Illegal target of jump or branch
RE: jsp vs do
In general, however, you can go to actions directly as long as you supply the required fields in the url (if any). In the case of the struts-example, going to logon.do gives a validation error because it was expecting the correct query string. For example: http://localhost/struts-example/logon.do?username=foopassword=bar Anthony -Original Message- From: Gregor Rayman [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 10:28 AM To: [EMAIL PROTECTED] Subject: Re: jsp vs do Anthony Martin [EMAIL PROTECTED] wrote: This is how I understand it. A .do maps to an action then to a .jsp. If you link directly to a .jsp, the action never executes. Actions are mapped to a .jsp in the struts-config.xml file. I'm sure there are more clear explanations to follow. Anthony DO takes you to an action which needs some input from your currently displayed from. If you don't have yet the data necessary for the action, you cannot go to the action. In such case you can go to HTML or JSP, which contains the input fields you can fill out and submit to a DO action. In the example application, the link goes to login.jsp, since it is the place where you can enter the credentials. They are then validated in a action (DO). You cannot go to the action directly, since you do not have the username/password yet. -- gR
RE: proposal: splitting struts mailing list
I recently signed up for this mailing list, but I no longer wish to be on it. I emailed [EMAIL PROTECTED], and asked to be removed, but I am still getting the messages! Please remove me from all of your lists! Thanks! -Original Message- From: Norman Timmler [SMTP:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 10:36 AM To: [EMAIL PROTECTED] Subject: proposal: splitting struts mailing list hi, the daily mails in this mailinglist incrased a lot past the last month. what do you think about to split the mailinglist into two. eg. into a beginner and advanced one. perhaps this could fit everybodys needs. norman . . . . . . . . . . . . . . . . . . . . . . . . . Norman Timmler application developer neteye GmbH Alsterchaussee 3 20149 Hamburg Tel +49-(0)40 85 40 26 -40 Fax +49-(0)40 85 40 26 -10 [EMAIL PROTECTED] http://neteye.de
Re: jsp vs do
Anthony Martin [EMAIL PROTECTED] wrote: In general, however, you can go to actions directly as long as you supply the required fields in the url (if any). In the case of the struts-example, going to logon.do gives a validation error because it was expecting the correct query string. For example: http://localhost/struts-example/logon.do?username=foopassword=bar Anthony Yes, you can always go directly to the action, as long as you provide the necessary data. Some actions do not need any input at all. (e. g. /admin/restart.do) It wouldn't be very bad to go directly to login.do without any data, since this would simply report an error and forward to its input (login.jsp) itself. -- gR -Original Message- From: Gregor Rayman [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 10:28 AM To: [EMAIL PROTECTED] Subject: Re: jsp vs do Anthony Martin [EMAIL PROTECTED] wrote: This is how I understand it. A .do maps to an action then to a .jsp. If you link directly to a .jsp, the action never executes. Actions are mapped to a .jsp in the struts-config.xml file. I'm sure there are more clear explanations to follow. Anthony DO takes you to an action which needs some input from your currently displayed from. If you don't have yet the data necessary for the action, you cannot go to the action. In such case you can go to HTML or JSP, which contains the input fields you can fill out and submit to a DO action. In the example application, the link goes to login.jsp, since it is the place where you can enter the credentials. They are then validated in a action (DO). You cannot go to the action directly, since you do not have the username/password yet. -- gR
RE: validation
Don't forget as well the validation framework from David, which normally should be integrated into Struts at some point. Fr. -Original Message- From: Rey Francois Sent: 02 July 2001 13:58 To: '[EMAIL PROTECTED]' Subject: RE: validation There would a few pros and cons for each of the approaches you mention, making the choice difficult. A third approach is to have the validation extracted into another set of classes, so that neither the ActionForm nor the Action itself contain the real validation logic. The mapper framework I'm working on does such a thing. I've made an early release available on Ted Husted site (http://www.husted.com/about/struts/resources.htm#extensions) if you're curious. Fr. -Original Message- From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]] Sent: 29 June 2001 18:45 To: '[EMAIL PROTECTED]' Subject: RE: validation On second thoughts ...I guess if there is some validation common to all the actions its probably better to place it in the actionform even if it means looking at information outside the view/form itself? -Original Message- From: Gogineni, Pratima Sent: Friday, June 29, 2001 9:41 AM To: '[EMAIL PROTECTED]' Subject: validation Hi, I have a design question about validation in struts. So far I had been doing most of my validation in my action classes rather than in my actionform. I was just looking into moving some of the validation into the validate method of the action form and find that I have to access some information in the servlet context to do this since the action form itself does not have all the information to do the complete validation. I was thinking that this has a couple of problems - 1. performance since I have to access the same info again in the action classes. 2. I feel it is messy because I am making my actionform which is just a piece/view of the whole picture access information that is outside the view itself ... All of the above leads me to believe that most of the heavy duty validation should happen in the action class. The actionform only does some minor validation like maybe checking for null (basically just using the information it knows). I which case should we not have a validate method in the action classes too? Please let me know if I am missing something / got something wrong ... Thanks Pratima The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
Re: proposal: splitting struts mailing list
The problem with splitting into two lists is that the advanced users will not be around to answer the beginner questions. I agree that there is a lot of traffic on this list, both beginner and advanced. I see it as a benefit though. The beginners get to learn from the advanced, and the advanced (developers) get to see the typical types of questions that are asked. This may then lead to a better design, or better documentation, etc. Just my two cents. :) Pete Norman Timmler wrote: hi, the daily mails in this mailinglist incrased a lot past the last month. what do you think about to split the mailinglist into two. eg. into a beginner and advanced one. perhaps this could fit everybodys needs. norman . . . . . . . . . . . . . . . . . . . . . . . . . Norman Timmler application developer neteye GmbH Alsterchaussee 3 20149 Hamburg Tel +49-(0)40 85 40 26 -40 Fax +49-(0)40 85 40 26 -10 [EMAIL PROTECTED] http://neteye.de
RE: proposal: splitting struts mailing list
Agreed. :) Chris -Original Message- From: Peter Alfors [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 1:57 PM To: [EMAIL PROTECTED] Subject: Re: proposal: splitting struts mailing list The problem with splitting into two lists is that the advanced users will not be around to answer the beginner questions. I agree that there is a lot of traffic on this list, both beginner and advanced. I see it as a benefit though. The beginners get to learn from the advanced, and the advanced (developers) get to see the typical types of questions that are asked. This may then lead to a better design, or better documentation, etc. Just my two cents. :) Pete
RE: Netbeans Support of Struts
Not directly-- I have, however, added Tomcat to my struts projects and ran the entire process within NetBeans. -- Levi -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 12:07 PM To: [EMAIL PROTECTED] Subject: Netbeans Support of Struts Does the Netbeans IDE support the creation of Struts applications and running/debugging them inside Netbeans? Dan
RE: Netbeans Support of Struts
Netbeans 3.2 has support for execution of JSPs and Servlets and with some slight tweaking you can also debug a web-app. Forte 4j 3.0 has a little better support for this, but seems to still have some issues . Both of them have Tomcat integrated as plug-ins and have pretty good support for JSP editing. Laine -Original Message- From: Cook, Levi [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 2:09 PM To: '[EMAIL PROTECTED]' Subject: RE: Netbeans Support of Struts Not directly-- I have, however, added Tomcat to my struts projects and ran the entire process within NetBeans. -- Levi -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 12:07 PM To: [EMAIL PROTECTED] Subject: Netbeans Support of Struts Does the Netbeans IDE support the creation of Struts applications and running/debugging them inside Netbeans? Dan
NotEqual or Present?
I am trying to check if the user entered a value for a search criteria in a results page. My ActionForm sets a propertyto "" if the user did not enter a value. So in the following code, I want to only show it if the property does not equal "". But the following does not work, should it? logic:notEqual name="myForm" property="searchParam" value="" show this if property "searchParam" is not equal to "" /logic:notEqual Thanks, Matt
Re: NotEqual or Present?
probably you should use match and notmatch tags logic:notmatch name="myForm" property="searchParam" value="" show this if property "searchParam" is not equal to "" /logic:notEqual rama. - Original Message - From: Matt Raible To: Struts User Sent: Monday, July 02, 2001 11:17 AM Subject: NotEqual or Present? I am trying to check if the user entered a value for a search criteria in a results page. My ActionForm sets a propertyto "" if the user did not enter a value. So in the following code, I want to only show it if the property does not equal "". But the following does not work, should it? logic:notEqual name="myForm" property="searchParam" value="" show this if property "searchParam" is not equal to "" /logic:notEqual Thanks, Matt
Templates located in WEB-INF?
Is it possible to hide all JSP files under the /WEB-INF/ directory and still use templates?? I had some difficulties with the following code finding the main_content.jsp page. Should this work or am I trying to do something that is known to not work? (BTW - The code seems to run fine if I put the /jsp directory inside the context root.) Thanks! Tim Colson %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' % template:insert template='/WEB-INF/jsp/layout1.jsp' template:put name='title' bean:message key=main.menu.title/ /template:put template:put name='header' content='/header' direct='true' / template:put name='sidebar' content='sidenav' direct='true'/ template:put name='content' content='/WEB-INF/jsp/main_content.jsp' / template:put name='footer' content='/footer' direct='true' / /template:insert
Re: NotEqual or Present?
If I do this, I get the following error - it seems to go away when I put a value in value="put value or space here" [02/Jul/2001 12:52:02:2] error: Exception: SERVLET-execution_failed: Error in executing servlet resourceList: java.lang.Exception: JSP Error: Setter method not provided for class org.apache.struts.taglib.logic.NotMatchTag, property classException Stack Trace:java.lang.Exception: JSP Error: Setter method not provided for class org.apache.struts.taglib.logic.NotMatchTag, property class at com.netscape.jsp.JSPTree.genAttributeAssignments(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSP.compile(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.JSPtoJava(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.thread.ThreadBasic.run(Native Method) at java.lang.Thread.run(Thread.java:479) - Original Message - From: Rama Krishna To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 12:45 PM Subject: Re: NotEqual or Present? probably you should use match and notmatch tags logic:notmatch name="myForm" property="searchParam" value="" show this if property "searchParam" is not equal to "" /logic:notEqual rama. - Original Message - From: Matt Raible To: Struts User Sent: Monday, July 02, 2001 11:17 AM Subject: NotEqual or Present? I am trying to check if the user entered a value for a search criteria in a results page. My ActionForm sets a propertyto "" if the user did not enter a value. So in the following code, I want to only show it if the property does not equal "". But the following does not work, should it? logic:notEqual name="myForm" property="searchParam" value="" show this if property "searchParam" is not equal to "" /logic:notEqual Thanks, Matt
Re: NotEqual or Present?
do you have the set method for property 'searchParam' in your form bean??? or may be it needs a constant instead of a null value, but this is not true as it works fine for me. - Original Message - From: Matt Raible To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 11:53 AM Subject: Re: NotEqual or Present? If I do this, I get the following error - it seems to go away when I put a value in value="put value or space here" [02/Jul/2001 12:52:02:2] error: Exception: SERVLET-execution_failed: Error in executing servlet resourceList: java.lang.Exception: JSP Error: Setter method not provided for class org.apache.struts.taglib.logic.NotMatchTag, property classException Stack Trace:java.lang.Exception: JSP Error: Setter method not provided for class org.apache.struts.taglib.logic.NotMatchTag, property class at com.netscape.jsp.JSPTree.genAttributeAssignments(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSP.compile(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.JSPtoJava(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.thread.ThreadBasic.run(Native Method) at java.lang.Thread.run(Thread.java:479) - Original Message - From: Rama Krishna To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 12:45 PM Subject: Re: NotEqual or Present? probably you should use match and notmatch tags logic:notmatch name="myForm" property="searchParam" value="" show this if property "searchParam" is not equal to "" /logic:notEqual rama. - Original Message - From: Matt Raible To: Struts User Sent: Monday, July 02, 2001 11:17 AM Subject: NotEqual or Present? I am trying to check if the user entered a value for a search criteria in a results page. My ActionForm sets a propertyto "" if the user did not enter a value. So in the following code, I want to only show it if the property does not equal "". But the following does not work, should it? logic:notEqual name="myForm" property="searchParam" value="" show this if property "searchParam" is not equal to "" /logic:notEqual Thanks, Matt
Re: NotEqual or Present?
We set all our values to "" in our dataObjects so the UI does not display null on the screen. Does struts auto-convert a null to a "" for display? If so, then we can get the getter/setters in our dataObjects (forms). Matt - Original Message - From: Spencer Smith To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 12:57 PM Subject: Re: NotEqual or Present? Why not default the value to null and use the Present/NotPresent methods? ie. String searchParam = null; logic:present name="myForm" property="searchParam" show this if property "searchParam" is not present /logic:notPresent This way, if the user never sets it, it will always be null (and notPresent). - Original Message - From: Matt Raible To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 11:53 AM Subject: Re: NotEqual or Present? If I do this, I get the following error - it seems to go away when I put a value in value="put value or space here" [02/Jul/2001 12:52:02:2] error: Exception: SERVLET-execution_failed: Error in executing servlet resourceList: java.lang.Exception: JSP Error: Setter method not provided for class org.apache.struts.taglib.logic.NotMatchTag, property classException Stack Trace:java.lang.Exception: JSP Error: Setter method not provided for class org.apache.struts.taglib.logic.NotMatchTag, property class at com.netscape.jsp.JSPTree.genAttributeAssignments(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSP.compile(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.JSPtoJava(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.thread.ThreadBasic.run(Native Method) at java.lang.Thread.run(Thread.java:479) - Original Message - From: Rama Krishna To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 12:45 PM Subject: Re: NotEqual or Present? probably you should use match and notmatch tags logic:notmatch name="myForm" property="searchParam" value="" show this if property "searchParam" is not equal to "" /logic:notEqual rama. - Original Message - From: Matt Raible To: Struts User Sent: Monday, July 02, 2001 11:17 AM Subject: NotEqual or Present? I am trying to check if the user entered a value for a search criteria in a results page. My ActionForm sets a propertyto "" if the user did not enter a value. So in the following code, I want to only show it if the property does not equal "". But the following does not work, should it? logic:notEqual name="myForm" property="searchParam" value="" show this if property "searchParam" is not equal to "" /logic:notEqual Thanks, Matt
RE: Templates located in WEB-INF?
Where is you template file (WEB-INF)? If it is, rry using relative paths to put to the template. ex: the line in project.jsp that puts to the template... template:put name=body content =../project/project_body.jsp/ where the path is relative to the template NOT to the puting file. Let me know this works, or I'll have a hell of a time when I deploy. D -Original Message- From: Tim Colson [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 2:48 PM To: [EMAIL PROTECTED] Subject: Templates located in WEB-INF? Is it possible to hide all JSP files under the /WEB-INF/ directory and still use templates?? I had some difficulties with the following code finding the main_content.jsp page. Should this work or am I trying to do something that is known to not work? (BTW - The code seems to run fine if I put the /jsp directory inside the context root.) Thanks! Tim Colson %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' % template:insert template='/WEB-INF/jsp/layout1.jsp' template:put name='title' bean:message key=main.menu.title/ /template:put template:put name='header' content='/header' direct='true' / template:put name='sidebar' content='sidenav' direct='true'/ template:put name='content' content='/WEB-INF/jsp/main_content.jsp' / template:put name='footer' content='/footer' direct='true' / /template:insert
html:select and indexed
Can the 'indexed' label (used for working with indexed properties) be used with html:select and the html:options tags? ~Jason
Re: HTML:link tag
When I change my code from html:cancel to html:button I get the following error: html:button onclick=location.href='/NASApp/timetracker/mainMenu' bean:message key=button.done styleClass=inputButtonNormal / /html:button I would leave this as html:cancel, but the onClick doesn't work. Any ideas? Matt - Original Message - From: Matt Raible [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 1:01 PM Subject: Re: HTML:link tag I have a search page that displays a list of data, it is a jsp that only talks to itself. I'd like to add a done button at the bottom that takes them back to the main menu when they are done. In my JSP, I'd like to put: html:cancel / And map it in my struts-config.xml using: action path=/searchResource forward=/resourceList name=resourceForm scope=request validate=false input=/mainMenu forward name=cancel path=/mainMenu / /action But this does NOT work, so I am looking for a work around using the following: html:button onClick=location.href='/NASApp/appName/mainMenu' And I want to get /NASApp/appName/mainMenu from html:link, rather than hardcoding it into my application. Thanks, Matt - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 10:06 AM Subject: RE: HTML:link tag Matt, Not sure I follow what you are trying to do. Do you want to post some more info...? Cheers, Dave Matt Raible [EMAIL PROTECTED] on 06/26/2001 11:06:02 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: HTML:link tag Does anyone know how to extract the link url using struts, rather than the full a.../a tag? I would like to get a URL from a global-forward for use in a javascript function. Thanks, Matt --- Michael Skariah [EMAIL PROTECTED] wrote: Thanks a million Spencer. -Michael. -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 3:37 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: HTML:link tag %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % *make sure above line is in your jsp page html:link page=/test.do target=_topClick Here/html:link *in order for above line to work you need to set up an action in struts-config.xml ie: !-- Handle actions for /Test -- action path=/Test.do type=com.pfizer.ecms.ws.TestAction /action - Original Message - From: Michael Skariah [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 3:23 PM Subject: HTML:link tag Hello all, I am trying to replace the following with the Struts HTML link tag. a href=test.doTest/a Could anyone help me out here\. Thanks, Michael. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
RE: HTML:link tag
I think you'd have to use an Action class to get the html:cancel / behavior. The action class would call isCancelled(request) to find out if the form was canceled, and then return a forward mapping to the cancel path ex: return (mapping.findForward(cancel)); If you can use html:cancel / (or submit for that matter) without an action class, please let me know. D -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 3:02 PM To: [EMAIL PROTECTED] Subject: Re: HTML:link tag I have a search page that displays a list of data, it is a jsp that only talks to itself. I'd like to add a done button at the bottom that takes them back to the main menu when they are done. In my JSP, I'd like to put: html:cancel / And map it in my struts-config.xml using: action path=/searchResource forward=/resourceList name=resourceForm scope=request validate=false input=/mainMenu forward name=cancel path=/mainMenu / /action But this does NOT work, so I am looking for a work around using the following: html:button onClick=location.href='/NASApp/appName/mainMenu' And I want to get /NASApp/appName/mainMenu from html:link, rather than hardcoding it into my application. Thanks, Matt - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 10:06 AM Subject: RE: HTML:link tag Matt, Not sure I follow what you are trying to do. Do you want to post some more info...? Cheers, Dave Matt Raible [EMAIL PROTECTED] on 06/26/2001 11:06:02 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: HTML:link tag Does anyone know how to extract the link url using struts, rather than the full a.../a tag? I would like to get a URL from a global-forward for use in a javascript function. Thanks, Matt --- Michael Skariah [EMAIL PROTECTED] wrote: Thanks a million Spencer. -Michael. -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 3:37 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: HTML:link tag %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % *make sure above line is in your jsp page html:link page=/test.do target=_topClick Here/html:link *in order for above line to work you need to set up an action in struts-config.xml ie: !-- Handle actions for /Test -- action path=/Test.do type=com.pfizer.ecms.ws.TestAction /action - Original Message - From: Michael Skariah [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 3:23 PM Subject: HTML:link tag Hello all, I am trying to replace the following with the Struts HTML link tag. a href=test.doTest/a Could anyone help me out here\. Thanks, Michael. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
transactional tokens
Does anyone have experience using the transactional tokens in the action? I have seen the example in the struts-example application and I'm still not clear on quite how these are used. I am particularly confused as to how I would use the tokens in a 'wizard' style set of forms. A good example would be greatly appreciated!! Thanks in advance, --John
Need help with tag library can someone help thanks
yes i am new to this all and i am getting this error can anyone point me in the right direction? C:\struts-sandbox\tomcat\webapps\HelloWorld\hello.jsp(1,0) Unable to open taglibrary /WEB-INF/struts-bean.tld : Could not locate TLD /WEB-INF/struts-bean.tld thank you
Fw: HTML:link tag
Sorry, I forgot the error: Missing identifier: jsp_missing_attribute in resource: servlet [02/Jul/2001 13:21:27:0] error: Exception: SERVLET-execution_failed: Error in executing servlet resourceList: java.lang.Exception: Missing id! jsp_mis sing_attribute Exception Stack Trace: java.lang.Exception: Missing id! jsp_missing_attribute at com.netscape.jsp.JSPTree.validateAttributes(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSP.compile(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.JSPtoJava(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Un known Source) at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.thread.ThreadBasic.run(Native Method) at java.lang.Thread.run(Thread.java:479) - Original Message - From: Matt Raible [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 1:36 PM Subject: Re: HTML:link tag When I change my code from html:cancel to html:button I get the following error: html:button onclick=location.href='/NASApp/timetracker/mainMenu' bean:message key=button.done styleClass=inputButtonNormal / /html:button I would leave this as html:cancel, but the onClick doesn't work. Any ideas? Matt - Original Message - From: Matt Raible [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 1:01 PM Subject: Re: HTML:link tag I have a search page that displays a list of data, it is a jsp that only talks to itself. I'd like to add a done button at the bottom that takes them back to the main menu when they are done. In my JSP, I'd like to put: html:cancel / And map it in my struts-config.xml using: action path=/searchResource forward=/resourceList name=resourceForm scope=request validate=false input=/mainMenu forward name=cancel path=/mainMenu / /action But this does NOT work, so I am looking for a work around using the following: html:button onClick=location.href='/NASApp/appName/mainMenu' And I want to get /NASApp/appName/mainMenu from html:link, rather than hardcoding it into my application. Thanks, Matt - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 10:06 AM Subject: RE: HTML:link tag Matt, Not sure I follow what you are trying to do. Do you want to post some more info...? Cheers, Dave Matt Raible [EMAIL PROTECTED] on 06/26/2001 11:06:02 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: HTML:link tag Does anyone know how to extract the link url using struts, rather than the full a.../a tag? I would like to get a URL from a global-forward for use in a javascript function. Thanks, Matt --- Michael Skariah [EMAIL PROTECTED] wrote: Thanks a million Spencer. -Michael. -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 3:37 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: HTML:link tag %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % *make sure above line is in your jsp page html:link page=/test.do target=_topClick Here/html:link *in order for above line to work you need to set up an action in struts-config.xml ie: !-- Handle actions for /Test -- action path=/Test.do type=com.pfizer.ecms.ws.TestAction /action - Original Message - From: Michael Skariah [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 3:23 PM Subject: HTML:link tag Hello all, I am trying to replace the following with the Struts HTML link tag. a href=test.doTest/a Could anyone help me out here\.
RE: Wizard kind of form
I use 1 ActionForm for my wizards. I include a hidden form element called 'page'. In my reset and validate methods, I use the page field to determine what to reset/validate. James Hicks -Original Message- From: Gangadharappa, Kiran [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 3:41 PM To: '[EMAIL PROTECTED]' Subject: Wizard kind of form hi, May be this is a trivial. I want to build an application where ORDER is to be entered thro html. ORDER has about 30 attributes. So it is split across 3 screens, first 10 in the first page say order1.jsp. Now from the struts perspective, should I use one Action Form or should I use three? I am kind of confused because, when I looked at the actionServlet code, there for every HTTP request, ActionForm is reset!!. (Of course implementation of this reset method is in myForm). Can someone throw some light on this? Regards Kiran
RE: validation
Ted, Do you think this approach of splitting validation between both the ActionForm.validate() and the Action.perform() is the most desirable? Somehow I have the feeling that by extracting these validations into separate classes is a better approach because it makes it easier to reuse the validation logic, which is one of the benefit of having validation framework. The real question then is whether this framework should only do the domain-type checking or should also support the business logic checking. I think it should support both, especially if you can also separate them within the same framework. Fr. -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: 02 July 2001 18:04 To: [EMAIL PROTECTED] Subject: Re: validation The general thinking is that there are at least two levels of validation. First, there is the simple domain-type checking, such as fields that are suppose to be numeric should contain only numerals. Second, there is business-logic checking, like invoice numbers are all greater than 1000 or no start dates should occur before 1984, or that the username and password match. The first type is easy to automate and doesn't require access to the business logic, so we have a standard method that you can override if you want to do that as part of your ActionForm. With that method, there would not be a good place for you to plug-in simple validations. The second type gets to be application specific, and is usually handled in the Action perform method. Since you are already overriding perform, there didn't seem to be much value in providing a yet another method to override here. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Gogineni, Pratima wrote: Please let me know if I am missing something / got something wrong ... I which case should we not have a validate method in the action classes too? On second thoughts ...I guess if there is some validation common to all the actions its probably better to place it in the actionform even if it means looking at information outside the view/form itself? I which case should we not have a validate method in the action classes too? Thanks Pratima The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
RE: validation
When I say I have my validation logic in the perform method - I just mean that this is where I am doing the validation. But the logic (most of it) is in separate classes. I would guess this is upto the user to decide whether to put in the perform method directly or use classes of their own for validation. Did you mean something else when you say validation in separate classes? Also I image the business logic validation is highly specific to the situation and I cant think what kind of framework you can provide for this - other than just call a validate method ... thanks pratima -Original Message- From: Rey Francois [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 9:48 AM To: '[EMAIL PROTECTED]' Subject: RE: validation Ted, Do you think this approach of splitting validation between both the ActionForm.validate() and the Action.perform() is the most desirable? Somehow I have the feeling that by extracting these validations into separate classes is a better approach because it makes it easier to reuse the validation logic, which is one of the benefit of having validation framework. The real question then is whether this framework should only do the domain-type checking or should also support the business logic checking. I think it should support both, especially if you can also separate them within the same framework. Fr. -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: 02 July 2001 18:04 To: [EMAIL PROTECTED] Subject: Re: validation The general thinking is that there are at least two levels of validation. First, there is the simple domain-type checking, such as fields that are suppose to be numeric should contain only numerals. Second, there is business-logic checking, like invoice numbers are all greater than 1000 or no start dates should occur before 1984, or that the username and password match. The first type is easy to automate and doesn't require access to the business logic, so we have a standard method that you can override if you want to do that as part of your ActionForm. With that method, there would not be a good place for you to plug-in simple validations. The second type gets to be application specific, and is usually handled in the Action perform method. Since you are already overriding perform, there didn't seem to be much value in providing a yet another method to override here. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Gogineni, Pratima wrote: Please let me know if I am missing something / got something wrong ... I which case should we not have a validate method in the action classes too? On second thoughts ...I guess if there is some validation common to all the actions its probably better to place it in the actionform even if it means looking at information outside the view/form itself? I which case should we not have a validate method in the action classes too? Thanks Pratima The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
RE: Problems with iterate
Hi, Thanks for replying... I did stumble onto the index extension in my search, but i thought i could manage without! I will try to do as you describes, thanks a lot! ^terp -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 12:57 AM To: [EMAIL PROTECTED] Subject: RE: Problems with iterate You need to do two things. First, you need to generate appropriate names for your input fields. If you use the current Struts tags then all the occurances of your two fields in the example below will generate names of firstName and lastName. What you want is to generate names in the format contactDataVector[x].firstName and contactDataVector[x].lastName, where x is the index number of the field. Dave Hay has posted a set of modified Struts tags which generate these names on Ted Husted's site: http://www.husted.com/about/struts/resources.htm#extensions - Indexed Tags Secondly you need to provide the appropriate getters/setters in your bean and ActionForm. Obviously in your bean you need setFirstName() and setLastName() methods - additionally you need the following getter in your ActionForm: public ContactData getContactDataVector(int index) { return (ContactData)(contactDataVector.get(index)); } Hope this helps. Niall -Original Message- From: Torsten Terp [mailto:[EMAIL PROTECTED]] Sent: 01 July 2001 19:01 To: Struts user list Subject: Problems with iterate Hi, Sorry if this has been answered before, but i havent been able to find an answer! Im using iterate to display a vector containg valueobjects, i.e., html:form action=showContacts logic:iterate id=contacts name=form property=contactDataVector html:hidden name=contacts property=contactId/ tr td width=150 html:text name=contacts property=firstName size=20/ /td td width=150 html:text name=contacts property=lastName size=20/ /td /tr ... ... 'form' is my struts form bean, 'contactDataVector' is a vector of 'contactData' objects each containing (among others) the variables 'firstName' and 'lastName'. There is no problem in displaying the data, all goes well, but updating fields in the form is not working, when i want to save the changes in the struts action the vector is null! I can see that making a variable 'firstName' in the form, results in a call to its setter method, i.e., i can make it work when updating a single row, but i cant manage to get the update to work on the actual contactData objects in the vector. ?!?! Any advices out there?? ^terp
RE: OFFTOPIC: Solaris and Tomcat problems!
Mikkel, Here's a bit of a hack solution, but ... have you tried to use Jikes as your JSP compiler? Regards, Ben Flaumenhaft - [EMAIL PROTECTED] Principal, Sidelight Consulting http://www.sidelight.com -Original Message- From: Mikkel Bruun [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 12:10 PM To: '[EMAIL PROTECTED] ' Subject: OFFTOPIC: Solaris and Tomcat problems! This has nothing to do with struts, but I know this list has a couple of guru's and demigods lurking... I have just installed solaris 8 on an intel machine. I installed tomcat 3.2.2 and it runs the servlets examples without any problems...BUT There seems to be a problem running the jsp files... Whenever i request a jsp file it just freezes, and i get no respond... Looking into the matter I saw that the jsp was succesfully compiled to a .java file...BUT The jsp compiler seems to be endlessly looping in the translation, because it keeps writing the same line over and over again (until im out of disk space)... I looked into the tomcat mailling archives and saw that somebod had experienced this problem before, but I wasnt able to find a solution... Any suggestions thanks in advance... Mikkel
RE: Problems with iterate
Hi, A giant thank you!!! There is nothing like source when in trouble :-) Will try it at once ^terp -Original Message- From: Merikan Peter [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 9:20 AM To: '[EMAIL PROTECTED]' Subject: RE: Problems with iterate Here is a working example of nested properties in an iterator. All I need is an indexed getter and setter for address in my testBean.( getAddress(int index) ) % String propertyValue = null;% logic:iterate id=address name=testBean property=addresses indexId=addressIndex tr td valign=top Index #[bean:write name=addressIndex/] /td td table border=0 tr thStreet:/th td % propertyValue = address[ + addressIndex + ].street; % html:text property=%=propertyValue%/ /td /tr tr thZip Code:/th td % propertyValue = address[ + addressIndex + ].zipCode; % html:text property=%=propertyValue%/ /td /tr /table /td /tr /logic:iterate /Peter -Original Message- From: Torsten Terp [mailto:[EMAIL PROTECTED]] Sent: den 1 juli 2001 20:01 To: Struts user list Subject: Problems with iterate Hi, Sorry if this has been answered before, but i havent been able to find an answer! Im using iterate to display a vector containg valueobjects, i.e., html:form action=showContacts logic:iterate id=contacts name=form property=contactDataVector html:hidden name=contacts property=contactId/ tr td width=150 html:text name=contacts property=firstName size=20/ /td td width=150 html:text name=contacts property=lastName size=20/ /td /tr ... ... 'form' is my struts form bean, 'contactDataVector' is a vector of 'contactData' objects each containing (among others) the variables 'firstName' and 'lastName'. There is no problem in displaying the data, all goes well, but updating fields in the form is not working, when i want to save the changes in the struts action the vector is null! I can see that making a variable 'firstName' in the form, results in a call to its setter method, i.e., i can make it work when updating a single row, but i cant manage to get the update to work on the actual contactData objects in the vector. ?!?! Any advices out there?? ^terp
Error
Hi, Does anybody know reason for this error, while running sample application, ERROR: User database not loaded -- check servlet container logs for error messages Thanks
RE: validation
thanks Ill take a look at both these tonight. pratima -Original Message- From: Rey Francois [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 5:02 AM To: '[EMAIL PROTECTED]' Subject: RE: validation Don't forget as well the validation framework from David, which normally should be integrated into Struts at some point. Fr. -Original Message- From: Rey Francois Sent: 02 July 2001 13:58 To: '[EMAIL PROTECTED]' Subject: RE: validation There would a few pros and cons for each of the approaches you mention, making the choice difficult. A third approach is to have the validation extracted into another set of classes, so that neither the ActionForm nor the Action itself contain the real validation logic. The mapper framework I'm working on does such a thing. I've made an early release available on Ted Husted site (http://www.husted.com/about/struts/resources.htm#extensions) if you're curious. Fr. -Original Message- From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]] Sent: 29 June 2001 18:45 To: '[EMAIL PROTECTED]' Subject: RE: validation On second thoughts ...I guess if there is some validation common to all the actions its probably better to place it in the actionform even if it means looking at information outside the view/form itself? -Original Message- From: Gogineni, Pratima Sent: Friday, June 29, 2001 9:41 AM To: '[EMAIL PROTECTED]' Subject: validation Hi, I have a design question about validation in struts. So far I had been doing most of my validation in my action classes rather than in my actionform. I was just looking into moving some of the validation into the validate method of the action form and find that I have to access some information in the servlet context to do this since the action form itself does not have all the information to do the complete validation. I was thinking that this has a couple of problems - 1. performance since I have to access the same info again in the action classes. 2. I feel it is messy because I am making my actionform which is just a piece/view of the whole picture access information that is outside the view itself ... All of the above leads me to believe that most of the heavy duty validation should happen in the action class. The actionform only does some minor validation like maybe checking for null (basically just using the information it knows). I which case should we not have a validate method in the action classes too? Please let me know if I am missing something / got something wrong ... Thanks Pratima The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
Struts 1.0 on WebSphere 3.5.4??
Has anyone been able to get Struts 1.0 to work on WebSphere 3.5.4 (yes, that's with the new patch 4)? I can get index.jsp to run, but I'm not getting farther than that. I've made the recommended DTD changes, but that didn't help (no ActionMapping, or similar, errors have shown up in the log.) What I'm looking to find out is if I need to go through the additional process of modifying the Struts code as was declared necessary for 3.5.2 and below. Any ideas? Thanks for your help The following is the reported error: - Error 500 An error has occured while processing request:http://hca320872k/strutsexample/logon.jsp Message: Server caught unhandled exception from servlet [jsp11]: cant remove Attributes from request scope Target Servlet: jsp11 StackTrace: Root Error-1: cant remove Attributes from request scope java.lang.IllegalArgumentException: cant remove Attributes from request scope at java.lang.RuntimeException. init (RuntimeException.java:49) at java.lang.IllegalArgumentException. init (IllegalArgumentException.java:45) at org.apache.jasper.runtime.PageContextImpl.removeAttribute(PageContextImpl.java:23 6) at org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java:591) at _logon_jsp_1._jspService(_logon_jsp_1.java:357) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:127) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:39 6) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:718) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:872) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java :626) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServ let.java:160) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.jav a:287) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServl et.java:105) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:360) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager. java:775) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.ja va:701) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebApp RequestDispatcher.java:478) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispa tcher.java:234) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispat cher.java:138) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java: 77) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocat ion.java:67) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestPr ocessor.java:155) at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java :300) at com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQEvent ListenerImp.java:230) at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventListen erImp.java:104) at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQEventS ource.java:212) at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnabl e.notifyService(SQWrapperEventSource.java:353) at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnabl e.run(SQWrapperEventSource.java:220) at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run(OutO fProcThread.java:248) at java.lang.Thread.run(Thread.java:481) Wrapped Error-2: cant remove Attributes from request scope javax.servlet.ServletException: cant remove Attributes from request scope at javax.servlet.ServletException. init (ServletException.java:161) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.jav a:392) at _logon_jsp_1._jspService(_logon_jsp_1.java:378) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:127) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:39 6) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:718) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:872) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
Re: jsp vs do
One thing to note, however, is that the internationalization (bean:message tags) won't go to non-default mappings unless you use a *.do extension. I can't remember if our tests showed that going first to a *.do and then to a *.jsp worked or not...I don't think so. If you need to make your login screen available (to continue the example) in several languages, you need to link to the *.do version, and write your Action class in a way that either won't auto-validate the ActionForm, or won't require info up front. Tim Shadel Gregor Rayman [EMAIL PROTECTED] 07/02/01 11:52AM Anthony Martin [EMAIL PROTECTED] wrote: In general, however, you can go to actions directly as long as you supply the required fields in the url (if any). In the case of the struts-example, going to logon.do gives a validation error because it was expecting the correct query string. For example: http://localhost/struts-example/logon.do?username=foopassword=bar Anthony Yes, you can always go directly to the action, as long as you provide the necessary data. Some actions do not need any input at all. (e. g. /admin/restart.do) It wouldn't be very bad to go directly to login.do without any data, since this would simply report an error and forward to its input (login.jsp) itself. -- gR -Original Message- From: Gregor Rayman [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 10:28 AM To: [EMAIL PROTECTED] Subject: Re: jsp vs do Anthony Martin [EMAIL PROTECTED] wrote: This is how I understand it. A .do maps to an action then to a .jsp. If you link directly to a .jsp, the action never executes. Actions are mapped to a .jsp in the struts-config.xml file. I'm sure there are more clear explanations to follow. Anthony DO takes you to an action which needs some input from your currently displayed from. If you don't have yet the data necessary for the action, you cannot go to the action. In such case you can go to HTML or JSP, which contains the input fields you can fill out and submit to a DO action. In the example application, the link goes to login.jsp, since it is the place where you can enter the credentials. They are then validated in a action (DO). You cannot go to the action directly, since you do not have the username/password yet. -- gR
I18n was: jsp vs do
Thanks, this can be the source of some problems I've had with the i18n. I am using Struts only about one month, I has some problems with figuring out, how bean:message determines the locale it should use. So I peeked in the sources and found out, it uses a session sttribute. I haven't look in the sources deep enough, so I did not find, who actually sets the session attribute. So I used a tiny scriplet which checks to see whether the attribute is set, and if it is not, the scriplet sets it according to the request's preferences. I mean, this could/should be done by the bean:message tag as well. -- gR - Original Message - Timothy Shadel [EMAIL PROTECTED] wrote: One thing to note, however, is that the internationalization (bean:message tags) won't go to non-default mappings unless you use a *.do extension. I can't remember if our tests showed that going first to a *.do and then to a *.jsp worked or not...I don't think so. If you need to make your login screen available (to continue the example) in several languages, you need to link to the *.do version, and write your Action class in a way that either won't auto-validate the ActionForm, or won't require info up front. Tim Shadel Gregor Rayman [EMAIL PROTECTED] 07/02/01 11:52AM Anthony Martin [EMAIL PROTECTED] wrote: In general, however, you can go to actions directly as long as you supply the required fields in the url (if any). In the case of the struts-example, going to logon.do gives a validation error because it was expecting the correct query string. For example: http://localhost/struts-example/logon.do?username=foopassword=bar Anthony Yes, you can always go directly to the action, as long as you provide the necessary data. Some actions do not need any input at all. (e. g. /admin/restart.do) It wouldn't be very bad to go directly to login.do without any data, since this would simply report an error and forward to its input (login.jsp) itself. -- gR -Original Message- From: Gregor Rayman [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 10:28 AM To: [EMAIL PROTECTED] Subject: Re: jsp vs do Anthony Martin [EMAIL PROTECTED] wrote: This is how I understand it. A .do maps to an action then to a .jsp. If you link directly to a .jsp, the action never executes. Actions are mapped to a .jsp in the struts-config.xml file. I'm sure there are more clear explanations to follow. Anthony DO takes you to an action which needs some input from your currently displayed from. If you don't have yet the data necessary for the action, you cannot go to the action. In such case you can go to HTML or JSP, which contains the input fields you can fill out and submit to a DO action. In the example application, the link goes to login.jsp, since it is the place where you can enter the credentials. They are then validated in a action (DO). You cannot go to the action directly, since you do not have the username/password yet. -- gR
Two Problems
Hi everyone, I have two problems, which I am not able to fix. The parser.jar is in my classpath, my library but when I try to run ant dist, I get the following error and these classes are in parser.jar. I have checked my classpath and library many times. The second problem is the applicationResources is unavailable to the Jsp file. I have checked the web.xml and the applicationResource path is right but I am still unable to load it. Thanks, Jyothi [javadoc] Loading source files for package org.apache.struts.taglib.template.u til... [javadoc] Loading source files for package org.apache.struts.upload... [javadoc] Loading source files for package org.apache.struts.util... [javadoc] Constructing Javadoc information... [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\action\Act ionServlet.java:91: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\action\Act ionServlet.java:92: Class org.xml.sax.SAXException not found in import. [javadoc] import org.xml.sax.SAXException; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\R ule.java:66: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\S etPropertiesRule.java:67: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\S etNextRule.java:67: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\S etPropertyRule.java:67: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\C allParamRule.java:67: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\C allMethodRule.java:67: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:76: Class javax.xml.parsers.SAXParser not found in import. [javadoc] import javax.xml.parsers.SAXParser; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:77: Class javax.xml.parsers.SAXParserFactory not found in import. [javadoc] import javax.xml.parsers.SAXParserFactory; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:79: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:80: Class org.xml.sax.DocumentHandler not found in import. [javadoc] import org.xml.sax.DocumentHandler; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:81: Class org.xml.sax.EntityResolver not found in import. [javadoc] import org.xml.sax.EntityResolver; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:82: Class org.xml.sax.ErrorHandler not found in import. [javadoc] import org.xml.sax.ErrorHandler; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:83: Class org.xml.sax.HandlerBase not found in import. [javadoc] import org.xml.sax.HandlerBase; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:84: Class org.xml.sax.InputSource not found in import. [javadoc] import org.xml.sax.InputSource; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:85: Class org.xml.sax.Locator not found in import. [javadoc] import org.xml.sax.Locator; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:86: Class org.xml.sax.SAXException not found in import. [javadoc] import org.xml.sax.SAXException; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:87: Class org.xml.sax.SAXParseException not found in import. [javadoc] import org.xml.sax.SAXParseException; [javadoc]^ [javadoc]
Re: Two Problems
do you have parser.jar in ant\lib??? regarding the applicationresources, i don't know what is your application but try putting it in web-inf\classes or if your classes are in a .jar file then add this resources file to that jar file. bottom line is it should be somewhere, your appserver can access it. hope this helps, rama - Original Message - From: Jyothi Palvai [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 4:23 PM Subject: Two Problems Hi everyone, I have two problems, which I am not able to fix. The parser.jar is in my classpath, my library but when I try to run ant dist, I get the following error and these classes are in parser.jar. I have checked my classpath and library many times. The second problem is the applicationResources is unavailable to the Jsp file. I have checked the web.xml and the applicationResource path is right but I am still unable to load it. Thanks, Jyothi [javadoc] Loading source files for package org.apache.struts.taglib.template.u til... [javadoc] Loading source files for package org.apache.struts.upload... [javadoc] Loading source files for package org.apache.struts.util... [javadoc] Constructing Javadoc information... [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\action\Act ionServlet.java:91: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\action\Act ionServlet.java:92: Class org.xml.sax.SAXException not found in import. [javadoc] import org.xml.sax.SAXException; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\R ule.java:66: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\S etPropertiesRule.java:67: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\S etNextRule.java:67: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\S etPropertyRule.java:67: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\C allParamRule.java:67: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\C allMethodRule.java:67: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:76: Class javax.xml.parsers.SAXParser not found in import. [javadoc] import javax.xml.parsers.SAXParser; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:77: Class javax.xml.parsers.SAXParserFactory not found in import. [javadoc] import javax.xml.parsers.SAXParserFactory; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:79: Class org.xml.sax.AttributeList not found in import. [javadoc] import org.xml.sax.AttributeList; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:80: Class org.xml.sax.DocumentHandler not found in import. [javadoc] import org.xml.sax.DocumentHandler; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:81: Class org.xml.sax.EntityResolver not found in import. [javadoc] import org.xml.sax.EntityResolver; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:82: Class org.xml.sax.ErrorHandler not found in import. [javadoc] import org.xml.sax.ErrorHandler; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:83: Class org.xml.sax.HandlerBase not found in import. [javadoc] import org.xml.sax.HandlerBase; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:84: Class org.xml.sax.InputSource not found in import. [javadoc] import org.xml.sax.InputSource; [javadoc]^ [javadoc] C:\strutsFiles\jakarta-struts\src\share\org\apache\struts\digester\D igester.java:85: Class org.xml.sax.Locator not found in import. [javadoc] import org.xml.sax.Locator; [javadoc]^ [javadoc]
RE: jsp vs do
Oops forget my answer, I did not read well enough the question in the first instance, sorry. Fr. -Original Message- From: Rey Francois Sent: 02 July 2001 18:56 To: '[EMAIL PROTECTED]' Subject: RE: jsp vs do Probably because you want to remain faithful to the MVC approach: only the controller should decide where to dispatch a request. Linking JSPs together directly can lead to a spaghetti mess. What you want is one central point where the request dispacthing is done (the ActionServlet) so you can easily change it later on for all pages containing a certain request. This is why is's better to go through the ActionServlet (using .do instead of .jsp). Your login.jsp may not need some pre-processing logic at present, but in the future you may have the requirement to do so later on, in which case you need an Action and a mapping in struts-config.xml (the MVC approach recommends that you do not put such logic directly in the login.jsp itself). Fr. -Original Message- From: Bob Byron [mailto:[EMAIL PROTECTED]] Sent: 02 July 2001 18:56 To: struts-user Subject: jsp vs do I am still in the early stages of understanding struts and would like to know a bit more about the jsp vs do extensions. In looking at the index.jsp page of the struts-example, you see two links. Register with the MailReader Demonstration Application links to editRegristration.do (***DO***) Log on to the MailReader Demonstration Application links to login.jsp (***JSP***) Why was the register page linked to a do instead of a jsp page? Why was the login page linked to a jsp instead of a do? I do understand that the do takes you through the struts actions, but don't understand why the login link was set to login.jsp instead of login.do initially. (I am not asking What it does so much as I am asking Why was the decision made to do it that way.) Thank You, Bob Byron __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
Re: OFFTOPIC: Solaris and Tomcat problems!
There is no compiler class (jar) distributed with Tomcat, out of the box. Apparently there are none in open source. Apache will only distribute open source. Of course, Sun (and others) distribute tools.jar (or equiv) gratis. Modify your startup.sh (or is it setenv.sh ??) to include the tools.jar on the Tomcat classpath. Then all is well. - Original Message - From: Mikkel Bruun [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 3:09 PM Subject: OFFTOPIC: Solaris and Tomcat problems! This has nothing to do with struts, but I know this list has a couple of guru's and demigods lurking... I have just installed solaris 8 on an intel machine. I installed tomcat 3.2.2 and it runs the servlets examples without any problems...BUT There seems to be a problem running the jsp files... Whenever i request a jsp file it just freezes, and i get no respond... Looking into the matter I saw that the jsp was succesfully compiled to a .java file...BUT The jsp compiler seems to be endlessly looping in the translation, because it keeps writing the same line over and over again (until im out of disk space)... I looked into the tomcat mailling archives and saw that somebod had experienced this problem before, but I wasnt able to find a solution... Any suggestions thanks in advance... Mikkel
RE: Netbeans Support of Struts
I am facing problem when I tried to make org.apache.startup.Tomcat as my main class. It throws me some exception. I have added the jar file in my file system. Do I need to specifically expand the jar file and then add the directories TIA Ajit At 11:35 AM 7/3/01 +1200, you wrote: Yes you can run/debug a struts application using Netbeans 3.2. To get it going (using tomcat): - Add all the tomcat libraries into your Projects Filesystems. - Add a link in the Project window to webserver.jar - Make org.apache.tomcat.startup.Tomcat your main class - Edit the project settings Execution Types properties. Add -Dtomcat.home=C:\tomcat to all the External Process properties (So that the tomcat startup class knows where to file the tomcat web applications) Just use Execute Project, or Debug Project from the main menu to run, or debug your struts application. Richard. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 03 July 2001 05:07 To: [EMAIL PROTECTED] Subject: Netbeans Support of Struts Does the Netbeans IDE support the creation of Struts applications and running/debugging them inside Netbeans? Dan
Re: Please confirm css ok from client-side jscript validation
Sorry for the delay ,yes all works fine cheers 4 your contribution. Peter Alfors wrote: You can either link to a javascript file: SCRIPT language=JavaScript src=myJavascriptFile.js/SCRIPT Or include the javascript code directly: SCRIPT language=JavaScript function myFunct() {} /SCRIPT and call methods from whichever event you want: onLoad, onClick, etc HTH, Pete Chuck Amadi wrote: I have placed the CSS file in my struts-bbnpa( named web app) and not directly in WEB-INF directory. but as follows - /struts-bbnpa/css/bbnpa.css same level as WEB-INF I have used the LINK tag as the href the client's browser should not be able to access the style sheet. as demonstrated - works fine . CHEERS!! link rel=stylesheet href=css/bbnpa.css charset=ISO-8859-1 type=text/css/struts-bbnpa/css/bbnpa.css nevertheless how do i embed the javascript within jsp as i had js working on my college assignment web-site (a timed window status scroll ) albiet wont work on my companies web project. any ideas. Cheers again chuck -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: help with package struts-classpath
Hi,there since my last altication my .java files wont compile into .class files i am recieveing invalid package declaretions . Thus can i create a class dir that 's the same top level as tomcat's bin,conf,lib,logs,src,webapps and work as per the tomcat doc's as im have spent considerable time on this invalid path. Cheers Chuck Jonathan wrote: FIRST you need put the jars that are in the ora directory inside the lib directory instead take the struts-documentation, the struts-example etc.etc. etc. out of WEB-INF. They dont belong there. In fact, the .war files are what you should be working with and they should be in c:\jakarta-tomcat-3.2.1\webapps inside the lib directory you should have struts.jar ALSO for compiling your project your classpath should be c:\..the jars inside c:\jakarta-tomcat-3.2.1\lib c:\..the jars inside c:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\lib c:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\classes Now try and tell me what happened - Original Message - From: Chuck Amadi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 14, 2001 10:50 AM Subject: Re: help with package struts-classpath Is This Better Jonathan !! Cheers Chuck Jonathan wrote: Part 1.1Type: Plain Text (text/plain) Encoding: quoted-printable -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
RE: Netbeans Support of Struts
You shouldn't need to expand the jar. What version of NetBeans are you using, and what is the exception that is raised? -Original Message-From: Ajit Chourasia [mailto:[EMAIL PROTECTED]]Sent: 03 July 2001 12:32To: [EMAIL PROTECTED]Subject: RE: Netbeans Support of StrutsI am facing problem when I tried to make org.apache.startup.Tomcat as my main class. It throws me some exception. I have added the jar file in my file system. Do I need to specifically expand the jar file and then add the directories TIAAjitAt 11:35 AM 7/3/01 +1200, you wrote: Yes you can run/debug a struts application using Netbeans 3.2.To get it going (using tomcat):- Add all the tomcat libraries into your Projects Filesystems.- Add a link in the Project window to "webserver.jar"- Make "org.apache.tomcat.startup.Tomcat" your main class- Edit the project settings "Execution Types" properties. Add-Dtomcat.home=C:\tomcat to all the "External Process" properties (So thatthe tomcat startup class knows where to file the tomcat web applications)Just use "Execute Project", or "Debug Project" from the main menu to run, ordebug your struts application.Richard.-Original Message-From: [EMAIL PROTECTED][mailto:[EMAIL PROTECTED]]Sent: 03 July 2001 05:07To: [EMAIL PROTECTED]Subject: Netbeans Support of StrutsDoes the Netbeans IDE support the creation of Struts applications andrunning/debugging them inside Netbeans?Dan
RE: Error
Yes, I am familiar with this error. The problem is the user database is not loaded. For the specific reason why the user database didn't, you have to check the servlet logs. In those logs you'll find an error message with regards to the user database not loading. Regards, Matthew -Original Message- From: Mahesh Bhagia [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 2:40 PM To: Apache Struts (E-mail) Subject: Error Hi, Does anybody know reason for this error, while running sample application, ERROR: User database not loaded -- check servlet container logs for error messages Thanks winmail.dat
RE: jsp vs do
Probably because you want to remain faithful to the MVC approach: only the controller should decide where to dispatch a request. Linking JSPs together directly can lead to a spaghetti mess. What you want is one central point where the request dispacthing is done (the ActionServlet) so you can easily change it later on for all pages containing a certain request. This is why is's better to go through the ActionServlet (using .do instead of .jsp). Your login.jsp may not need some pre-processing logic at present, but in the future you may have the requirement to do so later on, in which case you need an Action and a mapping in struts-config.xml (the MVC approach recommends that you do not put such logic directly in the login.jsp itself). Fr. -Original Message- From: Bob Byron [mailto:[EMAIL PROTECTED]] Sent: 02 July 2001 18:56 To: struts-user Subject: jsp vs do I am still in the early stages of understanding struts and would like to know a bit more about the jsp vs do extensions. In looking at the index.jsp page of the struts-example, you see two links. Register with the MailReader Demonstration Application links to editRegristration.do (***DO***) Log on to the MailReader Demonstration Application links to login.jsp (***JSP***) Why was the register page linked to a do instead of a jsp page? Why was the login page linked to a jsp instead of a do? I do understand that the do takes you through the struts actions, but don't understand why the login link was set to login.jsp instead of login.do initially. (I am not asking What it does so much as I am asking Why was the decision made to do it that way.) Thank You, Bob Byron __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
Help with Resources !!
Hello All - I am new to Struts and trying to run the Struts example applications. When I am starting Tomcat, everything loads fine (as found in the $TOMCAT_HOME/logs/servlet.log file). In fact the following gets logged in the file : 2001-07-02 08:38:46 - path=/struts-example :jsp: init 2001-07-02 08:38:46 - path=/struts-example :database: init 2001-07-02 08:38:46 - path=/struts-example :database: Initializing database servlet 2001-07-02 08:38:46 - path=/struts-example :database: Loading database from '/WEB-INF/database.xml' 2001-07-02 08:38:46 - path=/struts-example :action: init 2001-07-02 08:38:46 - path=/struts-example :action: Loading application resources from resource org.apache.struts.example.ApplicationResources 2001-07-02 08:38:46 - path=/struts-example :action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2001-07-02 08:38:46 - path=/struts-example :action: Process servletName=action, urlPattern=*.do 2001-07-02 08:38:46 - path=/struts-example :action: Mapping for servlet 'action' = '*.do' But when I try to run the application in struts-example, I get the following error : javax.servlet.ServletException: Missing message for key index.title But the ApplicationResources file is in proper place, as given in the configuration files. Any help will be appreciated. Cheers. - Debasish __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: Help with Resources !!
Whether there is the key index.title in your ApplicationResources file or not ? - Original Message - From: Debasish Ghosh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 11:17 AM Subject: Help with Resources !! Hello All - I am new to Struts and trying to run the Struts example applications. When I am starting Tomcat, everything loads fine (as found in the $TOMCAT_HOME/logs/servlet.log file). In fact the following gets logged in the file : 2001-07-02 08:38:46 - path=/struts-example :jsp: init 2001-07-02 08:38:46 - path=/struts-example :database: init 2001-07-02 08:38:46 - path=/struts-example :database: Initializing database servlet 2001-07-02 08:38:46 - path=/struts-example :database: Loading database from '/WEB-INF/database.xml' 2001-07-02 08:38:46 - path=/struts-example :action: init 2001-07-02 08:38:46 - path=/struts-example :action: Loading application resources from resource org.apache.struts.example.ApplicationResources 2001-07-02 08:38:46 - path=/struts-example :action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2001-07-02 08:38:46 - path=/struts-example :action: Process servletName=action, urlPattern=*.do 2001-07-02 08:38:46 - path=/struts-example :action: Mapping for servlet 'action' = '*.do' But when I try to run the application in struts-example, I get the following error : javax.servlet.ServletException: Missing message for key index.title But the ApplicationResources file is in proper place, as given in the configuration files. Any help will be appreciated. Cheers. - Debasish __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: NotEqual or Present?
If u have a text field on the html form . When u submit that form without entering anything in textfield then in the servlet if u try to do String value = request.getParameter("nameOfTextField") , u will get value ="" and not null So no need of settingdataObjectsvalues to "" explicitely - Original Message - From: Matt Raible To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 8:07 PM Subject: Re: NotEqual or Present? We set all our values to "" in our dataObjects so the UI does not display null on the screen. Does struts auto-convert a null to a "" for display? If so, then we can get the getter/setters in our dataObjects (forms). Matt - Original Message - From: Spencer Smith To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 12:57 PM Subject: Re: NotEqual or Present? Why not default the value to null and use the Present/NotPresent methods? ie. String searchParam = null; logic:present name="myForm" property="searchParam" show this if property "searchParam" is not present /logic:notPresent This way, if the user never sets it, it will always be null (and notPresent). - Original Message - From: Matt Raible To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 11:53 AM Subject: Re: NotEqual or Present? If I do this, I get the following error - it seems to go away when I put a value in value="put value or space here" [02/Jul/2001 12:52:02:2] error: Exception: SERVLET-execution_failed: Error in executing servlet resourceList: java.lang.Exception: JSP Error: Setter method not provided for class org.apache.struts.taglib.logic.NotMatchTag, property classException Stack Trace:java.lang.Exception: JSP Error: Setter method not provided for class org.apache.struts.taglib.logic.NotMatchTag, property class at com.netscape.jsp.JSPTree.genAttributeAssignments(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSPTree.compileUserTag(Unknown Source) at com.netscape.jsp.JSPTree.compile(Unknown Source) at com.netscape.jsp.JSP.compile(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.JSPtoJava(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.thread.ThreadBasic.run(Native Method) at java.lang.Thread.run(Thread.java:479) - Original Message - From: Rama Krishna To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 12:45 PM Subject: Re: NotEqual or Present? probably you should use match and notmatch tags logic:notmatch name="myForm" property="searchParam" value="" show this if property "searchParam" is not equal to "" /logic:notEqual rama. - Original Message - From: Matt Raible To: Struts User Sent: Monday, July 02, 2001 11:17 AM Subject: NotEqual or Present? I am trying to check if the user entered a value for a search criteria in a results page. My ActionForm sets a propertyto "" if the user did not enter a value. So in the following code, I want to only show it if the property does not equal "". But the following does not work, should it? logic:notEqual name="myForm" property="searchParam" value="" show this if property "searchParam" is not equal to ""
Re: Help with Resources !!
Yes, it is there. Actually I am trying to run the struts-example application that came with Struts. I checked that the ApplicationResources file is in proper place and contains the key : index.title. I am running on Windows NT. Actually I looked up the mail archive and found a similar problem faced by a Windows 2000 user. No solution to this problem was posted in the thread. --- Pham Thanh Quan [EMAIL PROTECTED] wrote: Whether there is the key index.title in your ApplicationResources file or not ? - Original Message - From: Debasish Ghosh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 11:17 AM Subject: Help with Resources !! Hello All - I am new to Struts and trying to run the Struts example applications. When I am starting Tomcat, everything loads fine (as found in the $TOMCAT_HOME/logs/servlet.log file). In fact the following gets logged in the file : 2001-07-02 08:38:46 - path=/struts-example :jsp: init 2001-07-02 08:38:46 - path=/struts-example :database: init 2001-07-02 08:38:46 - path=/struts-example :database: Initializing database servlet 2001-07-02 08:38:46 - path=/struts-example :database: Loading database from '/WEB-INF/database.xml' 2001-07-02 08:38:46 - path=/struts-example :action: init 2001-07-02 08:38:46 - path=/struts-example :action: Loading application resources from resource org.apache.struts.example.ApplicationResources 2001-07-02 08:38:46 - path=/struts-example :action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2001-07-02 08:38:46 - path=/struts-example :action: Process servletName=action, urlPattern=*.do 2001-07-02 08:38:46 - path=/struts-example :action: Mapping for servlet 'action' = '*.do' But when I try to run the application in struts-example, I get the following error : javax.servlet.ServletException: Missing message for key index.title But the ApplicationResources file is in proper place, as given in the configuration files. Any help will be appreciated. Cheers. - Debasish __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/