Re: getting Session from one to another namespace - possible?
Hi, thanks for the hint, but I used namespace="/secure" already. Only typed it wrong into the mail. Also compared namespace names between struts.xml and my nav.jsp. Thats also correct, so I looked if the user (a variable in the session) is null. But the user is not null. So it looks like there is another problem with the lib which connect to LDAP server. As I can see for the moment I have no problem with the session but with my user object. Cheers, Michael Randy Burgess schrieb: Is the namespace the same as what is defined in your struts.xml? Have you tried namespace="/secure" for instance? Regards, Randy Burgess Sr. Software Architect D5 Systems, LLC The LoginAction forwards the user into the secure namespace. There I have a menu with ">link1 ">link2 ">link3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
fileUpload vs custom servlet
I upgraded my app to Struts2, which provides file uploading. Now my custom servlet for uploading an attachment no longer receives the request. Is there a configurable option for restoring the old functionality of having the custom servlet upload the attachment? Thanks. FYI - 1) Initially an exception was thrown as a result of FilterDispatcher.doFilter handing off multipart handling. This was due to a jar mismatch. So, I got the correct versions of the commons-io.jar and commons-fileupload.jar, and the exception is gone. But my servlet never receives the request. 2) I have a custom interceptor stack containing defaultStack. That means the fileUpload interceptor is available. -- View this message in context: http://www.nabble.com/fileUpload-vs-custom-servlet-tp18395960p18395960.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validation.xml and struts-config.xml error
Hi, I am getting following errors in validation.xml and struts-config.xml at line 1 in Eclipse. Referenced file contains errors (http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd). For more information, right click on the message and select "Show Details..." Referenced file contains errors (http://struts.apache.org/dtds/struts-config_1_3.dtd). For more information, right click on the message and select "Show Details..." http://www.nabble.com/file/p18395591/Untitled.gif Could anybody tell me what is causing the problem and how to resolve it? Thank you, semaj -- View this message in context: http://www.nabble.com/validation.xml-and-struts-config.xml-error-tp18395591p18395591.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REST plugin URL syntax
http://struts.apache.org/2.x/docs/building-the-framework-from-source.html The instructions are pretty straight-forward. If you've never used maven before, it's a bit tricky at first, but once you run through it a few times, it's pretty easy. If you're building from trunk, then you might want to grab the XWork2 sources and build them as well - http://www.opensymphony.com/xwork/cvs.action -Wes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S1] Options from database for a view use case. Recommended way?
I have a list of items in DB: ITEMS contain rows ID and NAME I would like to know what is the recommended way to have a form that lets the user select an option from the database list of items and when the uses clicks the preview action the selected item is shown prior to the last action of confirmation. Should I get the list of items from the form? (setting it in the form does not make sense to me as a form is just for user input and that list is not user input) Or from the action? (request.setAttribute()) (setting them from the action associates that list with a view and I am only supposed to let the controller know what to do next not what view to display) Or from any other place? Could someone show me the recommended way on how to do it showing me the Form(s), Actions and struts-config.xml? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getting Session from one to another namespace - possible?
Is the namespace the same as what is defined in your struts.xml? Have you tried namespace="/secure" for instance? Regards, Randy Burgess Sr. Software Architect D5 Systems, LLC > From: Michael Obster <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List > Date: Thu, 10 Jul 2008 19:52:53 +0200 > To: Struts Users Mailing List > Subject: getting Session from one to another namespace - possible? > > Hi, > > I've a problem with holding the session between two namespaces. > I defined 3 namespaces: > - /: The unsecure namespace > - /secure: The secure namespace -> user has to be logged in > - /usermanager: The special secure namespace -> user has to have > permission to get there > > The LoginAction forwards the user into the secure namespace. There I > have a menu with > ">link1 > ">link2 > > ">link3 > > When I switch to the action2 the session is hold. Switching back to > action1 works as well. > But if I switch to action3 I get the right page, but switching back to > action1 or action2 I get the login page. After some debugging I've seen > that the session was killed. After some further debugging I've seen that > this only happens when I switch the namespace. > > Has anyone an idea, what I did wrong? > > Regards, > Michael > > - > 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: Integration Of Struts 2 and Acegi
Note that Acegi has become Spring Security: http://static.springframework.org/spring-security/site/index.html On Thu, Jul 10, 2008 at 3:43 PM, nani2ratna <[EMAIL PROTECTED]> wrote: > > Hi, > > can anybody tell me how to configure struts 2.0 and acegi, > I searched, but i got something in the javaworld for spring, struts 2 and > acegi. > Cant i implement with struts 2.1 > If any body there who has already implemented this one. > If you dont mind please dont give any other links, > because i searched and i tried to implement every thing. > If i am wrong please guide me. > > Thanks and Regards > Ratna sekhar.k > -- > View this message in context: > http://www.nabble.com/Integration-Of-Struts-2-and-Acegi-tp18390390p18390390.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > 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: [S2]Integration Of Struts 2 and Acegi
Hi, Thanks for immediate reply. Please send me the example, my mail id is [EMAIL PROTECTED] Which is the best one for authentication and authorization for struts 2, spring, hibernate. Please suggest me. Thanks and Regards Ratna Sekhar Miguel-55 wrote: > > The configuration is trivial if you only want to use the url > interceptor, using struts, o servlets or anything, and spring security > 2.x. > If you need to use the acl's to restrict the callable method in the > struts action objects, theoretically it could be done, but i haven't > tried that. > I can send you an example, if you need > > Si quieres ser más positivo, pierde un electrón > Miguel Ruiz Velasco S. > > > On Thu, Jul 10, 2008 at 2:43 PM, nani2ratna <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> can anybody tell me how to configure struts 2.0 and acegi, >> I searched, but i got something in the javaworld for spring, struts 2 and >> acegi. >> Cant i implement with struts 2.1 >> If any body there who has already implemented this one. >> If you dont mind please dont give any other links, >> because i searched and i tried to implement every thing. >> If i am wrong please guide me. >> >> Thanks and Regards >> Ratna sekhar.k >> -- >> View this message in context: >> http://www.nabble.com/Integration-Of-Struts-2-and-Acegi-tp18390390p18390390.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> 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] > > > -- View this message in context: http://www.nabble.com/Integration-Of-Struts-2-and-Acegi-tp18390390p18390619.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2]Integration Of Struts 2 and Acegi
The configuration is trivial if you only want to use the url interceptor, using struts, o servlets or anything, and spring security 2.x. If you need to use the acl's to restrict the callable method in the struts action objects, theoretically it could be done, but i haven't tried that. I can send you an example, if you need Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco S. On Thu, Jul 10, 2008 at 2:43 PM, nani2ratna <[EMAIL PROTECTED]> wrote: > > Hi, > > can anybody tell me how to configure struts 2.0 and acegi, > I searched, but i got something in the javaworld for spring, struts 2 and > acegi. > Cant i implement with struts 2.1 > If any body there who has already implemented this one. > If you dont mind please dont give any other links, > because i searched and i tried to implement every thing. > If i am wrong please guide me. > > Thanks and Regards > Ratna sekhar.k > -- > View this message in context: > http://www.nabble.com/Integration-Of-Struts-2-and-Acegi-tp18390390p18390390.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > 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]
Integration Of Struts 2 and Acegi
Hi, can anybody tell me how to configure struts 2.0 and acegi, I searched, but i got something in the javaworld for spring, struts 2 and acegi. Cant i implement with struts 2.1 If any body there who has already implemented this one. If you dont mind please dont give any other links, because i searched and i tried to implement every thing. If i am wrong please guide me. Thanks and Regards Ratna sekhar.k -- View this message in context: http://www.nabble.com/Integration-Of-Struts-2-and-Acegi-tp18390390p18390390.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts1 and Struts2 mailing lists separation ?
You can always use Nabble: http://www.nabble.com/Struts---User-f206.html L. Gabriel Belingueres wrote: I personally would like to interact using a web based forum where you can post with formatted java and xml code and even with emoticons instead of this email based mailing list, but this would be even more utopianphpBB would do :) 2008/7/7 Jason Wyatt <[EMAIL PROTECTED]>: Dave, may I ask why it has been consistently voted down (and voted by who?). It would seem to be a logical separation IMHO, what's the benefit of keeping them together when the platforms have nothing in common except the name struts? If people still don't know about or use the [S1] and [S2] convention, which seems to be the case, its likely that won't change because new members will be joining the list all the time. +1 to split Regards Jason -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, 8 July 2008 2:40 AM To: Struts Users Mailing List Subject: Re: Struts1 and Struts2 mailing lists separation ? This has been brought up from time to time over the years and has been consistently voted down. (I suggested it once myself and am in favor of it as well.) In lieu of that happening I'd urge people to tag the subject line of all list messages with either [S1] or [S2] (or whatever, as long as it's adopted as an ad-hoc convention) and deal with it on the client side. Dave --- On Mon, 7/7/08, Chris Pratt <[EMAIL PROTECTED]> wrote: Not that my vote counts, but +1 again. On Mon, Jul 7, 2008 at 6:40 AM, Owen Berry <[EMAIL PROTECTED]> wrote: And another, +1 On Mon, Jul 7, 2008 at 8:28 AM, ManiKanta G <[EMAIL PROTECTED]> wrote: +1 me too Alessio Mereu wrote: +1 for me too 2008/7/7 Marc Logemann <[EMAIL PROTECTED]>: +1 for the suggestion Marc On Mon, 7 Jul 2008 12:53:14 +0200 (MEST), "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: Could Struts project admins separate Struts1 and Struts2 users mailing lists? I think it is bad for the users to have two frameworks under the same mailing list. Ahora también puedes acceder a tu correo Terra desde el móvil. Infórmate pinchando aquí. - 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] ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail & notify us immediately at [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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S1] div update and struts
hi i am using an iframe to update my page. i noticed that the url does not change and my buttons have problems accessing javascript functions that are supposed to be loaded along with the new data. the new data is shown and i used firebug to check that my scripts are loaded. however if i put parent.document.location = parent.frames["hframe"].location everything works perfectly but the page blinks (something i am trying to avoid). could this be a problem with struts? any help would be appreciated. saludos Lalchandra Rampersaud Carpe diem - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: looking for suggestion regarding interceptor
Oh, I see. Since we have a need to cache much of our data between requests (rather than fetching the data from the back end systems on every action request), we have more code that would have to be copied to each execute method (using your scheme). So in our case it relieves a lot of headaches to have that code in one location. Thanks for the explanation. (*Chris*) On Thu, Jul 10, 2008 at 11:28 AM, Gabriel Belingueres <[EMAIL PROTECTED]> wrote: > Spring only inject the service. The data returned by the service is > holded into an instance variable of the action (or I could just store > the data in session or application scope). > > Spring dependencies are wired this way: > > Service <--- Cache <--- DAO > > > Ex: > > class MyAction extends ActionSupport { > > private Service service; // with its setter > private List list; // with its setter and getter > > public String execute() { >list = service.getData(); >return SUCCESS; > } > > } > > > 2008/7/10 Chris Pratt <[EMAIL PROTECTED]>: >> I guess I'm confused. If Spring is injecting the data, why do you >> need it to also inject the Service? >> (*Chris*) >> >> On Thu, Jul 10, 2008 at 10:41 AM, Gabriel Belingueres >> <[EMAIL PROTECTED]> wrote: >>> IMHO both approaches are similar, as the intention is to inject the >>> required data when you need it. The difference is that you created >>> both an interface and an interceptor to perform the injection, while I >>> relied on Spring to do this work. >>> >>> As a general rule I think on writing custom interceptors only when >>> there is some generic pre/post processing that would need to take on a >>> set of actions but that are not part of regular functional >>> requirements. >>> >>> See between the lines: >>> >>> 2008/7/10 Chris Pratt <[EMAIL PROTECTED]>: But then your Service Bean/DAO has to be injected into every Action that might need to load it >>> >>> Yes, in the same way you need to implement the xxxAware interface in >>> every action that need to access the data. >>> and the code to check for the Data Object and load it, >>> >>> Not quite; this is the job of Spring, I only declare it one time in >>> the spring configuration xml file. >>> then store it to the context has to be Cut-n-Pasted >>> >>> Don't know what you meant here. There is not too much C&P. Just 2 >>> instance variables: one for the service, and the other for the data. >>> Same as implementing the interface and declaring a variable to hold >>> the data. >>> between each of those Actions. Way too many chances for Cut-n-Paste errors or incomplete fixes for my taste. By using the Interceptor that code is consolidated in one place and the only thing the Action has to worry about it what it was created specifically to accomplish, not all the other housekeeping chores. (*Chris*) On Wed, Jul 9, 2008 at 6:10 PM, Gabriel Belingueres <[EMAIL PROTECTED]> wrote: > Wow it is amazing how S2 can be used. > This is a use of interceptor I've never seen before. > > IMHO, I think it is too much trouble to declare an xxxAware interface > and an xxxInterceptor to just share the same database data across > multiple pages. I would stick to store the data in session or > application scope. You have available the SessionAware and > ApplicationAware interfaces that injects into an action a > java.util.Map that usually is enough for testability. > > My own common solution to this problem would be to use Spring to > inject a service bean into the action that would retrieve the category > list from a cache (OSCache works great for me and has easy Spring > integration.) When data is not in the cache or it times-out, it is > read from the database. > > 2008/7/9 Chris Pratt <[EMAIL PROTECTED]>: >> That's usually how I start. The one thing I usually add is an Aware >> interface that allows me to inject the value into my Actions when it's >> needed. So in your case I'd add a simple interface: >> >> interface CategoryListAware { >> void setCategoryList(List categories); >> } >> >> And at the end of your interceptor I'd add: >> >> Object action = invocation.getAction(); >> if(action instanceof CategoryListAware) { >> ((CategoryListAware)action).setCategoryList(categoryList); >> } >> >> That way you can add the Interceptor to your default stack and the >> Actions that need the category list can have it injected without >> having to have any knowledge about the Session. (which makes the >> system much easier to unit test). >> >> (*Chris*) >> >> On Wed, Jul 9, 2008 at 3:28 PM, Dhiraj Thakur <[EMAIL PROTECTED]> wrote: >>> Hello there, >>> >>> There are 4 jsp page in which i want to show same category by >>> retrieving it >>> from database. >>> What is the best way to do that? should i write a intercepter
Re: Struts-Tiles - Missing Content
SUCCESS! I figured out what was going wrong with my code. Whew, what a tangled mess. I have a CustomRequestProcessor that initializes variables for users coming to the site and it was mucking up because part of my query includes values that come from that initialization. I had thought I had checked for this, but I was also getting an error that didn't actually report itself because I check the users cookies to see if they had cached their login for me. Anyway, the problem is all in my own code and nothing funky with Struts/Tiles afterall. Special Thanks to Antonio!! - Original Message From: Ryan Henson <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Thursday, July 10, 2008 1:58:13 PM Subject: Re: Struts-Tiles - Missing Content I put in the text as you suggested and it did indeed show the text from the body. So now the issue has moved to being that the data variable is not being found. Alright, that helped me find some more issues but we're not quite there yet. The results from the body come back with ONLY "Hello from the body". The logic beyond that should return either the data or the text "I do not see your data", but NEITHER is returned. I do not see any errors in the console to help me with this either. The logic tag simply does not do its job. Ideas Antonio? Thanks for your help btw, I really do appreciate it. Excerpt from ReportAction public ActionForward getCamperScheduleReport(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { logger.info("I'm starting my report"); DynaValidatorActionForm query = (DynaValidatorActionForm) form; QueryService service = new QueryService(); ReportService service2 = new ReportService(); Camp camp = (Camp) request.getSession().getAttribute("currentCamp"); int currentCampID = camp.getCampID(); String[] camperIDs; Report report = (Report) request.getAttribute("report"); if (query.getString("selectedIDs").indexOf(",") > 0) { camperIDs = query.getString("selectedIDs").split(","); } else { camperIDs = new String[] { query.getString("selectedIDs") }; } logger.info("I have the camper IDs which the first is: " + camperIDs[0]); report.setSelectedIDs(query.getString("selectedIDs")); request.setAttribute("report", report); request.setAttribute("campers", service.getCampers(currentCampID)); request.setAttribute("periods", service.getPeriodList()); if (camperIDs[0].length() > 0) { request.setAttribute("data", service2.getCamperScheduleReport( camperIDs, currentCampID)); logger.info("I've set the data"); } logger.info("All done what's next?"); if (query.getString("print").equals("true")) { return mapping.findForward("camper.print"); } else { return mapping.findForward("camper.view"); } } Updated tools.report.camper.body.jsp <%@ taglib uri="/tags/struts-logic" prefix="logic"%> <%@ taglib uri="/tags/struts-html" prefix="html"%> <%@ taglib uri="/tags/struts-bean" prefix="bean"%> <%@ taglib uri="/tags/jstl/core" prefix="c"%> Hello from the body I do not see your data ${person.firstName} ${person.middleInitial} ${person.lastName} Age: ${person.age} Rank: ${person.rank} Troop: ${person.troopName} Period ClassName Instructor Location Area Special Requirements ${period.periodName} ${course.className} ${course.instructorFirstName} ${course.instructorLastName} ${course.locationName} ${course.areaName} ${course.specialRequirements}
Re: REST plugin doesn't return JSON serialization anymore...
It's an S2 REST plugin issue... --- On Thu, 7/10/08, John Moose <[EMAIL PROTECTED]> wrote: > no problem, is this a Struts 2 issue or Struts sandbox > issue?? > > On Thu, Jul 10, 2008 at 2:15 PM, Musachy Barroso > <[EMAIL PROTECTED]> wrote: > > > Could you open a jira ticket with the details? > > > > musachy > > > > On Thu, Jul 10, 2008 at 2:03 PM, John Moose > <[EMAIL PROTECTED]> wrote: > > > building with Struts-2.1.3-SNAPSHOT and > xworks-2.1.2-SNAPSHOT > > > > > > the XML extenson and XHTML extension seem to work > OK both in the showcase > > > and my app, but the .json extension seems to be > triggering a File > > Download > > > action...even in the showcase??? > > > > > > fwiw, JSON serialized data is a key feature of > our new > > > architecture...several weeks back this feature > worked well and our gov't > > > sponsors were really impressed. > > > > > > > > > > > -- > > "Hey you! Would you help me to carry the > stone?" Pink Floyd > > > > > - > > 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: REST plugin doesn't return JSON serialization anymore...
Struts 2 musachy On Thu, Jul 10, 2008 at 2:26 PM, John Moose <[EMAIL PROTECTED]> wrote: > no problem, is this a Struts 2 issue or Struts sandbox issue?? > > On Thu, Jul 10, 2008 at 2:15 PM, Musachy Barroso <[EMAIL PROTECTED]> wrote: > >> Could you open a jira ticket with the details? >> >> musachy >> >> On Thu, Jul 10, 2008 at 2:03 PM, John Moose <[EMAIL PROTECTED]> wrote: >> > building with Struts-2.1.3-SNAPSHOT and xworks-2.1.2-SNAPSHOT >> > >> > the XML extenson and XHTML extension seem to work OK both in the showcase >> > and my app, but the .json extension seems to be triggering a File >> Download >> > action...even in the showcase??? >> > >> > fwiw, JSON serialized data is a key feature of our new >> > architecture...several weeks back this feature worked well and our gov't >> > sponsors were really impressed. >> > >> >> >> >> -- >> "Hey you! Would you help me to carry the stone?" Pink Floyd >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action form bean values in javascript
If you're doing validation in JavaScript anyway, why wouldn't you use a JavaScript-based date validation method and avoid the heinous mixing of Java and JavaScript?! Dave --- On Thu, 7/10/08, vimala <[EMAIL PROTECTED]> wrote: > I am using struts for web application development. I have a > class > clsDateTools within which I define a function public > boolean isDate(String > dateToCheck) for validating date values. Here is my jsp > page > > <%@ page import="visg.usrBeans.clsDateTools" > %> > > > > > > <% clsDateTools datetool = new clsDateTools();%> > > function Save(){ > > > > > if(document.someActionForm.txtInspectionDate.value != > ""){ > valuefn = <% > =isDate(document.someActionForm.txtInspectionDate.value) > %>; > > if(valueFn == false){ > alert("Enter valid Complication Date in > dd/mm/"); > return false; > } > } > } > > > > > > >width="100%"> > > .. > > > >width="50%"> >class="normaltextualtheme">Inspection > Date > >width="50%"> > > > var datevalue = > "<%=request.getSession().getAttribute("txtInspectionDate")%>"; > if(datevalue=="null") { > datevalue = > "<%=datetool.stringnoDate("/")%>"; > } > if (!document.layers) { > document.write(" readonly='readonly' type=text > name=\"txtInspectionDate\" > tabindex=\"2\" > value=\""+datevalue+"\" size=10 > class=\"readonly\" >"); > document.write(" name=\"B3\" style=\"width: 20; > height: 20;background-image: > url('./images/show-calendar.gif') \" > value=\"\" > onclick='popUpCalendar(ttxtInspectionDate, > txtInspectionDate, > \"dd/mm/\");return > false;'>"); > } > > > > > > > > > > > For the code line valuefn = <% > =isDate(document.someActionForm.txtInspectionDate.value) > %>, > it shows an error message 'document is unresolved > type'. How can I pass the > action form values as parameters within javascript? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: looking for suggestion regarding interceptor
Spring only inject the service. The data returned by the service is holded into an instance variable of the action (or I could just store the data in session or application scope). Spring dependencies are wired this way: Service <--- Cache <--- DAO Ex: class MyAction extends ActionSupport { private Service service; // with its setter private List list; // with its setter and getter public String execute() { list = service.getData(); return SUCCESS; } } 2008/7/10 Chris Pratt <[EMAIL PROTECTED]>: > I guess I'm confused. If Spring is injecting the data, why do you > need it to also inject the Service? > (*Chris*) > > On Thu, Jul 10, 2008 at 10:41 AM, Gabriel Belingueres > <[EMAIL PROTECTED]> wrote: >> IMHO both approaches are similar, as the intention is to inject the >> required data when you need it. The difference is that you created >> both an interface and an interceptor to perform the injection, while I >> relied on Spring to do this work. >> >> As a general rule I think on writing custom interceptors only when >> there is some generic pre/post processing that would need to take on a >> set of actions but that are not part of regular functional >> requirements. >> >> See between the lines: >> >> 2008/7/10 Chris Pratt <[EMAIL PROTECTED]>: >>> But then your Service Bean/DAO has to be injected into every Action >>> that might need to load it >> >> Yes, in the same way you need to implement the xxxAware interface in >> every action that need to access the data. >> >>> and the code to check for the Data Object >>> and load it, >> >> Not quite; this is the job of Spring, I only declare it one time in >> the spring configuration xml file. >> >>>then store it to the context has to be Cut-n-Pasted >> >> Don't know what you meant here. There is not too much C&P. Just 2 >> instance variables: one for the service, and the other for the data. >> Same as implementing the interface and declaring a variable to hold >> the data. >> >>> between each of those Actions. Way too many chances for Cut-n-Paste >>> errors or incomplete fixes for my taste. By using the Interceptor >>> that code is consolidated in one place and the only thing the Action >>> has to worry about it what it was created specifically to accomplish, >>> not all the other housekeeping chores. >>> (*Chris*) >>> >>> On Wed, Jul 9, 2008 at 6:10 PM, Gabriel Belingueres >>> <[EMAIL PROTECTED]> wrote: Wow it is amazing how S2 can be used. This is a use of interceptor I've never seen before. IMHO, I think it is too much trouble to declare an xxxAware interface and an xxxInterceptor to just share the same database data across multiple pages. I would stick to store the data in session or application scope. You have available the SessionAware and ApplicationAware interfaces that injects into an action a java.util.Map that usually is enough for testability. My own common solution to this problem would be to use Spring to inject a service bean into the action that would retrieve the category list from a cache (OSCache works great for me and has easy Spring integration.) When data is not in the cache or it times-out, it is read from the database. 2008/7/9 Chris Pratt <[EMAIL PROTECTED]>: > That's usually how I start. The one thing I usually add is an Aware > interface that allows me to inject the value into my Actions when it's > needed. So in your case I'd add a simple interface: > > interface CategoryListAware { > void setCategoryList(List categories); > } > > And at the end of your interceptor I'd add: > > Object action = invocation.getAction(); > if(action instanceof CategoryListAware) { > ((CategoryListAware)action).setCategoryList(categoryList); > } > > That way you can add the Interceptor to your default stack and the > Actions that need the category list can have it injected without > having to have any knowledge about the Session. (which makes the > system much easier to unit test). > > (*Chris*) > > On Wed, Jul 9, 2008 at 3:28 PM, Dhiraj Thakur <[EMAIL PROTECTED]> wrote: >> Hello there, >> >> There are 4 jsp page in which i want to show same category by retrieving >> it >> from database. >> What is the best way to do that? should i write a intercepter which will >> retrieve Category from database and store it in session? >> something like this >> >> >>if (session.getAttribute("category") == null) { >> >>CategoryDAO categoryDAO = new CategoryDAO(); >> >>categoryList = categoryDAO.listCategory(); >> >>session.setAttribute(ConfigAPP.CATEGORY_KEY, categoryList); >> >>categoryList = (List) >> session.getAttribute(ConfigAPP.CATEGORY_KEY); >> >>System.out.println(categoryList.size()); >> >>
Re: REST plugin doesn't return JSON serialization anymore...
no problem, is this a Struts 2 issue or Struts sandbox issue?? On Thu, Jul 10, 2008 at 2:15 PM, Musachy Barroso <[EMAIL PROTECTED]> wrote: > Could you open a jira ticket with the details? > > musachy > > On Thu, Jul 10, 2008 at 2:03 PM, John Moose <[EMAIL PROTECTED]> wrote: > > building with Struts-2.1.3-SNAPSHOT and xworks-2.1.2-SNAPSHOT > > > > the XML extenson and XHTML extension seem to work OK both in the showcase > > and my app, but the .json extension seems to be triggering a File > Download > > action...even in the showcase??? > > > > fwiw, JSON serialized data is a key feature of our new > > architecture...several weeks back this feature worked well and our gov't > > sponsors were really impressed. > > > > > > -- > "Hey you! Would you help me to carry the stone?" Pink Floyd > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Action form bean values in javascript
Hai all, I am using struts for web application development. I have a class clsDateTools within which I define a function public boolean isDate(String dateToCheck) for validating date values. Here is my jsp page <%@ page import="visg.usrBeans.clsDateTools" %> <% clsDateTools datetool = new clsDateTools();%> function Save(){ if(document.someActionForm.txtInspectionDate.value != ""){ valuefn = <% =isDate(document.someActionForm.txtInspectionDate.value) %>; if(valueFn == false){ alert("Enter valid Complication Date in dd/mm/"); return false; } } } .. Inspection Date var datevalue = "<%=request.getSession().getAttribute("txtInspectionDate")%>"; if(datevalue=="null") { datevalue = "<%=datetool.stringnoDate("/")%>"; } if (!document.layers) { document.write(""); document.write(""); } For the code line valuefn = <% =isDate(document.someActionForm.txtInspectionDate.value) %>, it shows an error message 'document is unresolved type'. How can I pass the action form values as parameters within javascript? thanks vimala -- View this message in context: http://www.nabble.com/Action-form-bean-values-in-javascript-tp18388850p18388850.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REST plugin doesn't return JSON serialization anymore...
Could you open a jira ticket with the details? musachy On Thu, Jul 10, 2008 at 2:03 PM, John Moose <[EMAIL PROTECTED]> wrote: > building with Struts-2.1.3-SNAPSHOT and xworks-2.1.2-SNAPSHOT > > the XML extenson and XHTML extension seem to work OK both in the showcase > and my app, but the .json extension seems to be triggering a File Download > action...even in the showcase??? > > fwiw, JSON serialized data is a key feature of our new > architecture...several weeks back this feature worked well and our gov't > sponsors were really impressed. > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: looking for suggestion regarding interceptor
I guess I'm confused. If Spring is injecting the data, why do you need it to also inject the Service? (*Chris*) On Thu, Jul 10, 2008 at 10:41 AM, Gabriel Belingueres <[EMAIL PROTECTED]> wrote: > IMHO both approaches are similar, as the intention is to inject the > required data when you need it. The difference is that you created > both an interface and an interceptor to perform the injection, while I > relied on Spring to do this work. > > As a general rule I think on writing custom interceptors only when > there is some generic pre/post processing that would need to take on a > set of actions but that are not part of regular functional > requirements. > > See between the lines: > > 2008/7/10 Chris Pratt <[EMAIL PROTECTED]>: >> But then your Service Bean/DAO has to be injected into every Action >> that might need to load it > > Yes, in the same way you need to implement the xxxAware interface in > every action that need to access the data. > >> and the code to check for the Data Object >> and load it, > > Not quite; this is the job of Spring, I only declare it one time in > the spring configuration xml file. > >>then store it to the context has to be Cut-n-Pasted > > Don't know what you meant here. There is not too much C&P. Just 2 > instance variables: one for the service, and the other for the data. > Same as implementing the interface and declaring a variable to hold > the data. > >> between each of those Actions. Way too many chances for Cut-n-Paste >> errors or incomplete fixes for my taste. By using the Interceptor >> that code is consolidated in one place and the only thing the Action >> has to worry about it what it was created specifically to accomplish, >> not all the other housekeeping chores. >> (*Chris*) >> >> On Wed, Jul 9, 2008 at 6:10 PM, Gabriel Belingueres >> <[EMAIL PROTECTED]> wrote: >>> Wow it is amazing how S2 can be used. >>> This is a use of interceptor I've never seen before. >>> >>> IMHO, I think it is too much trouble to declare an xxxAware interface >>> and an xxxInterceptor to just share the same database data across >>> multiple pages. I would stick to store the data in session or >>> application scope. You have available the SessionAware and >>> ApplicationAware interfaces that injects into an action a >>> java.util.Map that usually is enough for testability. >>> >>> My own common solution to this problem would be to use Spring to >>> inject a service bean into the action that would retrieve the category >>> list from a cache (OSCache works great for me and has easy Spring >>> integration.) When data is not in the cache or it times-out, it is >>> read from the database. >>> >>> 2008/7/9 Chris Pratt <[EMAIL PROTECTED]>: That's usually how I start. The one thing I usually add is an Aware interface that allows me to inject the value into my Actions when it's needed. So in your case I'd add a simple interface: interface CategoryListAware { void setCategoryList(List categories); } And at the end of your interceptor I'd add: Object action = invocation.getAction(); if(action instanceof CategoryListAware) { ((CategoryListAware)action).setCategoryList(categoryList); } That way you can add the Interceptor to your default stack and the Actions that need the category list can have it injected without having to have any knowledge about the Session. (which makes the system much easier to unit test). (*Chris*) On Wed, Jul 9, 2008 at 3:28 PM, Dhiraj Thakur <[EMAIL PROTECTED]> wrote: > Hello there, > > There are 4 jsp page in which i want to show same category by retrieving > it > from database. > What is the best way to do that? should i write a intercepter which will > retrieve Category from database and store it in session? > something like this > > >if (session.getAttribute("category") == null) { > >CategoryDAO categoryDAO = new CategoryDAO(); > >categoryList = categoryDAO.listCategory(); > >session.setAttribute(ConfigAPP.CATEGORY_KEY, categoryList); > >categoryList = (List) > session.getAttribute(ConfigAPP.CATEGORY_KEY); > >System.out.println(categoryList.size()); > >} else { >categoryList = categoryList = (List) > session.getAttribute(ConfigAPP.CATEGORY_KEY); >} > > > or is there any other way to do that ? > > > > *Dhiraj* > - 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] >>> >>> >> >> ---
REST plugin doesn't return JSON serialization anymore...
building with Struts-2.1.3-SNAPSHOT and xworks-2.1.2-SNAPSHOT the XML extenson and XHTML extension seem to work OK both in the showcase and my app, but the .json extension seems to be triggering a File Download action...even in the showcase??? fwiw, JSON serialized data is a key feature of our new architecture...several weeks back this feature worked well and our gov't sponsors were really impressed.
Re: Struts-Tiles - Missing Content
I put in the text as you suggested and it did indeed show the text from the body. So now the issue has moved to being that the data variable is not being found. Alright, that helped me find some more issues but we're not quite there yet. The results from the body come back with ONLY "Hello from the body". The logic beyond that should return either the data or the text "I do not see your data", but NEITHER is returned. I do not see any errors in the console to help me with this either. The logic tag simply does not do its job. Ideas Antonio? Thanks for your help btw, I really do appreciate it. Excerpt from ReportAction public ActionForward getCamperScheduleReport(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { logger.info("I'm starting my report"); DynaValidatorActionForm query = (DynaValidatorActionForm) form; QueryService service = new QueryService(); ReportService service2 = new ReportService(); Camp camp = (Camp) request.getSession().getAttribute("currentCamp"); int currentCampID = camp.getCampID(); String[] camperIDs; Report report = (Report) request.getAttribute("report"); if (query.getString("selectedIDs").indexOf(",") > 0) { camperIDs = query.getString("selectedIDs").split(","); } else { camperIDs = new String[] { query.getString("selectedIDs") }; } logger.info("I have the camper IDs which the first is: " + camperIDs[0]); report.setSelectedIDs(query.getString("selectedIDs")); request.setAttribute("report", report); request.setAttribute("campers", service.getCampers(currentCampID)); request.setAttribute("periods", service.getPeriodList()); if (camperIDs[0].length() > 0) { request.setAttribute("data", service2.getCamperScheduleReport( camperIDs, currentCampID)); logger.info("I've set the data"); } logger.info("All done what's next?"); if (query.getString("print").equals("true")) { return mapping.findForward("camper.print"); } else { return mapping.findForward("camper.view"); } } Updated tools.report.camper.body.jsp <%@ taglib uri="/tags/struts-logic" prefix="logic"%> <%@ taglib uri="/tags/struts-html" prefix="html"%> <%@ taglib uri="/tags/struts-bean" prefix="bean"%> <%@ taglib uri="/tags/jstl/core" prefix="c"%> Hello from the body I do not see your data ${person.firstName} ${person.middleInitial} ${person.lastName} Age: ${person.age} Rank: ${person.rank} Troop: ${person.troopName} Period ClassName Instructor Location Area Special Requirements ${period.periodName} ${course.className} ${course.instructorFirstName} ${course.instructorLastName} ${course.locationName} ${course.areaName} ${course.specialRequirements} The camper is not enrolled in any classes - Original Message From: Antonio Petrelli <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Thursday, July 10, 2008 10:34:31 AM Subject: Re: Struts-Tiles - Missing Content 2008/7/10 Ryan Henson <[EMAIL PROTECTED]>: > I posted the resulting HTML code at the bottom of that last email. Whoops! Sorry I did not see it. > It would appear from my side that the is > not executing properly as does actually > produce the correct text. Now I see it, that's strange. I see that in your body JSP page there is a tag surrounding everything. Can you try putting a sample text before this tag to see if, at least, the page is called? Ant
getting Session from one to another namespace - possible?
Hi, I've a problem with holding the session between two namespaces. I defined 3 namespaces: - /: The unsecure namespace - /secure: The secure namespace -> user has to be logged in - /usermanager: The special secure namespace -> user has to have permission to get there The LoginAction forwards the user into the secure namespace. There I have a menu with ">link1 ">link2 ">link3 When I switch to the action2 the session is hold. Switching back to action1 works as well. But if I switch to action3 I get the right page, but switching back to action1 or action2 I get the login page. After some debugging I've seen that the session was killed. After some further debugging I've seen that this only happens when I switch the namespace. Has anyone an idea, what I did wrong? Regards, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
You could always try modifying the manifest file and re-packaging; if that's the only version issue you're having it's unlikely that a ..n version issue would cause an issue. It could, though. Dave --- On Thu, 7/10/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > From: Milan Milanovic <[EMAIL PROTECTED]> > Subject: Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization > To: user@struts.apache.org > Date: Thursday, July 10, 2008, 1:34 PM > Dear Dave, > > > newton.dave wrote: > > > > --- On Thu, 7/10/08, Milan Milanovic > <[EMAIL PROTECTED]> wrote: > >> Oh, it uses commons-logging-1.0.3.jar but I'm > using > >> commons-logging-1.0.4.jar in my applications lib > directory. > >> So, I need to delete 1.0.4 and copy 1.0.3 in my > lib ? > > > > Wouldn't it have been quicker to try it? > > > > Actually no, I would have to change some else libraries > too, because I don't > use those versions :-(. > > > newton.dave wrote: > > > > If it can't find a file listed it will obviously > fail--if the file isn't > > available it won't be able to contribute any > classes to the classpath, no? > > > > Quite right ;-). I give up, it's too complicated, when > someone create > Eclipse plug-in, I'll use it...or maybe when I find > time I'll create it ;-). > > -- > Thx anyway, Milan > > > > newton.dave wrote: > > > > Dave > > > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18388059.html > Sent from the Struts - User mailing list archive at > Nabble.com. > > > - > 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: looking for suggestion regarding interceptor
IMHO both approaches are similar, as the intention is to inject the required data when you need it. The difference is that you created both an interface and an interceptor to perform the injection, while I relied on Spring to do this work. As a general rule I think on writing custom interceptors only when there is some generic pre/post processing that would need to take on a set of actions but that are not part of regular functional requirements. See between the lines: 2008/7/10 Chris Pratt <[EMAIL PROTECTED]>: > But then your Service Bean/DAO has to be injected into every Action > that might need to load it Yes, in the same way you need to implement the xxxAware interface in every action that need to access the data. > and the code to check for the Data Object > and load it, Not quite; this is the job of Spring, I only declare it one time in the spring configuration xml file. >then store it to the context has to be Cut-n-Pasted Don't know what you meant here. There is not too much C&P. Just 2 instance variables: one for the service, and the other for the data. Same as implementing the interface and declaring a variable to hold the data. > between each of those Actions. Way too many chances for Cut-n-Paste > errors or incomplete fixes for my taste. By using the Interceptor > that code is consolidated in one place and the only thing the Action > has to worry about it what it was created specifically to accomplish, > not all the other housekeeping chores. > (*Chris*) > > On Wed, Jul 9, 2008 at 6:10 PM, Gabriel Belingueres > <[EMAIL PROTECTED]> wrote: >> Wow it is amazing how S2 can be used. >> This is a use of interceptor I've never seen before. >> >> IMHO, I think it is too much trouble to declare an xxxAware interface >> and an xxxInterceptor to just share the same database data across >> multiple pages. I would stick to store the data in session or >> application scope. You have available the SessionAware and >> ApplicationAware interfaces that injects into an action a >> java.util.Map that usually is enough for testability. >> >> My own common solution to this problem would be to use Spring to >> inject a service bean into the action that would retrieve the category >> list from a cache (OSCache works great for me and has easy Spring >> integration.) When data is not in the cache or it times-out, it is >> read from the database. >> >> 2008/7/9 Chris Pratt <[EMAIL PROTECTED]>: >>> That's usually how I start. The one thing I usually add is an Aware >>> interface that allows me to inject the value into my Actions when it's >>> needed. So in your case I'd add a simple interface: >>> >>> interface CategoryListAware { >>> void setCategoryList(List categories); >>> } >>> >>> And at the end of your interceptor I'd add: >>> >>> Object action = invocation.getAction(); >>> if(action instanceof CategoryListAware) { >>> ((CategoryListAware)action).setCategoryList(categoryList); >>> } >>> >>> That way you can add the Interceptor to your default stack and the >>> Actions that need the category list can have it injected without >>> having to have any knowledge about the Session. (which makes the >>> system much easier to unit test). >>> >>> (*Chris*) >>> >>> On Wed, Jul 9, 2008 at 3:28 PM, Dhiraj Thakur <[EMAIL PROTECTED]> wrote: Hello there, There are 4 jsp page in which i want to show same category by retrieving it from database. What is the best way to do that? should i write a intercepter which will retrieve Category from database and store it in session? something like this if (session.getAttribute("category") == null) { CategoryDAO categoryDAO = new CategoryDAO(); categoryList = categoryDAO.listCategory(); session.setAttribute(ConfigAPP.CATEGORY_KEY, categoryList); categoryList = (List) session.getAttribute(ConfigAPP.CATEGORY_KEY); System.out.println(categoryList.size()); } else { categoryList = categoryList = (List) session.getAttribute(ConfigAPP.CATEGORY_KEY); } or is there any other way to do that ? *Dhiraj* >>> >>> - >>> 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] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
Dear Dave, newton.dave wrote: > > --- On Thu, 7/10/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: >> Oh, it uses commons-logging-1.0.3.jar but I'm using >> commons-logging-1.0.4.jar in my applications lib directory. >> So, I need to delete 1.0.4 and copy 1.0.3 in my lib ? > > Wouldn't it have been quicker to try it? > Actually no, I would have to change some else libraries too, because I don't use those versions :-(. newton.dave wrote: > > If it can't find a file listed it will obviously fail--if the file isn't > available it won't be able to contribute any classes to the classpath, no? > Quite right ;-). I give up, it's too complicated, when someone create Eclipse plug-in, I'll use it...or maybe when I find time I'll create it ;-). -- Thx anyway, Milan newton.dave wrote: > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18388059.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: This is odd, sometimes my requests 'miss' the Struts2 filter
You are correct, the default is REQUEST (if no dispatcher is specified). Also, depending on your needs, consider using Spring Security. I was finally able to add it to all my struts2 app without problems. J2EE authentication has it's own limitations as you will continue to learn and in these kind of cases (forwards, includes, etc) you'll have to write your own code anyway (whereas with Spring or not). Please, excuse me if it sounds like I try to evangelize Spring. I must admit that I had written code with and without it and Spring makes you code a lot easier to maintain, yet writing/configuring following specs (as it sounds like you are doing) teaches you good lessons... As a way of reference, the SRV.12.5.3 (from servlet spec 2.4) says that in the form based authentication (as you said you are doing)... "The login form associated with the security constraint is sent to the client and the URL path triggering the authentication is stored by the container" The spec clearly doesn't specify whether a forward or a response.redirect() is used. This means that it is up to the container to decide how this is implemented. Depending on your portability requirements, this may or may not be an issue (Tomcat vs Weblogic, Resin, etc)... Lyallex wrote: OK, I think I've twigged this now Every jsp page has this include recently I have included this in header.jsp (I'm messing around with Struts2 i18n) <%@ taglib prefix="s" uri= "/struts-tags" %> ... If I go back to this config in web.xml .. struts2 /* ... /welcome.jsp ... when I access the site the welcome page with it's included header loads fine. So obviously the request is going through the filter. If I then click the login link it all goes horribly wrong. looking at the exception trace it appears that login.jsp which also loads the header is where the problem lies So, it appears that there is a forward going on (or at least a redirect) somewhere when Tomcat sees that I am trying to access a protected resource This makes sense as I'm trying to access a servlet (Login) but I actually get a jsp (login.jsp) according to http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd another valid value for is INCLUDE so I tried this on it's own ... boom, it all went wrong, so it looks like the default behaviour for the filter mapping thing is REQUEST. If you add any dispatcher then that seems to override the default config. Distressingly (perhaps) struts2 /* REQUEST INCLUDE Doesn't do it, it has to be struts2 /* REQUEST FORWARD phew, got there in the end I'm still not entirely convinced I've got to the bottom of things as I'm sure I had this working with the tags in the header but without the stuff ... then again it's been a long week and I'm probably mistaken. Anyway, whoever said there was a forward going on ... take a bow, you were right and I was talking tosh If it's true that this fix does indeed break in some versions of IE then we are in a spot of bother with this. Thanks for the input, it got me thinking. Rgds lyallex On Thu, Jul 10, 2008 at 11:11 AM, Lyallex <[EMAIL PROTECTED]> wrote: Hello Tomcat version 5.5.26 Struts2 version 2.0.11.1 I'm trying to understand why, given the following in web.xml requests sometimes 'miss out' the Struts2 filter struts2 org.apache.struts2.dispatcher.FilterDispatcher struts2 /* It appears to really only be an issue with web.xml declarative security Reading around the various archives it appears that this is a know issue when trying to use Struts2 Actions as the target but I'm not trying to do that I just use a standard jsp. The really odd thing is that the login process works perfectly sometimes and sometimes it fails with the (apparently well known) message The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter ... Here's the login config FORM Form based authentication /login.jsp /login.jsp Someone, somwhere on my journey through the archives suggested this fix. struts2 /* REQUEST FORWARD It does appear to solve the problem I was just wondering why ? Is there a definitive resolution to this problem out there somewhere ? TIA lyallex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alberto A. Flores http://www.linkedin.com/in/aflores - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
--- On Thu, 7/10/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > Oh, it uses commons-logging-1.0.3.jar but I'm using > commons-logging-1.0.4.jar in my applications lib directory. > So, I need to delete 1.0.4 and copy 1.0.3 in my lib ? Wouldn't it have been quicker to try it? If it can't find a file listed it will obviously fail--if the file isn't available it won't be able to contribute any classes to the classpath, no? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
Dear Dave, newton.dave wrote: > > --- On Thu, 7/10/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: >> I noticed this, but my Sitegraph plugin in the same >> directory as the dependent jars so I don't need to >> put them into classpath? > > Oh, it looks like the sitegraph plugin puts its requirements in its > manifest file, so never mind about all that classpath stuff. Remove the > -cp option altogether. > > (I'm not sure the -cp option is valid with a -jar option anyway, > actually.) > O.K. newton.dave wrote: > > Are you using the appropriate versions of the required libraries? The > "Class-Path" entry in the sitegraph plugin lists all possible dependencies > (jar files with version numbers). > Oh, it uses commons-logging-1.0.3.jar but I'm using commons-logging-1.0.4.jar in my applications lib directory. So, I need to delete 1.0.4 and copy 1.0.3 in my lib ? newton.dave wrote: > > Which version of S2 are you using? > > Dave > 2.0.11.1 -- Thx, Milan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18385724.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
S@: action performed twice when using ajax
Hi all, I have a table (displayTag) and a form. when the user check (checkbox) some of the items in the table and clicks submit the action is performed BUT after it is finished it performs again... my question is why and how can I avoid that? Thank You! -- View this message in context: http://www.nabble.com/S%40%3A-action-performed-twice-when-using-ajax-tp18385659p18385659.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: looking for suggestion regarding interceptor
But then your Service Bean/DAO has to be injected into every Action that might need to load it and the code to check for the Data Object and load it, then store it to the context has to be Cut-n-Pasted between each of those Actions. Way too many chances for Cut-n-Paste errors or incomplete fixes for my taste. By using the Interceptor that code is consolidated in one place and the only thing the Action has to worry about it what it was created specifically to accomplish, not all the other housekeeping chores. (*Chris*) On Wed, Jul 9, 2008 at 6:10 PM, Gabriel Belingueres <[EMAIL PROTECTED]> wrote: > Wow it is amazing how S2 can be used. > This is a use of interceptor I've never seen before. > > IMHO, I think it is too much trouble to declare an xxxAware interface > and an xxxInterceptor to just share the same database data across > multiple pages. I would stick to store the data in session or > application scope. You have available the SessionAware and > ApplicationAware interfaces that injects into an action a > java.util.Map that usually is enough for testability. > > My own common solution to this problem would be to use Spring to > inject a service bean into the action that would retrieve the category > list from a cache (OSCache works great for me and has easy Spring > integration.) When data is not in the cache or it times-out, it is > read from the database. > > 2008/7/9 Chris Pratt <[EMAIL PROTECTED]>: >> That's usually how I start. The one thing I usually add is an Aware >> interface that allows me to inject the value into my Actions when it's >> needed. So in your case I'd add a simple interface: >> >> interface CategoryListAware { >> void setCategoryList(List categories); >> } >> >> And at the end of your interceptor I'd add: >> >> Object action = invocation.getAction(); >> if(action instanceof CategoryListAware) { >> ((CategoryListAware)action).setCategoryList(categoryList); >> } >> >> That way you can add the Interceptor to your default stack and the >> Actions that need the category list can have it injected without >> having to have any knowledge about the Session. (which makes the >> system much easier to unit test). >> >> (*Chris*) >> >> On Wed, Jul 9, 2008 at 3:28 PM, Dhiraj Thakur <[EMAIL PROTECTED]> wrote: >>> Hello there, >>> >>> There are 4 jsp page in which i want to show same category by retrieving it >>> from database. >>> What is the best way to do that? should i write a intercepter which will >>> retrieve Category from database and store it in session? >>> something like this >>> >>> >>>if (session.getAttribute("category") == null) { >>> >>>CategoryDAO categoryDAO = new CategoryDAO(); >>> >>>categoryList = categoryDAO.listCategory(); >>> >>>session.setAttribute(ConfigAPP.CATEGORY_KEY, categoryList); >>> >>>categoryList = (List) >>> session.getAttribute(ConfigAPP.CATEGORY_KEY); >>> >>>System.out.println(categoryList.size()); >>> >>>} else { >>>categoryList = categoryList = (List) >>> session.getAttribute(ConfigAPP.CATEGORY_KEY); >>>} >>> >>> >>> or is there any other way to do that ? >>> >>> >>> >>> *Dhiraj* >>> >> >> - >> 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: Using xdoclet with ValidatorActionForm
Dimitris Mouchritsas wrote: Hi all, I've got a multipage form bean to complete a registration in 3 steps. Validator is not working correctly. Some fields in the first page are validated, some are not. In the 3rd page none of the fields are validated. Now from what I understand I need to extend ValidatorActionForm instead of ValidatorForm. But in the xdoclet path I need to provide a path attribute. (btw I use a patched 1.2.3 xdoclet to support struts 1.3.8) If this is the path for the action then I'm in trouble because I have 3 seperate actions for each step. Do I need to combine them in one? Could you please provide an example of how to use this path attribute? Thanks Dimitris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Finally found the answer, when declaring the page attribute for the property in xdoclet it has to be on the same declaration as in: * @struts.validator type="required,mask,maxlength" page="3" and not as in: * @struts.validator type="required,mask,maxlength" * @struts.validator page="3" The latter, even though it produced a valid validation xml it added a null as in: and this messed up the validation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
--- On Thu, 7/10/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > I noticed this, but my Sitegraph plugin in the same > directory as the dependent jars so I don't need to > put them into classpath? Oh, it looks like the sitegraph plugin puts its requirements in its manifest file, so never mind about all that classpath stuff. Remove the -cp option altogether. (I'm not sure the -cp option is valid with a -jar option anyway, actually.) Are you using the appropriate versions of the required libraries? The "Class-Path" entry in the sitegraph plugin lists all possible dependencies (jar files with version numbers). Which version of S2 are you using? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Browser compatability issue - in Struts2.0
Hi I have implemented ajax based parital page rendering in Struts 2.0. Currently i'm facing browser compatibility issue because of radio button events. While using onclick,it is working fine in IE but not in Firefox2.0 Similarly, when using onchange it is working vice-versa. Currently is there any browser compatibility issue with Struts2.0 Thanks, Srini -- View this message in context: http://www.nabble.com/Browser-compatability-issue---%3Cs%3Aradio%3E-in-Struts2.0-tp18384585p18384585.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2.0 + Ajax based Implementation
Hi I have implemented ajax based parital page rendering in Struts 2.0. Currently i'm facing browser compatibility issue because of radio button events. While using onclick,it is working fine in IE but not in Firefox2.0 Similarly, when using onchange it is working vice-versa. Currently is there any browser compatibility issue with Struts2.0 Thanks, Srini newton.dave wrote: > > --- On Thu, 7/10/08, AjaySrini <[EMAIL PROTECTED]> wrote: >> I'm using Struts2.0 in our application.I have written >> the code in such a way it supports Ajax(). >> I'm successfully implemented the login screen using >> ajax.After user successfully logs in, the user views four >> Radio buttons written in a struts 2 div tag.Based on the >> selection of the radio buttons i need to display another >> component in the same page by invoking an action class using >> AJAX.. >> >> Note:The login Screen is a separate JSP. And successful >> login which displays other JSP. >> >> Looking forward to ur reply > > What's the question? > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Struts2.0-%2B-Ajax-based-Implementation-tp18378719p18384511.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: This is odd, sometimes my requests 'miss' the Struts2 filter
OK, I think I've twigged this now Every jsp page has this include recently I have included this in header.jsp (I'm messing around with Struts2 i18n) <%@ taglib prefix="s" uri= "/struts-tags" %> ... If I go back to this config in web.xml .. struts2 /* ... /welcome.jsp ... when I access the site the welcome page with it's included header loads fine. So obviously the request is going through the filter. If I then click the login link it all goes horribly wrong. looking at the exception trace it appears that login.jsp which also loads the header is where the problem lies So, it appears that there is a forward going on (or at least a redirect) somewhere when Tomcat sees that I am trying to access a protected resource This makes sense as I'm trying to access a servlet (Login) but I actually get a jsp (login.jsp) according to http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd another valid value for is INCLUDE so I tried this on it's own ... boom, it all went wrong, so it looks like the default behaviour for the filter mapping thing is REQUEST. If you add any dispatcher then that seems to override the default config. Distressingly (perhaps) struts2 /* REQUEST INCLUDE Doesn't do it, it has to be struts2 /* REQUEST FORWARD phew, got there in the end I'm still not entirely convinced I've got to the bottom of things as I'm sure I had this working with the tags in the header but without the stuff ... then again it's been a long week and I'm probably mistaken. Anyway, whoever said there was a forward going on ... take a bow, you were right and I was talking tosh If it's true that this fix does indeed break in some versions of IE then we are in a spot of bother with this. Thanks for the input, it got me thinking. Rgds lyallex On Thu, Jul 10, 2008 at 11:11 AM, Lyallex <[EMAIL PROTECTED]> wrote: > Hello > > Tomcat version 5.5.26 > Struts2 version 2.0.11.1 > > I'm trying to understand why, given the following in web.xml requests > sometimes 'miss out' the Struts2 filter > > > struts2 > org.apache.struts2.dispatcher.FilterDispatcher > > > > struts2 > /* > > > > It appears to really only be an issue with web.xml declarative security > > Reading around the various archives it appears that this is a know issue > when trying to use Struts2 Actions as the target but I'm not trying to do that > I just use a standard jsp. > > > > The really odd thing is that the login process works perfectly > sometimes and sometimes it fails with the (apparently well known) message > > The Struts dispatcher cannot be found. > This is usually caused by using Struts tags without the associated filter ... > > > > Here's the login config > > > FORM > Form based authentication > > /login.jsp > /login.jsp > > > > Someone, somwhere on my journey through the archives suggested this fix. > > > struts2 > /* > REQUEST > FORWARD > > > It does appear to solve the problem I was just wondering why ? > > Is there a definitive resolution to this problem out there somewhere ? > > TIA > > lyallex > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
Dear Dave, newton.dave wrote: > > So... you didn't use "x.x.x", and you didn't add "[-ns NAMESPACE]", which > are obviously placeholders. So is the "...". It should be replaced with > (a) nothing, removing the -cp, and rely on the CLASSPATH environment > variable, (b) use -cp and use the CLASSPATH as -cp's argument, or (c) put > all the required libraries as -cp arguments (not recommended; too much > work). > > As I said before: using -cp will cause your classpath environment variable > to be ignored (IIRC, I could be wrong about that, but avoiding the > confusion is easy. Or so I thought.) > As I wrote above in the thread I removed -cp and I'm just using my System environment CLASSPATH variable. newton.dave wrote: > Apparently the large red box on the SiteGraph plugin page [1] containing > the following text remains unnoticed: > > "You must either supply the correct classpath when invoking the SiteGraph > tool or place the Sitegraph plugin in the same directory as the dependent > jars. Specifically, the XWork jar, Struts jar, and their dependencies must > be included in the classpath. Futhermore, you must also include your > Action class files referenced in struts.xml. Without the proper class path > entries, SiteGraph will not function properly." > > PUT ***ALL*** THE REQUIRED JARS IN YOUR CLASSPATH. I don't know what else > to tell you or how else to say it so you'll understand. > > (You've installed GraphViz, right?) > > I noticed this, but my Sitegraph plugin in the same directory as the dependent jars so I don't need to put them into classpath ? Yes, I installed GrahViz and I have its .exe in PATH variable. -- Milan newton.dave wrote: > > --- On Thu, 7/10/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: >> this is how it is given at SiteGraph page: >> >> java -cp ... -jar struts2-sitegraph-plugin-x.x.x.jar >> -config CONFIG_DIR >> -views VIEWS_DIRS >> -output OUTPUT >> [-ns NAMESPACE] > > So... you didn't use "x.x.x", and you didn't add "[-ns NAMESPACE]", which > are obviously placeholders. So is the "...". It should be replaced with > (a) nothing, removing the -cp, and rely on the CLASSPATH environment > variable, (b) use -cp and use the CLASSPATH as -cp's argument, or (c) put > all the required libraries as -cp arguments (not recommended; too much > work). > > As I said before: using -cp will cause your classpath environment variable > to be ignored (IIRC, I could be wrong about that, but avoiding the > confusion is easy. Or so I thought.) > > Apparently the large red box on the SiteGraph plugin page [1] containing > the following text remains unnoticed: > > "You must either supply the correct classpath when invoking the SiteGraph > tool or place the Sitegraph plugin in the same directory as the dependent > jars. Specifically, the XWork jar, Struts jar, and their dependencies must > be included in the classpath. Futhermore, you must also include your > Action class files referenced in struts.xml. Without the proper class path > entries, SiteGraph will not function properly." > > PUT ***ALL*** THE REQUIRED JARS IN YOUR CLASSPATH. I don't know what else > to tell you or how else to say it so you'll understand. > > (You've installed GraphViz, right?) > > Good luck, > Dave > > [1] http://struts.apache.org/2.x/docs/sitegraph-plugin.html > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18384293.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts-Tiles - Missing Content
2008/7/10 Ryan Henson <[EMAIL PROTECTED]>: > I posted the resulting HTML code at the bottom of that last email. Whoops! Sorry I did not see it. > It would appear from my side that the is > not executing properly as does actually > produce the correct text. Now I see it, that's strange. I see that in your body JSP page there is a tag surrounding everything. Can you try putting a sample text before this tag to see if, at least, the page is called? Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts-Tiles - Missing Content
I posted the resulting HTML code at the bottom of that last email. It would appear from my side that the is not executing properly as does actually produce the correct text. My question is focused on why does HttpURLConnection not seem to work correctly with tiles:insert? - Original Message From: Antonio Petrelli <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Thursday, July 10, 2008 9:44:16 AM Subject: Re: Struts-Tiles - Missing Content 2008/7/10 Ryan Henson <[EMAIL PROTECTED]>: > I will note that calling this definition works correctly when I just view it > using a browser. So I doubt it is a problem of Tiles. Can you see if the HTML is ok just before you use it with iText? Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
--- On Thu, 7/10/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > this is how it is given at SiteGraph page: > > java -cp ... -jar struts2-sitegraph-plugin-x.x.x.jar > -config CONFIG_DIR > -views VIEWS_DIRS > -output OUTPUT > [-ns NAMESPACE] So... you didn't use "x.x.x", and you didn't add "[-ns NAMESPACE]", which are obviously placeholders. So is the "...". It should be replaced with (a) nothing, removing the -cp, and rely on the CLASSPATH environment variable, (b) use -cp and use the CLASSPATH as -cp's argument, or (c) put all the required libraries as -cp arguments (not recommended; too much work). As I said before: using -cp will cause your classpath environment variable to be ignored (IIRC, I could be wrong about that, but avoiding the confusion is easy. Or so I thought.) Apparently the large red box on the SiteGraph plugin page [1] containing the following text remains unnoticed: "You must either supply the correct classpath when invoking the SiteGraph tool or place the Sitegraph plugin in the same directory as the dependent jars. Specifically, the XWork jar, Struts jar, and their dependencies must be included in the classpath. Futhermore, you must also include your Action class files referenced in struts.xml. Without the proper class path entries, SiteGraph will not function properly." PUT ***ALL*** THE REQUIRED JARS IN YOUR CLASSPATH. I don't know what else to tell you or how else to say it so you'll understand. (You've installed GraphViz, right?) Good luck, Dave [1] http://struts.apache.org/2.x/docs/sitegraph-plugin.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: RE: RE: Re: [S2] Struts configuration vizualization
Dear Lukasz, Yes, Environment variable CLASSPATH, I wrote above what is content of the variable. java -cp is for setting classpath and it is given at Sitegraph page. I tried just with "java -jar struts2-sitegraph-plugin-2.0.11.1.jar -config ../src/java...", but it is the same. -- Milan Lukasz Lenart wrote: > >> I put this in my classpath: >> >> C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib\commons-logging-1.0.4.jar; >> >> and I run sitegraph from my lib folder: >> >> C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib>java -cp ... -jar >> stru >> ts2-sitegraph-plugin-2.0.11.1.jar -config ../src/java -views ../../pages >> -output >> shema > > What you mean "classpath"? Environment's variable CLASSPATH? > What it is: java -cp ...? > > If you add all your jar's to the CLASSPATH, omit -cp parameter, if you > want to add additional jar's only for this process, add > java -cp %CLASSPATH%;c:\path\to\my.jar > > if you start > java - cp c:\path\to\my.jar > > it will overwrite the system CLASSPATH, java will not use them. > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18383505.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
Dear Dave, this is how it is given at SiteGraph page: java -cp ... -jar struts2-sitegraph-plugin-x.x.x.jar -config CONFIG_DIR -views VIEWS_DIRS -output OUTPUT [-ns NAMESPACE] -- Milan newton.dave wrote: > > --- On Thu, 7/10/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: >> I put this in my classpath: >> >> C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib\commons-logging-1.0.4.jar; >> >> and I run sitegraph from my lib folder: >> >> C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib>java >> -cp ... -jar struts2-sitegraph-plugin-2.0.11.1.jar -config ../src/java >> -views ../../pages -output shema >> >> and I get this exception: >> >> Exception in thread "main" >> java.lang.NoClassDefFoundError: >> org/apache/commons/logging/LogFactory >> at >> org.apache.struts2.sitegraph.SiteGraph.(SiteGraph.java:51) >> >> What is the problem here ? > > You have a single jar in your classpath. It seems unlikely, at best, that > this single jar contains all the dependencies for running sitegraph. > > I'm also not sure what "-cp ..." will do; I'm only familiar with that > notation in regards to enabling/disabling assertions in sub-packages--what > is your intention with that line argument value? I'm also reasonably sure > that using the "-cp" argument will override the CLASSPATH environment > variable. > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18383461.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: RE: RE: Re: [S2] Struts configuration vizualization
When I write echo %CLASSPATH% in my command prompt I get this: and I get this exception: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lo gging/LogFactory at org.apache.struts2.sitegraph.SiteGraph.(SiteGraph.java:51) When I write echo %CLASSPATH% in my command prompt I get this: %CLASSPATH%;C:\Documents and Settings\Administrator\Desktop\Projects\db-derby-10. 2.2.0-bin\lib\derby.jar;C:\Documents and Settings\Administrator\Desktop\Projects\ db-derby-10.2.2.0-bin\lib\derbytools.jar;c:\java;c:\java\backport-util-concurren t.jar;C:\Program Files\Java\jre1.5.0_12\lib\ext\QTJava.zip;C:\eclipse\workspace\ myProject\WebContent\WEB-INF\lib\commons-logging-1.0.4.jar;C:\eclipse\worksp ace\myProject\build; commons-logging is obviously enlisted here, so what is the problem ? -- Milan Gabriel Belingueres-2 wrote: > > You didn't unclude the most important part of all your command line: > "java -cp " > > Obviously you failed to add the commons logging jar file to the classpath. > > Try: java -cp path/to/the/following/file/commons-logging-1.0.4.jar;... > .. > > 2008/7/10 Milan Milanovic <[EMAIL PROTECTED]>: >> >> Dear Dave, >> >> I put this in my classpath: >> >> C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib\commons-logging-1.0.4.jar; >> >> and I run sitegraph from my lib folder: >> >> C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib>java -cp ... -jar >> stru >> ts2-sitegraph-plugin-2.0.11.1.jar -config ../src/java -views ../../pages >> -output >> shema >> >> and I get this exception: >> >> Exception in thread "main" java.lang.NoClassDefFoundError: >> org/apache/commons/lo >> gging/LogFactory >>at >> org.apache.struts2.sitegraph.SiteGraph.(SiteGraph.java:51) >> >> What is the problem here ? >> >> -- >> Thx, Milan >> >> >> >> >> newton.dave wrote: >>> >>> That's not how classpaths work: as I said, jar files must be listed >>> individually. This is most easily done programmatically in a shell >>> script >>> (or batch file*s*; thanks Windows :( >>> >>> *Class* files need only the top-level directory listed--usually a build >>> output directory. >>> >>> Dave >>> >>> Milan Milanovic wrote: Hi, newton.dave wrote: > > Driving. In an automobile. To get from one place to another. > > Oh that, sorry ;-). You are anwsering to the list while driving, WOW :-). newton.dave wrote: > > Java 101 just means really basic Java: if you put all the libraries in > your lib directory that'd probably be enough (plus your build > directory, > I > think somebody else mentioned). > All of my libs are in my lib directory, and I put CLASSPATH variable to that directory and still I got that error with LogManager. -- Milan newton.dave wrote: > > Milan Milanovic wrote: >> You are driving ? Java 101 ? I must say I don't understand you :-(. >> I now how to define classpath, but there is a lot of things to >> configure >> for >> this SiteGraph plugin, so I'm asking if anyone have an example ? >> -- >> Milan >> newton.dave wrote: >>> >>> No, I'm driving. This is Java 101, so any Java tutorial should be >>> able >>> to >>> point you in the right direction. >>> >>> Dave >>> >>> >>> Milan Milanovic wrote: Could you please give me an example ? -- Milan newton.dave wrote: > > No, it means you should include the directory *containing* the > compiled > class files. Jar files must be listed individually (trivial under > Unix-like environments, nearly under Windows--set your classpath > or > do > it > from a shell/batch script; why would you do it by hand?!) > > Dave > > Milan Milanovic wrote: >> Hi, >> what this means: "Futhermore, you must also include your Action >> class >> files >> referenced in struts.xml" ? >> Does this mean that I should include in command line all of my >> 100 >> action >> classes ? >> -- >> Thx, Milan >> Musachy Barroso wrote: >>> >>> Or this: >>> >>> http://cwiki.apache.org/S2PLUGINS/sitegraph-plugin.html >>> >>> musachy >>> >>> On Wed, Jul 9, 2008 at 8:08 AM, Don Brown >>> <[EMAIL PROTECTED]> >>> wrote: You can try the config browser plugin: http://struts.apache.org/2.x/docs/config-browser-plugin.html Don On Wed, Jul 9, 2008 at 2:04 AM, Milan Milanovic <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm wodering is there any Eclipse plug-in (or something > similar) > which > will > vi
[OT] RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
--- On Thu, 7/10/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > I put this in my classpath: > > C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib\commons-logging-1.0.4.jar; > > and I run sitegraph from my lib folder: > > C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib>java > -cp ... -jar struts2-sitegraph-plugin-2.0.11.1.jar -config ../src/java > -views ../../pages -output shema > > and I get this exception: > > Exception in thread "main" > java.lang.NoClassDefFoundError: > org/apache/commons/logging/LogFactory > at > org.apache.struts2.sitegraph.SiteGraph.(SiteGraph.java:51) > > What is the problem here ? You have a single jar in your classpath. It seems unlikely, at best, that this single jar contains all the dependencies for running sitegraph. I'm also not sure what "-cp ..." will do; I'm only familiar with that notation in regards to enabling/disabling assertions in sub-packages--what is your intention with that line argument value? I'm also reasonably sure that using the "-cp" argument will override the CLASSPATH environment variable. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts-Tiles - Missing Content
2008/7/10 Ryan Henson <[EMAIL PROTECTED]>: > I will note that calling this definition works correctly when I just view it > using a browser. So I doubt it is a problem of Tiles. Can you see if the HTML is ok just before you use it with iText? Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: RE: RE: Re: [S2] Struts configuration vizualization
You didn't unclude the most important part of all your command line: "java -cp " Obviously you failed to add the commons logging jar file to the classpath. Try: java -cp path/to/the/following/file/commons-logging-1.0.4.jar;... .. 2008/7/10 Milan Milanovic <[EMAIL PROTECTED]>: > > Dear Dave, > > I put this in my classpath: > > C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib\commons-logging-1.0.4.jar; > > and I run sitegraph from my lib folder: > > C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib>java -cp ... -jar stru > ts2-sitegraph-plugin-2.0.11.1.jar -config ../src/java -views ../../pages > -output > shema > > and I get this exception: > > Exception in thread "main" java.lang.NoClassDefFoundError: > org/apache/commons/lo > gging/LogFactory >at > org.apache.struts2.sitegraph.SiteGraph.(SiteGraph.java:51) > > What is the problem here ? > > -- > Thx, Milan > > > > > newton.dave wrote: >> >> That's not how classpaths work: as I said, jar files must be listed >> individually. This is most easily done programmatically in a shell script >> (or batch file*s*; thanks Windows :( >> >> *Class* files need only the top-level directory listed--usually a build >> output directory. >> >> Dave >> >> Milan Milanovic wrote: >>> Hi, >>> newton.dave wrote: Driving. In an automobile. To get from one place to another. >>> Oh that, sorry ;-). You are anwsering to the list while driving, WOW :-). >>> newton.dave wrote: Java 101 just means really basic Java: if you put all the libraries in your lib directory that'd probably be enough (plus your build directory, I think somebody else mentioned). >>> All of my libs are in my lib directory, and I put CLASSPATH variable to >>> that >>> directory and still I got that error with LogManager. >>> -- >>> Milan >>> newton.dave wrote: Milan Milanovic wrote: > You are driving ? Java 101 ? I must say I don't understand you :-(. > I now how to define classpath, but there is a lot of things to > configure > for > this SiteGraph plugin, so I'm asking if anyone have an example ? > -- > Milan > newton.dave wrote: >> >> No, I'm driving. This is Java 101, so any Java tutorial should be able >> to >> point you in the right direction. >> >> Dave >> >> >> Milan Milanovic wrote: >>> Could you please give me an example ? >>> -- >>> Milan >>> newton.dave wrote: No, it means you should include the directory *containing* the compiled class files. Jar files must be listed individually (trivial under Unix-like environments, nearly under Windows--set your classpath or do it from a shell/batch script; why would you do it by hand?!) Dave Milan Milanovic wrote: > Hi, > what this means: "Futhermore, you must also include your Action > class > files > referenced in struts.xml" ? > Does this mean that I should include in command line all of my 100 > action > classes ? > -- > Thx, Milan > Musachy Barroso wrote: >> >> Or this: >> >> http://cwiki.apache.org/S2PLUGINS/sitegraph-plugin.html >> >> musachy >> >> On Wed, Jul 9, 2008 at 8:08 AM, Don Brown <[EMAIL PROTECTED]> >> wrote: >>> You can try the config browser plugin: >>> >>> http://struts.apache.org/2.x/docs/config-browser-plugin.html >>> >>> Don >>> >>> On Wed, Jul 9, 2008 at 2:04 AM, Milan Milanovic >>> <[EMAIL PROTECTED]> wrote: Hi, I'm wodering is there any Eclipse plug-in (or something similar) which will vizualize struts.xml configuration ? -- Thx, Milan -- View this message in context: http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18342762.html Sent from the Struts - User mailing list archive at Nabble.com. - 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] >>> >>> >> >> >> >> -- >> "Hey you! Would you help me to carry the stone?" Pink Floyd >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >>
Re: RE: RE: RE: Re: [S2] Struts configuration vizualization
> I put this in my classpath: > > C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib\commons-logging-1.0.4.jar; > > and I run sitegraph from my lib folder: > > C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib>java -cp ... -jar stru > ts2-sitegraph-plugin-2.0.11.1.jar -config ../src/java -views ../../pages > -output > shema What you mean "classpath"? Environment's variable CLASSPATH? What it is: java -cp ...? If you add all your jar's to the CLASSPATH, omit -cp parameter, if you want to add additional jar's only for this process, add java -cp %CLASSPATH%;c:\path\to\my.jar if you start java - cp c:\path\to\my.jar it will overwrite the system CLASSPATH, java will not use them. Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with checkbox (when using disabled property)
I would have thought would handle all of that for you, but I guess it may not be working, or doesn't aim to. 2008/7/10 Paweł Wielgus <[EMAIL PROTECTED]>: > Hi all, > just yesterday i had the very same problem in rails with date field, > so i searched for disabled definition and found this: > http://www.w3.org/TR/html401/interact/forms.html#successful-controls > and > http://www.w3.org/TR/html401/interact/forms.html#h-17.12 > It looks like disabled flag will simply prevent the field from submiting. > > So an extra hidden field read-only should do the job. > > Best greetings, > Paweł Wielgus. > > On 10/07/2008, Dave Newton <[EMAIL PROTECTED]> wrote: >> --- On Wed, 7/9/08, Owen Berry <[EMAIL PROTECTED]> wrote: >> > You need to have a hidden field value that will take the >> > place of the disabled checkbox as some browsers do not >> > send disabled field values. >> >> >> The tag already includes the hidden field; I don't know >> what it does for disabled checkboxes, though. The checkbox interceptor >> *should* work in concert with the tag to handle disabled checkboxes as well, >> or at least I thought it did. >> >> >> Dave >> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >
Re: Struts-Tiles - Missing Content
Sure, I'll post the important excepts from my tiles-def.xml and attach it as well since its kind of large. I will note that calling this definition works correctly when I just view it using a browser. I am reconstructing the exact same call to my function using HttpURLConnection and have verified those variables by logging them to my console. tiles-def.xml printLayout.jsp <%@ taglib uri="/tags/struts-tiles" prefix="tiles"%> Camp Airy BSA: Schedule Manager - tools.report.camper.body.jsp <%@ taglib uri="/tags/struts-logic" prefix="logic"%> <%@ taglib uri="/tags/struts-html" prefix="html"%> <%@ taglib uri="/tags/struts-bean" prefix="bean"%> <%@ taglib uri="/tags/jstl/core" prefix="c"%> ${person.firstName} ${person.middleInitial} ${person.lastName} Age: ${person.age} Rank: ${person.rank} Troop: ${person.troopName} Period ClassName Instructor Location Area Special Requirements ${period.periodName} ${course.className} ${course.instructorFirstName} ${course.instructorLastName} ${course.locationName} ${course.areaName} ${course.specialRequirements} The camper is not enrolled in any classes Resulting HTML from the HttpURLConnection Camp Airy BSA: Schedule Manager - Tools - Reports - Camper >From all of the above my diagnosis is that the problem has to do with >. For the life of my I can't figure out why, >which is why I'm asking for some assistance please. Thanks! -Ryan - Original Message From: Antonio Petrelli <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Thursday, July 10, 2008 2:15:13 AM Subject: Re: Struts-Tiles - Missing Content > I've been experimenting with multiple variations on how to accomplish > this so my below code is a little messy, but it does create and return > a PDF, but it is missing the content it should have. As far as I can > tell from the order of events the following occurs. I open my browser > to the makePDF.do action which sets up an HttpURLConnection to the > getReport action. The getReport action then forwards to the tiles name > which retrieves the layout jsp and is where it should insert the tiles > attributes and get the report content. This is where it breaks down > however and the only HTML that is returned is from the layout page. Let's try to narrow down the problem. Is the resulting HTML correct? If not, please post the Tiles definition and the used JSP pages. Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd";>
RE: RE: RE: RE: Re: [S2] Struts configuration vizualization
Dear Dave, I put this in my classpath: C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib\commons-logging-1.0.4.jar; and I run sitegraph from my lib folder: C:\eclipse\workspace\myProject\WebContent\WEB-INF\lib>java -cp ... -jar stru ts2-sitegraph-plugin-2.0.11.1.jar -config ../src/java -views ../../pages -output shema and I get this exception: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lo gging/LogFactory at org.apache.struts2.sitegraph.SiteGraph.(SiteGraph.java:51) What is the problem here ? -- Thx, Milan newton.dave wrote: > > That's not how classpaths work: as I said, jar files must be listed > individually. This is most easily done programmatically in a shell script > (or batch file*s*; thanks Windows :( > > *Class* files need only the top-level directory listed--usually a build > output directory. > > Dave > > Milan Milanovic wrote: >> Hi, >> newton.dave wrote: >>> >>> Driving. In an automobile. To get from one place to another. >>> >>> >> Oh that, sorry ;-). You are anwsering to the list while driving, WOW :-). >> newton.dave wrote: >>> >>> Java 101 just means really basic Java: if you put all the libraries in >>> your lib directory that'd probably be enough (plus your build directory, >>> I >>> think somebody else mentioned). >>> >> All of my libs are in my lib directory, and I put CLASSPATH variable to >> that >> directory and still I got that error with LogManager. >> -- >> Milan >> newton.dave wrote: >>> >>> Milan Milanovic wrote: You are driving ? Java 101 ? I must say I don't understand you :-(. I now how to define classpath, but there is a lot of things to configure for this SiteGraph plugin, so I'm asking if anyone have an example ? -- Milan newton.dave wrote: > > No, I'm driving. This is Java 101, so any Java tutorial should be able > to > point you in the right direction. > > Dave > > > Milan Milanovic wrote: >> Could you please give me an example ? >> -- >> Milan >> newton.dave wrote: >>> >>> No, it means you should include the directory *containing* the >>> compiled >>> class files. Jar files must be listed individually (trivial under >>> Unix-like environments, nearly under Windows--set your classpath or >>> do >>> it >>> from a shell/batch script; why would you do it by hand?!) >>> >>> Dave >>> >>> Milan Milanovic wrote: Hi, what this means: "Futhermore, you must also include your Action class files referenced in struts.xml" ? Does this mean that I should include in command line all of my 100 action classes ? -- Thx, Milan Musachy Barroso wrote: > > Or this: > > http://cwiki.apache.org/S2PLUGINS/sitegraph-plugin.html > > musachy > > On Wed, Jul 9, 2008 at 8:08 AM, Don Brown <[EMAIL PROTECTED]> > wrote: >> You can try the config browser plugin: >> >> http://struts.apache.org/2.x/docs/config-browser-plugin.html >> >> Don >> >> On Wed, Jul 9, 2008 at 2:04 AM, Milan Milanovic >> <[EMAIL PROTECTED]> wrote: >>> >>> Hi, >>> >>> I'm wodering is there any Eclipse plug-in (or something similar) >>> which >>> will >>> vizualize struts.xml configuration ? >>> >>> -- >>> Thx, Milan >>> -- >>> View this message in context: >>> http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18342762.html >>> Sent from the Struts - User mailing list archive at Nabble.com. >>> >>> >>> - >>> 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] >> >> > > > > -- > "Hey you! Would you help me to carry the stone?" Pink Floyd > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-S2--Struts-configuration-vizualization-tp18342762p18361832.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] >
Re: This is odd, sometimes my requests 'miss' the Struts2 filter
On Thu, Jul 10, 2008 at 1:59 PM, Alberto A. Flores <[EMAIL PROTECTED]> wrote: > As far as I know, the servlet spec 2.3 didn't comment much on what to do on > forwards (whether to make forwarded resources pass through the filters as > well or not). Tomcat 4.x assumed you didn't have to, whereas other > containers (e.g. weblogic 8) passed them through. This was fix in servlet > spec 2.4 (Tomcat 5.x) where additional configuration can be made for these > cases (the default is only request, but now you have control over forwards, > includes, errors, etc). Well this has nothing to do with forwards AFAICS, that fact is the exact same link works sometimes and sometimes it doesn't If I am already logged in and I click the link then I goto the relevant resource depending on role without being required to log in. That seems to work fine. The problem occurs when I click the exact same link from different pages, well sometimes it does and then again sometimes it doesn't. I really can't see why one Http Request should be different from another as far as the filter is concerned. There is a forward going on but that is after the user has been validated and the Login servlet executes, it then forwards the request onto the relevant resource but like I say, the user has already been logged in by them. There is obviously something going on that I am not aware of ... > > Depending on what your JSP is trying to do (target url), you security would > need to address those destinations as well. Also, consider checking WW-2025 > (Struts2 JIRA) as the fix above seems to break in IE7 (not sure why either, > but I know that IE handles HTTP 1.1 in a weird way, so I'm not surprised). Well I read that it breaks in IE 7 but I downloaded that particular piece of nastiness and it works fine for me Thank Mozilla for Firefox :-) > > Also, have you declared a security-role, disabled caching on your JSP, etc, > etc, while testing this problem. It is also possible that you properly > authenticated once and the session never got invalidated and you were always > running on a valid session (cookie based). My roles are all there, everything works perfectly ... sometimes ... it's all very confusing I have to say. Anyway, thanks for the ideas I'll keep hacking away Never had this problem with POJOs, Servlets and jsps :-( rgds lyallex > > Lyallex wrote: >> >> Hello >> >> Tomcat version 5.5.26 >> Struts2 version 2.0.11.1 >> >> I'm trying to understand why, given the following in web.xml requests >> sometimes 'miss out' the Struts2 filter >> >> >> struts2 >> >> org.apache.struts2.dispatcher.FilterDispatcher >> >> >> >> struts2 >> /* >> >> >> >> It appears to really only be an issue with web.xml declarative security >> >> Reading around the various archives it appears that this is a know issue >> when trying to use Struts2 Actions as the target but I'm not trying to do >> that >> I just use a standard jsp. >> >> >> >> The really odd thing is that the login process works perfectly >> sometimes and sometimes it fails with the (apparently well known) message >> >> The Struts dispatcher cannot be found. >> This is usually caused by using Struts tags without the associated filter >> ... >> >> >> >> Here's the login config >> >> >> FORM >> Form based authentication >> >> /login.jsp >> /login.jsp >> >> >> >> Someone, somwhere on my journey through the archives suggested this fix. >> >> >> struts2 >> /* >> REQUEST >> FORWARD >> >> >> It does appear to solve the problem I was just wondering why ? >> >> Is there a definitive resolution to this problem out there somewhere ? >> >> TIA >> >> lyallex >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- > > Alberto A. Flores > http://www.linkedin.com/in/aflores > > > > - > 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: This is odd, sometimes my requests 'miss' the Struts2 filter
On Thu, Jul 10, 2008 at 1:13 PM, Jeoffrey Bakker <[EMAIL PROTECTED]> wrote: > Hi, > > Are you sure that the behaviour was really odd? I can't think of a better word to describe it frankly I have the following link View my account This is a protected resource and requires a login If you don't get to any other protected resource via this link you have not initialised your login session correctly and you are thrown out. It's worked for me for years in various web apps. With Struts2 on board, sometimes when I click this link everything works, sometimes it doesn't If I have struts2 /* As far as I am aware then every request should be handled by this mapping. Unless I am missing something of course Rgds lyallex > So, you didn't have > different entry points to show login page. E.g. directly requesting the > login page or being forwarded by an other url. > > Regards, > Jeoffrey > > > 2008/7/10 Lyallex <[EMAIL PROTECTED]>: > >> Hello >> >> Tomcat version 5.5.26 >> Struts2 version 2.0.11.1 >> >> I'm trying to understand why, given the following in web.xml requests >> sometimes 'miss out' the Struts2 filter >> >> >> struts2 >> >> org.apache.struts2.dispatcher.FilterDispatcher >> >> >> >> struts2 >> /* >> >> >> >> It appears to really only be an issue with web.xml declarative security >> >> Reading around the various archives it appears that this is a know issue >> when trying to use Struts2 Actions as the target but I'm not trying to do >> that >> I just use a standard jsp. >> >> >> >> The really odd thing is that the login process works perfectly >> sometimes and sometimes it fails with the (apparently well known) message >> >> The Struts dispatcher cannot be found. >> This is usually caused by using Struts tags without the associated filter >> ... >> >> >> >> Here's the login config >> >> >> FORM >> Form based authentication >> >> /login.jsp >> /login.jsp >> >> >> >> Someone, somwhere on my journey through the archives suggested this fix. >> >> >> struts2 >> /* >> REQUEST >> FORWARD >> >> >> It does appear to solve the problem I was just wondering why ? >> >> Is there a definitive resolution to this problem out there somewhere ? >> >> TIA >> >> lyallex >> >> - >> 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: This is odd, sometimes my requests 'miss' the Struts2 filter
As far as I know, the servlet spec 2.3 didn't comment much on what to do on forwards (whether to make forwarded resources pass through the filters as well or not). Tomcat 4.x assumed you didn't have to, whereas other containers (e.g. weblogic 8) passed them through. This was fix in servlet spec 2.4 (Tomcat 5.x) where additional configuration can be made for these cases (the default is only request, but now you have control over forwards, includes, errors, etc). Depending on what your JSP is trying to do (target url), you security would need to address those destinations as well. Also, consider checking WW-2025 (Struts2 JIRA) as the fix above seems to break in IE7 (not sure why either, but I know that IE handles HTTP 1.1 in a weird way, so I'm not surprised). Also, have you declared a security-role, disabled caching on your JSP, etc, etc, while testing this problem. It is also possible that you properly authenticated once and the session never got invalidated and you were always running on a valid session (cookie based). Lyallex wrote: Hello Tomcat version 5.5.26 Struts2 version 2.0.11.1 I'm trying to understand why, given the following in web.xml requests sometimes 'miss out' the Struts2 filter struts2 org.apache.struts2.dispatcher.FilterDispatcher struts2 /* It appears to really only be an issue with web.xml declarative security Reading around the various archives it appears that this is a know issue when trying to use Struts2 Actions as the target but I'm not trying to do that I just use a standard jsp. The really odd thing is that the login process works perfectly sometimes and sometimes it fails with the (apparently well known) message The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter ... Here's the login config FORM Form based authentication /login.jsp /login.jsp Someone, somwhere on my journey through the archives suggested this fix. struts2 /* REQUEST FORWARD It does appear to solve the problem I was just wondering why ? Is there a definitive resolution to this problem out there somewhere ? TIA lyallex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alberto A. Flores http://www.linkedin.com/in/aflores - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Recipe for Action and View
Hi, Check PrepareInterceptor [1] with prepare() method [1] http://struts.apache.org/2.1.2/docs/prepare-interceptor.html Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: This is odd, sometimes my requests 'miss' the Struts2 filter
> > struts2 > /* > REQUEST > FORWARD > > > It does appear to solve the problem I was just wondering why ? Because it's up to a servlet container how it will forward to /* (request, forward, redirect ;-), the same is with index.action is working or not. Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Customizing CSS
Iterator Tag [1], second and third example [1] http://struts.apache.org/2.0.11.2/docs/iterator.html Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Recipe for Action and View
Hello everyone, this is my first S2 project - i am a newbie (although i have a tiny little experience with S1...). :-) I am storing my view (JSP) files in /WEB-INF/jsp/... so they cannot be accessed directly to prevent links from external pages that contain fake parameters. Therefore all requests are handled by actions. AFAIR, the current coding practice in S1 is to use an action that caters a form (e.g. prepopulate) and presents the view to the user. A second action then takes care of the form processing (including validation and everything). ^ <> | | /-\+--+ /-\ --->( presentFormAction )-->| form.jsp |<-->( processFormAction ) \-/+--+ \-/ My questionis the following: Is it possible to merge these two actions into a single one? Or are there any drawbacks? ^ | <> | /--\ +--+ --->( formAction )<-->| form.jsp | \--/ +--+ The problem seems to be the validation. Of course, I don't want the initial request (with all params set to null) validated (and the error messages generated). A solution could be to assign a param/value pair to the "Submit"-Button and let an interceptor check for it. If not found, forward to INPUT.. The interceptor must fire before the error-generating interceptors (conversionError, validation and workflow AFAIK). Is there a good way to do this? Maybe I am not the first one who wants to do it and there is already something in the default interceptor stack. I wouldn't touch the S2-defaults until I really must. Or is there a reason why my approach wouldn't work? Proposals are welcome :-) Thanks very much in advance, ~Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: This is odd, sometimes my requests 'miss' the Struts2 filter
Hi, Are you sure that the behaviour was really odd? So, you didn't have different entry points to show login page. E.g. directly requesting the login page or being forwarded by an other url. Regards, Jeoffrey 2008/7/10 Lyallex <[EMAIL PROTECTED]>: > Hello > > Tomcat version 5.5.26 > Struts2 version 2.0.11.1 > > I'm trying to understand why, given the following in web.xml requests > sometimes 'miss out' the Struts2 filter > > > struts2 > > org.apache.struts2.dispatcher.FilterDispatcher > > > > struts2 > /* > > > > It appears to really only be an issue with web.xml declarative security > > Reading around the various archives it appears that this is a know issue > when trying to use Struts2 Actions as the target but I'm not trying to do > that > I just use a standard jsp. > > > > The really odd thing is that the login process works perfectly > sometimes and sometimes it fails with the (apparently well known) message > > The Struts dispatcher cannot be found. > This is usually caused by using Struts tags without the associated filter > ... > > > > Here's the login config > > > FORM > Form based authentication > > /login.jsp > /login.jsp > > > > Someone, somwhere on my journey through the archives suggested this fix. > > > struts2 > /* > REQUEST > FORWARD > > > It does appear to solve the problem I was just wondering why ? > > Is there a definitive resolution to this problem out there somewhere ? > > TIA > > lyallex > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: REST plugin URL syntax
--- On Thu, 7/10/08, Mike Watson <[EMAIL PROTECTED]> wrote: > So what's the best way to get the latest 2.1.3 snapshot as source? Via SVN. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Customizing CSS
Actually you don't even have to use the modulus operator there -- you can access #stat.even or #stat.odd directly. jk On Thu, Jul 10, 2008 at 5:56 AM, ManiKanta G <[EMAIL PROTECTED]> wrote: > In which theme u want to implement? > If it is in S2, u can use DisplayTag (displaytag.sourceforge.net), which > will look almost all needs of tabular reports or form (including paging, > sorting). > > If you want to implement using tag, then use rowStatus of > the iterator and using the modulo (%) division by 2, u can get whether the > current iteration is even or odd, and based that you can decorate your > table. > > Regards, > ManiKanta > > > > Narayana S wrote: > >> Hi, >> >>as per my requirement, i have to apply two different colors to >> alternate rows.can any one guide me how to extend theme to implement this? >> >> >> > > > > ** DISCLAIMER ** > Information contained and transmitted by this E-MAIL is proprietary to Sify > Limited and is intended for use only by the individual or entity to which it > is addressed, and may contain information that is privileged, confidential > or exempt from disclosure under applicable law. If this is a forwarded > message, the content of this E-MAIL may not have been sent with the > authority of the Company. If you are not the intended recipient, an agent of > the intended recipient or a person responsible for delivering the > information to the named recipient, you are notified that any use, > distribution, transmission, printing, copying or dissemination of this > information in any way or in any manner is strictly prohibited. If you have > received this communication in error, please delete this mail & notify us > immediately at [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com
Re: Struts2.0 + Ajax based Implementation
--- On Thu, 7/10/08, AjaySrini <[EMAIL PROTECTED]> wrote: > I'm using Struts2.0 in our application.I have written > the code in such a way it supports Ajax(). > I'm successfully implemented the login screen using > ajax.After user successfully logs in, the user views four > Radio buttons written in a struts 2 div tag.Based on the > selection of the radio buttons i need to display another > component in the same page by invoking an action class using > AJAX.. > > Note:The login Screen is a separate JSP. And successful > login which displays other JSP. > > Looking forward to ur reply What's the question? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling Exceptions in Action constructors
The thing to remember here is that unlike the constructor, prepare() won't run on its own outside of a Struts context. So if you are writing unit tests of your various execute() type methods, be aware that you will need to run prepare() manually within the unit tests (or as part of setUp() or whatever). jk On Thu, Jul 10, 2008 at 3:59 AM, Lyallex <[EMAIL PROTECTED]> wrote: > Sheesh, that works like a dream, thanks ... > Can't think how I missed that bit in the book. > > Preparable, marvelous. > > lyallex > > > On Wed, Jul 9, 2008 at 5:04 PM, Jim Kiley <[EMAIL PROTECTED]> wrote: > > I think in this situation I would have SomeAction implement Preparable, > and > > put someComponent's initialization into the prepare() method, if I could > get > > away with it. I realize that might not be possible in your situation, > but > > not knowing more details it's my first suggestion. > > > > jk > > > > On Wed, Jul 9, 2008 at 12:00 PM, Lyallex <[EMAIL PROTECTED]> wrote: > > > >> Hi > >> > >> I have a question about handling Exceptions in Action constructors > >> > >> I have the following constructor in an Action > >> > >>public SomeAction() throws BusinessComponentException { > >>someComponent = new SomeBusinessComponent(); > >>} > >> > >> Now when an instance of this Action is instantiated it may be the case > >> that the SomeBusinessComponent > >> constructor may throw a BusinessComponentException, the question is > >> how to handle this. > >> > >> As an aside It's also the case that the methods of this action may > >> also throw such an Exception > >> but I can manage that fine. > >> > >> The exception trace reveals the following > >> > >> Unable to instantiate Action, ... > >> > >> > > com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:294) > >> > >> I tried to handle this by putting the following in struts.xml > >> > >> > >> /friendlyError.jsp > >> > >> > >> > >> > >> > >> > >> But no joy. I think this is because of the way the Exception > >> interceptor does it's thing. > >> > >> Here's what my book (Struts2 in Action) says > >> > >> ...When the exception interceptor executes during its postprocessing > >> phase ... Hmm, that would explain it, there is no post processing > >> phase because execution doesn't get that far. (I think). > >> > >> Does anyone have a pattern for handling exceptions in Action > constructors ? > >> > >> many TsIA > >> > >> lyallex > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > > Jim Kiley > > Technical Consultant | Summa > > [p] 412.258.3346 [m] 412.445.1729 > > http://www.summa-tech.com > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com
Re: a wish: inclusion of tiles-2.0.6
2008/7/10 Radoslav Nedyalkov <[EMAIL PROTECTED]>: > I'm so excited finally getting a consistent error page without a bunch > of workarounds and patches, so > here is the recipe for the struts/tiles/freemarker combination: > I think you'd better open a JIRA issue for this. About Tiles 2.0.6 the inclusion should be trivial, just the change of a version number in the pom. Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
a wish: inclusion of tiles-2.0.6
Hello, I'm so excited finally getting a consistent error page without a bunch of workarounds and patches, so here is the recipe for the struts/tiles/freemarker combination: prerequisites: 1. struts-2.1.x - put template_exception_handler=rethrow in freemarker.properties to catch for the writeIfCompleted functionality in FreemarkerResult. 2. tiles-2.0.6- template exceptions now pass through [ https://issues.apache.org/struts/browse/TILES-238 ]. This way the "main layout" ftl template remains buffered and discarded thanks to 1. No messed output, you get a clear error page. 3. xwork-2.1.x - result exceptions now are properly handled from ExceptionMappingInterceptor. [ http://jira.opensymphony.com/browse/XW-521 ] This was a simple test setup simply replacing tiles-2.0.5 from the distro with tiles-2.0.6. I'm not sure how trivial or complex the integration steps shoud be. Cheers, Rado - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
This is odd, sometimes my requests 'miss' the Struts2 filter
Hello Tomcat version 5.5.26 Struts2 version 2.0.11.1 I'm trying to understand why, given the following in web.xml requests sometimes 'miss out' the Struts2 filter struts2 org.apache.struts2.dispatcher.FilterDispatcher struts2 /* It appears to really only be an issue with web.xml declarative security Reading around the various archives it appears that this is a know issue when trying to use Struts2 Actions as the target but I'm not trying to do that I just use a standard jsp. The really odd thing is that the login process works perfectly sometimes and sometimes it fails with the (apparently well known) message The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter ... Here's the login config FORM Form based authentication /login.jsp /login.jsp Someone, somwhere on my journey through the archives suggested this fix. struts2 /* REQUEST FORWARD It does appear to solve the problem I was just wondering why ? Is there a definitive resolution to this problem out there somewhere ? TIA lyallex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Customizing CSS
In which theme u want to implement? If it is in S2, u can use DisplayTag (displaytag.sourceforge.net), which will look almost all needs of tabular reports or form (including paging, sorting). If you want to implement using tag, then use rowStatus of the iterator and using the modulo (%) division by 2, u can get whether the current iteration is even or odd, and based that you can decorate your table. Regards, ManiKanta Narayana S wrote: Hi, as per my requirement, i have to apply two different colors to alternate rows.can any one guide me how to extend theme to implement this? ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail & notify us immediately at [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Customizing CSS
Use .cust tr.odd {background-color:#ff;} .cust tr.even {background-color:#DD;} or Find in google -Original Message- From: Narayana S [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2008 3:18 PM To: Struts Users Mailing List Subject: Customizing CSS Hi, as per my requirement, i have to apply two different colors to alternate rows.can any one guide me how to extend theme to implement this? DISCLAIMER: This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Customizing CSS
Hi, as per my requirement, i have to apply two different colors to alternate rows.can any one guide me how to extend theme to implement this?
Re: REST plugin URL syntax
So what's the best way to get the latest 2.1.3 snapshot as source? Only the jars seem to be in the maven snapshot repo... Are there any instructions on doing that somewhere? I've looked but can't find them... 2008/7/3 Jeromy Evans <[EMAIL PROTECTED]>: > Mike Watson wrote: >> >> Hi Jeromy, >> >> I've finally found time to try to resolve this but haven't had much luck. >> >> Just to recap, I'm looking to be able to do something similar to the >> following: >> /book -> returns a list of books >> /book/123 -> returns book with id 123 >> /book/123/chapter/1 -> return chapter with id 1, retrieved from book >> 123 (this is a simplistic example, all resources have a unique ID) >> >> I'd also like to be able to control access based on the >> context/namespace used to access a resource e.g.: >> /logo/abc -> read or update >> /book/123/logo/abc -> read only >> (would I need multiple LogoControllers for this?) >> >> Using Namespaces as described by Jeromy below certainly seems to make >> sense but as soon as I start to try the example provided I lose the >> ability to GET /book/123, and I've tried with BookController having >> namespace of "/" or "/book" and neither works. And so far I haven't >> been able to successfully hit the ChapterController using a url like >> /book/123/chapter. >> >> Am I missing something really obvious? Is there something I need to >> put in the struts.xml to configure the namespaces as well as using the >> @Namespace annotation? >> >> Jeromy, you seem to be pretty knowledgeable about this - can you think >> of anything I might be doing wrong? >> >> Thanks in advance for your help. >> >> Mike >> >> > > Hi Mike, I'll throw a quick answer together now and try to give you a more > in-depth one in a day or two by building an example. > The steps are: > 1. ensure struts is up-to-date. (2.1.3-SNAPSHOT preferably, to ensure you > have the latest ActionMappingParamsInterceptor) > 2. enable the NamedVariablePatternMatcher via struts.xml 3. Create the > BookController in the root namespace. GET /book/123 will invoke > BookController.show() with id=123 > 4. Create the ChapterController in the namespace containing the book id > variable (/book/{bookid}). GET /book/123/chapter will invoke > ChapterContoller.index() with bookId=123. > > ie. > > @Namespace("/") > public class BookController implements ModelDriven { } > > > @Namespace("/book/{bookId}") > public class ChapterController implements ModelDriven { } > > > Now that's what *should* happen. I use it in a large application that > includes many other related tweaks so I'll throw together a vanilla sample > and post it somewhere. > > I'll come back to the authorization issue separately. The quick answer is > that you can omit methods that are never permitted and/or filter URLs based > on a URI pattern and/or user's role. > regards, > Jeromy Evans > > > - > 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]
Struts2.0 + Ajax based Implementation
Hi all, I'm using Struts2.0 in our application.I have written the code in such a way it supports Ajax(). I'm successfully implemented the login screen using ajax.After user successfully logs in, the user views four Radio buttons written in a struts 2 div tag.Based on the selection of the radio buttons i need to display another component in the same page by invoking an action class using AJAX.. Note:The login Screen is a separate JSP. And successful login which displays other JSP. Looking forward to ur reply -- View this message in context: http://www.nabble.com/Struts2.0-%2B-Ajax-based-Implementation-tp18378719p18378719.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using xdoclet with ValidatorActionForm
Hi all, I've got a multipage form bean to complete a registration in 3 steps. Validator is not working correctly. Some fields in the first page are validated, some are not. In the 3rd page none of the fields are validated. Now from what I understand I need to extend ValidatorActionForm instead of ValidatorForm. But in the xdoclet path I need to provide a path attribute. (btw I use a patched 1.2.3 xdoclet to support struts 1.3.8) If this is the path for the action then I'm in trouble because I have 3 seperate actions for each step. Do I need to combine them in one? Could you please provide an example of how to use this path attribute? Thanks Dimitris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling Exceptions in Action constructors
Sheesh, that works like a dream, thanks ... Can't think how I missed that bit in the book. Preparable, marvelous. lyallex On Wed, Jul 9, 2008 at 5:04 PM, Jim Kiley <[EMAIL PROTECTED]> wrote: > I think in this situation I would have SomeAction implement Preparable, and > put someComponent's initialization into the prepare() method, if I could get > away with it. I realize that might not be possible in your situation, but > not knowing more details it's my first suggestion. > > jk > > On Wed, Jul 9, 2008 at 12:00 PM, Lyallex <[EMAIL PROTECTED]> wrote: > >> Hi >> >> I have a question about handling Exceptions in Action constructors >> >> I have the following constructor in an Action >> >>public SomeAction() throws BusinessComponentException { >>someComponent = new SomeBusinessComponent(); >>} >> >> Now when an instance of this Action is instantiated it may be the case >> that the SomeBusinessComponent >> constructor may throw a BusinessComponentException, the question is >> how to handle this. >> >> As an aside It's also the case that the methods of this action may >> also throw such an Exception >> but I can manage that fine. >> >> The exception trace reveals the following >> >> Unable to instantiate Action, ... >> >> >> com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:294) >> >> I tried to handle this by putting the following in struts.xml >> >> >> /friendlyError.jsp >> >> >> >> >> >> >> But no joy. I think this is because of the way the Exception >> interceptor does it's thing. >> >> Here's what my book (Struts2 in Action) says >> >> ...When the exception interceptor executes during its postprocessing >> phase ... Hmm, that would explain it, there is no post processing >> phase because execution doesn't get that far. (I think). >> >> Does anyone have a pattern for handling exceptions in Action constructors ? >> >> many TsIA >> >> lyallex >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > Jim Kiley > Technical Consultant | Summa > [p] 412.258.3346 [m] 412.445.1729 > http://www.summa-tech.com > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with checkbox (when using disabled property)
Hi all, just yesterday i had the very same problem in rails with date field, so i searched for disabled definition and found this: http://www.w3.org/TR/html401/interact/forms.html#successful-controls and http://www.w3.org/TR/html401/interact/forms.html#h-17.12 It looks like disabled flag will simply prevent the field from submiting. So an extra hidden field read-only should do the job. Best greetings, Paweł Wielgus. On 10/07/2008, Dave Newton <[EMAIL PROTECTED]> wrote: > --- On Wed, 7/9/08, Owen Berry <[EMAIL PROTECTED]> wrote: > > You need to have a hidden field value that will take the > > place of the disabled checkbox as some browsers do not > > send disabled field values. > > > The tag already includes the hidden field; I don't know what > it does for disabled checkboxes, though. The checkbox interceptor *should* > work in concert with the tag to handle disabled checkboxes as well, or at > least I thought it did. > > > Dave > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >