Problem with resin-1.2.5
Hello Everybody i am using resin-1.2.5 with jdk1.3 as my web server just now i got a diffrent problem.there is standalone.exe in my bin directory if i double click it a window pops up and diappears but when i run it from commmand promt it works okay.i think the problem is that the envoirment the dos promt is having is not the same when i doulble click it but i am unable to trace it please send your suggestioni am using resin as a part of some product.. D.C.
RE: struts not reading properties file
Hello Venkata thank you for the link i think it solves my problem. -Original Message- From: Allamsetty, Venkata [mailto:[EMAIL PROTECTED]] Sent: Friday, April 20, 2001 10:22 AM To: '[EMAIL PROTECTED]' Subject: RE: struts not reading properties file http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html thanks Venkata -Original Message- From: Dinesh Chaturvedi [mailto:[EMAIL PROTECTED]] Sent: Friday, April 20, 2001 12:23 AM To: [EMAIL PROTECTED] Subject: RE: struts not reading properties file Hello Everybody can you help me finding link that has JAVA coding standards .i hope many of you might have gone through it. D.C.
RE: struts not reading properties file
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html thanks Venkata -Original Message- From: Dinesh Chaturvedi [mailto:[EMAIL PROTECTED]] Sent: Friday, April 20, 2001 12:23 AM To: [EMAIL PROTECTED] Subject: RE: struts not reading properties file Hello Everybody can you help me finding link that has JAVA coding standards .i hope many of you might have gone through it. D.C.
RE: struts not reading properties file
Hello Everybody can you help me finding link that has JAVA coding standards .i hope many of you might have gone through it. D.C.
RE: Re[2]: Handling File Upload Failures
Soeren, Michael> I just added two new exceptions to be thrown when the content length or Michael> maximum length is exceeded, they will be the root cause of the Michael> ServletException thrown. Is this good enough to be able to elegantly handle Michael> the problem for you? >the new code is working well for me now. >But one question I still have is where would I catch the post to big >exeption? >Is there an elegant way in struts to do it? I would assume if you could somehow catch the ServletException that wraps it, you could get the root cause and see if it's an instance of org.apache.struts.upload.MaxLengthExceededException and go from there. Could that work inside of a jsp error page? Like this: <%@ page language="java" errorPage="true" %> <% if (exception instanceof ServletException) { Exception rootException = ServletException.getRootCause(); if (rootException instanceof MaxLengthExceededException) { //do your thing here } } %>
RE: Newbie: taglib uri's to be included
Hi > I wanna know whether is it necessary to include > struts-html.tld, struts-form.tld; if i include > struts.tld in my jsp page. http://www.mail-archive.com/struts-user@jakarta.apache.org/msg03606.html "The struts.tld file is for the old (pre-1.0) taglib. These tags are deprecated in 1.0, and are there only for backwards compatibility. The 1.0 taglibs use the struts-*.tld files (e.g. struts-template.tld). All of the implementations, though, are in struts.jar, as you noted." Hope this helps. Tobias
RE: Checking User log in in a JSP page
Hi... > I would argue that logging a user in is business logic. > However, the user > state (i.e. whether the user is logged in) is part of the > model - a "permission > denied" message is the appropriate view of the model when the > user is not > logged in; thus this belongs in the JSP. Everything is right - though I would say that checking permissions make's most sense on the controller side (->business logic). > I check permissions at the top of all of my JSP's - I don't > feel that this has > caused business logic to leak into the pages. However, if > clients can post > directly to your actions the actions need to check > permissions, too (since the > post might not have come from a valid page). In my application all important stuff (retrieving/storing data to be displayed in my JSP) is done by the controller, bypassing the servlet is possible but doesn't make much sense. Most likely the user will not see more than some ugly nullpointer exceptions because beans are missing or whatever. There's no "official" way to get to these pages directly... so - who cares?! :) Regards, Tobias
Newbie: taglib uri's to be included
Hi, I wanna know whether is it necessary to include struts-html.tld, struts-form.tld; if i include struts.tld in my jsp page. thanx, sampath __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: Need help with logic:iterate :)
Hi Alex, see below Alex Colic schrieb: > > Hi, > > I am trying to get a handle on the logic:iterate tag. > > I have an object in application scope under the key 'storeroomList.' > There is a vector of objects under the property 'storeroomList'. Each one of > the objects in this vector has a property 'name.' > > What I am trying to do is go through the vector and print out the names. I > have attempted the below but the only storeroom name to be printed out to > the screen is the last storeroom. I traced the execution of the iterate > class and it looks to be getting the correct data, going through each > element of the vector and pulling out the name property and then looping > through all the elements without printing them to the screen and then the > bean:write is called. > > Any help is as usual greatly appreciated. > > Oh, bonus question.. Lets say I only wanted to print out a particular > storeroom. Iterate through the vector but only print the storeroom that had > the name "main." > > property="storeroomList"/> ^ You close the iterate tag by putting the ending "/" right in the start tag. I had this problem several times. It is a pity that there is NO ERROR message is generated > > > > Regards > > Alex
RE: Need help with logic:iterate :)
Your tag closes itself before it gets to the tag body. i.e. I made this mistake a couple times too so don't feel bad! On your bonus question, your JSP shouldn't be performing business logic, the bean should be. Create another getter on your bean for the specific thing you want to display. Alternatively, inside your you could wrap a tag around your and conditionally display a particular value within the iteration. Roman -Original Message- From: Alex Colic Sent: Thu 4/19/2001 12:50 PM To: Struts Cc: Subject: Need help with logic:iterate :) Hi, I am trying to get a handle on the logic:iterate tag. I have an object in application scope under the key 'storeroomList.' There is a vector of objects under the property 'storeroomList'. Each one of the objects in this vector has a property 'name.' What I am trying to do is go through the vector and print out the names. I have attempted the below but the only storeroom name to be printed out to the screen is the last storeroom. I traced the execution of the iterate class and it looks to be getting the correct data, going through each element of the vector and pulling out the name property and then looping through all the elements without printing them to the screen and then the bean:write is called. Any help is as usual greatly appreciated. Oh, bonus question.. Lets say I only wanted to print out a particular storeroom. Iterate through the vector but only print the storeroom that had the name "main." Regards Alex winmail.dat
Re: Need help with logic:iterate :)
You're closing your first element, so the iterate never gets to the bean:write until after the loop is finished. You have: It should be (note the lack of the trailing slash): If you only want to do something for one specific bean, then use logic:equal inside the iterate tag. -- Dan Miser http://www.distribucon.com >From: "Alex Colic" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: "Struts" <[EMAIL PROTECTED]> >Subject: Need help with logic:iterate :) >Date: Thu, 19 Apr 2001 15:50:44 -0400 > >I >have attempted the below but the only storeroom name to be printed out to >the screen is the last storeroom. I traced the execution of the iterate >class and it looks to be getting the correct data, going through each >element of the vector and pulling out the name property and then looping >through all the elements without printing them to the screen and then the >bean:write is called. > >Oh, bonus question.. Lets say I only wanted to print out a particular >storeroom. Iterate through the vector but only print the storeroom that had >the name "main." > > >property="storeroomList"/> > > _ Get your FREE download of MSN Explorer at http://explorer.msn.com
RE: struts not reading properties file
Hey G.L., You might also want to check if the web app is configured properly on Orion. I would try adding a class to the classes directory of your web app and then try using the class in a tag. If it can't load the useBean class then I would guess it is a Orion configuration problem. In addition, when you say cais.properties is located in /WEB-INF/classes is that for the default web app or named web app? Hope this Helps, Abraham > -Original Message- > From: Peter Alfors [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 19, 2001 12:45 PM > To: [EMAIL PROTECTED] > Subject: Re: struts not reading properties file > > > In your web.xml file, does the tag point to > the correct > location? > > > ... > > application > com.myResources.dictionary > > > The properties file does not need to be in both places. > You could either place it the classes directory, or jar it up > with the rest of > your classes. > > Pete > > Shruti Biyani wrote: > > > I get the same error message all the time...I do not know why...I think > > applicationResources.properties should be in 2 places...One in > src folder > > and other in classes folder...For some reason, when I execute the run > > file...ti throws an exception saying that it cannot find my > User class and > > then when I display the jsp, it gives the message: > > > > 500 Internal Server Error > > > > javax.servlet.jsp.JspException: Missing message for key > main.title at > > > > org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java, > > > > Compiled Code) at /index.jsp._jspService(/index.jsp.java, Compiled > > > Code) > > > > > > > Anyone face this problem? > > > > --Shruti > > > > -Original Message- > > From: Rajan Gupta [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, April 19, 2001 12:29 PM > > To: [EMAIL PROTECTED] > > Subject: Re: struts not reading properties file > > > > Have u provide the correct location of ApplicationResources in web.xml? > > --- "G.L. Grobe" <[EMAIL PROTECTED]> wrote: > > > Agreed, but not the case. > > > > > > - Original Message - > > > From: "Dan Miser" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Tuesday, April 17, 2001 11:13 PM > > > Subject: Re: struts not reading properties file > > > > > > > > > > Most likely you have a copy of struts.jar somewhere on your > CLASSPATH. > > > It > > > > only belongs in WEB-INF/lib. > > > > -- > > > > Dan Miser > > > > http://www.distribucon.com > > > > > > > > - Original Message - > > > > From: G.L. Grobe > > > > To: [EMAIL PROTECTED] > > > > Sent: Tuesday, April 17, 2001 10:27 PM > > > > Subject: struts not reading properties file > > > > > > > > 500 Internal Server Error > > > > javax.servlet.jsp.JspException: Missing message for key > main.title at > > > > org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java, > > > > Compiled Code) at /index.jsp._jspService(/index.jsp.java, Compiled > > > Code) > > > at > > > > > > > > > > > > > > > __ > > Do You Yahoo!? > > Yahoo! Auctions - buy the things you want at great prices > > http://auctions.yahoo.com/ >
Tomcat+Apache Struts problem
I am already with problems with struts on apache+tomcat configuration, but now I discover new facts: - The problem is related with the WEB_INF/web.xml file. The struts.har file isn't found if is on WEB-INF/lib. I must move it to WEB-INF/classes - I must modify the server.xml file? If I don't modify it, Tomcat doesn't create a tomcat-apache.conf with all the applications Some idea? CUL8R,[]s Jim Bruno Goldberg <[EMAIL PROTECTED]>
Need help with logic:iterate :)
Hi, I am trying to get a handle on the logic:iterate tag. I have an object in application scope under the key 'storeroomList.' There is a vector of objects under the property 'storeroomList'. Each one of the objects in this vector has a property 'name.' What I am trying to do is go through the vector and print out the names. I have attempted the below but the only storeroom name to be printed out to the screen is the last storeroom. I traced the execution of the iterate class and it looks to be getting the correct data, going through each element of the vector and pulling out the name property and then looping through all the elements without printing them to the screen and then the bean:write is called. Any help is as usual greatly appreciated. Oh, bonus question.. Lets say I only wanted to print out a particular storeroom. Iterate through the vector but only print the storeroom that had the name "main." Regards Alex
Re: struts not reading properties file
In your web.xml file, does the tag point to the correct location? ... application com.myResources.dictionary The properties file does not need to be in both places. You could either place it the classes directory, or jar it up with the rest of your classes. Pete Shruti Biyani wrote: > I get the same error message all the time...I do not know why...I think > applicationResources.properties should be in 2 places...One in src folder > and other in classes folder...For some reason, when I execute the run > file...ti throws an exception saying that it cannot find my User class and > then when I display the jsp, it gives the message: > > 500 Internal Server Error > > > javax.servlet.jsp.JspException: Missing message for key main.title at > > > org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java, > > > Compiled Code) at /index.jsp._jspService(/index.jsp.java, Compiled > > Code) > > > > Anyone face this problem? > > --Shruti > > -Original Message- > From: Rajan Gupta [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 19, 2001 12:29 PM > To: [EMAIL PROTECTED] > Subject: Re: struts not reading properties file > > Have u provide the correct location of ApplicationResources in web.xml? > --- "G.L. Grobe" <[EMAIL PROTECTED]> wrote: > > Agreed, but not the case. > > > > - Original Message - > > From: "Dan Miser" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, April 17, 2001 11:13 PM > > Subject: Re: struts not reading properties file > > > > > > > Most likely you have a copy of struts.jar somewhere on your CLASSPATH. > > It > > > only belongs in WEB-INF/lib. > > > -- > > > Dan Miser > > > http://www.distribucon.com > > > > > > - Original Message - > > > From: G.L. Grobe > > > To: [EMAIL PROTECTED] > > > Sent: Tuesday, April 17, 2001 10:27 PM > > > Subject: struts not reading properties file > > > > > > 500 Internal Server Error > > > javax.servlet.jsp.JspException: Missing message for key main.title at > > > org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java, > > > Compiled Code) at /index.jsp._jspService(/index.jsp.java, Compiled > > Code) > > at > > > > > > > > > > __ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ begin:vcard n:; x-mozilla-html:FALSE org:http://www.irista.com/logo/irista.gif">Bringing Vision to Your Supply Chain adr:;; version:2.1 end:vcard
RE: struts not reading properties file
I get the same error message all the time...I do not know why...I think applicationResources.properties should be in 2 places...One in src folder and other in classes folder...For some reason, when I execute the run file...ti throws an exception saying that it cannot find my User class and then when I display the jsp, it gives the message: 500 Internal Server Error > > javax.servlet.jsp.JspException: Missing message for key main.title at > > org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java, > > Compiled Code) at /index.jsp._jspService(/index.jsp.java, Compiled > Code) > Anyone face this problem? --Shruti -Original Message- From: Rajan Gupta [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 12:29 PM To: [EMAIL PROTECTED] Subject: Re: struts not reading properties file Have u provide the correct location of ApplicationResources in web.xml? --- "G.L. Grobe" <[EMAIL PROTECTED]> wrote: > Agreed, but not the case. > > - Original Message - > From: "Dan Miser" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, April 17, 2001 11:13 PM > Subject: Re: struts not reading properties file > > > > Most likely you have a copy of struts.jar somewhere on your CLASSPATH. > It > > only belongs in WEB-INF/lib. > > -- > > Dan Miser > > http://www.distribucon.com > > > > - Original Message - > > From: G.L. Grobe > > To: [EMAIL PROTECTED] > > Sent: Tuesday, April 17, 2001 10:27 PM > > Subject: struts not reading properties file > > > > 500 Internal Server Error > > javax.servlet.jsp.JspException: Missing message for key main.title at > > org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java, > > Compiled Code) at /index.jsp._jspService(/index.jsp.java, Compiled > Code) > at > > > > > __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: struts not reading properties file
Have u provide the correct location of ApplicationResources in web.xml? --- "G.L. Grobe" <[EMAIL PROTECTED]> wrote: > Agreed, but not the case. > > - Original Message - > From: "Dan Miser" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, April 17, 2001 11:13 PM > Subject: Re: struts not reading properties file > > > > Most likely you have a copy of struts.jar somewhere on your CLASSPATH. > It > > only belongs in WEB-INF/lib. > > -- > > Dan Miser > > http://www.distribucon.com > > > > - Original Message - > > From: G.L. Grobe > > To: [EMAIL PROTECTED] > > Sent: Tuesday, April 17, 2001 10:27 PM > > Subject: struts not reading properties file > > > > 500 Internal Server Error > > javax.servlet.jsp.JspException: Missing message for key main.title at > > org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java, > > Compiled Code) at /index.jsp._jspService(/index.jsp.java, Compiled > Code) > at > > > > > __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re[2]: Handling File Upload Failures
Hi, Michael> I just added two new exceptions to be thrown when the content length or Michael> maximum length is exceeded, they will be the root cause of the Michael> ServletException thrown. Is this good enough to be able to elegantly handle Michael> the problem for you? the new code is working well for me now. But one question I still have is where would I catch the post to big exeption? Is there an elegant way in struts to do it? Soeren
RE: Error creating Action instance for path in .EAR!
Hi, I think I found what's going on with this error. I have a J2EE application which has .war part and ejb.jar part. If I only deploy .war part of my application, struts works fine. However, after I pack .war with my ejb components. Struts give me this error message! Could someone please tell me what I should change if I want struts to work in my .ear package. Thanks!! Lewis Lin -Original Message- From: Lewis Lin [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 1:37 PM To: [EMAIL PROTECTED] Subject: Error creating Action instance for path Hi, I have been trying hard to get struts work on my application. I can deploy struts example in my jboss server without any problem. The problem happens when I try to write my own Action class. I got this error in my tomcat container: Error creating Action instance for path '/searchEntity', class name 'com.fairfin.pms.main.control.web.actions.SearchEntityAction' - java.lang.NoClassDefFoundError: org/apache/struts/action/Action However, I can run /admin/reload successfully. Which I think my struts in deployed correctly. Can someone please please help me with this? Thanks, Lewis Lin == PC home §K¶O¹q¤l«H½c¡A¥Ó½Ð½Ð¦Ü: http://www.pchome.com.tw PC home Online ºô¸ô®a®x¡@¡@ ·|û²Ä¤@¡A¥xÆW³Ì¤jªº¤J¤fºô¯¸ == == PC home §K¶O¹q¤l«H½c¡A¥Ó½Ð½Ð¦Ü: http://www.pchome.com.tw PC home Online ºô¸ô®a®x¡@¡@ ·|û²Ä¤@¡A¥xÆW³Ì¤jªº¤J¤fºô¯¸ ==
Re: Checking User log in in a JSP page
I would argue that logging a user in is business logic. However, the user state (i.e. whether the user is logged in) is part of the model - a "permission denied" message is the appropriate view of the model when the user is not logged in; thus this belongs in the JSP. I check permissions at the top of all of my JSP's - I don't feel that this has caused business logic to leak into the pages. However, if clients can post directly to your actions the actions need to check permissions, too (since the post might not have come from a valid page). Irfan Mohammed wrote: > This question is regarding where to provide the check for user logged in, > should it be done in the Jsp or the actionServlet. While I have proposed > the Jsp since you may not want a user to see a page if they are not > registered, others claim that it should be in the actionServlet. Their > claim is that checking for user logged in is business logic (even though its > done using a tag) and there should be no business logic in a Jsp page. > Further allowing this you open the Jsp page to adding more business logic. > My question is where do you draw the line on the business logic that can be > provided in a Jsp page. What are the thoughts of designers out there. > > Thanks > Irfan
how do I report exceptions during Action setup?
Hello, All of my Actions may throw Exceptions during their initialization phase (during setServlet). setServlet isn't set up to throw any Exceptions. What happens if my Action class is not able to initialize properly (can't get a reference to my EJBs or a DataSource, as an example). I would want to somehow signal to the ActionServlet that this Action is invalid. If I can't throw an exception, is there a way to notify the ActionServlet that this Action is invalid? Thanks very much for any tips and pointers! Seth Seth Ladd | Software Engineer, Product Development Brivo Systems, Inc. [EMAIL PROTECTED] Confidential and Proprietary, Brivo Systems, Inc.
Error creating Action instance for path
Hi, I have been trying hard to get struts work on my application. I can deploy struts example in my jboss server without any problem. The problem happens when I try to write my own Action class. I got this error in my tomcat container: Error creating Action instance for path '/searchEntity', class name 'com.fairfin.pms.main.control.web.actions.SearchEntityAction' - java.lang.NoClassDefFoundError: org/apache/struts/action/Action However, I can run /admin/reload successfully. Which I think my struts in deployed correctly. Can someone please please help me with this? Thanks, Lewis Lin == PC home §K¶O¹q¤l«H½c¡A¥Ó½Ð½Ð¦Ü: http://www.pchome.com.tw PC home Online ºô¸ô®a®x¡@¡@ ·|û²Ä¤@¡A¥xÆW³Ì¤jªº¤J¤fºô¯¸ ==
Checking User log in in a JSP page
This question is regarding where to provide the check for user logged in, should it be done in the Jsp or the actionServlet. While I have proposed the Jsp since you may not want a user to see a page if they are not registered, others claim that it should be in the actionServlet. Their claim is that checking for user logged in is business logic (even though its done using a tag) and there should be no business logic in a Jsp page. Further allowing this you open the Jsp page to adding more business logic. My question is where do you draw the line on the business logic that can be provided in a Jsp page. What are the thoughts of designers out there. Thanks Irfan
Re: Writing complicated HTML with embedded bean data
> You can use the html:link tag to pass parameters. That's true -- ! The html:link also solves other problems (like including the session id when url rewriting is in effect). Thanks for pointing this out. However, in cases where there is not a struts-specific solution, there is still a need to be able to embed bean info in HTML tags. For example, I have a case where I need to build a link tag and get the entire link URL from a bean property; I don't believe there's an attribute of that handles situations like that. >From my limited experience, it seems that, although Struts can strive to provide the features for 80% of cases like this in the html taglib, there will always be that other 20% to deal with, and I'm looking for a general-purpose solution for those. I actually just whipped up the implementation for my proposal just for fun and it works nicely. But I don't want to go off and use something nonstandard if there's a better 'standard' way. - Original Message - From: "Deadman, Hal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 19, 2001 9:49 AM Subject: RE: Writing complicated HTML with embedded bean data You can use the html:link tag to pass parameters. [...] > -Original Message- > From: Stephen Schaub [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 19, 2001 9:40 AM > To: [EMAIL PROTECTED] > Subject: Writing complicated HTML with embedded bean data > > >... > One of the issues I'm trying to deal with is how to generate > things like HTML links without resorting to embedding > scriptlets. > > For example, let's say that I have a bean named 'product' > with two properties: id and title. I would like to generate > a link like this: > > > > > > I don't want to resort to using a scriptlet to get the > product id embedded in the link. So far the only solution > I've seen is in the struts-example app, which uses a custom > tag in a similar situation to avoid the scriptlet approach. > That seems like overengineering to me (or maybe I'm just too > lazy). > > It seems to me that the tag might be easily > adapted to solve this problem. I would like to be able to do > something like this: > > In ApplicationResources, define the following: > > product.link={1} > > Then, in the jsp file: > > arg1="{product.title}"/> > > I'm using { } in the arg attributes to indicate that the > text of the argument should be retrieved from the bean using > the struts property evaluation system. > > What think ye? > > Stephen Schaub >
does not display errors
Hi All, I am trying to use the ActionErrors collection to send the actions back to the browser errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.user.create.failure")); // Report any errors we have discovered back to the original form if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput())); } But no errors are being displayed on the browser. This is snippet of my jsp code: User Name: Quantity Create Can Any body tell me what is going wrong here? I declared my error key and value in the resource file. Also no error is being thrown by the JRE. Thanks, Uday.
Re: Performance of of action?
I think there is no significant performance differences between "calling an action", using or using . Once the jsp page is compiled, all these solutions result in java method calls. Differences are more on how you architect your jsp pages. As you speak of 'sort of components" in your mail, you may take a look to the Components proposal, which can be seem as "extended templates", and will be smoothly incorporated in Struts 1.1 . Cedric Components sites : http://www.lifl.fr/~dumoulin/components/ (mirror) : http://www.geocities.com/cedricdumoulin/components/ Scott Cressler wrote: > I'm trying to decide how to structure our app. We want to use templates to > separate the layout from the content, and we want to use the Struts > framework to separate the business logic from the presentation. I've been > converting several parts of our site and am happy with the results. > However, we also want to, as much as possible, separate out reusable parts > of the presentation into separate JSP pages (sort of "components"). For > example, we have a header and have it separated into header.jsp. This JSP > page can take parameters and can also adjust itself based on its > "environment", that is, what it finds in the request. But to do so, it has > a bunch of Java in the JSP (it was also developed before I came and without > an eye to keeping the business logic separate). > > What I'd like to do is change the header.jsp to pull the Java out. I see > several possible ways to do that. One is to essentially develop an Action > that sets up for the JSP and then forwards to the JSP. So, for example, > that would change the code in my current pages like: > > name="atab" value="main"/> > > to look like: > > name="atab" value="main"/> > > but I'm not sure what the performance implications of this would be. That > is, what is the difference between a of a JSP page versus an > Action. In the case of the Action, it would be routed through the app > server (resin in our case...for now), through the ActionServlet and Action, > and then forwarded to the JSP. (Now that I think of it, I'm not sure this > would even work, but I think it should.) In the JSP case, is it also routed > through the app server, so the only difference is where the business logic > is done? > > Another idea I have is to create one or more custom tags that will set up > for the header JSP. That way, the JSP could be included just as header.jsp, > but the Java and business logic would have been extracted to the custom > tag(s). The negative of this is it is a departure from the Struts > architecture and puts the business logic in a sort of unexpected place. > > The last idea I had was to somehow cause the Action for the enclosing page > (that is, the page that does the of the header) to do the > logic and setup necessary for the header. Then the header would just get > what it needs from the request and could remain a JSP, not an Action. The > negative of this is that the logic for the header would be performed by the > Actions of all the pages, although it could be included in the BaseAction > that I extend for my Actions. > > BTW, we have one motivation that others may not have: we are developing an > example application that will be given to our customers to base their app > on. So we want to structure things in the best, most understandable way. > > Thanks for any help, > Scott
Re: Error in comps-tutorial.war (Struts + Components + Orion)
Ok, there was a bug preventing Components to run on Orion. It is now corrected. You can download latest version, and test it with Orion ! Cedric Components sites : http://www.lifl.fr/~dumoulin/components/ (mirror) : http://www.geocities.com/cedricdumoulin//components/ [EMAIL PROTECTED] wrote: > Folks, > > Anyone using components on top of struts? I got a problem when I tried to > execute comps-tutorial.war (tutorial from components) within orion. > > Any ideas? Pls c the attachment for error. > > P.S. > I already moved the dtd files from struts.jar into the classes directory. > > Thanks in advance! > > Chris > > = > Error > = > > javax.servlet.jsp.JspException: Error - tag.useAttribute : attribute > 'componentsList' not found in context. Check tag syntax > > at > s1.struts.taglib.component.UseAttributeTag.doStartTag(UseAttributeTag.java:1 > 28) > > at > /layout/vboxLayout.jsp._jspService(/layout/vboxLayout.jsp.java:43) (JSP page > line 10) > > at com.orionserver.http.OrionHttpJspPage.service(JAX) > > at com.evermind.server.http.HttpApplication.xu(JAX) > > at com.evermind.server.http.JSPServlet.service(JAX) > > at com.evermind.server.http.d4.s3(JAX) > > at com.evermind.server.http.d4.include(JAX) > > at com.evermind.server.http.EvermindPageContext.include(JAX) > > at > s1.struts.taglib.component.InsertTag$InsertHandler.doEndTag(InsertTag.java:6 > 50) > > at s1.struts.taglib.component.InsertTag.doEndTag(InsertTag.java:291) > > at > /layout/classicLayout.jsp._jspService(/layout/classicLayout.jsp.java:67) > > at com.orionserver.http.OrionHttpJspPage.service(JAX) > > at com.evermind.server.http.HttpApplication.xu(JAX) > > at com.evermind.server.http.JSPServlet.service(JAX) > > at com.evermind.server.http.d4.s3(JAX) > > at com.evermind.server.http.d4.include(JAX) > > at com.evermind.server.http.EvermindPageContext.include(JAX) > > at > s1.struts.taglib.component.InsertTag$InsertHandler.doEndTag(InsertTag.java:6 > 50) > > at s1.struts.taglib.component.InsertTag.doEndTag(InsertTag.java:291) > > at /index.jsp._jspService(/index.jsp.java:35) > > at com.orionserver.http.OrionHttpJspPage.service(JAX) > > at com.evermind.server.http.HttpApplication.xu(JAX) > > at com.evermind.server.http.JSPServlet.service(JAX) > > at com.evermind.server.http.d4.s3(JAX) > > at com.evermind.server.http.d4.s1(JAX) > > at com.evermind.server.http.eg.s9(JAX) > > at com.evermind.server.http.eg.dr(JAX) > > at com.evermind.util.f.run(JAX)
Error running strut example on iPlanet Webserver 4.1
I am getting the following exception when trying to run the strut example which comes along with struts beta 1 I am using iPlanet Webserver 4.1 org.apache.jasper.JasperException: Unable to open taglibrary /WEB-INF/struts-bean.tld : Could not locate TLD META-INF/taglib.tld at java.lang.Throwable.(Throwable.java:96) at java.lang.Exception.(Exception.java:44) at javax.servlet.ServletException.(ServletException.java:68) at org.apache.jasper.JasperException.(JasperException.java:73) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve ntListener.java:688) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList ener.java:119) at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:190) at org.apache.jasper.compiler.Parser.parse(Parser.java:1048) at org.apache.jasper.compiler.Parser.parse(Parser.java:1022) at org.apache.jasper.compiler.Parser.parse(Parser.java:1018) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:173) at com.netscape.server.http.servlet.NSServletEntity.load(NSServletEntity.java:2 30) at com.netscape.server.http.servlet.NSServletEntity.update(NSServletEntity.java :149) at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.jav a:466) My configurations is given below. 1. Unzipped the war file and created a map /strut to the root of the application 2. Added WEB-INF/lib/struts.jar and WEB-INF/classes to jvm12 config 3. Added @.*[.]do$=action to rules property file 4. I am not quite sure what the mapping should be for the servlets in the classes directory and struts.jar Any ideas on what I am doing incorrectly? Thanks Rajiv
RE: Performance of of action?
Hmmm, maybe I made it too complicated by mentioning templates...that really isn't my question. My question is more about the performance of doing a of a JSP file versus an Action (that is, something like "header.do"). Another aspect of my question is what are the negative implications of pulling the business logic out of the JSP and into a custom tag as opposed to an Action class. If you do this, the architecture of your app becomes a little more complicated and a little harder for others to understand, doesn't it? Scott > -Original Message- > From: Mario Laureti [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 19, 2001 8:47 AM > To: [EMAIL PROTECTED] > Subject: Re: Performance of of action? > > > I am not sure if I understand your question correctly but > have you check the struts-template web application example > that comes with the struts framework? This might give you > a good indication on how to build a good template using Struts. > > You can also create custom tags instead of having Java in your jsp... > > Mario L. > > >>> [EMAIL PROTECTED] 04/19/01 11:27AM >>> > I'm trying to decide how to structure our app. We want to > use templates to > separate the layout from the content, and we want to use the Struts > framework to separate the business logic from the > presentation. I've been > converting several parts of our site and am happy with the results. > However, we also want to, as much as possible, separate out > reusable parts > of the presentation into separate JSP pages (sort of > "components"). For > example, we have a header and have it separated into > header.jsp. This JSP > page can take parameters and can also adjust itself based on its > "environment", that is, what it finds in the request. But to > do so, it has > a bunch of Java in the JSP (it was also developed before I > came and without > an eye to keeping the business logic separate). > > What I'd like to do is change the header.jsp to pull the Java > out. I see > several possible ways to do that. One is to essentially > develop an Action > that sets up for the JSP and then forwards to the JSP. So, > for example, > that would change the code in my current pages like: > > name="atab" value="main"/> > > to look like: > > name="atab" value="main"/> > > but I'm not sure what the performance implications of this > would be. That > is, what is the difference between a of a JSP > page versus an > Action. In the case of the Action, it would be routed through the app > server (resin in our case...for now), through the > ActionServlet and Action, > and then forwarded to the JSP. (Now that I think of it, I'm > not sure this > would even work, but I think it should.) In the JSP case, is > it also routed > through the app server, so the only difference is where the > business logic > is done? > > Another idea I have is to create one or more custom tags that > will set up > for the header JSP. That way, the JSP could be included just > as header.jsp, > but the Java and business logic would have been extracted to > the custom > tag(s). The negative of this is it is a departure from the Struts > architecture and puts the business logic in a sort of > unexpected place. > > The last idea I had was to somehow cause the Action for the > enclosing page > (that is, the page that does the of the header) > to do the > logic and setup necessary for the header. Then the header > would just get > what it needs from the request and could remain a JSP, not an > Action. The > negative of this is that the logic for the header would be > performed by the > Actions of all the pages, although it could be included in > the BaseAction > that I extend for my Actions. > > BTW, we have one motivation that others may not have: we are > developing an > example application that will be given to our customers to > base their app > on. So we want to structure things in the best, most > understandable way. > > Thanks for any help, > Scott >
Re: Performance of of action?
I am not sure if I understand your question correctly but have you check the struts-template web application example that comes with the struts framework? This might give you a good indication on how to build a good template using Struts. You can also create custom tags instead of having Java in your jsp... Mario L. >>> [EMAIL PROTECTED] 04/19/01 11:27AM >>> I'm trying to decide how to structure our app. We want to use templates to separate the layout from the content, and we want to use the Struts framework to separate the business logic from the presentation. I've been converting several parts of our site and am happy with the results. However, we also want to, as much as possible, separate out reusable parts of the presentation into separate JSP pages (sort of "components"). For example, we have a header and have it separated into header.jsp. This JSP page can take parameters and can also adjust itself based on its "environment", that is, what it finds in the request. But to do so, it has a bunch of Java in the JSP (it was also developed before I came and without an eye to keeping the business logic separate). What I'd like to do is change the header.jsp to pull the Java out. I see several possible ways to do that. One is to essentially develop an Action that sets up for the JSP and then forwards to the JSP. So, for example, that would change the code in my current pages like: to look like: but I'm not sure what the performance implications of this would be. That is, what is the difference between a of a JSP page versus an Action. In the case of the Action, it would be routed through the app server (resin in our case...for now), through the ActionServlet and Action, and then forwarded to the JSP. (Now that I think of it, I'm not sure this would even work, but I think it should.) In the JSP case, is it also routed through the app server, so the only difference is where the business logic is done? Another idea I have is to create one or more custom tags that will set up for the header JSP. That way, the JSP could be included just as header.jsp, but the Java and business logic would have been extracted to the custom tag(s). The negative of this is it is a departure from the Struts architecture and puts the business logic in a sort of unexpected place. The last idea I had was to somehow cause the Action for the enclosing page (that is, the page that does the of the header) to do the logic and setup necessary for the header. Then the header would just get what it needs from the request and could remain a JSP, not an Action. The negative of this is that the logic for the header would be performed by the Actions of all the pages, although it could be included in the BaseAction that I extend for my Actions. BTW, we have one motivation that others may not have: we are developing an example application that will be given to our customers to base their app on. So we want to structure things in the best, most understandable way. Thanks for any help, Scott
Performance of of action?
I'm trying to decide how to structure our app. We want to use templates to separate the layout from the content, and we want to use the Struts framework to separate the business logic from the presentation. I've been converting several parts of our site and am happy with the results. However, we also want to, as much as possible, separate out reusable parts of the presentation into separate JSP pages (sort of "components"). For example, we have a header and have it separated into header.jsp. This JSP page can take parameters and can also adjust itself based on its "environment", that is, what it finds in the request. But to do so, it has a bunch of Java in the JSP (it was also developed before I came and without an eye to keeping the business logic separate). What I'd like to do is change the header.jsp to pull the Java out. I see several possible ways to do that. One is to essentially develop an Action that sets up for the JSP and then forwards to the JSP. So, for example, that would change the code in my current pages like: to look like: but I'm not sure what the performance implications of this would be. That is, what is the difference between a of a JSP page versus an Action. In the case of the Action, it would be routed through the app server (resin in our case...for now), through the ActionServlet and Action, and then forwarded to the JSP. (Now that I think of it, I'm not sure this would even work, but I think it should.) In the JSP case, is it also routed through the app server, so the only difference is where the business logic is done? Another idea I have is to create one or more custom tags that will set up for the header JSP. That way, the JSP could be included just as header.jsp, but the Java and business logic would have been extracted to the custom tag(s). The negative of this is it is a departure from the Struts architecture and puts the business logic in a sort of unexpected place. The last idea I had was to somehow cause the Action for the enclosing page (that is, the page that does the of the header) to do the logic and setup necessary for the header. Then the header would just get what it needs from the request and could remain a JSP, not an Action. The negative of this is that the logic for the header would be performed by the Actions of all the pages, although it could be included in the BaseAction that I extend for my Actions. BTW, we have one motivation that others may not have: we are developing an example application that will be given to our customers to base their app on. So we want to structure things in the best, most understandable way. Thanks for any help, Scott
bug? resource bundle is not automatically changed
Hello! We're using the tag to display localizable messages. The message is displayed in the default locale which was active when the web server was started. I thought struts would use the correct resource bundle automatically! Isn't that true? What we did to get the correct language was session.setAttribute(org.apache.struts.action.Action.LOCALE_KEY, request.getLocale()); in the jsp pages. This works, but I suggest struts should do this automatically. Greetings, Uli
Re: An HTTP POST goes in the Action.perform(..) method, what about the HTTP GET?
>From: "Mario Laureti" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: <[EMAIL PROTECTED]> >Subject: An HTTP POST goes in the Action.perform(..) method, what about the >HTTP GET? >Date: Thu, 19 Apr 2001 10:08:57 -0400 > >Hello, > > I have 2 questions: > > 1) How can I catch when a HTTP GET is performed on an action? hello in your Action.perform(...) you could say: request.getMethod() grtz _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Writing complicated HTML with embedded bean data
I'm rather new to Struts, and have done quite a bit of reading, but am just now getting down to some experimental development. One of the issues I'm trying to deal with is how to generate things like HTML links without resorting to embedding scriptlets. For example, let's say that I have a bean named 'product' with two properties: id and title. I would like to generate a link like this: I don't want to resort to using a scriptlet to get the product id embedded in the link. So far the only solution I've seen is in the struts-example app, which uses a custom tag in a similar situation to avoid the scriptlet approach. That seems like overengineering to me (or maybe I'm just too lazy). It seems to me that the tag might be easily adapted to solve this problem. I would like to be able to do something like this: In ApplicationResources, define the following: product.link={1} Then, in the jsp file: I'm using { } in the arg attributes to indicate that the text of the argument should be retrieved from the bean using the struts property evaluation system. What think ye? Stephen Schaub
An HTTP POST goes in the Action.perform(..) method, what aboutthe HTTP GET?
Hello, I have 2 questions: 1) How can I catch when a HTTP GET is performed on an action? 2) Also in the web.xml can we define a "sort of" welcome-action? login.do Instead of login.jsp Many thanks in advance. Mario Laureti
RE: How to receive name of page in Tag
Use a meta tag with the name of the page in it. retrieve info from this meta tag cheers, Amar.. -Original Message- From: Marcin Baj [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 3:25 AM To: [EMAIL PROTECTED] Subject: How to receive name of page in Tag Hello, I'm writing my own tag, but I don't know how to receive name of page where the request comes from. I want to have this name in tag class. Please help me. Marcin Baj, Poland
RE: Writing complicated HTML with embedded bean data
You can use the html:link tag to pass parameters. The example shows how to pass a single parameter, there is another method involving a Map that lets you pass multiple key/value pairs as parameters. > -Original Message- > From: Stephen Schaub [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 19, 2001 9:40 AM > To: [EMAIL PROTECTED] > Subject: Writing complicated HTML with embedded bean data > > > I'm rather new to Struts, and have done quite a bit of > reading, but am just now getting down to some experimental > development. > > One of the issues I'm trying to deal with is how to generate > things like HTML links without resorting to embedding > scriptlets. > > For example, let's say that I have a bean named 'product' > with two properties: id and title. I would like to generate > a link like this: > > > > > > I don't want to resort to using a scriptlet to get the > product id embedded in the link. So far the only solution > I've seen is in the struts-example app, which uses a custom > tag in a similar situation to avoid the scriptlet approach. > That seems like overengineering to me (or maybe I'm just too > lazy). > > It seems to me that the tag might be easily > adapted to solve this problem. I would like to be able to do > something like this: > > In ApplicationResources, define the following: > > product.link={1} > > Then, in the jsp file: > > arg1="{product.title}"/> > > I'm using { } in the arg attributes to indicate that the > text of the argument should be retrieved from the bean using > the struts property evaluation system. > > What think ye? > > Stephen Schaub >
Re: How to submit JSP to itself?
Couldn't you use the full path? /myApp/pages/myAction.do Pete Alex Colic wrote: > Hi, > > How do you set-up the action property of a form tag if you want the JSP to > submit the form to itself? > > When the user wants to go to the next page I have a next button that in its > onclick event I will set the forms.action property via JavaScript. > > Thanks for any help. > > Alex begin:vcard n:; x-mozilla-html:FALSE org:http://www.irista.com/logo/irista.gif">Bringing Vision to Your Supply Chain adr:;; version:2.1 end:vcard
Re: How to receive name of page in Tag
Thanks a lot, Bajo - Original Message - From: Peter Alfors <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 19, 2001 3:21 PM Subject: Re: How to receive name of page in Tag > you could do something like: > > HttpServletRequest request = (HttpServletRequest) > pageContext.getRequest(); > String myURI = request.getRequestURI(); > > HTH, > Pete > > Marcin Baj wrote: > > > Hello, > > > > I'm writing my own tag, but I don't know how to receive name of page where > > the request comes from. I want to have this name in tag class. > > > > Please help me. > > > > Marcin Baj, > > Poland >
RE: How to display odd/even rows using iterator
Thanks for all your replies. Writing a scriplet is no brainer but I am trying to avoid them ( I was successful so far). Since my collection consists of beans and each bean represents a row i just added an extra member variable (sequence) which indicates if the row is odd or even. In this case you don't need any scriplets. = == Mark. > -Original Message- > From: Bart Moberts [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, April 19, 2001 6:26 AM > To: [EMAIL PROTECTED] > Subject: Re: How to display odd/even rows using iterator > > > hello > > i do it this way: > > <%! String[] colors = new String[2]; int i = 0; %> > <% colors[0]="#EE"; colors[1]="#CECECE"; i = 0;%> > > > <% i = 1 - i; %> > > > > ... > > > > > grtz > > > >From: "Zeltser, Mark" <[EMAIL PROTECTED]> > >Reply-To: [EMAIL PROTECTED] > >To: [EMAIL PROTECTED] > >Subject: How to display odd/even rows using iterator > >Date: Wed, 18 Apr 2001 12:00:54 -0400 > > > >Hello, > > > >I have the following code to build the table: > >= > === > >== > > >property="displayRates"> > > > > > >>filter="true"/> > > > > > >filter="true"/> > > > > > >>filter="true"/> > > > > > > > >= > === > >== > > > >I would like to set different colors for odd/even rows. How do I do this? > > > >Thanks, Mark. > > > > > >- > - > >This message is intended only for the personal and confidential use of > the > >designated recipient(s) named above. If you are not the intended > recipient > >of this message you are hereby notified that any review, dissemination, > >distribution or copying of this message is strictly prohibited. This > >communication is for information purposes only and should not be regarded > > >as an offer to sell or as a solicitation of an offer to buy any financial > > >product, an official confirmation of any transaction, or as an official > >statement of Lehman Brothers Inc. Email transmission cannot be > guaranteed > >to be secure or error-free. Therefore, we do not represent that this > >information is complete or accurate and it should not be relied upon as > >such. All information is subject to change without notice. > > > > > > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers Inc. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
Re: How to receive name of page in Tag
you could do something like: HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); String myURI = request.getRequestURI(); HTH, Pete Marcin Baj wrote: > Hello, > > I'm writing my own tag, but I don't know how to receive name of page where > the request comes from. I want to have this name in tag class. > > Please help me. > > Marcin Baj, > Poland begin:vcard n:; x-mozilla-html:FALSE org:http://www.irista.com/logo/irista.gif">Bringing Vision to Your Supply Chain adr:;; version:2.1 end:vcard
How to submit JSP to itself?
Hi, How do you set-up the action property of a form tag if you want the JSP to submit the form to itself? When the user wants to go to the next page I have a next button that in its onclick event I will set the forms.action property via JavaScript. Thanks for any help. Alex
AW: AW: null or empty string
Ok, I understood. I think you need a little workaround ... Maybe try this. Inside the form I would use a hidden input-field that value is a comma-seperated list with the name of all checkboxes inside the form. This field will be submited with the form. Now you know which checkboxes are inside the form and can ask the request if it is present. If you use everytime the same name for this hidden field (containing the names of the checkboxes), you can make you validation-routine very dynamic and you do not need JavaScript ! cu Frank > -Ursprüngliche Nachricht- > Von: Andrew Steady [SMTP:[EMAIL PROTECTED]] > Gesendet am: Donnerstag, 19. April 2001 13:14 > An: [EMAIL PROTECTED] > Betreff: Re: AW: null or empty string > > This is the behaviour as I understood it and it leaves no way to tell if a > user has left a checkbox selection blank without knowing specifically that > you were exepecting it on that page, something my current design dosen't > enforce with other types of input (nice and dynamic). > > I may be able to extend the Form tag to include some onSubmit csjavascript > that searches through fields and makes sure a blank string is submitted if > it has been left unchecked. We shall see. > > Andy S > > > > > > [EMAIL PROTECTED] on 19/04/2001 12:11:23 > > Please respond to [EMAIL PROTECTED] > > To: [EMAIL PROTECTED] > cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis) > Subject: AW: null or empty string > > > > > Hi Andrew, > The the normal behavior of an checkbox is, that it will submit the value > of > the checkbox with the form if the user has selected the checkbox. If it is > not selected, the browser will not send the value of the checkbox to the > server. If you ask for the checkbox-parameter in the request and it is not > present, you know, that the user has not selected the checkbox. > cu Frank > > -Urspr?ngliche Nachricht- > > Von:Andrew Steady [SMTP:[EMAIL PROTECTED]] > > Gesendet am: Donnerstag, 19. April 2001 12:47 > > An: [EMAIL PROTECTED] > > Betreff: null or empty string > > > > > > Hi, > > > > > > > > I have written a dynamic validation routine which is based upon only > > validating the fields that have been submitted and then "mopping > up" > > later. This only works because you can tell the difference > > > > between a field being submitted and left blank (value = "") and a field > > not > > being present in the request (value = null). > > > > > > > > This is true for input type="text" but is not true for input > > type="checkbox", has anyone come accross this problem before? any > > solutions ideas? > > > > > > > > Cheers, > > > > > > > > Andy S > > > > Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene > Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung > reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. > Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, > Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser > E-Mail nicht gestattet ist.Diese Nachricht ist ausschliesslich fuer den > bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht > der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so > bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen. > > For legal and security reasons the information provided in this e-mail is > not legally binding. Upon request we would be pleased to provide you with > a > legally binding confirmation in written form. Any form of unauthorised > use, > publication, reproduction, copying or disclosure of the content of this > e-mail is not permitted. This message is exclusively for the person > addressed or their representative. If you are not the intended recipient > of > this message and its contents, please notify the sender immediately. > --- > > > > > > > > Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail nicht gestattet ist.Diese Nachricht ist ausschliesslich fuer den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen. For legal and security reasons the information provided in this e-mail is not legally binding. Upon request we would be pleased to provide you with a legally binding confirmation in written form. Any form of unauthorised use, publication, reproduction, copying or disclosure
Re: null or empty string
Thanks very much, I'll investigate this it might be just what I need. [EMAIL PROTECTED] on 19/04/2001 12:22:29 Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis) Subject: Re: null or empty string Andrew, CheckBox values are retrieved using the getParameterValues method on the the HTTPServletRequest object which returns a string array. Most other input types simply use the getParameter method which work as you describe below. Regards, Paul - Original Message - From: "Andrew Steady" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 19, 2001 5:47 AM Subject: null or empty string > > Hi, > > > > I have written a dynamic validation routine which is based upon only > validating the fields that have been submitted and then "mopping up" > later. This only works because you can tell the difference > > between a field being submitted and left blank (value = "") and a field not > being present in the request (value = null). > > > > This is true for input type="text" but is not true for input > type="checkbox", has anyone come accross this problem before? any > solutions ideas? > > > > Cheers, > > > > Andy S > > >
Re: null or empty string
Andrew, CheckBox values are retrieved using the getParameterValues method on the the HTTPServletRequest object which returns a string array. Most other input types simply use the getParameter method which work as you describe below. Regards, Paul - Original Message - From: "Andrew Steady" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 19, 2001 5:47 AM Subject: null or empty string > > Hi, > > > > I have written a dynamic validation routine which is based upon only > validating the fields that have been submitted and then "mopping up" > later. This only works because you can tell the difference > > between a field being submitted and left blank (value = "") and a field not > being present in the request (value = null). > > > > This is true for input type="text" but is not true for input > type="checkbox", has anyone come accross this problem before? any > solutions ideas? > > > > Cheers, > > > > Andy S > > >
Re: AW: null or empty string
This is the behaviour as I understood it and it leaves no way to tell if a user has left a checkbox selection blank without knowing specifically that you were exepecting it on that page, something my current design dosen't enforce with other types of input (nice and dynamic). I may be able to extend the Form tag to include some onSubmit csjavascript that searches through fields and makes sure a blank string is submitted if it has been left unchecked. We shall see. Andy S [EMAIL PROTECTED] on 19/04/2001 12:11:23 Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis) Subject: AW: null or empty string Hi Andrew, The the normal behavior of an checkbox is, that it will submit the value of the checkbox with the form if the user has selected the checkbox. If it is not selected, the browser will not send the value of the checkbox to the server. If you ask for the checkbox-parameter in the request and it is not present, you know, that the user has not selected the checkbox. cu Frank > -Urspr?ngliche Nachricht- > Von:Andrew Steady [SMTP:[EMAIL PROTECTED]] > Gesendet am: Donnerstag, 19. April 2001 12:47 > An: [EMAIL PROTECTED] > Betreff: null or empty string > > > Hi, > > > > I have written a dynamic validation routine which is based upon only > validating the fields that have been submitted and then "mopping up" > later. This only works because you can tell the difference > > between a field being submitted and left blank (value = "") and a field > not > being present in the request (value = null). > > > > This is true for input type="text" but is not true for input > type="checkbox", has anyone come accross this problem before? any > solutions ideas? > > > > Cheers, > > > > Andy S > Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail nicht gestattet ist.Diese Nachricht ist ausschliesslich fuer den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen. For legal and security reasons the information provided in this e-mail is not legally binding. Upon request we would be pleased to provide you with a legally binding confirmation in written form. Any form of unauthorised use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. This message is exclusively for the person addressed or their representative. If you are not the intended recipient of this message and its contents, please notify the sender immediately. ---
AW: null or empty string
Hi Andrew, The the normal behavior of an checkbox is, that it will submit the value of the checkbox with the form if the user has selected the checkbox. If it is not selected, the browser will not send the value of the checkbox to the server. If you ask for the checkbox-parameter in the request and it is not present, you know, that the user has not selected the checkbox. cu Frank > -Ursprüngliche Nachricht- > Von: Andrew Steady [SMTP:[EMAIL PROTECTED]] > Gesendet am: Donnerstag, 19. April 2001 12:47 > An: [EMAIL PROTECTED] > Betreff: null or empty string > > > Hi, > > > > I have written a dynamic validation routine which is based upon only > validating the fields that have been submitted and then "mopping up" > later. This only works because you can tell the difference > > between a field being submitted and left blank (value = "") and a field > not > being present in the request (value = null). > > > > This is true for input type="text" but is not true for input > type="checkbox", has anyone come accross this problem before? any > solutions ideas? > > > > Cheers, > > > > Andy S > Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail nicht gestattet ist.Diese Nachricht ist ausschliesslich fuer den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen. For legal and security reasons the information provided in this e-mail is not legally binding. Upon request we would be pleased to provide you with a legally binding confirmation in written form. Any form of unauthorised use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. This message is exclusively for the person addressed or their representative. If you are not the intended recipient of this message and its contents, please notify the sender immediately. ---
null or empty string
Hi, I have written a dynamic validation routine which is based upon only validating the fields that have been submitted and then "mopping up" later. This only works because you can tell the difference between a field being submitted and left blank (value = "") and a field not being present in the request (value = null). This is true for input type="text" but is not true for input type="checkbox", has anyone come accross this problem before? any solutions ideas? Cheers, Andy S
Digester :"java.lang.InternalError: (Ex02) An error has occurred " AND"addCallParam"
Hello, It seems that addCallParam push a String on the stack, why ? It is very annoying for my program. How can I by pass that problem ? I would like to parse the following XML : 1/ first : I push my global object on stack (digester.push) 2/ on config tag : create configClassName object with nested attribute (new Object on Digester Stack with addObjectCreate and addSetProperty). Before automatically pop, I do a addSetNext to store newly object reference to global object. 3/ on connector end tag I would like to run a method with name and className parameters : so I use addCallMethod et 2 addCallParam on connector pattern, BUT addCallParam push a String on stack and my previous AddSetNext is now launched on that String instead of the global object Thus I receive that InternalError !!! I can't believe it is impossible !! Does somebody have any idea ? Please, Thanks, Sébastien - Un courrier électronique n'engage pas son émetteur. Tout message susceptible de comporter un engagement doit être confirmé par un écrit dûment signé. An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. Ein elektronischer Brief bzw. eine elektronische Nachricht ist für den Absender nicht verbindlich. Jede Nachricht, welche eine Verpflichtung beinhaltet, muß schriftlich bestätigt und ordnungsgemäß unterzeichnet werden. -
Re: How to display odd/even rows using iterator
hello i do it this way: <%! String[] colors = new String[2]; int i = 0; %> <% colors[0]="#EE"; colors[1]="#CECECE"; i = 0;%> <% i = 1 - i; %> > ... grtz >From: "Zeltser, Mark" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: How to display odd/even rows using iterator >Date: Wed, 18 Apr 2001 12:00:54 -0400 > >Hello, > >I have the following code to build the table: > >== > property="displayRates"> > > > filter="true"/> > > > > > > filter="true"/> > > > > >== > >I would like to set different colors for odd/even rows. How do I do this? > >Thanks, Mark. > > >-- >This message is intended only for the personal and confidential use of the >designated recipient(s) named above. If you are not the intended recipient >of this message you are hereby notified that any review, dissemination, >distribution or copying of this message is strictly prohibited. This >communication is for information purposes only and should not be regarded >as an offer to sell or as a solicitation of an offer to buy any financial >product, an official confirmation of any transaction, or as an official >statement of Lehman Brothers Inc. Email transmission cannot be guaranteed >to be secure or error-free. Therefore, we do not represent that this >information is complete or accurate and it should not be relied upon as >such. All information is subject to change without notice. > > _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
RE: how to use a select option with a property from the form bean?
Have a look at this reply of this user-list : http://www.mail-archive.com/struts-user@jakarta.apache.org/msg05661.html Annick Naranjo Sanchez [EMAIL PROTECTED] -Message d'origine- De : Roxie Rochat [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 18 avril 2001 20:40 À : [EMAIL PROTECTED] Objet : how to use a select option with a property from the form bean? I would like to configure a form bean with a property that contains a collection to be rendered as a select statement, but I can't get it to work. If the options collection attribute is not specified, the docs say that you can specify just the property: "The value of this attribute is the name of a property of the ActionForm bean associated with our form, which will return the collection." What should this collection look like? Can anyone point me at an example? Thanks, Roxie
Re: How to display odd/even rows using iterator
Scott Walter wrote: > Although I don't like to place Java code in my JSP > pages, this is how I accomplished this: > > > <% if(index%2==0) { %> > > <% } else { %> > > <% } %> > > index++; > > > > --- Anthony Martin <[EMAIL PROTECTED]> wrote: > > I'm sure I'll get to this in my project. Why not > > make it a read property of > > the bean? > > > > protected String rowColor = "#FF" ; > > public String getRowColor ( ) { return > > this.rowColor ; } > > public void setRowColor ( String value ) { > > this.rowColor = value ; } > > > > Then all you need is a way to change that value at > > the top of the > > block by detecting the current state > > with a couple > > tag. > > Using two tags is a good solution, but wouldn't it be nice to have a kind of "if .. then .. else" feature ? Like : ... ... Any plan to implement this ? Bernard.
How to receive name of page in Tag
Hello, I'm writing my own tag, but I don't know how to receive name of page where the request comes from. I want to have this name in tag class. Please help me. Marcin Baj, Poland