Re: How to clear ActionForm before calling mapping.forward(...)???
Is this what you are looking for? ActionForward cleanDisplay= new ActionForward(/myAction.do?); cleanDisplay.setRedirect(true); return cleanDisplay; put that in your action and run it. -Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
??? find site error (action)
Here is what the error says: * Internet Explorer cannot download myAction.do?myparam=344 from localhost Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. *** What could cause this error Why can't it find the site? -Eric - 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]
STRUTS PROJECT finding problem
What could cause this error See attached error message. Why can't it find the site? -Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
STRUTS PROJECT finding problem (adding attachment again, not sure why it said Part.001)
[EMAIL PROTECTED] 03/14/05 3:24 PM What could cause this error See attached error message. Why can't it find the site? -Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
??????????? in JSP
My app server runs on a unix box and I am getting lots of question marks showing up in my JSP. How do I fix this problem? I downloaded the Programmers File Editor but it doesn't seem to help at all. -Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DispatchAction - NullPointerException
The execute method can be used to put code that will apply to all the dispatched methods. *--- public class BasicInfoAction extends DispatchAction { private String thing1; private String thing2; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { thing1=The cat in a hat thing2=The cat in a hat request.getSession().setAttribute(thing1, thing1); request.getSession().setAttribute(thing2, thing2); return super.execute(mapping, form, request, response); } public ActionForward display(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { System.out.println(method=display); return mapping.getInputForward(); } * -Eric [EMAIL PROTECTED] 03/08/05 9:54 AM Hey Rick, Thanks for your reply. On Tue, 08 Mar 2005 10:18:30 -0500, Rick Reumann [EMAIL PROTECTED] wrote: Basile Passe wrote the following on 3/7/2005 12:49 PM: The value of the request parameter named method to pick the appropriate execute method is not valid. But why? struts-config.xml is correct and form (JSP) also. Well, not sure exactly what you mean above. I'm assuming since you said it works 95% of the time, you do have typical dispatch method names. When you use a DispatchAction you typically don't code the execute method (that's handled by the base class). The execute method of the base class chooses the correct method in your dispatch action. From your I understand your description of DispatchAction and my use is good. stack trace it's apparent that you are NOT always passing the method I'm sure we passing the good method parameter but sometimes the error appears in the stack trace!. parameter like you say you are OR the method param you are passing does not match the method name in the dispatch action (check for typos). Use a debugger or print out the request params that are being passed. I don't have the possibilities to reproduce the error. The error appears in production (error occurs from time to time). ;) (PS- It's not a good idea to reply to another topic and change the subject, since it messes up the threading of messages. This message and your original is now burried within the Two CSS files thread) Sorry :P Have you an idea for resolve this problem ? Sorry for my poor english ;) Basile Passe Error trace : java.lang.NullPointerException at java.lang.Class.getMethod0 (Native Method) at java.lang.Class.getMethod (Class.java:888) at org.apache.struts.actions.DispatchAction.getMethod (DispatchAction.java:334) at org.apache.struts.actions.DispatchAction.dispatchMethod (DispatchAction.java:266) at adsn.fcddv.framework.struts.BaseDispatchAction.execute (BaseDispatchAction.java:76) at org.apache.struts.action.RequestProcessor.processActionPerform (RequestProcessor.java:446) at adsn.fcddv.framework.struts.CustomRequestProcessor.process (CustomRequestProcessor.java:101) at org.apache.struts.action.ActionServlet.process (ActionServlet.java:1292) at org.apache.struts.action.ActionServlet.doGet (ActionServlet.java:492) at javax.servlet.http.HttpServlet.service (HttpServlet.java:740) at javax.servlet.http.HttpServlet.service (HttpServlet.java:853) at com.evermind.server.http.ResourceFilterChain.doFilter (ResourceFilterChain.java:65) at oracle.security.jazn.oc4j.JAZNFilter.doFilter (JAZNFilter.java:283) at com.evermind.server.http.ServletRequestDispatcher.invoke (ServletRequestDispatcher.java:560) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal (ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest (HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run (HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run (HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run (PooledExecutor.java:803) at java.lang.Thread.run (Thread.java:484) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Best regards, Basile - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
New Question Re: bean:write filter=false
I have a question after reading this question. What exactly does the filter= do? -Eric [EMAIL PROTECTED] 03/07/05 1:30 PM Hi, I wanted to display label using bean:write filter=false. But I need to filter(or allow) selected HTML tag. For example I have to allow code/code tag but I have to filter scriptalert(hi);/script like that.. Can we do this selective filtering using any tag libraries,, otherwise I have to extend existing tag libraries..Please help me out here.. Thanks, Kaja - 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: One last ATTACHMENT issue
I noticed this too, but putting the '/physrcrtadmin' in there doesn't matter, it still doesn't work...??? But I do think it might be some kind of path or reference issue. Thanks, -Eric Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 3/2/2005 7:21:40 AM In addition to not needing the ampersand, the first and second href seem to point differently. The first points to: /physrcrtadmin/AttachmentAction.do The second to: AttachmentAction.do Which may be the same place already if whatever page you got this from is in the same directory tree but it's not obvious from the below.. Maybe adding a simple debug statement on the server-side with the value of attachment_id (and/or all request parameters) will make it obvious what's coming through and what to change. Regards...djsuarez -Original Message- From: Curtis Taylor [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 01, 2005 10:32 PM To: user@struts.apache.org Subject: Re: One last ATTACHMENT issue Shot in the dark here: IIRC, you don't need the ampersand after the initial question mark in the request URL. Try killing that see what happens... Good luck, -- Curtis Eric Lemle wrote: Can anyone tell me why this a href=/physrcrtadmin/AttachmentAction.do?amp;attachment_id=341 target=ResumeAttachmentVeselovaNataliaECV.doc/a works perfectly. But this. function printAttachment( id, name ) { childWindow=window.open( 'AttachmentAction.do?attachment_id='+id, name, 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=y es,copyhistory=no,scrollbars=yes,width=790,height=600'); childWindow.focus(); } which is called with... if(document.forms[0].printCV.checked==true || document.forms[0].printAllAttachments.checked==true) { printAttachment( '341', 'printCV'); } throws an error messages saying it can find the file. ? Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- 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: problem with logic:iterate
I think this is what you are looking for logic:iterate name=myVector id=myProject indexId=i bean:define id=mydescription name=myProject property=description / bean:write name=mydescription/ /logic:iterate -Eric [EMAIL PROTECTED] 3/2/2005 12:09:49 PM hi folks, I am trying to iterate a through a Vector of object of class Project where project has getter and setter getDescription(),setDescription(),etc In the jsp page I first created bean of name bar. Vector v=new Vector(); Project p1=new Project(); p1.setName(project1); p1.setDescription(des); pageContext.setAttribute(bar,v,PageContext.PAGE_SCOPE); then trying to iterate over bar logic:iterate id=element name=bar /logic:iterate __ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ - 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: problem with logic:iterate
Is bar in the session? [EMAIL PROTECTED] 3/2/2005 12:45:03 PM thanks I am running into a related problem with radio buttons: logic:iterate id=element name=bar html:radio idName=element value=name property=pName /html:radio /logic:iterate when rendered it says: [ServletException in:/calc/ProjectManagerMain.jsp] Cannot find bean under name org.apache.struts.taglib.html.BEAN' What's wrong? thanks --- Eric Lemle [EMAIL PROTECTED] wrote: I think this is what you are looking for logic:iterate name=myVector id=myProject indexId=i bean:define id=mydescription name=myProject property=description / bean:write name=mydescription/ /logic:iterate -Eric [EMAIL PROTECTED] 3/2/2005 12:09:49 PM hi folks, I am trying to iterate a through a Vector of object of class Project where project has getter and setter getDescription(),setDescription(),etc In the jsp page I first created bean of name bar. Vector v=new Vector(); Project p1=new Project(); p1.setName(project1); p1.setDescription(des); pageContext.setAttribute(bar,v,PageContext.PAGE_SCOPE); then trying to iterate over bar logic:iterate id=element name=bar /logic:iterate __ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ - 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] __ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ - 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: How to reduce jsp files by using Tiles?
I think if you use the tiles-defs.xml configuration properly you can eliminate lots of files. But I don't use that file yet. -Eric [EMAIL PROTECTED] 3/2/2005 12:53:59 PM I do not think it's possible... I hope someone can prove me wrong. --- Daniel PC Leung [EMAIL PROTECTED] wrote: I have a standand Tiles layout. ie. it has header, Left, Body and footer. In one of the body, I have this. td html:link page=/UserAccountMaint.jsp bean:message key=securityMaint.userAccountMaint/ /html:link /td Whenever it is clicked, only the body portion is changed. I have to use 2 jsp files to make it happen, UserAccountMaint.jsp: tiles:insert definition=xxx.mainLayout flush=true tiles:put name=body value=/UserAccountMaintBody.jsp / /tiles:insert Can I use only 1 jsp file so that only the body portion is changed? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:link diff from javascript (aka attachment issue)
HELP? The only thing that I can think of is that the statement html:link action=/AttachmentAction.do? paramId=attachment_id paramName=mutableForm paramProperty=attachment_id target=ResumeAttachment ...is doing something that the javascript childWindow=window.open( 'AttachmentAction.do?attachment_id='+id, name, 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=790,height=600'); ...isn't doing. And that is why it works and the js does not. ? ANYONE KNOW WHAT THE DIFFERENCE IS? -Eric Eric Lemle wrote: Can anyone tell me why this a href=/physrcrtadmin/AttachmentAction.do?amp;attachment_id=341 target=ResumeAttachmentVeselovaNataliaECV.doc/a works perfectly. But this. function printAttachment( id, name ) { childWindow.focus(); } which is called with... if(document.forms[0].printCV.checked==true || document.forms[0].printAllAttachments.checked==true) { printAttachment( '341', 'printCV'); } throws an error messages saying it can find the file. ? Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- 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]
??? action returning multiple attachments?
Is there a way I can have an action return more than one action forward, meaning some are going to be attachments and then the normal forward is returned like usual? Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RESOLVED FYI Re: ??? action returning multiple attachments?
THIS was SOLVED by adding an onclick to a submit button that called a javascript method that then called an action via window.open which returned the attachment then called it again and again for however many attachments were to be sent. Then after the javascript was done the normal submit action was executed. he he he! :) Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 3/1/2005 10:52:39 AM An Action can only return one ActionForward, because there is only one response. Theoretically, you could return a response with a content type of multipart/mixed, but I doubt many browsers would know what to do with that. I guess I've never tried it; maybe they take that into account. Would it be easier to return a single page with links to each of the materials which might otherwise be sent as an attachment? As Erik pointed out, the idea of attachments is not a natural fit for an HTTP response. Joe At 12:28 PM -0500 3/1/05, Erik Weber wrote: Could it be accomplished by a single ActionForward with a path that specifies the attachments in a query string? Sorry, I don't exactly know what you mean by attachments. Erik Eric Lemle wrote: Is there a way I can have an action return more than one action forward, meaning some are going to be attachments and then the normal forward is returned like usual? Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- 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] -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Narrow minds are weapons made for mass destruction -The Ex - 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]
One last ATTACHMENT issue
Can anyone tell me why this a href=/physrcrtadmin/AttachmentAction.do?amp;attachment_id=341 target=ResumeAttachmentVeselovaNataliaECV.doc/a ...works perfectly. But this. function printAttachment( id, name ) { childWindow=window.open( 'AttachmentAction.do?attachment_id='+id, name, 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=790,height=600'); childWindow.focus(); } which is called with... if(document.forms[0].printCV.checked==true || document.forms[0].printAllAttachments.checked==true) { printAttachment( '341', 'printCV'); } ...throws an error messages saying it can find the file. ? Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JAVASCRIPT: Object expected
FYI FOR ALL OF YOU WHO TRIED TO HELP WITH THIS ERROR YESTERDAY. THE PROBLEM HAS BEEN RESOLVED.. INVALID-NON WORKING script language=JavaScript src=/includes/calendar.js / VALID-WORKING script language=JavaScript src=/includes/calendar.js /script boy did this _iss me off. thanks, Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/22/2005 1:23:46 PM Eric, No javascript guru here, but... 1) Are you sure that this function is there? (check page source) yes at the top 2) Is this function declared at the very bottom and it's a huge and slow loading page and you are clicking that button *before* the page is completely loaded? I wait till page is loaded and have same problem 3) Is the word javascript really needed when it's inside onClick attribute? What would happen if you removed it and just left it as onClick='showlReport(81)'? I thought the same thing, so I removed the javascript: but still have same problem. thanks though!!! -- Take care, NG On Tue, 22 Feb 2005 13:09:10 -0700, Eric Lemle [EMAIL PROTECTED] wrote: Yes, already did that, and it does not even get to the function. It seems to think the function is not there but it actually is. ??? Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/22/2005 12:45:28 PM Those types of errors are always a pain to debug (although I hear tell Firefox is rather good for such things... I wouldn't know, I'm a Maxthon user myself). If you are like me though and tend towards the manual debugging approach... I'd start by throwing an alert(1); at the start of your showIReport() function. See if your getting there or not. That will narrow down the location of the problem by half :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Tue, February 22, 2005 2:40 pm, Eric Lemle said: I have an error on this line and it use to work... input name=Ireport1 value=Itinerary Report type=button onClick='javascript:showIReport(81);' the method is in the view source file function showIReport( id ) { childWindow=window.open( 'SiteVisitAction.do?dispatch=displayimode=Modifyreport=truesite_visit_id='+id, 'Itinerary_Report', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=800,height=800'); childWindow.focus(); } Please help. Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- 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]
JAVASCRIPT: Object expected
I have an error on this line and it use to work... input name=Ireport1 value=Itinerary Report type=button onClick='javascript:showIReport(81);' the method is in the view source file function showIReport( id ) { childWindow=window.open( 'SiteVisitAction.do?dispatch=displayimode=Modifyreport=truesite_visit_id='+id, 'Itinerary_Report', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=800,height=800'); childWindow.focus(); } Please help. Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JAVASCRIPT: Object expected
Yes, already did that, and it does not even get to the function. It seems to think the function is not there but it actually is. ??? Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/22/2005 12:45:28 PM Those types of errors are always a pain to debug (although I hear tell Firefox is rather good for such things... I wouldn't know, I'm a Maxthon user myself). If you are like me though and tend towards the manual debugging approach... I'd start by throwing an alert(1); at the start of your showIReport() function. See if your getting there or not. That will narrow down the location of the problem by half :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Tue, February 22, 2005 2:40 pm, Eric Lemle said: I have an error on this line and it use to work... input name=Ireport1 value=Itinerary Report type=button onClick='javascript:showIReport(81);' the method is in the view source file function showIReport( id ) { childWindow=window.open( 'SiteVisitAction.do?dispatch=displayimode=Modifyreport=truesite_visit_id='+id, 'Itinerary_Report', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=800,height=800'); childWindow.focus(); } Please help. Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- 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: JAVASCRIPT: Object expected
Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/22/2005 1:23:46 PM Eric, No javascript guru here, but... 1) Are you sure that this function is there? (check page source) yes at the top 2) Is this function declared at the very bottom and it's a huge and slow loading page and you are clicking that button *before* the page is completely loaded? I wait till page is loaded and have same problem 3) Is the word javascript really needed when it's inside onClick attribute? What would happen if you removed it and just left it as onClick='showlReport(81)'? I thought the same thing, so I removed the javascript: but still have same problem. thanks though!!! -- Take care, NG On Tue, 22 Feb 2005 13:09:10 -0700, Eric Lemle [EMAIL PROTECTED] wrote: Yes, already did that, and it does not even get to the function. It seems to think the function is not there but it actually is. ??? Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/22/2005 12:45:28 PM Those types of errors are always a pain to debug (although I hear tell Firefox is rather good for such things... I wouldn't know, I'm a Maxthon user myself). If you are like me though and tend towards the manual debugging approach... I'd start by throwing an alert(1); at the start of your showIReport() function. See if your getting there or not. That will narrow down the location of the problem by half :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Tue, February 22, 2005 2:40 pm, Eric Lemle said: I have an error on this line and it use to work... input name=Ireport1 value=Itinerary Report type=button onClick='javascript:showIReport(81);' the method is in the view source file function showIReport( id ) { childWindow=window.open( 'SiteVisitAction.do?dispatch=displayimode=Modifyreport=truesite_visit_id='+id, 'Itinerary_Report', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=800,height=800'); childWindow.focus(); } Please help. Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- 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]
STRUTS PROJECT
When downloading a file how do you get the users (client) computer to use the print command/option instead of the open command/option. (Maybe the the same way you get a desktop shortcut to print instead of open when its double clicked on.) relevant code... private void downloadFile(String attachmentId, HttpServletResponse response) { Attachment attachment=Attachment.retrieve(attachmentId); try{ BufferedOutputStream bos=new BufferedOutputStream(response.getOutputStream()); response.setContentType(attachment.getMime_type_txt()); response.addHeader(Content-Disposition, attachment; filename=+attachment.getFile_nm()); //maybe something here bos.flush(); bos.write(attachment.getFile_contents_bin()); bos.close(); } catch(Exception e) { e.printStackTrace(); } } Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DynaActionForms Question
It's a map, you have to call get(name); Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/22/2005 1:38:02 PM Hello, I have a question about using DynaActionForm objects. I would like to use DynaActionForm class to keep maintenance simpler. But I do not know how to get the form values out in the action class? I have the following bean set up. form-beans form-bean name=loginbean type=org.apache.struts.action.DynaActionForm form-property name=name type=java.lang.String initial=Titan / /form-bean /form-beans Now in the action class when I am working in the execute() method how do I get the data back from the bean? I tried the following public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, UserContainer userContainer) throws Exception { //MenuObject menu = new MenuObject(); System.out.println((String)form.getName()); and of course it will not compile, because it doesn't recognize any methods in the form. Can you not get data back from a dynaform like you can a normal bean? Thanks Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: out of memory FormFile problems after migrating to Struts 1.2.4
I gave you a snippet below that works for me, might help ya. Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/22/2005 1:37:34 PM Hi, Is there anybody with out of memory problems using FormFile in Struts 1.2.4? I've just migrated from 1.1 and I didn't change anything related to file attachment logic. But the actions that use html:form tag-lib with enctype=multipart/... and file attachment logic are now taking about 40MB of RAM off in each request...after two or three clicks the garbage works or I receive out of memory. Is there any changes in the Struts FormFile approach after 1.1? Thanks in advance! Paulo Alvim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] public ActionForward process(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { FormFile formFile; byte[] contents; try { formFile=(FormFile)myForm.get(attachment+tag); // -- The preferred method - contents=new byte[formFile.getFileSize()]; BufferedInputStream bis=new BufferedInputStream(formFile.getInputStream()); int length=bis.read(contents,0,formFile.getFileSize()); bis.close(); if (length==contents.length contents != null formFile.getFileSize() 0) { myForm.set(file_nm+tag, formFile.getFileName()); myForm.set(mime_type_txt+tag, formFile.getContentType()); myForm.set(file_contents_bin+tag, contents); } formFile.destroy(); } catch (Exception e) { e.printStackTrace(); } finally { } return mapping.findForward(login); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles - a reality check (contains many details) - Am I using this thing right?
Did you create a template.jsp that inserts the header, footer, nav, and main tile? Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/22/2005 1:50:34 PM Hi all I'm slowly figuring out the basics of Tiles, and I feel like its a good solution for my application. I want to make sure before I get to far that I'm thinking about things the right way. I have 1. a login page with a header, body and footer 2. Application itself which will contain a Header, Navigation, Body and Footer (same Header, and Footer as the login page). I have created the following directory structure ans JSP layout under my brand new shiny Struts 1.1 web application under the WebRoot Directory \WebRoot \WebRoot\WEB-INF \WebRoot\WEB-INF\tiles-defs.xml (listed below) \WebRoot\jsp \WebRoot\jsp\images \WebRoot\jsp\layouts \WebRoot\jsp\layouts\loginLayout.jsp \WebRoot\jsp\layouts\siteLayout.jsp \WebRoot\jsp\tiles \WebRoot\jsp\tiles\header.jsp (not full html page) \WebRoot\jsp\tiles\footer.jsp \WebRoot\jsp\tiles\navigation.jsp \WebRoot\jsp\loginBody.jsp \WebRoot\jsp\appPageBody.jsp Explanation: \layouts contains my JSP Layouts for the different parts of the app \tiles contains my reusable areas in the app (not complete html pages) \jsp contains the different body jsp files My question is : Is this a typical way to arrange a generic Tiles application? the problem come in when I try to use definition inheritance in the tiles-defs.xml file. See how in the tiles-defs.xml I have page.AppStart inheriting from base.definition, but it's using a DIFFERENT page as a template because the LOGIN page doesnt need navigation and th application page does... tiles-defs.xml tiles-definitions !-- Base Tiles Definition -- definition name=base.definition path=/jsp/layouts/loginLayout.jsp put name=header value=/jsp/tiles/header.jsp / put name=footer value=/jsp/tiles/footer.jsp / /definition !-- Tiles Definition of login page -- definition name=page.login extends=base.definition put name=title value=Login Page / put name=body value=/jsp/loginBody.jsp / /definition !-- Tiles definition of mail application page-- definition name=page.appStart extends=base.definition path=/jsp/layouts/siteLayout.jsp put name=title value=Application Title / put name=nav value=/jsp/navigation.jsp / put name=body value=/jsp/appStartBody.jsp / /definition /tiles-definitions -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: STRUTS PROJECT
Automatically print via windows using the print command that gets sent to the opening program. So, hence I want to open it but the send print to the program that opened it. I know there is a way to do this with a shortcut, but I was back in win 95 and I can't seem to get it to do it again. Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/22/2005 2:35:30 PM Do you mean you want the file to automatically print, or display the print dialog? If so, I don't believe that's possible. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com Eric Lemle wrote: When downloading a file how do you get the users (client) computer to use the print command/option instead of the open command/option. (Maybe the the same way you get a desktop shortcut to print instead of open when its double clicked on.) relevant code... private void downloadFile(String attachmentId, HttpServletResponse response) { Attachment attachment=Attachment.retrieve(attachmentId); try{ BufferedOutputStream bos=new BufferedOutputStream(response.getOutputStream()); response.setContentType(attachment.getMime_type_txt()); response.addHeader(Content-Disposition, attachment; filename=+attachment.getFile_nm()); //maybe something here bos.flush(); bos.write(attachment.getFile_contents_bin()); bos.close(); } catch(Exception e) { e.printStackTrace(); } } Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- 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: JSP only page flow
sure you just forward to a .jsp or an Action. Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/22/2005 4:15:43 PM Hi, I want to follow the Struts model and have all my page flow be in struts-config. However, I have a couple of JSP-only pages that forward to each other. Is there a way to set this flow up? A - B-C. An example I have is of a search page - results - edit individual result. I thought of setting a hidden field in each page that could get used as the 'forward' attribute in the form, but that would leave those values in the JSP page, not struts-config. - Nic. - 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: JSP only page flow
return mapping.findForward(myPage); //from struts-config.xml aka global forwards. or if you are doing dynamic forwards then... return new ActionForward(request.getParameter(forwardPage)); return new ActionForward(request.getParameter(forwardAction)); or in the session return new ActionForward(request.getSession().getAttribute(forwardPage)); does that help? Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/22/2005 4:34:47 PM Which part are you agreeing with? Setting the hidden field to be 'pageB.jsp' and having the Action return (mapping.findForward(request.getParameter(page))? - This wouldn' put all the page flow in one file though. Eric Lemle wrote: sure you just forward to a .jsp or an Action. Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/22/2005 4:15:43 PM Hi, I want to follow the Struts model and have all my page flow be in struts-config. However, I have a couple of JSP-only pages that forward to each other. Is there a way to set this flow up? A - B-C. An example I have is of a search page - results - edit individual result. I thought of setting a hidden field in each page that could get used as the 'forward' attribute in the form, but that would leave those values in the JSP page, not struts-config. - Nic. - 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]
??? Please help with including two action results
Joe: Well, I implemented this entire concept without the parameters and using the MappingDispatchAction too. And , after all that I am ending up with the same dam problem. It is only showing one of the tiles:include when more than one should show up. This was the original problem when using jsp:include here is a snippet logic:present name=basicInfoPDF tabletrtd a name=Basic Info/a tiles:insert page=/BasicInfoReport.do flush=false / pd4ml:page.break//td/tr/table /logic:present logic:present name=interestsPDF tabletrtd a name=Interests/a tiles:insert page=/InterestsReport.do flush=false / pd4ml:page.break//td/tr/table /logic:present logic:present name=referencesPDF tabletrtd a name=References/a tiles:insert page=/ReferencesReport.do flush=false / pd4ml:page.break//td/tr/table /logic:present .. Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] Joe Germuska [EMAIL PROTECTED] 2/17/2005 3:46:56 PM At 10:30 PM + 2/17/05, Eric Lemle wrote: Tried tiles:insert page=/InterestsAction.do?dispatch=display flush=false / but nothing shows up. Is this what you meant? So if I get the latest struts.. this might work? You definitely can't pass parameters through a tiles:insert call; the end result of the insert tag is a call to requestDispatcher.include(...), which doesn't accept parameters. If you need something like this, you should use the MappingDispatchAction, which allows you to use the Struts Config to specify a dispatch method instead of passing it as a request parameter. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Narrow minds are weapons made for mass destruction -The Ex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ??? Please help with including two action results STUPID!!!
STUPID the flush=false was breaking it. What the heck does that property do, except make you wonder whether it should be true or false or not there at all? It works when it is not there at all. -Eric Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/18/2005 3:08:17 PM Joe: Well, I implemented this entire concept without the parameters and using the MappingDispatchAction too. And , after all that I am ending up with the same dam problem. It is only showing one of the tiles:include when more than one should show up. This was the original problem when using jsp:include here is a snippet logic:present name=basicInfoPDF tabletrtd a name=Basic Info/a tiles:insert page=/BasicInfoReport.do flush=false / pd4ml:page.break//td/tr/table /logic:present logic:present name=interestsPDF tabletrtd a name=Interests/a tiles:insert page=/InterestsReport.do flush=false / pd4ml:page.break//td/tr/table /logic:present logic:present name=referencesPDF tabletrtd a name=References/a tiles:insert page=/ReferencesReport.do flush=false / pd4ml:page.break//td/tr/table /logic:present .. Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] Joe Germuska [EMAIL PROTECTED] 2/17/2005 3:46:56 PM At 10:30 PM + 2/17/05, Eric Lemle wrote: Tried tiles:insert page=/InterestsAction.do?dispatch=display flush=false / but nothing shows up. Is this what you meant? So if I get the latest struts.. this might work? You definitely can't pass parameters through a tiles:insert call; the end result of the insert tag is a call to requestDispatcher.include(...), which doesn't accept parameters. If you need something like this, you should use the MappingDispatchAction, which allows you to use the Struts Config to specify a dispatch method instead of passing it as a request parameter. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Narrow minds are weapons made for mass destruction -The Ex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
? html:rewrite
html: rewrite definition is ... Renders a URI What exactly does this do? Is it similar to jsp:include ? -Eric Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
??? Re: I have a jsp. that has two included jsp's, only one shows up.
Tried tiles:insert page=/InterestsAction.do?dispatch=display flush=false / but nothing shows up. Is this what you meant? So if I get the latest struts.. this might work? -Eric Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/8/2005 2:20:29 PM At 2:15 PM -0700 2/8/05, Eric Lemle wrote: So how does one get the final HTML from two Actions into the same page? I am pretty sure that Tiles will do includes instead of forwards where necessary so that you can use actions as the source of tiles:insert components. I've never had to use it, but someone recently pointed out a bug in the chain version of TilesPreProcess which was causing this to break. Joe Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/3/2005 5:28:09 PM Sort of. Remember, the normal result of a Struts action is the equivalent of RequestDispatcher.forward(). So, I imagine you're also seeing an IllegalStateException as well. You've got the equivalent of the following: includer.jsp: - @% page contentType=text/plain % Before forwarder1: jsp:include page=forwarder1.jsp/ After forwarder1: Before forwarder2: jsp:include page=forwarder2.jsp/ After forwarder2: forwarder1.jsp: --- jsp:forward page=content1.jsp/ forwarder2.jsp: --- jsp:forward page=content2.jsp/ content1.jsp: - content1.jsp content2.jsp: - content2.jsp Which should generate: content1.jsp Along with raising an IllegalStateException. Eric Lemle wrote: I have a jsp. that has two included jsp's that are actually struts actions but the response only returns the first one. I have tried flush=false (Doesn't matter) I have tried the jsp:param's for the parameters (Doesn't matter) Is there something in the framework that is preventing this? tabletrtd jsp:include page=/EventsAction.do?dispatch=display flush=true / /td/tr/table tabletrtd jsp:include page=/RelocationAction.do?dispatch=display flush=true / /td/tr/table Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.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] -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Narrow minds are weapons made for mass destruction -The Ex - 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]
STRUTS popup action jsp not finding path as normal
I have several jsp's in the same folder. They all have... script language=JavaScript src=../includes/calendar.js/script at the top. but when one is used in a popup via window.open action it does not find the .js. I tried other paths and none work. Where is struts going in this situation as far as a home path? -Eric Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: String from the Resource Bundle into HTML:SUBMIT value atttibute???
html:submit property=savebean:message key=global.button.save //html:submit Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/16/2005 11:23:51 AM Hi, I'm new to the servlets/jsp/struts world so I have a question which might seem trivial for most of you. I want to set the value attribute of the HTML:SUBMIT/ and HTML:RESET/ tags by taking the string from the resource bundle. I'm developing an English/Greek web site with 2 .properties files so in sake of elegancy and uniformity (?) I want to continue getting ALL the content from these 2 files. Although I found altKey and titleKey attributes, I don't seem to find any valueKey which would do the work. I forged some code that works but it seems a bit jackleg-ish (?) Here is a simplyfied fragment of it (omitted all null checkings): ... %@ page import=org.apache.struts.util.PropertyMessageResources % ... html:form action=/search.do table ... % PropertyMessageResources pmr = (PropertyMessageResources) application.getAttribute(org.apache.struts.action.MESSAGE); String resetTag = pmr.getMessage(request.getLocale() ,button.search.resettag); String submitTag = pmr.getMessage(request.getLocale() ,button.search.submittag); % tr tdhtml:reset value=%= resetTag %//td tdhtml:submit value=%= submitTag %//td /tr /table /html:form ... I guess I can tidy up a bit and have something like: html:reset value=%= ButtonTags.getMessage(button.search.resettag) %/ or maybe (not tested yet): bean:define id=resetButtomTag bean:message key=button.search.resettag/ /bean:define html:reset value=%= resetButtomTag % / but before I do that I would like to ask if there's something already available. Thnx, Kostas - 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: String from the Resource Bundle into HTML:SUBMIT value atttibute???
Try in your action... MessageResources mr=(MessageResources)request.getAttribute(org.apache.struts.action.MESSAGE); request.setAttribute(submitTag , mr.getMessage(submitTag ) ); //put it in the request or session or in your form bean the in the JSP... (maybe) bean:define id=submitTag name=myFormBean property=submitTag / //bean version html:submit property='%= +submitTag %' submit/html:submit -Eric Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/16/2005 11:23:51 AM Hi, I'm new to the servlets/jsp/struts world so I have a question which might seem trivial for most of you. I want to set the value attribute of the HTML:SUBMIT/ and HTML:RESET/ tags by taking the string from the resource bundle. I'm developing an English/Greek web site with 2 .properties files so in sake of elegancy and uniformity (?) I want to continue getting ALL the content from these 2 files. Although I found altKey and titleKey attributes, I don't seem to find any valueKey which would do the work. I forged some code that works but it seems a bit jackleg-ish (?) Here is a simplyfied fragment of it (omitted all null checkings): ... %@ page import=org.apache.struts.util.PropertyMessageResources % ... html:form action=/search.do table ... % PropertyMessageResources pmr = (PropertyMessageResources) application.getAttribute(org.apache.struts.action.MESSAGE); String resetTag = pmr.getMessage(request.getLocale() ,button.search.resettag); String submitTag = pmr.getMessage(request.getLocale() ,button.search.submittag); % tr tdhtml:reset value=%= resetTag %//td tdhtml:submit value=%= submitTag %//td /tr /table /html:form ... I guess I can tidy up a bit and have something like: html:reset value=%= ButtonTags.getMessage(button.search.resettag) %/ or maybe (not tested yet): bean:define id=resetButtomTag bean:message key=button.search.resettag/ /bean:define html:reset value=%= resetButtomTag % / but before I do that I would like to ask if there's something already available. Thnx, Kostas - 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]
? with invalid session
If the session expires and then they click on something it runs the action and then the action tries to get some info from the session which causes a null pointer exception. Is there anyway to have a pre-filter rather than a post-filter to send them to the page that says, says ex.- 'your session has expired, please login again' -Eric Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to integrate struts project with hibernate?
I would say,... the LabelValueBean is just a data structure that could be in java.util, so you could just put that class in your ejb layer if you want. Marrying is relative, aren't we all married to java.util anyway. If you always have web clients it will be helpful and if not I don't think it will hurt or require other struts classes. You could use the LabelValueBean in Swing also. Most Bean utils may fall into this category too. I did a j2ee app a few years back and had to basically write my own LabelValueBean, now I would just steal the struts one! Am I wrong? Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/16/2005 2:45:25 PM IMO, it is not wise to have your DAO return a list of LabelValueBean objects. I would be more likely to use a Map or a simple bean to do that instead of marrying your DAO layer to Struts. Larry On Wed, 16 Feb 2005 13:17:12 -0800 (PST), Carl Smith [EMAIL PROTECTED] wrote: We are using struts framework in our J2EE web application. In struts there is a LabelValueBean class, is it a good practice to use LabelValueBean in our application? For example, DAO returns a list of LabelValueBean for html drop down? There was an argument saying that it is not good to use LabelValueBean since some time later if we are not using the struts framework, we need to take the labelValueBean out. Thanks. - Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term' - 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: bean:include
Well, what I need is the results of complete actions, the final HTML and I want to include a few of those in a report page. So tiles is not really the solution because you only get one action again. -Eric Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/15/2005 12:34:59 PM From: wo shi ni baba [EMAIL PROTECTED] so essentially there's no replacement of jsp:include in struts, right? I suppose you could use Tiles to do the same thing as a jsp:include, but if all you need is a simple include, Tiles is overkill. -- Wendy Smoak - 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: AW: formbean with List field
In the jsp you can iterate your list and give unique identifier to each one maybe via the index. In the form bean you would have each of the unique names available. May want to use the LazyDynaBean. -Eric Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/15/2005 3:13:04 PM Hello struts users! I still have this issue... can anyone help me with this? -- I'm wondering if I can have a formbean containing a List of Strings. Is that recognized by Struts correctly? I need that for a shopping cart implementation, where the user can modify the amount of the articles in the shopping cart. For each article should be a text field for entering a number. So I think I need here a List of Strings in the form bean, right? How does the implementaion look like in the form bean? - 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]
Fwd: br issue
Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] Eric Lemle 2/15/2005 5:10:00 PM STRUTS project. OK I have some normal text that was originally retrieved from a html:textarea then saved into a database. I now try to display this text via a bean:write tag in a JSP. The returns (newlines) do not show up. I tried to replace them all in the action before the jsp is executed with br but 'br' is showing up now. How do I get the page to (show) execute newlines. To make it more confusing I never actually have a page because this runs thru a complex PDF filter. So don't ask me to view the source. Hope this made sense. -Eric Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to pass variable from servlet to jsp?
from Mailing LIST recipient *** If you people are going to argue, please send it to each other, some of us are glad its Friday and don't give two hoots about a scriplet debate. ** Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/11/2005 10:43:11 AM On Fri, 11 Feb 2005 12:24:33 -0500 (EST), [EMAIL PROTECTED] wrote: Yes Larry, I got that you think it's *CRAZY* *BAD* advice after the THIRD eMail came through to me. Hmm, I only sent it twice (once for each of the emails I got from you). Odd. It wasn't advice first of all, it was one possible alternative. Should we hide ways of doing things from people simply because we don't believe they are the best approach, or even because they are generally regarded as bad ideas? I'd hope you would say we shouldn't. OK, it was an alternative, but he also could just open his page with %, end it with %, and use response.write() to send output. That too would be an alternative, but I think every reputable JSP developer would say it is not really a good way to develop web applications. Your adamant response indicates closed-mindedness, which is never a good thing. I absolutely have no problem with you saying that most people would say that scriplets aren't the way to go. *I* would agree with that, and I am not a fan of taglibs. Still, I certainly see the argument for avoiding scriplets and I agree with it. Adamant? Umm, OK, I guess I must have mis-worded my email. I do not think I said never user scriptlets. What I was trying to say was that they are *not* the first choice of *any* web developer I know, and IMO, should not be the *first* thing suggested to a new JSP developer. And wouldn't you agree that a thorough understanding of all the alternatives will allow a person to make a better decision for themselves? Instead of simply saying something is a bad approach, isn't it better to show all the paths one could take and have them ON THEIR OWN come to the conclusion that one path is probably better than the other? I would argue that simply declaring one way to be bad without giving someone the knowledge about it so they can SEE FOR THEMSELVES why it's bad is WORSE than them using that option. So, should we allow people to poke their eyes out to learn that it is a bad idea? Sometimes, I think it is our responsibility to provide guidance to new developers. Besides all that, declaring it to be bad to NEVER use a tool is limiting and ultimately worse in my book. There may indeed be cases where scriplets are a better choice than taglibs, and it would be foolish in my opinion to disount the option out-of-hand. I partially agree. There are cases where scriptlets are required (I cannot think of one right now, but I am sure they exist). I do *not* agree that it is foolish to disount the option..it is a bad idea unless absolutely required (which in the examples provided, it clearly was not). No personal offense taken by the way, but I do think the closed-mindedness of your premise is kind of offensive on a technical level, if you can see the distinction :) Heheh, I am glad I did not offend you. Larry - 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: argument to struts config forward mapping
You can use the dispatch= for one argument but the others you must find a different way Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/11/2005 2:58:28 PM Does 1.2.4 support the following? action path=/processSimple ... forward name=success path=/jsp/simple/SimpleResults.jsp?id={0} redirect=true / /action How would pass the argument in Action? Thanks. -Betty - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: argument to struts config forward mapping
parameter=dispatch Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/11/2005 2:58:28 PM Does 1.2.4 support the following? action path=/processSimple ... forward name=success path=/jsp/simple/SimpleResults.jsp?id={0} redirect=true / /action How would pass the argument in Action? Thanks. -Betty - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: argument to struts config forward mapping
The other guys advice was great for your issue, the parameter= is in the struts-config.xml action definition and used for running a particular method in your action class, then in that method you can put parameters via the request.setParameter( hope this helps. action path=/MyAction type=com.me.my.actions.MyAction name=myForm input=/my.jsp scope=request parameter=dispatch validate=true forward name=refresh path=/MyAction.do?dispatch=list/ /action Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/11/2005 3:07:56 PM Hi Eric, I am a little confused. I have been using this for a while. But with another fw layer on top which allows passing up to 4 args. Are you telling me that struts never support this syntax in struts config since 1.1? Where would I put parameter=dispatch? -Betty -Original Message- From: Eric Lemle [mailto:[EMAIL PROTECTED] Sent: Friday, February 11, 2005 2:02 PM To: user@struts.apache.org Subject: Re: argument to struts config forward mapping parameter=dispatch Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/11/2005 2:58:28 PM Does 1.2.4 support the following? action path=/processSimple ... forward name=success path=/jsp/simple/SimpleResults.jsp?id={0} redirect=true / /action How would pass the argument in Action? Thanks. -Betty - 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: SessionState vs. request state.
Use the bean:write tag, and you could use tiles and put it in your template. Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/9/2005 3:47:19 PM Hi, I'm planning my approach to a data driven app that I have to write in the near future. I've used struts before in more of a demo-type, proof of concept scenarios, and am no where near and expert, but now need to build a production level system. For a web app that needed to display a username on every screen I was previously doing it like this: HttpSession zCurrentSession = request.getSession(false); if (zCurrentSession == null){ zCurrentSession = request.getSession(true); } try { zUserInfoBn = zUserData.getUserInfo(sEmailAddress); zUserInfoBn.setIsLoggedIn(true); }catch (ApplicationException zAppEx){ throw zAppEx; //stubbed out not complete } zCurrentSession.setAttribute(sUSERINFO_BN, zUserInfoBn); So I'm hoping I can get some opinions on how to display things like user information on the screens in an intelligent way. I'm not sure where the trade offs are between hitting the DB every time and storing at the request level, using cookies, or storing it some other way. Any ideas would be helpful. I'm in the rare position of being able to take my time and think out the approach and would love input from people who've got more experience than me. My env is linux, tomcat 5.0.28, latest jdk, struts, separate box running db (sql server 2000 w/ stored procs) on a 2.8ghz xeon box with 1 gig mem. To start the app shouldnt get more than 50,000 page views a month. Thanks -Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I have a jsp. that has two included jsp's that are actually struts actions but the response only
So how does one get the final HTML from two Actions into the same page? Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/3/2005 5:28:09 PM Sort of. Remember, the normal result of a Struts action is the equivalent of RequestDispatcher.forward(). So, I imagine you're also seeing an IllegalStateException as well. You've got the equivalent of the following: includer.jsp: - @% page contentType=text/plain % Before forwarder1: jsp:include page=forwarder1.jsp/ After forwarder1: Before forwarder2: jsp:include page=forwarder2.jsp/ After forwarder2: forwarder1.jsp: --- jsp:forward page=content1.jsp/ forwarder2.jsp: --- jsp:forward page=content2.jsp/ content1.jsp: - content1.jsp content2.jsp: - content2.jsp Which should generate: content1.jsp Along with raising an IllegalStateException. Eric Lemle wrote: I have a jsp. that has two included jsp's that are actually struts actions but the response only returns the first one. I have tried flush=false (Doesn't matter) I have tried the jsp:param's for the parameters (Doesn't matter) Is there something in the framework that is preventing this? tabletrtd jsp:include page=/EventsAction.do?dispatch=display flush=true / /td/tr/table tabletrtd jsp:include page=/RelocationAction.do?dispatch=display flush=true / /td/tr/table Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.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]
I have a jsp. that has two included jsp's that are actually struts actions but the response only ret
I have a jsp. that has two included jsp's that are actually struts actions but the response only returns the first one. I have tried flush=false (Doesn't matter) I have tried the jsp:param's for the parameters (Doesn't matter) Is there something in the framework that is preventing this? tabletrtd jsp:include page=/EventsAction.do?dispatch=display flush=true / /td/tr/table tabletrtd jsp:include page=/RelocationAction.do?dispatch=display flush=true / /td/tr/table Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wizard form and checkboxes that won't turn off
this might help, in your action not sure if this is in 1.1 either. ActionForward cleanDisplay= new ActionForward(add your code here); cleanDisplay.setRedirect(true); return cleanDisplay; Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] 2/3/2005 4:32:14 PM Could somebody please refer me to a solution to this? I have a form bean (session-scoped) that is displayed over 3 pages. There are back and next buttons. Once a checkbox is selected and the user has moved to another page, it can't be cleared again. I have read that this is because the checkbox item is now in the session and simply unchecking it does not remove it from the session. What I haven't found is a solution or workaround. I am using struts 1.1. Thanks very much in advance, J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]