How to pass HTTPRequest between two JSP ?
Hello... Since a few days I am working with Struts 2. (2.1.6) I am facing a big problem with HttpRequest and JSPs. Well... I have to forward a HTTPRequest from page1.jsp to page2.jsp So... How can I pass HTTPRequest attribute betwen 2 pages? Here is a part my web.xml file : ... struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /* ... the struts.xml file : ... /pages/bnf/administration/detailBnf.jsp /pages/bnf/administration/detailBnf.jsp ... and a part of the action java file (which implementents RequestAware): public String execute() throws Exception { request.put("test", 58); return SUCCESS; } public String modificationSubmit() throws TechniqueException, FonctionnelleException { request.get("test"); // is null editMode = true; return SUCCESS; } So... How can I pass the request attribute from on page to an other? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to pass HTTPRequest between two JSP ?
Thank you for your answer ... Yes... In fact the goal is to pass the request from an action to an other. But after having reading the struts's documentation I can only use result dispatcher type. In this part : http://cwiki.apache.org/WW/redirect-result.html they say that, with a redirect result, the last action is lost and the only way to pass attributes (or parameters) is to use session or web parameters. Finally the question may be how to configure the dispatch result? Regards... Fred --- En date de : Lun 1.3.10, Burton Rhodes a écrit : > De: Burton Rhodes > Objet: Re: How to pass HTTPRequest between two JSP ? > À: "Struts Users Mailing List" > Date: Lundi 1 mars 2010, 1h24 > I think you may want to do a > 'redirect' to the next action in your xml > file. You pass the request from one action to the > other. Not from jsp > to jsp. > > On 2/28/10, Frederik Minatchy > wrote: > > Hello... > > > > Since a few days I am working with Struts 2. (2.1.6) > > I am facing a big problem with HttpRequest and JSPs. > > > > Well... I have to forward a HTTPRequest from page1.jsp > to page2.jsp > > > > So... How can I pass HTTPRequest attribute betwen 2 > pages? > > > > Here is a part my web.xml file : > > > > ... > > > > > struts2 > > > > > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter > > > > > > > struts2 > > > /* > > > > ... > > > > > > the struts.xml file : > > > > ... > > > > > > class="fr.bnf.platon.bnf.actions.ConsultationBnfDetailAction"> > > > > > name="success">/pages/bnf/administration/detailBnf.jsp > > > > > > > > > > name="bnf-detail_modification" > > > class="fr.bnf.platon.bnf.actions.ConsultationBnfDetailAction" > > method="modificationSubmit"> > > > > > name="success">/pages/bnf/administration/detailBnf.jsp > > > > ... > > > > and a part of the action java file (which > implementents RequestAware): > > > > public String execute() throws > Exception > > { > > request.put("test", > 58); > > return SUCCESS; > > } > > > > public String modificationSubmit() throws > TechniqueException, > > FonctionnelleException > > { > > request.get("test"); // > is null > > editMode = true; > > return SUCCESS; > > } > > > > > > > > So... How can I pass the request attribute from on > page to an other? > > > > > > > > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > -- > Sent from my mobile device > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to pass HTTPRequest between two JSP ?
--- En date de : Lun 1.3.10, Alex Rodriguez Lopez a écrit : > De: Alex Rodriguez Lopez > Objet: Re: How to pass HTTPRequest between two JSP ? > À: "Struts Users Mailing List" > Date: Lundi 1 mars 2010, 9h21 > Em 28-02-2010 23:26, Frederik > Minatchy escreveu: > > Hello... > > > > Since a few days I am working with Struts 2. (2.1.6) > > I am facing a big problem with HttpRequest and JSPs. > > > > Well... I have to forward a HTTPRequest from page1.jsp > to page2.jsp > > > > So... How can I pass HTTPRequest attribute betwen 2 > pages? > > > > Here is a part my web.xml file : > > > > ... > > > > > struts2 > > > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter > > > > > > > struts2 > > > /* > > > > ... > > > > > > the struts.xml file : > > > > ... > > > > class="fr.bnf.platon.bnf.actions.ConsultationBnfDetailAction"> > > > name="success">/pages/bnf/administration/detailBnf.jsp > > > > > > > > > > name="bnf-detail_modification" > class="fr.bnf.platon.bnf.actions.ConsultationBnfDetailAction" > method="modificationSubmit"> > > > name="success">/pages/bnf/administration/detailBnf.jsp > > > > ... > > > > and a part of the action java file (which > implementents RequestAware): > > > > public String execute() throws Exception > > { > > request.put("test", 58); > > return SUCCESS; > > } > > > > public String > modificationSubmit() throws TechniqueException, > FonctionnelleException > > { > > request.get("test"); // is > null > > editMode = true; > > return SUCCESS; > > } > > > > > > > > So... How can I pass the request attribute from on > page to an other? > > > > > > > > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > I think you should be able to redirect with something like > this: > http://struts.apache.org/2.0.14/docs/redirect-action-result.html > > use return type redirect-action, work at request level > redirecting > requests, no jsps. I think request params are retained this > way. > > > Regards. > Alex Lopez > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > Thank you for your answer... But as I have to manage passwords I cannot pass values by using Request parameters (as they will appear in the url). I am forced to use Request Attributes. For the moment I am using SessionAware but it is not a good solution. Using Request attributes to store values seem to be a better way. (I remember that it was possible in strut 1.x wasn't it?) I have read that with Dispatch result HTTPRequest was "kept" on the server and was not lost... I am trying to implement things as it is written in documentation but it fails... I appreciate your help... Fred - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to pass HTTPRequest between two JSP ?
Perhaps it because of me and the way I understand HTTPRequest. Here is an other example : in the class name : fr.bnf.platon.bnf.actions.ConsultationEditeurDetailAction implementing ServletRequestAware interface when I am in the execute method I do : public String execute() throws Exception { ... request.setAttribute("isbnListe", isbnEditeurBeanById); // isbnEditeurBeanById is a map ... return SUCCESS; } and when I want to suppress element from the map stored in the request attribute I do : public String supprimerIsbn() { final Map allEditorIsbnToRemove = (Map) request.getAttribute("isbnListe"); // is null ... why ? ... // remove selected elements return "modification"; } in my xml file I have : ... /pages/bnf/consultationDemandes/detailEditeur.jsp /pages/bnf/consultationDemandes/detailEditeur.jsp /pages/bnf/consultationDemandes/detailEditeur.jsp /pages/bnf/consultationDemandes/detailEditeur.jsp ... and at least in the jsp : I enter in the "supprimerIsbn" method with the submit button : ... ... It's true... I can use Session... But after that I have to clean each elements I have set in session I am sure that the dispatch result is a solution... but perhaps I made a mistake in the web.xml file. For example why in my url I always have something like http://localhost:8080/X/x.jsp and not http://localhost:8080/X/x.action? Fred... Lost in struts2 world :( --- En date de : Lun 1.3.10, Nils-Helge Garli Hegvik a écrit : > De: Nils-Helge Garli Hegvik > Objet: Re: How to pass HTTPRequest between two JSP ? > À: "Struts Users Mailing List" > Date: Lundi 1 mars 2010, 9h50 > Either: > > - Don't do a redirect, but a regular dispatch [1] > - Store it in the session > > Regards, > > Nils-Helge Garli Hegvik > > [1] - http://struts.apache.org/2.1.8.1/docs/dispatcher-result.html > > > On Mon, Mar 1, 2010 at 10:40 AM, Frederik Minatchy > wrote: > > > > > > --- En date de : Lun 1.3.10, Alex Rodriguez Lopez > > a écrit : > > > >> De: Alex Rodriguez Lopez > >> Objet: Re: How to pass HTTPRequest between two JSP > ? > >> À: "Struts Users Mailing List" > >> Date: Lundi 1 mars 2010, 9h21 > >> Em 28-02-2010 23:26, Frederik > >> Minatchy escreveu: > >> > Hello... > >> > > >> > Since a few days I am working with Struts 2. > (2.1.6) > >> > I am facing a big problem with HttpRequest > and JSPs. > >> > > >> > Well... I have to forward a HTTPRequest from > page1.jsp > >> to page2.jsp > >> > > >> > So... How can I pass HTTPRequest attribute > betwen 2 > >> pages? > >> > > >> > Here is a part my web.xml file : > >> > > >> > ... > >> > > >> > > >> struts2 > >> > > >> > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter > >> > > >> > > >> > > >> struts2 > >> > > >> /* > >> > > >> > ... > >> > > >> > > >> > the struts.xml file : > >> > > >> > ... > >> > > >> > >> > class="fr.bnf.platon.bnf.actions.ConsultationBnfDetailAction"> > >> > > >> >> > name="success">/pages/bnf/administration/detailBnf.jsp > >> > > >> > > >> > > >> > > >> > >> name="bnf-detail_modification" > >> > class="fr.bnf.platon.bnf.actions.ConsultationBnfDetailAction" > >> method="modificationSubmit"> > >> > > >> >> > name="success">/pages/bnf/administration/detailBnf.jsp > >> > > >> > ... > >> > > >> > and a part of the action java file (which > >> implementents RequestAware): > >> > > >> > public String execute() throws > Exception > >> > { > >> > request.put("test", 58); > >> > return SUCCESS; > >> > } > >> > > >> > public String > >> modificationSubmit() throws TechniqueException, > >> FonctionnelleException > >> > { > >
Re: How to pass HTTPRequest between two JSP ?
To go from the first action (the execute method) to the second one (supprimerIsbn) I use a submit button in the jsp : --- En date de : Lun 1.3.10, Nils-Helge Garli Hegvik a écrit : > De: Nils-Helge Garli Hegvik > Objet: Re: How to pass HTTPRequest between two JSP ? > À: "Struts Users Mailing List" > Date: Lundi 1 mars 2010, 10h44 > I'm not following the chain of > actions here... Where's the > flow/connection between the two actions? > > Nils-H > > On Mon, Mar 1, 2010 at 11:36 AM, Frederik Minatchy > wrote: > > Perhaps it because of me and the way I understand > HTTPRequest. > > > > Here is an other example : > > > > > > in the class name : > > > > > fr.bnf.platon.bnf.actions.ConsultationEditeurDetailAction > implementing ServletRequestAware interface > > > > > > when I am in the execute method I do : > > > > public String execute() throws Exception { > > ... > > request.setAttribute("isbnListe", > isbnEditeurBeanById); // isbnEditeurBeanById is a map > > ... > > > > return SUCCESS; > > } > > > > and when I want to suppress element from the map > stored in the request attribute > > > > I do : > > > > public String supprimerIsbn() > > { > > final Map > allEditorIsbnToRemove = (Map IsbnEditeurBean>) request.getAttribute("isbnListe"); // > is null ... why ? > > ... > > // remove selected elements > > > > return "modification"; > > } > > > > in my xml file I have : > > > > ... > > class="fr.bnf.platon.bnf.actions.ConsultationEditeurDetailAction" > > > > name="input">/pages/bnf/consultationDemandes/detailEditeur.jsp > > type="dispatcher"> > > name="location">/pages/bnf/consultationDemandes/detailEditeur.jsp > > > > type="dispatcher"> > > name="location">/pages/bnf/consultationDemandes/detailEditeur.jsp > > > > type="dispatcher"> > > name="location">/pages/bnf/consultationDemandes/detailEditeur.jsp > > > > > > ... > > > > > > and at least in the jsp : > > > > > > I enter in the "supprimerIsbn" method with the submit > button : > > ... > > type="submit" /> > > ... > > > > > > It's true... I can use Session... But after that I > have to clean each elements I have set in session > > > > > > I am sure that the dispatch result is a solution... > but perhaps I made a mistake in the web.xml file. > > > > For example why in my url I always have something > like > > > > http://localhost:8080/X/x.jsp and > not http://localhost:8080/X/x.action? > > > > > > Fred... Lost in struts2 world :( > > > > > > --- En date de : Lun 1.3.10, Nils-Helge Garli Hegvik > > a écrit : > > > >> De: Nils-Helge Garli Hegvik > >> Objet: Re: How to pass HTTPRequest between two JSP > ? > >> À: "Struts Users Mailing List" > >> Date: Lundi 1 mars 2010, 9h50 > >> Either: > >> > >> - Don't do a redirect, but a regular dispatch [1] > >> - Store it in the session > >> > >> Regards, > >> > >> Nils-Helge Garli Hegvik > >> > >> [1] - http://struts.apache.org/2.1.8.1/docs/dispatcher-result.html > >> > >> > >> On Mon, Mar 1, 2010 at 10:40 AM, Frederik Minatchy > > >> wrote: > >> > > >> > > >> > --- En date de : Lun 1.3.10, Alex Rodriguez > Lopez > >> > >> a écrit : > >> > > >> >> De: Alex Rodriguez Lopez > >> >> Objet: Re: How to pass HTTPRequest > between two JSP > >> ? > >> >> À: "Struts Users Mailing List" > >> >> Date: Lundi 1 mars 2010, 9h21 > >> >> Em 28-02-2010 23:26, Frederik > >> >> Minatchy escreveu: > >> >> > Hello... > >> >> > > >> >> > Since a few days I am working with > Struts 2. > >> (2.1.6) > >> >> > I am facing a big problem with > HttpRequest > >> and JSPs. > >> >> > > >>
Re: How to pass HTTPRequest between two JSP ?
Ok! Now I understand a little bit more! But I will ask you on last question (I hope :) ) How can I do the same think without creating 2 independents request? It seems that the submit button is not the good choice... Thank you for your help... --- En date de : Lun 1.3.10, Nils-Helge Garli Hegvik a écrit : > De: Nils-Helge Garli Hegvik > Objet: Re: How to pass HTTPRequest between two JSP ? > À: "Struts Users Mailing List" > Date: Lundi 1 mars 2010, 11h07 > In that case, you're talking about > two entirely independent requests. > The request for the first action is no longer accessible > for the > second action invocation. So in this case your options > are: > > - Store the data as request parameters that you pass on to > the next action > - Store the data in the session. > > Nils-H > > > On Mon, Mar 1, 2010 at 11:56 AM, Frederik Minatchy > wrote: > > To go from the first action (the execute method) to > the second one (supprimerIsbn) I use a submit button in the > jsp : > > > > id="supprimerIsbn" type="submit" /> > > > > > > > > > > > > > > --- En date de : Lun 1.3.10, Nils-Helge Garli Hegvik > > a écrit : > > > >> De: Nils-Helge Garli Hegvik > >> Objet: Re: How to pass HTTPRequest between two JSP > ? > >> À: "Struts Users Mailing List" > >> Date: Lundi 1 mars 2010, 10h44 > >> I'm not following the chain of > >> actions here... Where's the > >> flow/connection between the two actions? > >> > >> Nils-H > >> > >> On Mon, Mar 1, 2010 at 11:36 AM, Frederik Minatchy > > >> wrote: > >> > Perhaps it because of me and the way I > understand > >> HTTPRequest. > >> > > >> > Here is an other example : > >> > > >> > > >> > in the class name : > >> > > >> > > >> > fr.bnf.platon.bnf.actions.ConsultationEditeurDetailAction > >> implementing ServletRequestAware interface > >> > > >> > > >> > when I am in the execute method I do : > >> > > >> > public String execute() throws Exception { > >> > ... > >> > request.setAttribute("isbnListe", > >> isbnEditeurBeanById); // isbnEditeurBeanById is a > map > >> > ... > >> > > >> > return SUCCESS; > >> > } > >> > > >> > and when I want to suppress element from the > map > >> stored in the request attribute > >> > > >> > I do : > >> > > >> > public String supprimerIsbn() > >> > { > >> > final Map > >> allEditorIsbnToRemove = (Map >> IsbnEditeurBean>) > request.getAttribute("isbnListe"); // > >> is null ... why ? > >> > ... > >> > // remove selected elements > >> > > >> > return "modification"; > >> > } > >> > > >> > in my xml file I have : > >> > > >> > ... > >> > >> > class="fr.bnf.platon.bnf.actions.ConsultationEditeurDetailAction" > >> > > >> > >> > name="input">/pages/bnf/consultationDemandes/detailEditeur.jsp > >> > name="success" > >> type="dispatcher"> > >> > > >> > name="location">/pages/bnf/consultationDemandes/detailEditeur.jsp > >> > > >> > name="modification" > >> type="dispatcher"> > >> > >> > name="location">/pages/bnf/consultationDemandes/detailEditeur.jsp > >> > > >> > name="supprimerISBN" > >> type="dispatcher"> > >> > >> > name="location">/pages/bnf/consultationDemandes/detailEditeur.jsp > >> > > >> > > >> > ... > >> > > >> > > >> > and at least in the jsp : > >> > > >> > > >> > I enter in the "supprimerIsbn" method with > the submit > >> button : > >> > ... > >> > id="supprimerIsbn" > >> type="submit" /> > >> > ... > >> > > >>
Re: How to pass HTTPRequest between two JSP ?
the submit button may be usefull to generate a password for example... But the user is not constrained to use it... It's because of that the second page cannot be the result of the first page. --- En date de : Lun 1.3.10, Nils-Helge Garli Hegvik a écrit : > De: Nils-Helge Garli Hegvik > Objet: Re: How to pass HTTPRequest between two JSP ? > À: "Struts Users Mailing List" > Date: Lundi 1 mars 2010, 14h05 > That depends. What are you trying to > do? What is the purpose of the > submit in the first place? If you just need to execute the > second > action directly after the first one, then configure your > second action > as a result of the first action. > > Nils-H > > On Mon, Mar 1, 2010 at 12:12 PM, Frederik Minatchy > wrote: > > Ok! Now I understand a little bit more! > > > > But I will ask you on last question (I hope :) ) > > How can I do the same think without creating 2 > independents request? It seems that the submit button is not > the good choice... > > > > Thank you for your help... > > > > > > > > --- En date de : Lun 1.3.10, Nils-Helge Garli Hegvik > > a écrit : > > > >> De: Nils-Helge Garli Hegvik > >> Objet: Re: How to pass HTTPRequest between two JSP > ? > >> À: "Struts Users Mailing List" > >> Date: Lundi 1 mars 2010, 11h07 > >> In that case, you're talking about > >> two entirely independent requests. > >> The request for the first action is no longer > accessible > >> for the > >> second action invocation. So in this case your > options > >> are: > >> > >> - Store the data as request parameters that you > pass on to > >> the next action > >> - Store the data in the session. > >> > >> Nils-H > >> > >> > >> On Mon, Mar 1, 2010 at 11:56 AM, Frederik Minatchy > > >> wrote: > >> > To go from the first action (the execute > method) to > >> the second one (supprimerIsbn) I use a submit > button in the > >> jsp : > >> > > >> > >> id="supprimerIsbn" type="submit" /> > >> > > >> > > >> > > >> > > >> > > >> > > >> > --- En date de : Lun 1.3.10, Nils-Helge > Garli Hegvik > >> > >> a écrit : > >> > > >> >> De: Nils-Helge Garli Hegvik > >> >> Objet: Re: How to pass HTTPRequest > between two JSP > >> ? > >> >> À: "Struts Users Mailing List" > >> >> Date: Lundi 1 mars 2010, 10h44 > >> >> I'm not following the chain of > >> >> actions here... Where's the > >> >> flow/connection between the two actions? > >> >> > >> >> Nils-H > >> >> > >> >> On Mon, Mar 1, 2010 at 11:36 AM, Frederik > Minatchy > >> > >> >> wrote: > >> >> > Perhaps it because of me and the way > I > >> understand > >> >> HTTPRequest. > >> >> > > >> >> > Here is an other example : > >> >> > > >> >> > > >> >> > in the class name : > >> >> > > >> >> > > >> >> > >> > fr.bnf.platon.bnf.actions.ConsultationEditeurDetailAction > >> >> implementing ServletRequestAware > interface > >> >> > > >> >> > > >> >> > when I am in the execute method I do > : > >> >> > > >> >> > public String execute() throws > Exception { > >> >> > ... > >> >> > > request.setAttribute("isbnListe", > >> >> isbnEditeurBeanById); // > isbnEditeurBeanById is a > >> map > >> >> > ... > >> >> > > >> >> > return SUCCESS; > >> >> > } > >> >> > > >> >> > and when I want to suppress element > from the > >> map > >> >> stored in the request attribute > >> >> > > >> >> > I do : > >> >> > > >> >> > public String supprimerIsbn() > >> >> > { > >> >> > final Map IsbnEditeurBean> > >> >> allEditorIsbnToRemove = > (Map >> >> IsbnEditeurBean>) > >> request.getAttribute("isbnListe"); // > >> >> is nu
RE: How to pass HTTPRequest between two JSP ?
Not so bad... But I have the impression it would be complicated to apply on my source... Because we have nearly finish and they will kill me if I touch too much objects :) --- En date de : Lun 1.3.10, Martin Gainty a écrit : > De: Martin Gainty > Objet: RE: How to pass HTTPRequest between two JSP ? > À: "Struts Users Mailing List" > Date: Lundi 1 mars 2010, 13h57 > > one way is to package a bean which contains a method which > will get or post the request e.g. > > <%@ page > contentType="text/html;charset=windows-1252"%> > class="gov.fmcsa.wribosservice.client.AXIOMClient" /> > > > > valign="center"><%=axiomclient.CallTheURL(object,request)%> > > > > > > //sample code > > AXIOMClient extends ABunchOfClasses implements > ABunchOfInterfaces > > { > > public static void callTheURL(Object > object,javax.servlet.http.HttpServletRequest request) > > { > > httpost=httpost_param; //save a local copy > org.apache.http.HttpResponse response_from_post = > null; > org.apache.http.client.HttpClient httpclient = new > org.apache.http.impl.client.DefaultHttpClient(); > > java.lang.String port="8007"; > java.lang.String host="localhost"; > java.lang.String protocol="http"; > > java.lang.String response_from_client="null > response"; > java.lang.String targetEndpoint=new > String("http://localhost:8007/CommInterface2/servlet/Comminterface2Servlet";); > > > > //GET > > org.apache.http.client.methods.HttpGet httpget = new > org.apache.http.client.methods.HttpGet(targetEndpoint); > try > { > httpget.addHeader("gov.fmcsa.wribosservice.client.WRIBOSServiceStub$SubmitmsgRequest",object.toString()); > } > catch(Exception excp) > { > if (debug) System.out.println("AXIOMClient > produces Exception produced for > httpget.addHeader(gov.fmcsa.wribosservice.client.WRIBOSServiceStub$SubmitmsgRequest,object.toString())"); > } > > > > //POST > > String resp=null; > > try > { > > org.apache.http.HttpHost target = new > org.apache.http.HttpHost("http://localhhost:8007/servlet/Comminterface2Servlet/";); > > // general setup > > org.apache.http.conn.scheme.SchemeRegistry > supportedSchemes = new > org.apache.http.conn.scheme.SchemeRegistry(); > > // Register the "http" protocol scheme, it is required > // by the default operator to look up socket factories. > supportedSchemes.register(new > org.apache.http.conn.scheme.Scheme("http",org.apache.http.conn.scheme.PlainSocketFactory.getSocketFactory(), > 8007)); > > // prepare parameters > org.apache.http.params.HttpParams params > = new org.apache.http.params.BasicHttpParams(); > > org.apache.http.params.HttpProtocolParams.setVersion(params, > org.apache.http.HttpVersion.HTTP_1_1); > > org.apache.http.params.HttpProtocolParams.setContentCharset(params, > "UTF-16"); > > org.apache.http.params.HttpProtocolParams.setUseExpectContinue(params, > true); > > org.apache.http.conn.ClientConnectionManager > connMgr = new > org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager(params,supportedSchemes); > > httpclient = new > org.apache.http.impl.client.DefaultHttpClient(connMgr, > params); > > httpget = new > org.apache.http.client.methods.HttpGet(targetEndpoint); > > httpget.addHeader("key",object.toString()); > > httpost = new > org.apache.http.client.methods.HttpPost("http://localhost:8007/CommInterface2/servlet/Comminterface2Servlet";); > > //roll thru the params and add in > nvps = new > java.util.ArrayList > (); > > nvps.add(new > org.apache.http.message.BasicNameValuePair("submitmsgRequest", > object.toString() )); > > > > httpost.setEntity(new > org.apache.http.client.entity.UrlEncodedFormEntity(nvps, > "UTF-8")); > > > set_httppost(object.toString()); > > > if (debug==true) > System.out.println("AXIOMClient !!!About to call the > server!!!"); > > response_from_post=httpclient.execute(httpost); > > > if(response_from_post!=null) > { > //acquire the > entity > > org.apache.http.HttpEntity entity = > response_from_post.getEntity(); > > > > //response_client=org.apache.http.util.EntityUtils.toByteArray(entity); > > previous_label_str=null; > > submitMsgCounter=0; > i=0; > label_ctr=0; > value_ctr=0; > > java.util.HashMap > returned_hashmap=ReturnBackFormattedList(org.apache.http.util.EntityUtils.toString(entity)); > String > delimiterToAppend=new String(""); > > response_from_client = > FormatTheHashMapAndReturnString(returned_hashmap,delimiterToAppend); > } > return response_from_client; > > } > > > > HTH > Martin Gainty > __ > Jogi és Bizalmassági kinyilatkoztatás/Verzicht und > Vertraulichkeitanmerkung/Note de déni et de > confidentia
Re : Struts 2 tooltip is not working
You should use the tiles attribute --- En date de : Mer 3.3.10, nani2ratna a écrit : > De: nani2ratna > Objet: Struts 2 tooltip is not working > À: user@struts.apache.org > Date: Mercredi 3 mars 2010, 9h42 > > Hi, > > We are using struts- 2.1.8.1 GA release. > I am trying to add tooltip attribute for tag. > Its not working. > > I tried adding still not working. > I tried changing theme = 'xhtnl'. > > Still its not working. > is this a bug. > > I am not using dojo plugin. > I am using jquery plugin. > Can anybody know whats the solution. > > Thanks and Regards > RS > -- > View this message in context: > http://old.nabble.com/Struts-2-tooltip-is-not-working-tp27766081p27766081.html > Sent from the Struts - User mailing list archive at > Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Re : Struts 2 tooltip is not working
Oups... I missed the "t" key to type "title"... Sorry... --- En date de : Mer 3.3.10, nani2ratna a écrit : > De: nani2ratna > Objet: Re: Re : Struts 2 tooltip is not working > À: user@struts.apache.org > Date: Mercredi 3 mars 2010, 13h11 > > Sorry Frederick. > I didn't get you. > There is not tiles attribute in S;text or s:a. > Where i need to use that attribute. > > Thanks in advance > RS > > > Frederik Minatchy wrote: > > > > You should use the tiles attribute > > > > --- En date de : Mer 3.3.10, nani2ratna > a écrit : > > > >> De: nani2ratna > >> Objet: Struts 2 tooltip is not working > >> À: user@struts.apache.org > >> Date: Mercredi 3 mars 2010, 9h42 > >> > >> Hi, > >> > >> We are using struts- 2.1.8.1 GA release. > >> I am trying to add tooltip attribute for > tag. > >> Its not working. > >> > >> I tried adding still not working. > >> I tried changing theme = 'xhtnl'. > >> > >> Still its not working. > >> is this a bug. > >> > >> I am not using dojo plugin. > >> I am using jquery plugin. > >> Can anybody know whats the solution. > >> > >> Thanks and Regards > >> RS > >> -- > >> View this message in context: > >> http://old.nabble.com/Struts-2-tooltip-is-not-working-tp27766081p27766081.html > >> Sent from the Struts - User mailing list archive > at > >> Nabble.com. > >> > >> > >> > - > >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > >> > >> > > > > > > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > -- > View this message in context: > http://old.nabble.com/Struts-2-tooltip-is-not-working-tp27766081p27768002.html > Sent from the Struts - User mailing list archive at > Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
About the better way to implement a JSP in read/edit mode
Hello everybody... I wonder about the better way to implement a JSP which shows the same informations in readonly mode and in creation/modification mode. So I have just designed the JSP' fields with s:textfield who can be dynamically shown in readonly mode with special css (background:transparent; border:none;...) specified in the action class. So the action class sets some attributes with certains values and than the html stream is generated in read mode or in edit mode. Is this the good way or should I developpe two JSP : one in read mode and an other one in edit mode? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: About the better way to implement a JSP in read/edit mode
Yes I know.. And this is what I made... The readonly parameter is set dynamically by the Action class --- En date de : Mar 9.3.10, Paweł Wielgus a écrit : > De: Paweł Wielgus > Objet: Re: About the better way to implement a JSP in read/edit mode > À: "Struts Users Mailing List" > Date: Mardi 9 mars 2010, 20h40 > Hi Frederick, > You can also add readonly or disabled property to > textfields. > But i don't think that there is a simple answear to your > question > about if it is good or bad. > > Best greetings, > Paweł Wielgus. > > > 2010/3/9 Frederik Minatchy : > > Hello everybody... > > > > > > I wonder about the better way to implement a JSP which > shows the same informations in readonly mode and in > creation/modification mode. > > > > So I have just designed the JSP' fields with > s:textfield who can be dynamically shown in readonly mode > with special css (background:transparent; border:none;...) > specified in the action class. > > > > So the action class sets some attributes with certains > values and than the html stream is generated in read mode or > in edit mode. > > > > Is this the good way or should I developpe two JSP : > one in read mode and an other one in edit mode? > > > > > > > > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: About the better way to implement a JSP in read/edit mode
Hello... Thank you for your answer... Your tag seems usefull.. but it seems to have been developped for Struts 1.x --- En date de : Mar 9.3.10, Angelo zerr a écrit : > De: Angelo zerr > Objet: Re: About the better way to implement a JSP in read/edit mode > À: "Struts Users Mailing List" > Date: Mardi 9 mars 2010, 21h04 > Hi Frederick, > > I had created a project about this problem with > http://formview.sourceforge.net/ > > With FormView, you develop ONE Jsp to manage CRUD form. > It's old project but > it works well (I have not time today to improve it). > > Regards Angelo > > 2010/3/9 Paweł Wielgus > > > Hi Frederick, > > You can also add readonly or disabled property to > textfields. > > But i don't think that there is a simple answear to > your question > > about if it is good or bad. > > > > Best greetings, > > Paweł Wielgus. > > > > > > 2010/3/9 Frederik Minatchy : > > > Hello everybody... > > > > > > > > > I wonder about the better way to implement a JSP > which shows the same > > informations in readonly mode and in > creation/modification mode. > > > > > > So I have just designed the JSP' fields with > s:textfield who can be > > dynamically shown in readonly mode with special css > (background:transparent; > > border:none;...) specified in the action class. > > > > > > So the action class sets some attributes with > certains values and than > > the html stream is generated in read mode or in edit > mode. > > > > > > Is this the good way or should I developpe two > JSP : one in read mode and > > an other one in edit mode? > > > > > > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: About the better way to implement a JSP in read/edit mode
I think I will think about that during my next Struts2 project :) But about my question "Do I have to develop several interfaces with the same fields in read mode and edit mode?" Does this mean that I should use the same JSP to do both? (that's already what I have done... but a colleague thinks that it is not the better way... who's right? :) ) --- En date de : Mer 10.3.10, Angelo zerr a écrit : > De: Angelo zerr > Objet: Re: About the better way to implement a JSP in read/edit mode > À: "Struts Users Mailing List" > Date: Mercredi 10 mars 2010, 9h26 > Hi Frederik, > > FormView can works with any HTML or JSP Taglib. It update > HTML switch > configuration and state of your HTML field. Formview works > with Struts 1.x > to use information about validation.xml (like required, > date...). I don't > know how works Struts 2.x validation but I think it's > possible to develop > that. > > Regards Angelo > > 2010/3/10 Frederik Minatchy > > > Hello... > > > > Thank you for your answer... > > > > Your tag seems usefull.. but it seems to have been > developped for Struts > > 1.x > > > > --- En date de : Mar 9.3.10, Angelo zerr > a écrit : > > > > > De: Angelo zerr > > > Objet: Re: About the better way to implement a > JSP in read/edit mode > > > À: "Struts Users Mailing List" > > > Date: Mardi 9 mars 2010, 21h04 > > > Hi Frederick, > > > > > > I had created a project about this problem with > > > http://formview.sourceforge.net/ > > > > > > With FormView, you develop ONE Jsp to manage CRUD > form. > > > It's old project but > > > it works well (I have not time today to improve > it). > > > > > > Regards Angelo > > > > > > 2010/3/9 Paweł Wielgus > > > > > > > Hi Frederick, > > > > You can also add readonly or disabled > property to > > > textfields. > > > > But i don't think that there is a simple > answear to > > > your question > > > > about if it is good or bad. > > > > > > > > Best greetings, > > > > Paweł Wielgus. > > > > > > > > > > > > 2010/3/9 Frederik Minatchy : > > > > > Hello everybody... > > > > > > > > > > > > > > > I wonder about the better way to > implement a JSP > > > which shows the same > > > > informations in readonly mode and in > > > creation/modification mode. > > > > > > > > > > So I have just designed the JSP' fields > with > > > s:textfield who can be > > > > dynamically shown in readonly mode with > special css > > > (background:transparent; > > > > border:none;...) specified in the action > class. > > > > > > > > > > So the action class sets some > attributes with > > > certains values and than > > > > the html stream is generated in read mode or > in edit > > > mode. > > > > > > > > > > Is this the good way or should I > developpe two > > > JSP : one in read mode and > > > > an other one in edit mode? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > - > > > > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > > > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > > > > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > > > > > > > > > > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: About the better way to implement a JSP in read/edit mode
many thanks :) I appreciate your response --- En date de : Mer 10.3.10, Alex Rodriguez Lopez a écrit : > De: Alex Rodriguez Lopez > Objet: Re: About the better way to implement a JSP in read/edit mode > À: user@struts.apache.org > Date: Mercredi 10 mars 2010, 10h24 > I do tend to think that the less > files the better. Here it's the same > with the number of files for actions/jsp, one can use more > actions, ore > less actions but more methods inside. Same with jsp, I do > think it's > better with less files, but a colleague here also thinks > the opposite, > sometimes with less files you have to provide aditional > checks or cases > so one file fits all possible use cases. > > I think it's more elegant for me with same file for read > and edit, but > others might dissagree, not sure if a way is better than > the other :) > > Alex > > Em 10-03-2010 09:43, Frederik Minatchy escreveu: > > I think I will think about that during my next Struts2 > project :) > > > > But about my question "Do I have to develop several > interfaces with the same fields in read mode and edit > mode?" > > > > Does this mean that I should use the same JSP to do > both? > > > > (that's already what I have done... but a colleague > thinks that it is not the better way... who's right? :) ) > > > > > > > > > > --- En date de : Mer 10.3.10, Angelo zerr > a écrit : > > > >> De: Angelo zerr > >> Objet: Re: About the better way to implement a JSP > in read/edit mode > >> À: "Struts Users Mailing List" > >> Date: Mercredi 10 mars 2010, 9h26 > >> Hi Frederik, > >> > >> FormView can works with any HTML or JSP Taglib. It > update > >> HTML switch > >> configuration and state of your HTML field. > Formview works > >> with Struts 1.x > >> to use information about validation.xml (like > required, > >> date...). I don't > >> know how works Struts 2.x validation but I think > it's > >> possible to develop > >> that. > >> > >> Regards Angelo > >> > >> 2010/3/10 Frederik Minatchy > >> > >>> Hello... > >>> > >>> Thank you for your answer... > >>> > >>> Your tag seems usefull.. but it seems to have > been > >> developped for Struts > >>> 1.x > >>> > >>> --- En date de : Mar 9.3.10, Angelo zerr > >> a écrit : > >>> > >>>> De: Angelo zerr > >>>> Objet: Re: About the better way to > implement a > >> JSP in read/edit mode > >>>> À: "Struts Users Mailing List" > >>>> Date: Mardi 9 mars 2010, 21h04 > >>>> Hi Frederick, > >>>> > >>>> I had created a project about this problem > with > >>>> http://formview.sourceforge.net/ > >>>> > >>>> With FormView, you develop ONE Jsp to > manage CRUD > >> form. > >>>> It's old project but > >>>> it works well (I have not time today to > improve > >> it). > >>>> > >>>> Regards Angelo > >>>> > >>>> 2010/3/9 Paweł Wielgus > >>>> > >>>>> Hi Frederick, > >>>>> You can also add readonly or disabled > >> property to > >>>> textfields. > >>>>> But i don't think that there is a > simple > >> answear to > >>>> your question > >>>>> about if it is good or bad. > >>>>> > >>>>> Best greetings, > >>>>> Paweł Wielgus. > >>>>> > >>>>> > >>>>> 2010/3/9 Frederik Minatchy: > >>>>>> Hello everybody... > >>>>>> > >>>>>> > >>>>>> I wonder about the better way to > >> implement a JSP > >>>> which shows the same > >>>>> informations in readonly mode and in > >>>> creation/modification mode. > >>>>>> > >>>>>> So I have just designed the JSP' > fields > >> with > >>>> s:textfield who can be > >>>>> dynamically shown in readonly mode > with > >> special css > >>>> (background:transparent; > >>>>> border:none;...) specified in the &g
Re: About the better way to implement a JSP in read/edit mode
After having read several answers I think your right... it depends mainly on the peoples working on the project. If they are abble to implement the same kind of JSP. Regards Fred --- En date de : Jeu 11.3.10, Paweł Wielgus a écrit : > De: Paweł Wielgus > Objet: Re: About the better way to implement a JSP in read/edit mode > À: "Struts Users Mailing List" > Date: Jeudi 11 mars 2010, 15h22 > Hi all, > no one's right. > One file need more presentation logic - which is bad and > harder to > maintain also presenting edit and view in one place might > not be the > most ergonomic way for users. > On the other hand, one file is less than two which might be > good. Also > with one file you will never forget to present in view file > new field > that just had been added to model in edit. > > The point here is that there is no simple answear for this > question. > > Best greetings, > Pawel Wielgus. > > 2010/3/10, Frederik Minatchy : > > many thanks :) > > > > I appreciate your response > > > > > > > > > > --- En date de : Mer 10.3.10, Alex Rodriguez Lopez > > > a écrit : > > > >> De: Alex Rodriguez Lopez > >> Objet: Re: About the better way to implement a JSP > in read/edit mode > >> À: user@struts.apache.org > >> Date: Mercredi 10 mars 2010, 10h24 > >> I do tend to think that the less > >> files the better. Here it's the same > >> with the number of files for actions/jsp, one can > use more > >> actions, ore > >> less actions but more methods inside. Same with > jsp, I do > >> think it's > >> better with less files, but a colleague here also > thinks > >> the opposite, > >> sometimes with less files you have to provide > aditional > >> checks or cases > >> so one file fits all possible use cases. > >> > >> I think it's more elegant for me with same file > for read > >> and edit, but > >> others might dissagree, not sure if a way is > better than > >> the other :) > >> > >> Alex > >> > >> Em 10-03-2010 09:43, Frederik Minatchy escreveu: > >> > I think I will think about that during my > next Struts2 > >> project :) > >> > > >> > But about my question "Do I have to develop > several > >> interfaces with the same fields in read mode and > edit > >> mode?" > >> > > >> > Does this mean that I should use the same JSP > to do > >> both? > >> > > >> > (that's already what I have done... but a > colleague > >> thinks that it is not the better way... who's > right? :) ) > >> > > >> > > >> > > >> > > >> > --- En date de : Mer 10.3.10, Angelo > zerr > >> a écrit : > >> > > >> >> De: Angelo zerr > >> >> Objet: Re: About the better way to > implement a JSP > >> in read/edit mode > >> >> À: "Struts Users Mailing List" > >> >> Date: Mercredi 10 mars 2010, 9h26 > >> >> Hi Frederik, > >> >> > >> >> FormView can works with any HTML or JSP > Taglib. It > >> update > >> >> HTML switch > >> >> configuration and state of your HTML > field. > >> Formview works > >> >> with Struts 1.x > >> >> to use information about validation.xml > (like > >> required, > >> >> date...). I don't > >> >> know how works Struts 2.x validation but > I think > >> it's > >> >> possible to develop > >> >> that. > >> >> > >> >> Regards Angelo > >> >> > >> >> 2010/3/10 Frederik Minatchy > >> >> > >> >>> Hello... > >> >>> > >> >>> Thank you for your answer... > >> >>> > >> >>> Your tag seems usefull.. but it seems > to have > >> been > >> >> developped for Struts > >> >>> 1.x > >> >>> > >> >>> --- En date de : Mar 9.3.10, Angelo > zerr > >> >> a écrit : > >> >>> > >> >>>> De: Angelo zerr > >> >>>> Objet: Re: About the better way > to > >> implement a > >> >> JSP in read/edit mode > >> >>>> À: "Struts Users Mailing > List" > >&g