logic:iterate and collections
I am putting a collection on the request as an attribute, and i can't access it for some reason. Maybe a few of you could shed some light on this problem: jsp logic:iterate collection=nestResults id=spgExtendedSearchForm /jsp console output javax.servlet.jsp.JspException: Cannot create iterator for this collection /console output nestResults is an ArrayList, and I have even tried using the .toArray() method on it with no success. When i cheat and put some code in the jsp to check the attributes, i see that it's present: ATTR: nestResults is [Ljava.lang.Object;@33934d Any idea what i need to do here? Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Accessing a variable inside logic:iterate
I am attempting to access a variable from an ActionForm that is nested in a logic:iterate tag, and I am getting this error: javax.servlet.jsp.JspException: Exception accessing property queueSelected for bean spgQueuesForm: java.lang.NoSuchMethodException: Unknown property 'queueSelected' I am using the same tag earlier in the page with no problems. Any Idea what restriction i may be overlooking? JSP logic:iterate id=spgQueuesForm name=spgQueuesForm property=queueDataSet logic:notEqual name=spgQueuesForm value=My Queue property=queueSelected input type=checkbox name=name.bean:write name=spgQueuesForm property=objid/ value=bean:write name=spgQueuesForm property=objid/ /logic:notEqual . . . TIA, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Retaining values through multiple actions
I am implementing a page by extending the DispatchAction class. I have a value that i pass on the request to the second method, which does some logic then forwards to the next jsp, but I can't retain the value on the request for the new jsp. I set it in the method using setAttribute, but when i enumerate the parameterNames, i see no params passed. What am i missing? TIA, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: Retaining values through multiple actions
I was under the impression that setting an attribute in a request would make it a parameter in a new page. Am I wrong? ---Original Message--- From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Sent: 02/27/03 09:17 AM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Retaining values through multiple actions Are you confusing attributes and parameters? -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 8:12 AM To: Struts Users Mailing List Subject: Retaining values through multiple actions I am implementing a page by extending the DispatchAction class. I have a value that i pass on the request to the second method, which does some logic then forwards to the next jsp, but I can't retain the value on the request for the new jsp. I set it in the method using setAttribute, but when i enumerate the parameterNames, i see no params passed. What am i missing? TIA, Jason - 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: Retaining values through multiple actions
I am not seeing a setParameter(string, object) method in HttpServletRequest, which is why thought setting it as an Attribute was the way to go... maybe it's too early, or I am just having an elder moment... where's setParameter? ---Original Message--- From: Becky Norum [EMAIL PROTECTED] Sent: 02/27/03 10:17 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: RE: Retaining values through multiple actions Attributes and parameters are distinct. Parameters are appended to the end of a request. They can only be strings. Attributes are stored in a ServletContext. Attributes can be any kind of object. If you use setParameter to store, you must use getParameter to retrieve. If you use setAttribute to store, you must use getAttribute to retrieve. To see your attribute, enumerate the attributes. -- Becky Norum Database Administrator Center for Subsurface Sensing and Imaging Systems (CenSSIS) Northeastern University a target=_blank href=http://www.censsis.neu.edu;http://www.censsis.neu.edu/a On Thu, 2003-02-27 at 09:25, Jason Vinson wrote: I was under the impression that setting an attribute in a request would make it a parameter in a new page. Am I wrong? ---Original Message--- From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Sent: 02/27/03 09:17 AM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Retaining values through multiple actions Are you confusing attributes and parameters? -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 8:12 AM To: Struts Users Mailing List Subject: Retaining values through multiple actions I am implementing a page by extending the DispatchAction class. I have a value that i pass on the request to the second method, which does some logic then forwards to the next jsp, but I can't retain the value on the request for the new jsp. I set it in the method using setAttribute, but when i enumerate the parameterNames, i see no params passed. What am i missing? TIA, Jason - 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]
Re: Re: Retaining values through multiple actions
hrmm is there way to append parameters on an action mapping from struts-config.xml? ---Original Message--- From: Ruud Steeghs [EMAIL PROTECTED] Sent: 02/27/03 10:27 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Retaining values through multiple actions setParameter does not exist... parameters are retrieved from your form. if you generate links you can add parameters by writing a url like myURL?par1=value1par2=val2 --- Jason Vinson [EMAIL PROTECTED] wrote: I am not seeing a setParameter(string, object) method in HttpServletRequest, which is why thought setting it as an Attribute was the way to go... maybe it's too early, or I am just having an elder moment... where's setParameter? ---Original Message--- From: Becky Norum [EMAIL PROTECTED] Sent: 02/27/03 10:17 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: RE: Retaining values through multiple actions Attributes and parameters are distinct. Parameters are appended to the end of a request. They can only be strings. Attributes are stored in a ServletContext. Attributes can be any kind of object. If you use setParameter to store, you must use getParameter to retrieve. If you use setAttribute to store, you must use getAttribute to retrieve. To see your attribute, enumerate the attributes. -- Becky Norum Database Administrator Center for Subsurface Sensing and Imaging Systems (CenSSIS) Northeastern University a target=_blank href=http://www.censsis.neu.edu;http://www.censsis.neu.edu/a On Thu, 2003-02-27 at 09:25, Jason Vinson wrote: I was under the impression that setting an attribute in a request would make it a parameter in a new page. Am I wrong? ---Original Message--- From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Sent: 02/27/03 09:17 AM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Retaining values through multiple actions Are you confusing attributes and parameters? -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 8:12 AM To: Struts Users Mailing List Subject: Retaining values through multiple actions I am implementing a page by extending the DispatchAction class. I have a value that i pass on the request to the second method, which does some logic then forwards to the next jsp, but I can't retain the value on the request for the new jsp. I set it in the method using setAttribute, but when i enumerate the parameterNames, i see no params passed. What am i missing? TIA, Jason - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: Re: Retaining values through multiple actions
Aren't attributes in the Application Scope? I suppose i could immediately remove them in the next page... Any glaring issues with this logic? ---Original Message--- From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Sent: 02/27/03 10:54 AM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Re: Retaining values through multiple actions Would attributes not work for you in this case? -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 9:29 AM To: Struts Users Mailing List Subject: Re: Re: Retaining values through multiple actions hrmm is there way to append parameters on an action mapping from struts-config.xml? ---Original Message--- From: Ruud Steeghs [EMAIL PROTECTED] Sent: 02/27/03 10:27 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Retaining values through multiple actions setParameter does not exist... parameters are retrieved from your form. if you generate links you can add parameters by writing a url like myURL?par1=value1par2=val2 --- Jason Vinson [EMAIL PROTECTED] wrote: I am not seeing a setParameter(string, object) method in HttpServletRequest, which is why thought setting it as an Attribute was the way to go... maybe it's too early, or I am just having an elder moment... where's setParameter? ---Original Message--- From: Becky Norum [EMAIL PROTECTED] Sent: 02/27/03 10:17 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: RE: Retaining values through multiple actions Attributes and parameters are distinct. Parameters are appended to the end of a request. They can only be strings. Attributes are stored in a ServletContext. Attributes can be any kind of object. If you use setParameter to store, you must use getParameter to retrieve. If you use setAttribute to store, you must use getAttribute to retrieve. To see your attribute, enumerate the attributes. -- Becky Norum Database Administrator Center for Subsurface Sensing and Imaging Systems (CenSSIS) Northeastern University a target=_blank href=http://www.censsis.neu.edu;http://www.censsis.neu.edu/a On Thu, 2003-02-27 at 09:25, Jason Vinson wrote: I was under the impression that setting an attribute in a request would make it a parameter in a new page. Am I wrong? ---Original Message--- From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Sent: 02/27/03 09:17 AM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Retaining values through multiple actions Are you confusing attributes and parameters? -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 8:12 AM To: Struts Users Mailing List Subject: Retaining values through multiple actions I am implementing a page by extending the DispatchAction class. I have a value that i pass on the request to the second method, which does some logic then forwards to the next jsp, but I can't retain the value on the request for the new jsp. I set it in the method using setAttribute, but when i enumerate the parameterNames, i see no params passed. What am i missing? TIA, Jason - 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] - 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
Re: RE: Re: Retaining values through multiple actions
Aren't attributes in the Application Scope? I suppose i could immediately remove them in the next page... Any glaring issues with this logic? ---Original Message--- From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Sent: 02/27/03 10:54 AM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Re: Retaining values through multiple actions Would attributes not work for you in this case? -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 9:29 AM To: Struts Users Mailing List Subject: Re: Re: Retaining values through multiple actions hrmm is there way to append parameters on an action mapping from struts-config.xml? ---Original Message--- From: Ruud Steeghs [EMAIL PROTECTED] Sent: 02/27/03 10:27 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Retaining values through multiple actions setParameter does not exist... parameters are retrieved from your form. if you generate links you can add parameters by writing a url like myURL?par1=value1par2=val2 --- Jason Vinson [EMAIL PROTECTED] wrote: I am not seeing a setParameter(string, object) method in HttpServletRequest, which is why thought setting it as an Attribute was the way to go... maybe it's too early, or I am just having an elder moment... where's setParameter? ---Original Message--- From: Becky Norum [EMAIL PROTECTED] Sent: 02/27/03 10:17 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: RE: Retaining values through multiple actions Attributes and parameters are distinct. Parameters are appended to the end of a request. They can only be strings. Attributes are stored in a ServletContext. Attributes can be any kind of object. If you use setParameter to store, you must use getParameter to retrieve. If you use setAttribute to store, you must use getAttribute to retrieve. To see your attribute, enumerate the attributes. -- Becky Norum Database Administrator Center for Subsurface Sensing and Imaging Systems (CenSSIS) Northeastern University a target=_blank href=http://www.censsis.neu.edu;http://www.censsis.neu.edu/a On Thu, 2003-02-27 at 09:25, Jason Vinson wrote: I was under the impression that setting an attribute in a request would make it a parameter in a new page. Am I wrong? ---Original Message--- From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Sent: 02/27/03 09:17 AM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Retaining values through multiple actions Are you confusing attributes and parameters? -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 8:12 AM To: Struts Users Mailing List Subject: Retaining values through multiple actions I am implementing a page by extending the DispatchAction class. I have a value that i pass on the request to the second method, which does some logic then forwards to the next jsp, but I can't retain the value on the request for the new jsp. I set it in the method using setAttribute, but when i enumerate the parameterNames, i see no params passed. What am i missing? TIA, Jason - 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] - 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
Re: RE: Re: Retaining values through multiple actions
Aren't attributes in the Application Scope? I suppose i could immediately remove them in the next page... Any glaring issues with this logic? ---Original Message--- From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Sent: 02/27/03 10:54 AM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Re: Retaining values through multiple actions Would attributes not work for you in this case? -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 9:29 AM To: Struts Users Mailing List Subject: Re: Re: Retaining values through multiple actions hrmm is there way to append parameters on an action mapping from struts-config.xml? ---Original Message--- From: Ruud Steeghs [EMAIL PROTECTED] Sent: 02/27/03 10:27 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Retaining values through multiple actions setParameter does not exist... parameters are retrieved from your form. if you generate links you can add parameters by writing a url like myURL?par1=value1par2=val2 --- Jason Vinson [EMAIL PROTECTED] wrote: I am not seeing a setParameter(string, object) method in HttpServletRequest, which is why thought setting it as an Attribute was the way to go... maybe it's too early, or I am just having an elder moment... where's setParameter? ---Original Message--- From: Becky Norum [EMAIL PROTECTED] Sent: 02/27/03 10:17 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: RE: Retaining values through multiple actions Attributes and parameters are distinct. Parameters are appended to the end of a request. They can only be strings. Attributes are stored in a ServletContext. Attributes can be any kind of object. If you use setParameter to store, you must use getParameter to retrieve. If you use setAttribute to store, you must use getAttribute to retrieve. To see your attribute, enumerate the attributes. -- Becky Norum Database Administrator Center for Subsurface Sensing and Imaging Systems (CenSSIS) Northeastern University a target=_blank href=http://www.censsis.neu.edu;http://www.censsis.neu.edu/a On Thu, 2003-02-27 at 09:25, Jason Vinson wrote: I was under the impression that setting an attribute in a request would make it a parameter in a new page. Am I wrong? ---Original Message--- From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Sent: 02/27/03 09:17 AM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Retaining values through multiple actions Are you confusing attributes and parameters? -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 8:12 AM To: Struts Users Mailing List Subject: Retaining values through multiple actions I am implementing a page by extending the DispatchAction class. I have a value that i pass on the request to the second method, which does some logic then forwards to the next jsp, but I can't retain the value on the request for the new jsp. I set it in the method using setAttribute, but when i enumerate the parameterNames, i see no params passed. What am i missing? TIA, Jason - 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] - 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
Re: Retaining values through multiple actions
Perfectly clear. The hidden field got the job done. Thanks so much for the detailed explanation. Jason ---Original Message--- From: Becky Norum [EMAIL PROTECTED] Sent: 02/27/03 11:26 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Re: Retaining values through multiple actions Jason, I apologize for being unclear earlier. You can setParameter using a HttpResponse, but that's not what you want to do in this case. Let me give you an example of request scope and forms using some of my work. This should clear things up: INPUT FORM: create_folder.jsp has hidden field: id=87 ACTION CLASS: SaveMetadataAction HttpRequest has id=87 in its scope I also do: request.setAttribute(temp, test); forwards to recurse_action.action to generate a treeview. ACTION CLASS: RecursiveAction HttpRequest still has id=87 in its scope as well as temp=test and uses it to create the tree. To access id, I have to use request.getParameter(id) because it was submitted using a form, which sets things in parameters. To access temp, I have to use request.getAttribute(temp) because I set temp as an attribute. This class forwards to project_view.jsp for display where id is _still_ 87 (access as a parameter), and temp is _still_ test (access as an attribute) because all I've done all this time is forward the request along. Forwards _forward_ the request, so everything saved in request scope in the initial form should still be available. You don't need to append the parameters as such. Just put them in the appropriate request, and forward, and it should still be available. Does this make sense? -- Becky Norum Database Administrator Center for Subsurface Sensing and Imaging Systems (CenSSIS) Northeastern University a target=_blank href=http://www.censsis.neu.edu;http://www.censsis.neu.edu/a On Thu, 2003-02-27 at 10:29, Jason Vinson wrote: hrmm is there way to append parameters on an action mapping from struts-config.xml? - 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]
Security without the use of Servlet Filters
I asked a while back about implementing a security check for session data, and some people recommended using Filter Objects. My current project is working with the Servlet 2.2 spec, so I don't have the option of using Filters. Someone else mentioned overriding the Default Action that all my pages extend, which sounds like my best option at this time. Could anyone point me to an example of how to do this? TIA, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
security question #2
I am using the below code to check for the presence of session attributes for security. Are there any issues I may be overlooking by doing it this way? TIA, Jason // // Default spgAction class // package spg.logic; import com.clarify.cbo.*; import org.apache.struts.action.*; import org.apache.struts.actions.*; import javax.servlet.http.*; public class spgAction extends Action { public ActionForward execute (ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { HttpSession session = request.getSession(); Session ClfySession = (Session)session.getAttribute(ClfySession); com.clarify.cbo.FormContext ClfyFormContext_S = (com.clarify.cbo.FormContext) session.getAttribute(ClfyFormContext_S); if ( ClfySession == null || ClfyFormContext_S == null) { return(mapping.findForward(login)); } else return super.execute(mapping, form, request, response); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tripping over request variables again
For some reason, I am not catching on to the idea of beans in the request. Here's my code: request.setAttribute(caseInfo, theCase); theForm.setCaseInfo(theCase); and my jsp: td valign=topbbean:write name=caseInfo scope=request property=id/ /b/td td valign=topbbean:write name=caseInfo scope=request property=title/ /b/td td valign=topbbean:write name=caseInfo scope=request property=busOrg//b/td td valign=topbbean:write name=caseInfo scope=request property=status//b/td and the error: javax.servlet.jsp.JspException: Cannot find bean caseInfo in scope request what am i missing this time? Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tripping over request variables again
Doh! new work environment... sorry. It works just fine. Jason ---Original Message--- From: Jason Vinson [EMAIL PROTECTED] Sent: 02/26/03 01:03 PM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: tripping over request variables again For some reason, I am not catching on to the idea of beans in the request. Here's my code: request.setAttribute(caseInfo, theCase); theForm.setCaseInfo(theCase); and my jsp: td valign=topbbean:write name=caseInfo scope=request property=id/ /b/td td valign=topbbean:write name=caseInfo scope=request property=title/ /b/td td valign=topbbean:write name=caseInfo scope=request property=busOrg//b/td td valign=topbbean:write name=caseInfo scope=request property=status//b/td and the error: javax.servlet.jsp.JspException: Cannot find bean caseInfo in scope request what am i missing this time? Jason - 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: RE: bean:write issues... or a better solution
I tried this in my page and i get: [log error] javax.servlet.jsp.JspException: Cannot find bean under name queuesName at org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:418) at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:234) [jsp] html:select name=spgQueuesForm property=queueSelected size=1 styleClass=fBdr-main html:options collection=queuesName property=objid / /html:select queuesName is a request level collection, with getters and setters for objid and title elements. any ideas? Jason ---Original Message--- From: Ray Madigan [EMAIL PROTECTED] Sent: 02/24/03 11:54 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: bean:write issues... or a better solution If queuesName is a session or request level attribute then the options tag should be html:options collection=queuesName property=objid/ given that the collection elements implement the getter getObjid ( ). Hope this helps! -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 8:37 AM To: Struts Users Mailing List Subject: bean:write issues... or a better solution Hi folks, I am using a container class (a collection referenced by queuesName) to hold data for populating a select list, and I can't access the internal strings with the getter and setter methods i have written. I have included code and can elaborate if needed. Can anyone tell me what I am overlooking... or should i try it with an Iterator tag instead? TIA, Jason [jsp] html:select name=spgQueuesForm property=queueSelected size=1 styleClass=fBdr-main html:options property=queuesName value=bean:write name=spgQueuesForm property=objid/ /html:select [/jsp] [stack trace] Mon Feb 24 11:29:00 EST 2003:E WebAppServletContext-spg Root cause of ServletException javax.servlet.jsp.JspException: No getter method for property objid of bean spgQueuesForm [/stack trace] - 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: RE: RE: bean:write issues... or a better solution
It's in my action class. theForm is the ActionForm that gets passed in. QueueListing[] theQueues = new QueueListing [cboQueue.getCount()]; for (int i=0; i theQueues.length; i++) { theQueues[i] = new QueueListing(); theQueues[i].setTitle((String)cboQueue.getFields().getItem(title).getValue()); theQueues[i].setObjid((String)cboQueue.getFields().getItem(objid).getValue()); cboQueue.moveNext(); } theForm.setQueuesName(theQueues); ---Original Message--- From: Karr, David [EMAIL PROTECTED] Sent: 02/25/03 01:29 PM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: RE: bean:write issues... or a better solution Show us where you're putting queuesName into request scope. -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 10:12 AM To: Struts Users Mailing List Subject: Re: RE: bean:write issues... or a better solution I tried this in my page and i get: [log error] javax.servlet.jsp.JspException: Cannot find bean under name queuesName at org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:418 ) at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:234) [jsp] html:select name=spgQueuesForm property=queueSelected size=1 styleClass=fBdr-main html:options collection=queuesName property=objid / /html:select queuesName is a request level collection, with getters and setters for objid and title elements. any ideas? Jason ---Original Message--- From: Ray Madigan [EMAIL PROTECTED] Sent: 02/24/03 11:54 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: bean:write issues... or a better solution If queuesName is a session or request level attribute then the options tag should be html:options collection=queuesName property=objid/ given that the collection elements implement the getter getObjid ( ). Hope this helps! -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 8:37 AM To: Struts Users Mailing List Subject: bean:write issues... or a better solution Hi folks, I am using a container class (a collection referenced by queuesName) to hold data for populating a select list, and I can't access the internal strings with the getter and setter methods i have written. I have included code and can elaborate if needed. Can anyone tell me what I am overlooking... or should i try it with an Iterator tag instead? TIA, Jason [jsp] html:select name=spgQueuesForm property=queueSelected size=1 styleClass=fBdr-main html:options property=queuesName value=bean:write name=spgQueuesForm property=objid/ /html:select [/jsp] [stack trace] Mon Feb 24 11:29:00 EST 2003:E WebAppServletContext-spg Root cause of ServletException javax.servlet.jsp.JspException: No getter method for property objid of bean spgQueuesForm [/stack trace] - 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]
Re: Re: RE: RE: bean:write issues... or a better solution
hrmm... if i load the page initially, i get a Internal Server Error, with the error message from before. But if i go to the address bar and just hit enter with the same address, it loads the page. what am i doing wrong? Jason ---Original Message--- From: Jason Vinson [EMAIL PROTECTED] Sent: 02/25/03 01:34 PM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: RE: RE: bean:write issues... or a better solution It's in my action class. theForm is the ActionForm that gets passed in. QueueListing[] theQueues = new QueueListing [cboQueue.getCount()]; for (int i=0; i theQueues.length; i++) { theQueues[i] = new QueueListing(); theQueues[i].setTitle((String)cboQueue.getFields().getItem(title).getValue()); theQueues[i].setObjid((String)cboQueue.getFields().getItem(objid).getValue()); cboQueue.moveNext(); } theForm.setQueuesName(theQueues); ---Original Message--- From: Karr, David [EMAIL PROTECTED] Sent: 02/25/03 01:29 PM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: RE: bean:write issues... or a better solution Show us where you're putting queuesName into request scope. -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 10:12 AM To: Struts Users Mailing List Subject: Re: RE: bean:write issues... or a better solution I tried this in my page and i get: [log error] javax.servlet.jsp.JspException: Cannot find bean under name queuesName at org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:418 ) at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:234) [jsp] html:select name=spgQueuesForm property=queueSelected size=1 styleClass=fBdr-main html:options collection=queuesName property=objid / /html:select queuesName is a request level collection, with getters and setters for objid and title elements. any ideas? Jason ---Original Message--- From: Ray Madigan [EMAIL PROTECTED] Sent: 02/24/03 11:54 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: bean:write issues... or a better solution If queuesName is a session or request level attribute then the options tag should be html:options collection=queuesName property=objid/ given that the collection elements implement the getter getObjid ( ). Hope this helps! -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 8:37 AM To: Struts Users Mailing List Subject: bean:write issues... or a better solution Hi folks, I am using a container class (a collection referenced by queuesName) to hold data for populating a select list, and I can't access the internal strings with the getter and setter methods i have written. I have included code and can elaborate if needed. Can anyone tell me what I am overlooking... or should i try it with an Iterator tag instead? TIA, Jason [jsp] html:select name=spgQueuesForm property=queueSelected size=1 styleClass=fBdr-main html:options property=queuesName value=bean:write name=spgQueuesForm property=objid/ /html:select [/jsp] [stack trace] Mon Feb 24 11:29:00 EST 2003:E WebAppServletContext-spg Root cause of ServletException javax.servlet.jsp.JspException: No getter method for property objid of bean spgQueuesForm [/stack trace] - 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]
conditional visibility of html elements
Is there an easy way in struts to make an html element visible based on a conditional statement. I used to use Barracuda, and there was the concept of a BComponent, which you could set to null to remove the element, or just pass a plain BComponent to keep the element. Is there anything like that here? TIA, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
bean:write issues... or a better solution
Hi folks, I am using a container class (a collection referenced by queuesName) to hold data for populating a select list, and I can't access the internal strings with the getter and setter methods i have written. I have included code and can elaborate if needed. Can anyone tell me what I am overlooking... or should i try it with an Iterator tag instead? TIA, Jason [jsp] html:select name=spgQueuesForm property=queueSelected size=1 styleClass=fBdr-main html:options property=queuesName value=bean:write name=spgQueuesForm property=objid/ /html:select [/jsp] [stack trace] Mon Feb 24 11:29:00 EST 2003:E WebAppServletContext-spg Root cause of ServletException javax.servlet.jsp.JspException: No getter method for property objid of bean spgQueuesForm [/stack trace] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bean:write issues... or a better solution
Did that jsp code come through? my webmail removed it from my side... ---Original Message--- From: Jason Vinson [EMAIL PROTECTED] Sent: 02/24/03 11:37 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: bean:write issues... or a better solution Hi folks, I am using a container class (a collection referenced by queuesName) to hold data for populating a select list, and I can't access the internal strings with the getter and setter methods i have written. I have included code and can elaborate if needed. Can anyone tell me what I am overlooking... or should i try it with an Iterator tag instead? TIA, Jason [jsp] html:select name=spgQueuesForm property=queueSelected size=1 styleClass=fBdr-main html:options property=queuesName value=bean:write name=spgQueuesForm property=objid/ /html:select [/jsp] [stack trace] Mon Feb 24 11:29:00 EST 2003:E WebAppServletContext-spg Root cause of ServletException javax.servlet.jsp.JspException: No getter method for property objid of bean spgQueuesForm [/stack trace] - 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]
combining commons-*.jar
This may be a dumb question, but is there any reason to not combine all the commons-*.jar libraries into one jar file? I am attempting to clean up our server's classpath, and combining all these jars would really help out. TIA, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: combining commons-*.jar
So if there was an upgrade, i could just rebundle them all correct? If that's the only drawback, I think I may go ahead and combine them. Anyone else care to comment? Jason ---Original Message--- From: Ian Hunter [EMAIL PROTECTED] Sent: 02/21/03 08:32 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: combining commons-*.jar If one component was upgraded, you'd have to replace the whole shootin' match. - Original Message - From: Jason Vinson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, February 21, 2003 8:28 AM Subject: combining commons-*.jar This may be a dumb question, but is there any reason to not combine all the commons-*.jar libraries into one jar file? I am attempting to clean up our server's classpath, and combining all these jars would really help out. TIA, Jason - 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: Re: Re: combining commons-*.jar
Well, i am using weblogic 5.1, which seems to be the most ignorant servlet container I have ever used. It requires explicit paths to EVERY class, so I have to reference the root of my packages (i.e. WEB-INF/classes) and EVERY individual jar file that needs to be referenced at run time, even if they are placed in WEB-INF/lib. Normally I would leave things as is, but my classpath is rediculous as is, and it seems like all these jars combined with replaced about eight individual entries with one commons-*.jar file. Do you follow my logic? Jason ---Original Message--- From: Chris Trawick [EMAIL PROTECTED] Sent: 02/21/03 08:46 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Re: combining commons-*.jar What is cleaning up the classpath about anyway? For building? Ant takes care of that, just use a lib directory. For deployment? Try /WEB-INF/lib or use your container's libdir. Coupling all the commons products together violates their designed modularity and introduces bloat. I personally don't have warm fuzzies about bundling 8 megs of fluff with every war and passing it around between different servers. It especially gets in the way of JBoss, when a large transfer (even just filesystem-to-filesystem) can cause the deployer to hose itself by trying to load the thing before it's actually there. Then again, maybe your situation is different... chris - Original Message - From: Jason Vinson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, February 21, 2003 8:33 AM Subject: Re: Re: combining commons-*.jar So if there was an upgrade, i could just rebundle them all correct? If that's the only drawback, I think I may go ahead and combine them. Anyone else care to comment? Jason ---Original Message--- From: Ian Hunter [EMAIL PROTECTED] Sent: 02/21/03 08:32 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: combining commons-*.jar If one component was upgraded, you'd have to replace the whole shootin' match. - Original Message - From: Jason Vinson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, February 21, 2003 8:28 AM Subject: combining commons-*.jar This may be a dumb question, but is there any reason to not combine all the commons-*.jar libraries into one jar file? I am attempting to clean up our server's classpath, and combining all these jars would really help out. TIA, Jason - 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]
Re: Re: Struts and Eclipse Doc
Nothing is wrong with Vim and ant but I would like to give an IDE a shot. Just to see what all the raving is about :) Jason ---Original Message--- From: Gemes Tibor [EMAIL PROTECTED] Sent: 02/20/03 10:38 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Struts and Eclipse Doc 2003. február 20. 16:28 dátummal Jason Vinson ezt írtad: With this many people using Struts, I am fairly sure someone is using Eclipse to develop in. Does anyone have a document that explains the setup of Eclipse to develop for struts? I have been a vim and ant guy... these IDE's confuse me a little. http://jakarta.apache.org/struts/faqs/eclipse.html What's wrong with vim/ant? Hth, Tib - 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: Re: [OT] What's your IQ?
i got a 138... but to be honest i guessed at 2 of the what object can you not make from the cut out piece puzzles. i'm gifted :) ---Original Message--- From: Jeff Kyser [EMAIL PROTECTED] Sent: 02/20/03 12:04 PM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: [OT] What's your IQ? More likely, you're myslexic. :) On Thursday, February 20, 2003, at 10:49 AM, Curley, John wrote: I got a 92. Will that qualify me for Mensa? -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 11:40 AM To: 'Struts Users Mailing List' Subject: RE: [OT] What's your IQ? I posted a negative number before my morning coffee. I did much better afterwards. Good enough to join the elite nerds. Ahh the power of coffee. :) -Original Message- From: Brandon Goodin [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 11:17 AM To: Struts Users Mailing List Subject: RE: [OT] What's your IQ? I posted a 129 Brandon Goodin Phase Web and Multimedia PO Box 85 Whitefish MT 59937 P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -Original Message- From: Simon Kelly [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 9:10 AM To: Struts Users Mailing List Subject: Re: [OT] What's your IQ? There's gotta be something wrong with that Ultimate IQ test they have there cause I just posted a 140, and I'm considered a dumb ass by the banjo player from Deliverance! - Original Message - From: Jacob Hookom [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, February 20, 2003 4:56 PM Subject: RE: [OT] What's your IQ? 129 - I'm joining the High IQ Society! | -Original Message- | From: alexj [mailto:[EMAIL PROTECTED]] | Sent: Thursday, February 20, 2003 8:53 AM | To: Struts Users Mailing List | Subject: Re: [OT] What's your IQ? | | -12 | - Original Message - | From: Brandon Goodin [EMAIL PROTECTED] | To: Struts User List [EMAIL PROTECTED] | Sent: Thursday, February 20, 2003 3:52 PM | Subject: [OT] What's your IQ? | | | Does our list consist of the best and brightest? ;-) Take the test to | learn | what your IQ is and join the most elite nerds on the planet. :-)) Also, | I | dare you to post your results. :-D | | http://www.highiqsociety.org | | DISCLAIMER: The results of the afformentioned test do not constitute a | legal | declaration of genius. Just the personal gratification that you can | still | make a passing grade on a pointless test. | | | | | | Brandon Goodin | Phase Web and Multimedia | PO Box 85 | Whitefish MT 59937 | P (406) 862-2245 | F (406) 862-0354 | [EMAIL PROTECTED] | http://www.phase.ws | | | | - | 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] - 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
did you try: top.Frame.location.href = 'action.do?action=main'; (no leading /) ? Jason ---Original Message--- From: Ray Madigan [EMAIL PROTECTED] Sent: 02/20/03 12:35 PM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: JavaScript I am using in my application, if you can't tell this from my previous posts ;-), does anyone else. I also want to be able to load a frame with a page with javascript like: top.Frame.location.href = '/action.do?action=main'; when i do this i get an error = MAPPING configuration error for request URI Any suggestions? Thanks Ray Madigan - 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]
[OT] logging level in Tomcat 4.1.18
Hi folks, I am using Tomcat 4.1.18, and I am using good ol' System.out.println for debugging, but my log file (catalina.out) has MASSIVE ammounts of [INFO] messages. I can't figure out how to change the level of output. I tried looking in tomcat/conf/ at server.xml and web.xml, as well as my web application's /WEB-INF/web.xml directory. Can anyone point me in the right direction? Sorry if this is too OT, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts Design (best practices)
Hi Folks, I have been working with Struts for about a week now, and I have a few design questions. I guess the most important is the proper flow of information and processing. When I began to code pages in Struts, I would link to the actual jsp page, then check it's ActionForm, then go to the Action class. Now I am beginning to think that the proper flow is to go to the Action class, then the ActionForm, then to the jsp. Is this correct? Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
overriding the ActionServlet class
Can anyone point me to a good example of a custom class that extends ActionServlet to do some security checks for session data? TIA, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:link question ... was Re: Re: How to link to an Action which has no Form.
Interesting you mention html:link, since I am having some problems with it currently. I am trying to append something to the end of a link, and I can't quite grasp what i am doing wrong. Here is my jsp code: html:link href=/jsp/spgCaseOverview.jsp?case_objid= paramName=spgQueuesForm paramId=id bean:write name=spgQueuesForm property=id/ /html:link My desired link is to have /jsp/spgCaseOverview.jsp?case_objid=foo were foo is contained in the id element of this collection i am iterating. Any idea what i may be doing wrong? (the current url gets this: http://sunbox:8001/jsp/spgCaseOverview.jsp?case_objid=queueDataSet.id=spg.beans.QueueData%4030122 ) a little help? Jason ---Original Message--- From: David Graham [EMAIL PROTECTED] Sent: 02/13/03 02:26 PM To: [EMAIL PROTECTED] Subject: Re: How to link to an Action which has no Form. http://jakarta.apache.org/struts/userGuide/struts-html.html#link David From: Bert Catsburg [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: How to link to an Action which has no Form. Date: Thu, 13 Feb 2003 20:26:29 +0100 Hello, How do you include a link in your code which triggers an Action which has no Form. The Action class will activate a global forward. I hope somebody can help me since I am on this problem for two days now and have search the whole list, docs and both Struts-books. A simple direction where to look any further would be of much help. Thank you, Bert Catsburg Code samples: JSP with the link: -- phtml:link page=/petrolPetrol/html:link/p Struts Config - global-forwards forward name=index path=/index.jsp / /global-forwards !-- Process a Petrol request -- actionpath=/petrol type=senktar.PetrolAction scope=request / PetrolAction.java - package senktar public class PetrolAction extends Action { public ActionForward execute(ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) throws Exception { . // Lines of code return mapping.findForward(index); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - 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 question ... was Re: Re: How to link to an Action which has no Form.
doh i got it. sorry for the extra traffic. Jason ---Original Message--- From: Jason Vinson [EMAIL PROTECTED] Sent: 02/13/03 02:37 PM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: html:link question ... was Re: Re: How to link to an Action which has no Form. Interesting you mention html:link, since I am having some problems with it currently. I am trying to append something to the end of a link, and I can't quite grasp what i am doing wrong. Here is my jsp code: html:link href=/jsp/spgCaseOverview.jsp?case_objid= paramName=spgQueuesForm paramId=id bean:write name=spgQueuesForm property=id/ /html:link My desired link is to have /jsp/spgCaseOverview.jsp?case_objid=foo were foo is contained in the id element of this collection i am iterating. Any idea what i may be doing wrong? (the current url gets this: http://sunbox:8001/jsp/spgCaseOverview.jsp?case_objid=queueDataSet.id=spg.beans.QueueData%4030122 ) a little help? Jason ---Original Message--- From: David Graham [EMAIL PROTECTED] Sent: 02/13/03 02:26 PM To: [EMAIL PROTECTED] Subject: Re: How to link to an Action which has no Form. http://jakarta.apache.org/struts/userGuide/struts-html.html#link David From: Bert Catsburg [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: How to link to an Action which has no Form. Date: Thu, 13 Feb 2003 20:26:29 +0100 Hello, How do you include a link in your code which triggers an Action which has no Form. The Action class will activate a global forward. I hope somebody can help me since I am on this problem for two days now and have search the whole list, docs and both Struts-books. A simple direction where to look any further would be of much help. Thank you, Bert Catsburg Code samples: JSP with the link: -- phtml:link page=/petrolPetrol/html:link/p Struts Config - global-forwards forward name=index path=/index.jsp / /global-forwards !-- Process a Petrol request -- actionpath=/petrol type=senktar.PetrolAction scope=request / PetrolAction.java - package senktar public class PetrolAction extends Action { public ActionForward execute(ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) throws Exception { . // Lines of code return mapping.findForward(index); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - 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]
html:options selected attribute
Hi folks, There my be a simple answer to this that I am overlooking, but I am populating a pull down select, and I can't figure out a good way to set the selected attribute to the first element. I am using a collection (string array) and my jsp has this code: td align=right colspan=6 html:select name=spgQueuesForm property=queuesName size=1 html:options property=queuesName/ /html:select /td All I want to do is have the first option selected, and it is defaulting to the last option. any help? TIA, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: html:options selected attribute
I am not exactly following the logic here. Could you elaborate a little more? Thanks, Jason ---Original Message--- From: Slobodan Kasterovic [EMAIL PROTECTED] Sent: 02/12/03 08:24 AM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: AW: html:options selected attribute Hi ! Look my sample: ### Form private ArrayList projektfilterliste; private String[] projektfilter; ### JSP html:select property=projektfilter size=1 onchange=newProjektfilter() styleClass=input_area html:options collection=projektfilterliste property=value labelProperty=label / /html:select ### Action ArrayList filterInhalt = new ArrayList(); filterInhalt.add(new LabelValueBean( getAllProjectsDescription(request), One)); filterInhalt.add(new LabelValueBean( getAllProjectsDescription(request), Two)); nextForm.setProjektfilterliste(filterInhalt); request.setAttribute(projektfilterliste,filterInhalt); // !!! // Preselection ArrayList preselectedFilter = new ArrayList(); preselectedFilter.add(One); nextForm.setProjektfilter( (String[]) preselectedFilter.toArray(new String[0])); // can multiple to bye Slobodan Kasterovic -- -Ursprungliche Nachricht- -- Von: Jason Vinson [mailto:[EMAIL PROTECTED]] -- Gesendet: Mittwoch, 12. Februar 2003 13:51 -- An: Struts Users Mailing List -- Betreff: html:options selected attribute -- -- -- Hi folks, -- --There my be a simple answer to this that I am -- overlooking, but I am populating a pull down select, and I -- can't figure out a good way to set the selected attribute -- to the first element. I am using a collection (string -- array) and my jsp has this code: -- -- td align=right colspan=6 -- html:select name=spgQueuesForm -- property=queuesName size=1 -- html:options property=queuesName/ -- /html:select -- /td -- -- All I want to do is have the first option selected, and it -- is defaulting to the last option. -- -- any help? -- -- TIA, -- Jason -- -- -- - -- 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: RE: html:options selected attribute
Thanks Sri, the first link had a solution that worked perfectly. I'll be sure to search google and the archives before posting in the future. Thanks again, Jason ---Original Message--- From: Sri Sankaran [EMAIL PROTECTED] Sent: 02/12/03 09:48 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: html:options selected attribute Take your pick of http://marc.theaimsgroup.com/?l=struts-userm=103416927522003w=2 http://marc.theaimsgroup.com/?l=struts-userm=103313043614360w=2 http://marc.theaimsgroup.com/?l=struts-userm=103254783510467w=2 http://marc.theaimsgroup.com/?l=struts-userm=102406536726794w=2 Or just look at the same application that ships with Struts (html-select.jsp in struts-exercise-taglib). Please do search the archives before posting Sri -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 12, 2003 9:25 AM To: Struts Users Mailing List Subject: Re: html:options selected attribute I am not exactly following the logic here. Could you elaborate a little more? Thanks, Jason ---Original Message--- From: Slobodan Kasterovic [EMAIL PROTECTED] Sent: 02/12/03 08:24 AM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: AW: html:options selected attribute Hi ! Look my sample: ### Form private ArrayList projektfilterliste; private String[] projektfilter; ### JSP html:select property=projektfilter size=1 onchange=newProjektfilter() styleClass=input_area html:options collection=projektfilterliste property=value labelProperty=label / /html:select ### Action ArrayList filterInhalt = new ArrayList(); filterInhalt.add(new LabelValueBean( getAllProjectsDescription(request), One)); filterInhalt.add(new LabelValueBean( getAllProjectsDescription(request), Two)); nextForm.setProjektfilterliste(filterInhalt); request.setAttribute(projektfilterliste,filterInhalt); // !!! // Preselection ArrayList preselectedFilter = new ArrayList(); preselectedFilter.add(One); nextForm.setProjektfilter( (String[]) preselectedFilter.toArray(new String[0])); // can multiple to bye Slobodan Kasterovic -- -Ursprungliche Nachricht- -- Von: Jason Vinson [mailto:[EMAIL PROTECTED]] -- Gesendet: Mittwoch, 12. Februar 2003 13:51 -- An: Struts Users Mailing List -- Betreff: html:options selected attribute -- -- -- Hi folks, -- --There my be a simple answer to this that I am overlooking, but I -- am populating a pull down select, and I can't figure out a good way -- to set the selected attribute to the first element. I am using a -- collection (string -- array) and my jsp has this code: -- -- td align=right colspan=6 -- html:select name=spgQueuesForm property=queuesName -- size=1 -- html:options property=queuesName/ -- /html:select -- /td -- -- All I want to do is have the first option selected, and it is -- defaulting to the last option. -- -- any help? -- -- TIA, -- Jason -- -- -- - -- 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]
Searching the Archives?
I feel dumb for asking this, but I am trying to search the list archives via: http://nagoya.apache.org/eyebrowse/SearchList?listId=[EMAIL PROTECTED]searchText=bean+attributesdefaultField=subjectSearch=Search and when i do a search, it returns Text search not available for this list. Where should i look for proper archive searching? Thanks, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
bean question
This may be beyond the scope of this list, but here goes. I have implemented a simple container class that implements an object with a few String objects. I initialized it in my Action class for testing, but when i try to write it out using the bean:write tag, i can't figure out how to access each String. Do I have to write individual get/set's in my ActionForm that call the get/sets from my container class? or is there an easier way? Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: bean question
Ok, Action Class contains a QueueData Object, which i wrote as a simple container, and it is initialized as follows: QueueData qData = new QueueData(id, title, condition, status, sev); //The ActionForm passed into the execute method is theForm theForm.setQueueData(qData); In my ActionForm class i have: /* QueueData Object */ private QueueData queueData = null; public QueueData getQueueData() { return (this.queueData); } public void setQueueData(QueueData queueData) { this.queueData=queueData; } And in my JSP I want to be able to pull each string from the QueueData object individually (to populate a table). Is this clear enough? Jason ---Original Message--- From: Durham David Cntr 805CSS/SCBE [EMAIL PROTECTED] Sent: 02/12/03 11:19 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: bean question post your code -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 12, 2003 10:09 AM To: Struts Users Mailing List Subject: bean question This may be beyond the scope of this list, but here goes. I have implemented a simple container class that implements an object with a few String objects. I initialized it in my Action class for testing, but when i try to write it out using the bean:write tag, i can't figure out how to access each String. Do I have to write individual get/set's in my ActionForm that call the get/sets from my container class? or is there an easier way? Jason - 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: Re: bean question
Dot notation worked for a single instance, but now i am trying to iterate through an array of them, and I get null pointer exceptions when i try to initialize the values. I am thinking this isn't related to struts directly though, but i guess it doesn't hurt to ask. Jason ---Original Message--- From: [EMAIL PROTECTED] Sent: 02/12/03 11:17 AM To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: bean question I depends on how you got it onto your page. If you set the object inside your form bean then simple dot notation will work: html:form bean:write property=myContainerObj.prop1/ If you put the attribute into scope directly, then a bean defin tag will be needed first. Jason Vinson [EMAIL PROTECTED] on 02/12/2003 10:08:38 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:bean question This may be beyond the scope of this list, but here goes. I have implemented a simple container class that implements an object with a few String objects. I initialized it in my Action class for testing, but when i try to write it out using the bean:write tag, i can't figure out how to access each String. Do I have to write individual get/set's in my ActionForm that call the get/sets from my container class? or is there an easier way? Jason - 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]
data acquisition and control
Hi folks, I am having a few issues this morning determining the proper way to control the data of my current web application. From what I have read, I see that the proper place to acquire data from the system is in the Action class. This data should be put on the request (correct?) and retrieved by the proper ActionForm to populate the jsp. Maybe monday morning has my brain working slow, but I am a little mixed up on a few points here. 1. Pulling the data from the system in the Action Class actually requires you to gather data in the Action Class of the page prior to the one you want to render the information in. Doesn't this defy the separation of logic and business in the MVC design paradigm? 2. To be completely honest, I am not seeing a convenient way to gather the data off the request in the ActionForm class of my page. I feel I may be completely overlooking the obvious, but I know I need to grab the request in the ActionForm, and I can't see a convenient way to do that by studying the javadocs. can anyone clear this up for me?? Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
newbie question: what to use for non-form data population?
If i want to use logic:iterate (or something similar) to populate a table that is not part of a form, I shouldn't be using a class that extends the ActionForm class correct? What should I use in it's place? TIA, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: newbie question: what to use for non-form data population?
well, i think i have a grasp on how to handle this problem. Correct me if i am wrong, but here's my logic: I am trying to get a listing of items with multiple properties to display to the user. They will populate a table, and one element of each row will have a hyperlink to a more detailed view of that single element. My proposed solution would just be to parse this data into multiple arrays (one per column) and use logic:iterate to fill out the table. Anything wrong with that logic? or does struts have a simpler way of handling such a thing? TIA, Jason ---Original Message--- From: Mark Galbreath [EMAIL PROTECTED] Sent: 02/10/03 11:23 AM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: newbie question: what to use for non-form data population? Why don't you want to place the table in a form? That's the easiest way you are going to get/set its values. Mark Galbreath Principal Consultant Workflow Process Engineering and Systems Integration http://www.QAT.com 410-703-367 / 800-799-8545 Never attribute to malice that which can be adequately explained by stupidity. ~Hanlon's Razor -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED]] Sent: Monday, February 10, 2003 11:11 AM To: Struts Users Mailing List Subject: newbie question: what to use for non-form data population? If i want to use logic:iterate (or something similar) to populate a table that is not part of a form, I shouldn't be using a class that extends the ActionForm class correct? What should I use in it's place? TIA, Jason - 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: Re: RE: noob question - iteration of a table
Is this inside a form element that has the ActionForm spgLooper associated with it? such as: html:form property=spgLooper action=/jsp/spgLooper.do if so, then yes. Is spgLooper called spgLooper in your form declarations of your struts-config.xml? under the form-bean declarations: !-- looper form bean -- form-bean name=spgLooperForm type=spgLooperForm/ and in the action-mapping section: !-- spgLooper action -- actionpath=/jsp/spgLooper type=spgLooperAction name=spgLooperForm input=/jsp/spgLooper.jsp scope=request forward name=success path=/jsp/spgHome.jsp / forward name=failure path=/jsp/spgLooper.jsp / /action what am i overlooking? Jason Michael Lee - Original Message - From: Jason Vinson [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, February 06, 2003 11:48 AM Subject: Re: RE: noob question - iteration of a table Here's what i have done so far (which isn't working): ActionForm class spgLooperForm.java: snip /* array of elements */ private String[] testArray = {foo, boo, noo, goo}; public String[] getTestArray() { return (this.testArray); } public void setTestArray(String[] testArray) { this.testArray=testArray; } /snip JSP spgLooper.jsp: snip logic:iterate id=testArray name=spgLooper Element is: bean:write name=testArray property=value/ /logic:iterate /snip And my output is: snip javax.servlet.jsp.JspException: Cannot find bean spgLooper in any scope at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:839) at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:300) at jsp_servlet._jsp.__spgLooper._jspService(__spgLooper.java:168) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :120) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp l.java:922) /snip any pointers would be GREATLY appreciated. TIA, Jason ---Original Message--- From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Sent: 02/06/03 02:25 PM To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: noob question - iteration of a table You're under the right impression. Have you looked at: http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate ? -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Jason Vinson [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 06, 2003 1:15 PM To: Struts Users Mailing List Subject: noob question - iteration of a table I am relatively new to struts (using 1.1b3), and I am trying to figure out how to iterate a group of tr td's. I am under the impression that i can setup all my data in the action form and use a special taglib to iterate a table in my jsp file, but I have no idea how to do it. Can anyone steer me in the right direction? TIA, Jason - 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]
struts and weblogic 5.1
Hi everyone, Quick question here. Will struts work with weblogic 5.1? I don't think it's servlet 2.3 compliant, which would lead me to believe that struts wouldn't work with it. Am I mistaken? TIA, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]