RE: ssl-forwarding filter not working in IE 6
Try setting the following 2 response header response.setHeader("Pragma", "public"); response.setHeader("Cache-Control", "max-age=0"); - Jim -Original Message- From: sudip shrestha [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 9:54 PM To: Struts Users Mailing List; Tomcat Users List Subject: ssl-forwarding filter not working in IE 6 Hi : I have following code for automatic ssl-forwarding filter: public void doFilter(ServletRequest servletrequest, ServletResponse servletresponse, FilterChain filterchain) throws IOException, ServletException { String s = servletrequest.getScheme(); if( !s.equalsIgnoreCase("http") ) { //System.out.println( "Normal filter Operation" ); filterchain.doFilter(servletrequest, servletresponse); } else { HttpServletResponse response = (HttpServletResponse)servletresponse; HttpServletRequest request = (HttpServletRequest)servletrequest; //System.out.println( "currPort: "+request.getServerPort() ); String url = "https://"; + request.getServerName(); //System.out.println( "currUrl: "+url ); url = url + ":" + PORT; //System.out.println( "currUrl: "+url ); url = url + request.getRequestURI(); //System.out.println( "currUrl: "+url ); String queryStr = request.getQueryString(); if( queryStr!=null ) url = url + "?" + queryStr; //System.out.println( "currUrl: "+url ); response.sendRedirect(url); return; } } This works perfectly in Firefox. However, IE just sits there till it throws me a "page cannot be displayed". If I directly type secure url, e.g., https://domain.com/siteAdd, it works in IE as well, but IE just cannot seem to forward it to the secure url from the plain url. Any suggestions? The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorized. If you are not an intended recipient, please notify the sender of this email immediately. You should not copy, 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/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Shale] Updates
I've committed a plugin code-named "Clay", contributed by Gary VanMatre, that takes a very interesting twist on reusing subtrees of JSF components, complete with on-the-fly customization of each individual use, plus the ability to recognize templates stored in a manner very similar to what Tapestry does (HTML static templates, tied to component definitions in a separate resource, tied together with an id value). Besides its support for resuing chunks of markup, this will also make it easy to build a full fledged JSF ViewHandler supporting this templating style, for those who don't like JSP. In addition, I've reorganized the nightly build subdirectory (http://cvs.apache.org/builds/struts/nightly/struts-shale) so that each individual artifact is in its own subdirectory. At the moment, that includes: * Core library * "Clay" plugin (referenced above) * Test framework (a full set of mock objects for building unit tests of Shale-based application code) * Use Cases (example app illustrating Shale functionality) Craig PS: Interestingly, the Shale wiki page (http://wiki.apache.org/struts/StrutsShale) is already 10th on Google's results for the "shale" search term :-). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SessionState vs. request state.
On 4/15/05, Michael J. <[EMAIL PROTECTED]> wrote: > I prefer to store everything on the server. It gives better control > over data and application state. > > > Brian > > > > I vote for storing information in session variables for > > the simple reason most Admins do not allow Browsers > > writing cookies on the hard drive for fear of introducing > > viruses to the system +1 for session variables > > > > Martin Gainty > > This is paranoia. To keep session id they would need to allow > jsessionid cookie somehow anyway. And if _all_ cookies are prohibited, > then Struts would need to rewrite each and every URL. Well, at least > URLs are polluted with jsessionid only, not with all _viewstate thing > (yuck!) > You should also note that most browsers do not actually store cookies on disk unless they have a defined expiration timestamp. Most servlet containers don't set such a timestamp on session id cookies, which leads to them being stored, in memory, only for the duration of the browser session. That in turn is a good thing, because even if someone has read access to the temporary directory where your browser stores cookies, they cannot snoop the ids of your current session and attempt to impersonate you. > Michael. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SessionState vs. request state.
I prefer to store everything on the server. It gives better control over data and application state. > Brian > > I vote for storing information in session variables for > the simple reason most Admins do not allow Browsers > writing cookies on the hard drive for fear of introducing > viruses to the system +1 for session variables > > Martin Gainty This is paranoia. To keep session id they would need to allow jsessionid cookie somehow anyway. And if _all_ cookies are prohibited, then Struts would need to rewrite each and every URL. Well, at least URLs are polluted with jsessionid only, not with all _viewstate thing (yuck!) Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multi Step Forms
> I have a situation where i need to have a multi screen form, lets say 3 > steps. On \ > the successfull validation of the 3rd step. I want to save the data into the > DB. \ > This data would have been collected starting on step one, through step 3 and \ > ecapsulated in 1 or more objects. > My question is whats the best way to do this from a design standpoint without > using \ > actionForms, thats not in option in my case. Specifically is there a clean > way to \ > save a partially filled object from step 1 and pass it to step 2. Basically > the \ > functionality like Server.Transer in .NET. Hi Brian, This sounds like a shameless ad (which it is), but this is _exactly_ what my flow library does: http://www.superinterface.com/easywizard.htm I would appreciate if you try it. To other Struts users: please excuse me for this plug ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to create a web flow with Struts
Hi guys, I am using Struts for three years, but only now decided to join the user group. About the web flow: would you like to take a look at approach, alternative to Spring Web Flow? I started thinking on flow engines when IBM's Servlet Manager still was around, but only lately I came up with something decent. I had looked at Struts Workflow Extension and had thought that I needed something simpler. So, here it is, the Easy Wizard: http://www.superinterface.com/easywizard.htm I am updating the docs right now, but the Struts version is already pretty good (JSF integration works as well, but not as clean. Spring is next) Please, check out the live demo at: http://www.superinterface.com/wizard/signupWizard.do Feel ree to reload, go forward or back. This is thing is pretty robust. The how-to is in process, but there are two articles, which describe pretty well, what Easy Wizard is: http://today.java.net/pub/a/today/2005/03/15/webwizard1.htm and http://today.java.net/pub/a/today/2005/03/29/webwizard2.htm I would like to hear comments from Struts community about my stuff. Thanks, Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts & UTF-8 (POST working, GET not)
Just try URLEncoder class of Java. by the way, would you mind telling me the way u use " String defaultEncode = "UTF-8"; HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse res = (HttpServletResponse) response; req.setCharacterEncoding(defaultEncode); res.setCharacterEncoding(defaultEncode); chain.doFilter(req, res); " if you have a bean and after ur form is submitted, all values of text fields (properties) in form will be mapped to 1 bean. where will you use " String defaultEncode = "UTF-8"; HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse res = (HttpServletResponse) response; req.setCharacterEncoding(defaultEncode); res.setCharacterEncoding(defaultEncode); chain.doFilter(req, res); " to encode data before data of form is mapped to bean ? regards Pham - Original Message - From: "Hond4" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Friday, April 15, 2005 4:50 PM Subject: Struts & UTF-8 (POST working, GET not) Hallo, I have fllowing problem with my Struts app on Jboss. Here is my filter String defaultEncode = "UTF-8"; HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse res = (HttpServletResponse) response; req.setCharacterEncoding(defaultEncode); res.setCharacterEncoding(defaultEncode); chain.doFilter(req, res); problem is that when I submit my form with POST everything works just fine, when I change form submit method to GET i have problems with characters. here is my example: UTF-8: płyn URL: p%C5%82yn any idea what's wrong with my app? Best regards, H0nd4 -- Castingi do trzeciej edycji Konkursu Elite Model Look już 16 i 17 kwietnia w Twoim mieście. Więcej informacji na stronie http://www.gazeta.pl/elitemodellook - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HELP] encodes special characters automatically?
Thank to delbd for ur reply, I tried to use acceptCharset attribute in tag, but MyEclipse report something like "there's no attribute called acceptCharset for " ? I only submit a normal form, with text field, not submit for uploading file. Can you show me in details about ur solution. thanks Pham - Original Message - From: "delbd" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Friday, April 15, 2005 7:48 PM Subject: Re: [HELP] encodes special characters automatically? I assume you mean you input japanese character but the form bean gets a messed result. If you have a multi-part/formdata encoding for form (used for file uploads) keep in ming there are problem detecting at the character encoding used by submitter. Browser is supposed to send the data in the same encoding as web page, but fileupload utility seems to be unable to catch the encoding used by web browser and the form validation bean get datas as if entered using iso-8859-1 (which is problematic when the web browser did in fact send an utf-8 stream). To soluce this, we always put this in multi part forms: This way we are sure the encoding used by borwser is the same as the one fileupload tool defaults to. Le Vendredi 15 Avril 2005 07:19, Pham Anh Tuan a Ãcrit : Hi all, I got a problem, again :) when I input special characters like japanese or vietnamese character into , automatically encodes that characters Decimal NCRs before mapping to bean property. Example 1: or ... I input japanese characters: ããã Before it is mapped to bean property myPro: わたし Example 2: or ... I input vietnamese characters: Tái Qua Before it is mapped to bean property myPro: T?i Qua; So, I wonder that does encodes special character automatically when it find some character like japanese or vietnamese? plz help me! Pham -- David Delbecq Royal Meteorological Institute of Belgium - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html-el vs html
html-el gives you the ability to process expression language (EL) within the tag attributes. Look at the JSTL docs to see the definition for EL. Look in the "contrib" directory of the struts release to see the TLDs and JARs for html-el. - Dan > -Original Message- > From: Abdullah Jibaly [mailto:[EMAIL PROTECTED] > Sent: Friday, April 15, 2005 2:05 PM > To: Struts Users Mailing List > Subject: html-el vs html > > Hi all, > > What is the difference between the html-el and html tags, and > which ones comes with Struts? I was looking at the TLD with > 1.2.4 and only saw the html tld. How do I get the html-el version? > > Thanks, > Abdullah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database Assistance Needed
JNDI *is* the way to go. See the Tomcat doc on configuring a DataSource (cited below). I use Tomcat 5.0, but I will not buy it that the examples don't work because I have followed the Tomcat documentation many times with success (including MySQL). Then write a simple Java class that acts as a connection manager. Your business object uses a DAO (preferably by referring only to an interface so it's not affected when you switch data stores). Your DAO asks the connection manager for a connection, either via a static method or an instance method if you are using a singleton. Your connection manager uses a JNDI lookup to get a reference to the DataSource that was configured in your application's context XML file (use caching so that the lookup only has to happen once). Try to get a connection from the DataSource. If that fails, use DriverManager to get a connection so the application will work, but log the error and fix the DataSource. No. 1 problem is a JNDI lookup on the wrong name. There is a MySQL example on this page: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html Erik Scott Purcell wrote: I have had some issues this past week, trying to come up with a way to cleanly connect to my, MySQL database. I know this is not necessarily a struts issue, but I am betting that there is no one on this list who is not using some type of database in the back-end. Now I have the O'Reilly book on Struts, and using the ObjectRelationalBridge is a little too large for me to take on currently, same as Hibernate or anything else I would have to research thoroughly. I just need a solid, simple way to grab a connection from a pool, use it in a Business Object and call it a day. Since I am running on Tomcat 5.5, I have tried to incorporate the DBCP from jakarta into my struts stuff. Problem is most examples do not work, or are incomplete for the 5.5 Tomcat, and I cannot find any decent examples of doing this. I am basically Running Mysql, and Tomcat 5.5, and struts 1.2. I really do not want to use the data-source in struts, as I intend to use a solution that will not be depreciated in the next release. Could anyone throw me a bone here. I have searched google to death for good examples, but come up with outdated examples, or incomplete. The examples for Tomcat make you use JNDI, and I am not sure if that is the way to go. Any assistance would be sincerely appreciated. Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html-el vs html
Hi all, What is the difference between the html-el and html tags, and which ones comes with Struts? I was looking at the TLD with 1.2.4 and only saw the html tld. How do I get the html-el version? Thanks, Abdullah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Database Assistance Needed
I have had some issues this past week, trying to come up with a way to cleanly connect to my, MySQL database. I know this is not necessarily a struts issue, but I am betting that there is no one on this list who is not using some type of database in the back-end. Now I have the O'Reilly book on Struts, and using the ObjectRelationalBridge is a little too large for me to take on currently, same as Hibernate or anything else I would have to research thoroughly. I just need a solid, simple way to grab a connection from a pool, use it in a Business Object and call it a day. Since I am running on Tomcat 5.5, I have tried to incorporate the DBCP from jakarta into my struts stuff. Problem is most examples do not work, or are incomplete for the 5.5 Tomcat, and I cannot find any decent examples of doing this. I am basically Running Mysql, and Tomcat 5.5, and struts 1.2. I really do not want to use the data-source in struts, as I intend to use a solution that will not be depreciated in the next release. Could anyone throw me a bone here. I have searched google to death for good examples, but come up with outdated examples, or incomplete. The examples for Tomcat make you use JNDI, and I am not sure if that is the way to go. Any assistance would be sincerely appreciated. Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dispatch Action Strangeness
in my HTML I have in my struts config (for the appropriate action) I have parameter="dispatch" Is there something else I need? On 4/15/05, Rick Reumann <[EMAIL PROTECTED]> wrote: > David Johnson wrote the following on 4/15/2005 3:21 PM: > > I saw that after I sent it. I have changed it to inherit from > > org.apache.struts.actions.DispatchAction (actually my BaseAction > > inherits from DispatchAction) but the methods still arent being > > called. > > You sure you have the parameter property in your action mapping in your > struts config? > > "set('graph'); I'm assuming is setting a hidden parameter (your dispatch > parameter)... whatever that parameter is, is the one you need also > defined in your action mapping. > > -- > Rick > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dispatch Action Strangeness
David Johnson wrote the following on 4/15/2005 3:21 PM: I saw that after I sent it. I have changed it to inherit from org.apache.struts.actions.DispatchAction (actually my BaseAction inherits from DispatchAction) but the methods still arent being called. You sure you have the parameter property in your action mapping in your struts config? "set('graph'); I'm assuming is setting a hidden parameter (your dispatch parameter)... whatever that parameter is, is the one you need also defined in your action mapping. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dispatch Action Strangeness
I saw that after I sent it. I have changed it to inherit from org.apache.struts.actions.DispatchAction (actually my BaseAction inherits from DispatchAction) but the methods still arent being called. strange right? On 4/15/05, Dave Newton <[EMAIL PROTECTED]> wrote: > David Johnson wrote: > > >My Action class still extends "Action" should it inherit > >DispatchAction instead? What am I missing? > > > > > If it doesn't extend DispatchAction how would it know to dispatch? > > Dave > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dispatch Action Strangeness
David Johnson wrote: My Action class still extends "Action" should it inherit DispatchAction instead? What am I missing? If it doesn't extend DispatchAction how would it know to dispatch? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dispatch Action Strangeness
Hi there I thought I'd break this into its own thread. I'm trying to implement a DispatchAction as discussed by Ted Husted here --> http://husted.com/struts/tips/002.html I have done the following 1. changed the html:submit to the following (along with the necassary javascript) Run Graph 2. Created a "graph" method on the Action class with the same signature at the execute() on the action however the graph method isn't getting called. My Action class still extends "Action" should it inherit DispatchAction instead? What am I missing? -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: nested within a Help!
> I am now mixing JSTL, Struts-EL and Struts (garden variety) > tags. Does this eem strange or like S.O.P? I use JSTL and struts-el tags together all the time. Of course, most of my struts tags don't use EL, so they look like original Struts stuff. That way, if I need EL in a tag, I just put it in, without worrying about whether I've invoked the EL or regular library. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested within a Help!
OH MY GOD IT WORKS For Future Reference: OLD: NEW: I have to admit... I'm actually stunned as hell that this worked ;) I am now mixing JSTL, Struts-EL and Struts (garden variety) tags. Does this eem strange or like S.O.P? /cheer On 4/15/05, Slattery, Tim - BLS <[EMAIL PROTECTED]> wrote: > > Where do you get all the struts-el stuff? dos it come bundles > > with Struts 1.2.4? > > It's in the Struts distribution ZIP file, in the contrib\struts-el > subdirectory > > > -- > Tim Slattery > [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: nested within a Help!
> Where do you get all the struts-el stuff? dos it come bundles > with Struts 1.2.4? It's in the Struts distribution ZIP file, in the contrib\struts-el subdirectory -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested within a Help!
Where do you get all the struts-el stuff? dos it come bundles with Struts 1.2.4? On 4/15/05, Slattery, Tim - BLS <[EMAIL PROTECTED]> wrote: > > if I'm using the Struts-EL version of the tags do I simply > > REMOVE the references to the old struts tags, or is it proper > > for them to coexist? I assume they ca coexist since not all > > of them have been ported. > > They can co-exist, as long the prefix attribute in the taglib directive is > different (so the container will know which to use). But why do that? It > makes more sense to me to simply use the EL versions for everything. AFAIK, > all the tags in the HTML, bean and logic taglibs have been ported. If you > use tags from nested taglib or some other taglib that hasn't been ported, > then of course you will need to reference the original version of that > taglib. > > -- > Tim Slattery > [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: nested within a Help!
> if I'm using the Struts-EL version of the tags do I simply > REMOVE the references to the old struts tags, or is it proper > for them to coexist? I assume they ca coexist since not all > of them have been ported. They can co-exist, as long the prefix attribute in the taglib directive is different (so the container will know which to use). But why do that? It makes more sense to me to simply use the EL versions for everything. AFAIK, all the tags in the HTML, bean and logic taglibs have been ported. If you use tags from nested taglib or some other taglib that hasn't been ported, then of course you will need to reference the original version of that taglib. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: nested within a Help!
> This looks like exactly what I need. I cant seem to find the > proper home page for the struts-el subproject however. I assume I need > > struts-bean-el.tld > struts-html-el.tld > struts-logic-el.tld > struts-el.jar > > Anyone using this that can give me a starting point? I have those, plus the following JSTL libraries, since my container isn't new enough to natively support JSTL: c.tld fmt.tld jstl.jar -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested within a Help!
Also if I'm using the Struts-EL version of the tags do I simply REMOVE the references to the old struts tags, or is it proper for them to coexist? I assume they ca coexist since not all of them have been ported. -D On 4/15/05, David Johnson <[EMAIL PROTECTED]> wrote: > This looks like exactly what I need. I cant seem to find the proper > home page for the struts-el subproject however. I assume I need > > struts-bean-el.tld > struts-html-el.tld > struts-logic-el.tld > struts-el.jar > > Anyone using this that can give me a starting point? > > On 4/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Here is what I know: > > http://struts.apache.org/faqs/struts-el.html > > http://struts.apache.org/userGuide/building_view.html section 3.4.6. > > > > HTH, > > Glenn > > > > David Johnson <[EMAIL PROTECTED]> > > 15/04/2005 12:52 PM > > Please respond to "Struts Users Mailing List" > > > >To: Struts Users Mailing List > >cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA) > > > >Subject:Re: nested within a > > Help! > > Classification: > > > > Are there any resources you can point me to? > > > > On 4/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > David, > > > > > > Sounds like the same thing I was having fun with yesterday. > > > I'm just back into the code... seems like the best would be Struts-EL > > > tags. > > > > > > I have not looked into how to use them in the current environment > > > (WebSphere Studio Application Developer). > > > > > > - Glenn > > > > > > David Johnson <[EMAIL PROTECTED]> > > > 15/04/2005 12:42 PM > > > Please respond to "Struts Users Mailing List" > > > > > >To: Struts Users Mailing List > > >cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA) > > > > > >Subject: nested within a Help! > > > Classification: > > > > > > > > > Hi all > > > > > > I have the following, with the goal being to allow the user to select > > > multiple portfolios, which I can then access in the action class. > > > > > > JSP: > > > > > >> > property="userPortfolio" /> > > > > > > > > > > > > this prints out a checkbox, then thename of the current portfolio from > > > the "userPortfolios" collection. > > > > > > The problem is that in the rendered HTML the portfolioName is not > > > being printed, only the following (from log.info in the Action Class) > > > > > > user selected portfolioID= > > > > > > the Question is: > > > Should I be using the c:forEach here or would I have more luck using > > > the Struts tag would they play more nicely > > > together? > > > > > > -- > > > -Dave > > > [EMAIL PROTECTED] > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > -- > > -Dave > > [EMAIL PROTECTED] > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > -Dave > [EMAIL PROTECTED] > -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested within a Help!
This looks like exactly what I need. I cant seem to find the proper home page for the struts-el subproject however. I assume I need struts-bean-el.tld struts-html-el.tld struts-logic-el.tld struts-el.jar Anyone using this that can give me a starting point? On 4/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Here is what I know: > http://struts.apache.org/faqs/struts-el.html > http://struts.apache.org/userGuide/building_view.html section 3.4.6. > > HTH, > Glenn > > David Johnson <[EMAIL PROTECTED]> > 15/04/2005 12:52 PM > Please respond to "Struts Users Mailing List" > >To: Struts Users Mailing List >cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA) > >Subject:Re: nested within a > Help! > Classification: > > Are there any resources you can point me to? > > On 4/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > David, > > > > Sounds like the same thing I was having fun with yesterday. > > I'm just back into the code... seems like the best would be Struts-EL > > tags. > > > > I have not looked into how to use them in the current environment > > (WebSphere Studio Application Developer). > > > > - Glenn > > > > David Johnson <[EMAIL PROTECTED]> > > 15/04/2005 12:42 PM > > Please respond to "Struts Users Mailing List" > > > >To: Struts Users Mailing List > >cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA) > > > >Subject: nested within a Help! > > Classification: > > > > > > Hi all > > > > I have the following, with the goal being to allow the user to select > > multiple portfolios, which I can then access in the action class. > > > > JSP: > > > >> property="userPortfolio" /> > > > > > > > > this prints out a checkbox, then thename of the current portfolio from > > the "userPortfolios" collection. > > > > The problem is that in the rendered HTML the portfolioName is not > > being printed, only the following (from log.info in the Action Class) > > > > user selected portfolioID= > > > > the Question is: > > Should I be using the c:forEach here or would I have more luck using > > the Struts tag would they play more nicely > > together? > > > > -- > > -Dave > > [EMAIL PROTECTED] > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > -Dave > [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: data-source configruation question
Nope, that still gives me the error. I have grepped thriough the classes looking for "java.lang.NoClassDefFoundError: org/apache/struts/legacy/GenericDataSource" ??? any ideas -Original Message- From: Rafael Taboada [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 11:47 AM To: Struts Users Mailing List Subject: Re: data-source configruation question Hi. u missed to call the data-source key u specified in ur struts-config.xml In ur struts-config.xml: U have: It must be: In ur action class: U have: dataSource = getDataSource(request); It must be: dataSource = getDataSource(request,"myDB"); And about being depreciated, there are others possibilities to connect to ur database. But u decide what to use. -- Rafael Taboada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested within a Help!
Here is what I know: http://struts.apache.org/faqs/struts-el.html http://struts.apache.org/userGuide/building_view.html section 3.4.6. HTH, Glenn David Johnson <[EMAIL PROTECTED]> 15/04/2005 12:52 PM Please respond to "Struts Users Mailing List" To: Struts Users Mailing List cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA) Subject:Re: nested within a Help! Classification: Are there any resources you can point me to? On 4/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > David, > > Sounds like the same thing I was having fun with yesterday. > I'm just back into the code... seems like the best would be Struts-EL > tags. > > I have not looked into how to use them in the current environment > (WebSphere Studio Application Developer). > > - Glenn > > David Johnson <[EMAIL PROTECTED]> > 15/04/2005 12:42 PM > Please respond to "Struts Users Mailing List" > >To: Struts Users Mailing List >cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA) > >Subject: nested within a Help! > Classification: > > > Hi all > > I have the following, with the goal being to allow the user to select > multiple portfolios, which I can then access in the action class. > > JSP: > >property="userPortfolio" /> > > > > this prints out a checkbox, then thename of the current portfolio from > the "userPortfolios" collection. > > The problem is that in the rendered HTML the portfolioName is not > being printed, only the following (from log.info in the Action Class) > > user selected portfolioID= > > the Question is: > Should I be using the c:forEach here or would I have more luck using > the Struts tag would they play more nicely > together? > > -- > -Dave > [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested within a Help!
Are there any resources you can point me to? On 4/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > David, > > Sounds like the same thing I was having fun with yesterday. > I'm just back into the code... seems like the best would be Struts-EL > tags. > > I have not looked into how to use them in the current environment > (WebSphere Studio Application Developer). > > - Glenn > > David Johnson <[EMAIL PROTECTED]> > 15/04/2005 12:42 PM > Please respond to "Struts Users Mailing List" > >To: Struts Users Mailing List >cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA) > >Subject: nested within a Help! > Classification: > > > Hi all > > I have the following, with the goal being to allow the user to select > multiple portfolios, which I can then access in the action class. > > JSP: > >property="userPortfolio" /> > > > > this prints out a checkbox, then thename of the current portfolio from > the "userPortfolios" collection. > > The problem is that in the rendered HTML the portfolioName is not > being printed, only the following (from log.info in the Action Class) > > user selected portfolioID= > > the Question is: > Should I be using the c:forEach here or would I have more luck using > the Struts tag would they play more nicely > together? > > -- > -Dave > [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested within a Help!
David, Sounds like the same thing I was having fun with yesterday. I'm just back into the code... seems like the best would be Struts-EL tags. I have not looked into how to use them in the current environment (WebSphere Studio Application Developer). - Glenn David Johnson <[EMAIL PROTECTED]> 15/04/2005 12:42 PM Please respond to "Struts Users Mailing List" To: Struts Users Mailing List cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA) Subject: nested within a Help! Classification: Hi all I have the following, with the goal being to allow the user to select multiple portfolios, which I can then access in the action class. JSP: this prints out a checkbox, then thename of the current portfolio from the "userPortfolios" collection. The problem is that in the rendered HTML the portfolioName is not being printed, only the following (from log.info in the Action Class) user selected portfolioID= the Question is: Should I be using the c:forEach here or would I have more luck using the Struts tag would they play more nicely together? -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: data-source configruation question
why don't use mysql-connector-java-3.1.7-bin??.. Download from www.mysql.com -- Rafael Taboada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: data-source configruation question
Hi. u missed to call the data-source key u specified in ur struts-config.xml In ur struts-config.xml: U have: It must be: In ur action class: U have: dataSource = getDataSource(request); It must be: dataSource = getDataSource(request,"myDB"); And about being depreciated, there are others possibilities to connect to ur database. But u decide what to use. -- Rafael Taboada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: data-source configruation question
Finally, I got an error to show up. Here are the jars in the WEB-INF\lib commons-collections.jar mm.mysql-2.0.7-bin.jar commons-pool-1.2.jar commons-dbcp-1.2.1.jar and of course the struts jars. Any ideas? message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet.init() for servlet action threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Unknown Source) root cause java.lang.NoClassDefFoundError: org/apache/struts/legacy/GenericDataSource java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(Unknown Source) java.security.SecureClassLoader.defineClass(Unknown Source) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1626) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181) java.lang.ClassLoader.loadClassInternal(Unknown Source) org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1082) org.apache.struts.action.ActionServlet.init(ActionServlet.java:471) javax.servlet.GenericServlet.init(GenericServlet.java:211) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Unknown Source) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.7 logs. Apache Tomcat/5.5.7 -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 11:30 AM To: user@struts.apache.org Subject: data-source configruation question Hello, I am confused on setting up a data source using dbcp with struts. I am referencing this web-site: http://linux.com.hk/docs/struts/faqs/database.html I am using mysql and struts 1.2. The problem I have is two-fold. First I remember hearing something about the being depreciated? Not sure if I read that, or I heard it. Anyone know about this? Secondly, I have my configuration here in my struts-config.xml and all properties are filled out properly. But my action class that calls this, the datasource is NULL. Any ideas? Thanks, Struts-config now my DispatchAction class has this AND IT PRINTS NULL ?? public final class QueryDispatchAction extends DispatchAction { public ActionForward query(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { javax.sql.DataSource dataSource = null; java.sql.Connection myConnection = null; try { dataSource = getDataSource(request); if (null == dataSource) { System.out.println("NULL"); } else { System.out.println("NOT NULL"); } myConnection = dataSource.getConnection(); // do what you wish with myConnection } catch (SQLException sqle) { getServlet().log("Connection.process", sqle); } finally { //enclose this in a finally block to make //sure the connection is closed try { myConnection.close(); } catch (SQLException e) { getServlet().log("Connection.close", e); } } Scott K Purcell | Developer | VERTIS | 555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com Vertis is the premier provider of targeted advertising, media, and marketing
nested within a Help!
Hi all I have the following, with the goal being to allow the user to select multiple portfolios, which I can then access in the action class. JSP: this prints out a checkbox, then thename of the current portfolio from the "userPortfolios" collection. The problem is that in the rendered HTML the portfolioName is not being printed, only the following (from log.info in the Action Class) user selected portfolioID= the Question is: Should I be using the c:forEach here or would I have more luck using the Struts tag would they play more nicely together? -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
data-source configruation question
Hello, I am confused on setting up a data source using dbcp with struts. I am referencing this web-site: http://linux.com.hk/docs/struts/faqs/database.html I am using mysql and struts 1.2. The problem I have is two-fold. First I remember hearing something about the being depreciated? Not sure if I read that, or I heard it. Anyone know about this? Secondly, I have my configuration here in my struts-config.xml and all properties are filled out properly. But my action class that calls this, the datasource is NULL. Any ideas? Thanks, Struts-config now my DispatchAction class has this AND IT PRINTS NULL ?? public final class QueryDispatchAction extends DispatchAction { public ActionForward query(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { javax.sql.DataSource dataSource = null; java.sql.Connection myConnection = null; try { dataSource = getDataSource(request); if (null == dataSource) { System.out.println("NULL"); } else { System.out.println("NOT NULL"); } myConnection = dataSource.getConnection(); // do what you wish with myConnection } catch (SQLException sqle) { getServlet().log("Connection.process", sqle); } finally { //enclose this in a finally block to make //sure the connection is closed try { myConnection.close(); } catch (SQLException e) { getServlet().log("Connection.close", e); } } Scott K Purcell | Developer | VERTIS | 555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com Vertis is the premier provider of targeted advertising, media, and marketing services that drive consumers to marketers more effectively. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] For Struts or Sports Lovers
If you are a struts or sports lover or both, you're welcome to take a look at www.sportslovers.net which is a yellow page of sports lovers and built based on Struts. Sorry if this post bothers you. T.T. - Do you Yahoo!? Yahoo! Small Business - Try our new resources site!
Re: help on accessing txt file
On 4/15/05, edward griebel <[EMAIL PROTECTED]> wrote: > Were you intending to retrieve a file from within a WAR or just a > random file on the web server box? The first case is much more > interesting than just opening streams. If the file in question is inside your webapp, the servlet API lets you *read* it quite easily. For example, lets say you are Struts :-), and you want to read the web.xml file so you can figure out what servlet mapping is being used (typically "/do/*" or "*.do") for ActionServlet. ServletContext context = ... get reference to ServletContext InputStream stream = context.getResourceAsStream("/WEB-INF/web.xml"); The ServletContext reference is available from a bunch of places ... from inside an Action, simply call: ServletContext context = getServlet().getServletContext(); > -ed Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: a Form with different actions actions
DispatchAction sounds like the right answer here, but remember that good design generally dictates that the shorted a class is, the better. Therefore, you most likely want to have your DispatchAction do not much more than make use of some helper class to do the actual functionality. Aside from keeping the DispatchActions small, it is better separation of responsibilities too. One other way to do this is to alter the action of your form on the client via scripting. For instance, attach this to your graph button: You can attach that same onClick event handler to any form element you want, setting the appropriate action mapping. Not sure either is really better, but its another way. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Fri, April 15, 2005 11:52 am, David Johnson said: > question: > > Does this tip apply to the latest version of Struts? I'm using V1.2.4 > and I notived this tip references the "perform()" method which as far > as I know is deprecated. > > I implemented this as it recommends, setting parameter="dispatch" in > the ActionMapping, but the methods I've created (with the same > signature as the execute() method arent being called, > > for example: my "report" submit button html is now > > Run > Report > > but the "report" method isnt being called > > what did I miss? Ted? > > > On 4/15/05, David Johnson <[EMAIL PROTECTED]> wrote: >> GREAT solution!!! Thank you both very much, and of course thanks to >> Ted H as well! >> >> -D >> >> On 4/15/05, Rafael Taboada <[EMAIL PROTECTED]> wrote: >> > Hi. U can use DispatchAction class to have different methods for each >> > function u have in ur form. >> > >> > For different buttons, there is a possibility to use >> > LookupDispatchAction class. Don't forget to map the keys. >> > >> > On 4/15/05, David Johnson <[EMAIL PROTECTED]> wrote: >> > > All >> > > >> > > I have a large page with a form on it that I need to submit to >> > > diffferent actions depending on that the user clicks. >> > > >> > > For example, I have on this page >> > > >> > > 0. a list of items the user can select 1-->n of (using checkboxes) >> > > 1. a list of graph types, with a "graph chosen now" button (user >> > > chooses things from item #0 above) >> > > 2. a list of reports, with a "report chosen now" button (user >> chooses >> > > things from item #0 above) >> > > 3. a "combine selected" buttons (again user chooses things from item >> #0 above) >> > > 4. a "create new" button >> > > >> > > Essentially I may need to access some or ALL of the form fields seen >> > > on the page regardless of which path the user takes, so I assume >> that >> > > means one big form. >> > > >> > > the problem is I want to submit to "graphAction" for graphs or >> > > "reportAction" for reports or "combineAction" etc. >> > > >> > > how is this kind of thing normally handled? I have simple forms that >> > > have obvious attribures but this feels different somehow. >> > > >> > > thoughts? >> > > -- >> > > -Dave >> > > [EMAIL PROTECTED] >> > > >> > > - >> > > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > > For additional commands, e-mail: [EMAIL PROTECTED] >> > > >> > > >> > >> > -- >> > >> > Rafael Taboada >> > >> >> -- >> -Dave >> [EMAIL PROTECTED] >> > > > -- > -Dave > [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: a Form with different actions actions
question: Does this tip apply to the latest version of Struts? I'm using V1.2.4 and I notived this tip references the "perform()" method which as far as I know is deprecated. I implemented this as it recommends, setting parameter="dispatch" in the ActionMapping, but the methods I've created (with the same signature as the execute() method arent being called, for example: my "report" submit button html is now Run Report but the "report" method isnt being called what did I miss? Ted? On 4/15/05, David Johnson <[EMAIL PROTECTED]> wrote: > GREAT solution!!! Thank you both very much, and of course thanks to > Ted H as well! > > -D > > On 4/15/05, Rafael Taboada <[EMAIL PROTECTED]> wrote: > > Hi. U can use DispatchAction class to have different methods for each > > function u have in ur form. > > > > For different buttons, there is a possibility to use > > LookupDispatchAction class. Don't forget to map the keys. > > > > On 4/15/05, David Johnson <[EMAIL PROTECTED]> wrote: > > > All > > > > > > I have a large page with a form on it that I need to submit to > > > diffferent actions depending on that the user clicks. > > > > > > For example, I have on this page > > > > > > 0. a list of items the user can select 1-->n of (using checkboxes) > > > 1. a list of graph types, with a "graph chosen now" button (user > > > chooses things from item #0 above) > > > 2. a list of reports, with a "report chosen now" button (user chooses > > > things from item #0 above) > > > 3. a "combine selected" buttons (again user chooses things from item #0 > > > above) > > > 4. a "create new" button > > > > > > Essentially I may need to access some or ALL of the form fields seen > > > on the page regardless of which path the user takes, so I assume that > > > means one big form. > > > > > > the problem is I want to submit to "graphAction" for graphs or > > > "reportAction" for reports or "combineAction" etc. > > > > > > how is this kind of thing normally handled? I have simple forms that > > > have obvious attribures but this feels different somehow. > > > > > > thoughts? > > > -- > > > -Dave > > > [EMAIL PROTECTED] > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > -- > > > > Rafael Taboada > > > > -- > -Dave > [EMAIL PROTECTED] > -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help on accessing txt file
Were you intending to retrieve a file from within a WAR or just a random file on the web server box? The first case is much more interesting than just opening streams. -ed On 4/15/05, Andrew Thorell <[EMAIL PROTECTED]> wrote: > try{ > File file = new File("text.txt"); > FileReader in = new FileReader(file); > FileWriter out = new FileWriter(file); > } > catch (IOException ex) <<-- could be wrong about the Excpetion here.. > { > } > Sun has a bunch of tutorials on this, also check out the API listings > on Java's website. Best of luck. > > Andrew > > On 4/15/05, Richard Reyes <[EMAIL PROTECTED]> wrote: > > Hello Guys, > > > > I need to access a file from inside an actions class. I will use its > > content as email contents. > > > > Regards > > Richard > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help on accessing txt file
try{ File file = new File("text.txt"); FileReader in = new FileReader(file); FileWriter out = new FileWriter(file); } catch (IOException ex) <<-- could be wrong about the Excpetion here.. { } Sun has a bunch of tutorials on this, also check out the API listings on Java's website. Best of luck. Andrew On 4/15/05, Richard Reyes <[EMAIL PROTECTED]> wrote: > Hello Guys, > > I need to access a file from inside an actions class. I will use its > content as email contents. > > Regards > Richard > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic parameter within
Hi all, Sorry to bring this issue again. Just read this, and I have the exactly same problem. But the thing is I can't submit the form due to some restrictions. So is there a way this can be done, or I will have to submit the form? .. Thanks, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:rewrite tag with javascript
Hi all, I am kindaa new to Struts and taglibraries world. I am using struts-bridge with Jetspeed 2 for my web portal, and have a problem. In a JavaScript function, I want to rewrite a URL. But when I rewrite that URL, I want that all my form parameters should be appended to that URL with the current values. (I cannot submit the form due to Jetspeed 2 restrictions.) For example, I want to achieve following link thru html:rewrite ../SomePage.jsp?FormElement1=currValue&Element2=currVal&... I want to dynamically append all the form elements. I am confused on how I can achieve that. The main problem is if I use location = ''; The Tag Library picks up first then JSP and it does not do the required thing. Please please help Thanks, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: a Form with different actions actions
GREAT solution!!! Thank you both very much, and of course thanks to Ted H as well! -D On 4/15/05, Rafael Taboada <[EMAIL PROTECTED]> wrote: > Hi. U can use DispatchAction class to have different methods for each > function u have in ur form. > > For different buttons, there is a possibility to use > LookupDispatchAction class. Don't forget to map the keys. > > On 4/15/05, David Johnson <[EMAIL PROTECTED]> wrote: > > All > > > > I have a large page with a form on it that I need to submit to > > diffferent actions depending on that the user clicks. > > > > For example, I have on this page > > > > 0. a list of items the user can select 1-->n of (using checkboxes) > > 1. a list of graph types, with a "graph chosen now" button (user > > chooses things from item #0 above) > > 2. a list of reports, with a "report chosen now" button (user chooses > > things from item #0 above) > > 3. a "combine selected" buttons (again user chooses things from item #0 > > above) > > 4. a "create new" button > > > > Essentially I may need to access some or ALL of the form fields seen > > on the page regardless of which path the user takes, so I assume that > > means one big form. > > > > the problem is I want to submit to "graphAction" for graphs or > > "reportAction" for reports or "combineAction" etc. > > > > how is this kind of thing normally handled? I have simple forms that > > have obvious attribures but this feels different somehow. > > > > thoughts? > > -- > > -Dave > > [EMAIL PROTECTED] > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > > Rafael Taboada > -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: a Form with different actions actions
Hi. U can use DispatchAction class to have different methods for each function u have in ur form. For different buttons, there is a possibility to use LookupDispatchAction class. Don't forget to map the keys. On 4/15/05, David Johnson <[EMAIL PROTECTED]> wrote: > All > > I have a large page with a form on it that I need to submit to > diffferent actions depending on that the user clicks. > > For example, I have on this page > > 0. a list of items the user can select 1-->n of (using checkboxes) > 1. a list of graph types, with a "graph chosen now" button (user > chooses things from item #0 above) > 2. a list of reports, with a "report chosen now" button (user chooses > things from item #0 above) > 3. a "combine selected" buttons (again user chooses things from item #0 above) > 4. a "create new" button > > Essentially I may need to access some or ALL of the form fields seen > on the page regardless of which path the user takes, so I assume that > means one big form. > > the problem is I want to submit to "graphAction" for graphs or > "reportAction" for reports or "combineAction" etc. > > how is this kind of thing normally handled? I have simple forms that > have obvious attribures but this feels different somehow. > > thoughts? > -- > -Dave > [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Rafael Taboada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: a Form with different actions actions
In the past, I've used DispatchAction to accomplish this: http://husted.com/struts/tips/002.html I'm not sure if there is a newer/better way. Dennis David Johnson <[EMAIL PROTECTED]> 04/15/2005 09:37 AM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject a Form with different actions actions All I have a large page with a form on it that I need to submit to diffferent actions depending on that the user clicks. For example, I have on this page 0. a list of items the user can select 1-->n of (using checkboxes) 1. a list of graph types, with a "graph chosen now" button (user chooses things from item #0 above) 2. a list of reports, with a "report chosen now" button (user chooses things from item #0 above) 3. a "combine selected" buttons (again user chooses things from item #0 above) 4. a "create new" button Essentially I may need to access some or ALL of the form fields seen on the page regardless of which path the user takes, so I assume that means one big form. the problem is I want to submit to "graphAction" for graphs or "reportAction" for reports or "combineAction" etc. how is this kind of thing normally handled? I have simple forms that have obvious attribures but this feels different somehow. thoughts? -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ssl-forwarding filter not working in IE 6
Hi : I have following code for automatic ssl-forwarding filter: public void doFilter(ServletRequest servletrequest, ServletResponse servletresponse, FilterChain filterchain) throws IOException, ServletException { String s = servletrequest.getScheme(); if( !s.equalsIgnoreCase("http") ) { //System.out.println( "Normal filter Operation" ); filterchain.doFilter(servletrequest, servletresponse); } else { HttpServletResponse response = (HttpServletResponse)servletresponse; HttpServletRequest request = (HttpServletRequest)servletrequest; //System.out.println( "currPort: "+request.getServerPort() ); String url = "https://"; + request.getServerName(); //System.out.println( "currUrl: "+url ); url = url + ":" + PORT; //System.out.println( "currUrl: "+url ); url = url + request.getRequestURI(); //System.out.println( "currUrl: "+url ); String queryStr = request.getQueryString(); if( queryStr!=null ) url = url + "?" + queryStr; //System.out.println( "currUrl: "+url ); response.sendRedirect(url); return; } } This works perfectly in Firefox. However, IE just sits there till it throws me a "page cannot be displayed". If I directly type secure url, e.g., https://domain.com/siteAdd, it works in IE as well, but IE just cannot seem to forward it to the secure url from the plain url. Any suggestions? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
a Form with different actions actions
All I have a large page with a form on it that I need to submit to diffferent actions depending on that the user clicks. For example, I have on this page 0. a list of items the user can select 1-->n of (using checkboxes) 1. a list of graph types, with a "graph chosen now" button (user chooses things from item #0 above) 2. a list of reports, with a "report chosen now" button (user chooses things from item #0 above) 3. a "combine selected" buttons (again user chooses things from item #0 above) 4. a "create new" button Essentially I may need to access some or ALL of the form fields seen on the page regardless of which path the user takes, so I assume that means one big form. the problem is I want to submit to "graphAction" for graphs or "reportAction" for reports or "combineAction" etc. how is this kind of thing normally handled? I have simple forms that have obvious attribures but this feels different somehow. thoughts? -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HELP] encodes special characters automatically?
I assume you mean you input japanese character but the form bean gets a messed result. If you have a multi-part/formdata encoding for form (used for file uploads) keep in ming there are problem detecting at the character encoding used by submitter. Browser is supposed to send the data in the same encoding as web page, but fileupload utility seems to be unable to catch the encoding used by web browser and the form validation bean get datas as if entered using iso-8859-1 (which is problematic when the web browser did in fact send an utf-8 stream). To soluce this, we always put this in multi part forms: This way we are sure the encoding used by borwser is the same as the one fileupload tool defaults to. Le Vendredi 15 Avril 2005 07:19, Pham Anh Tuan a Ãcrit : > Hi all, > > I got a problem, again :) > > when I input special characters like japanese or vietnamese character into > , automatically encodes that characters Decimal NCRs > before mapping to bean property. > > Example 1: > or > ... > > I input japanese characters: ããã > Before it is mapped to bean property myPro: わたし > > Example 2: > or > ... > > I input vietnamese characters: Tái Qua > Before it is mapped to bean property myPro: T?i Qua; > > So, I wonder that does encodes special character automatically > when it find some character like japanese or vietnamese? > > plz help me! > > Pham -- David Delbecq Royal Meteorological Institute of Belgium - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts & UTF-8 (POST working, GET not)
Hond4 wrote: > I have fllowing problem with my Struts app on Jboss. Here is my filter > String defaultEncode = "UTF-8"; > HttpServletRequest req = (HttpServletRequest) request; > HttpServletResponse res = (HttpServletResponse) response; > req.setCharacterEncoding(defaultEncode); >From setCharacterEncoding JavaDoc: "Overrides the name of the character encoding used in the *body* of this request." The GET parameters are in the URL query string (not the body of the request). TO tell tomcat they are encoded in UTF-8, in your tomcat/conf/server.xml file, look for tags and add this attribute: URIEncoding="UTF-8". E.g. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] question about open source data base selection
> If you are distributing a product to others that includes GPL > software, and you don't want to put your own work under the GPL, the > end-user has to download the GPL package separately (e.g. MySQL) and > then plug it in. (And you also have to be careful about how the > plugging in process works.) If you distribute the product as a > ready-to-go bundle, then the viral aspects of the GPL kick in, and > your package must be GPL too. :( > > -Ted. Not strictly true. You cannot distribute it as a single program. But you can distribute it together. Take a java web-app using mysql. You can compile it and build a war (excluding the jdbc driver). This program is therefore NOT including any GPL code (as long as you havnt used any elsewhere), and not affected by the GPL license. If you distribute it on a cd, with mysql and the jdbc jar on the cd, then you are not breaking the rules, as the programs are separate. See: http://www.fsf.org/licensing/licenses/gpl-faq.html#MereAggregation You could probably get away with writing install scripts that install your package, the mysql package, then install the extra jar. Note that once the programs are combined again, they would break the rules if distributed again with the jar file intact. Daniel. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[FRIDAY] Struts.Next
OK, once more, with feeling :) For the record, so that there is no mistake, the PMC did decide that Struts Shale is *not* Struts.Next. Today, the only Struts.Next is Struts 1.3. Craig McClanahan and David Geary will be speaking at Java One this year. The title of the talk is "Shale: The Next Struts?" But, by "next" they mean the next big thing. They do not mean Struts.Next. While it is not the next Struts Core, Struts Shale *is* a part of the Apache Struts Project. Shale is one of a growing number of Struts subprojects. Like Struts 1.3, Shale is unreleased software, so the best place to discuss it is the dev list. While we tolerate user-type questions about unreleased software on the user list, we do prefer that posts be addressed to the dev list until the software is released. When a post refers to a subproject or the next release, it's good practice to use subject keywords, like [Struts Flow], [BSF Scripting], [Struts 1.3], and [Struts Shale]. Also for the record, it *is* appropriate to discuss JSF on the Struts User list. Just as it was appropriate to discuss JSTL when it first came out. JSF is the latest Java technology. Struts has always supported the latest Java technologies, and JSF will be no exception. When we shipped the original taglibs, most teams were still using scriplets. Struts provided technology that many teams needed to move away from scriptlets and toward taglibs. Years later, when JSTL become available, we brought out Struts EL, to help teams migrate from custom tags to standard tags. When Java introduced the DataSource interface, Struts added support for an innovative DataSource manager. Later, as other options became available, we deprecated and removed ours, so that teams could move to newer, better implementations. Struts has always supported innovative technologies. First it was taglibs, then DataSources and JSTL, and now its the Bean Scripting Framework and JavaServer Faces. Through third-party extensions (any of which I for one would love to see us host here), Struts also supports XLST, Velocity, client-side menuing, Spring injection, and the SSL protocol. How to use technologies like these with your Struts applications are welcome topics on the Struts User list. Always have been, always will be. Now that JSF is available, Struts, true to its tradition, is again providing support for the latest Java technologies. We provide a Struts Faces taglib to help teams migrate from Struts Taglibs to JSF, one page at a time. (Struts 1.x or JSF is not an either/or proposition!) As mentioned, we are also working on Struts Shale, for teams that want to get a fresh start. Does Struts Shale mean that we aren't working on Struts Core? No, of course it doesn't. Like everyone else, most of the Struts Committers have five years worth of applications to maintain. (Yes, we do eat our own dog food!) It will be a very long time before those applications are ready to migrate to anything as innovative as Struts Shale. In the meantime, work continues on Struts Core 1.3.x and beyond [http://struts.apache.org/roadmap.html]. All development discussions do take place on dev@struts.apache.org and nowhere else. If you want to see how the sausages are made, feel free to subscribe [http://struts.apache.org/using.html#Lists]. To learn more about how Struts and other Apache projects operate, see * How the ASF Works [http://apache.org/foundation/how-it-works.html], * Rules for Revolutionaries [http://incubator.apache.org/learn/rules-for-revolutionaries.html], and * The Struts Project Bylaws [http://struts.apache.org/bylaws.html]. HTH, Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: form authentication
The standard examples work fine in Struts applications, such as * http://www.onjava.com/pub/a/onjava/2001/08/06/webform.html?page=last In the form, just be sure to name the attributes j_username and j_password. The container does the rest. (But some of the configuration details vary between containers.) For authentication generally, SecurityFilter [http://securityfilter.sourceforge.net/] is very popular. You might also want to review [http://struts.apache.org/faqs/ssl.html]. HTH, Ted. On 4/14/05, Peter Laufer <[EMAIL PROTECTED]> wrote: > Hi theere. > I'm newbie to struts. > I need some simple example how to do FORM AUTHENTICATION with struts. > can you help me? (send it to: [EMAIL PROTECTED]). > > thank you very much. > > Best Regards, > Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts & UTF-8 (POST working, GET not)
Hallo, I have fllowing problem with my Struts app on Jboss. Here is my filter String defaultEncode = "UTF-8"; HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse res = (HttpServletResponse) response; req.setCharacterEncoding(defaultEncode); res.setCharacterEncoding(defaultEncode); chain.doFilter(req, res); problem is that when I submit my form with POST everything works just fine, when I change form submit method to GET i have problems with characters. here is my example: UTF-8: płyn URL: p%C5%82yn any idea what's wrong with my app? Best regards, H0nd4 -- Castingi do trzeciej edycji Konkursu Elite Model Look już 16 i 17 kwietnia w Twoim mieście. Więcej informacji na stronie http://www.gazeta.pl/elitemodellook - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HELP] encodes special characters automatically?
but there's no Filter attribute in :| - Original Message - From: "yue pengfei" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Friday, April 15, 2005 3:33 PM Subject: Re: [HELP] encodes special characters automatically? Maybe you need set the filter attribute of html:text On 4/15/05, Pham Anh Tuan <[EMAIL PROTECTED]> wrote: Hi all, I got a problem, again :) when I input special characters like japanese or vietnamese character into , automatically encodes that characters Decimal NCRs before mapping to bean property. Example 1: or ... I input japanese characters: ããã Before it is mapped to bean property myPro: わたし Example 2: or ... I input vietnamese characters: Tái Qua Before it is mapped to bean property myPro: T?i Qua; So, I wonder that does encodes special character automatically when it find some character like japanese or vietnamese? plz help me! Pham - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HELP] encodes special characters automatically?
Maybe you need set the filter attribute of html:text On 4/15/05, Pham Anh Tuan <[EMAIL PROTECTED]> wrote: > Hi all, > > I got a problem, again :) > > when I input special characters like japanese or vietnamese character into > , automatically encodes that characters Decimal NCRs > before mapping to bean property. > > Example 1: > or > > ... > > I input japanese characters: ããã > Before it is mapped to bean property myPro: わたし > > Example 2: > or > > ... > > I input vietnamese characters: Tái Qua > Before it is mapped to bean property myPro: T?i Qua; > > So, I wonder that does encodes special character automatically > when it find some character like japanese or vietnamese? > > plz help me! > > Pham >
Re: Re[2]: form authentication
Hmm? Well, try any of the Struts books and go online and get their sample code. That always has the username/password logon stuff. Jack On 4/14/05, Peter Laufer <[EMAIL PROTECTED]> wrote: > > > I have there only these examples: > * Taglib Test Pages > * Upload examples > * Validator and Localization examples > > there is nothing about authentication... > > Peter > > Thursday, April 14, 2005, 4:43:42 PM, you wrote: > > > There are examples in the Struts shipment. > > > On 4/14/05, Peter Laufer <[EMAIL PROTECTED]> wrote: > >> Hi theere. > >> I'm newbie to struts. > >> I need some simple example how to do FORM AUTHENTICATION with struts. > >> can you help me? (send it to: [EMAIL PROTECTED]). > >> > >> thank you very much. > >> > >> Best Regards, > >> Peter > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
user@struts.apache.org
When inserting a tile into my jsp I am receiving an error after migrating to struts.1.2.4 org.apache.struts.taglib.tiles.InsertTag TRAS0014I: The following exception was logged com.ibm.ws.webcontainer.servlet.exception.UncaughtServletException: Server caught unhandled exception from servlet [SimpleFileServlet]: Response already committed. I understand that this is due to the fact the JSP invoking the template has no references to the 'shop_navigation' so I dutifully looked up the tiles taglib reference and found the ignore attribute. However even when using this it does not seem to work. Any ideas? Here is my usage fyi