RE: Validator multiple message-resources
I'm not 100% sure but I believe this came up before. I that, while you can define multiple message.resources, you really can only actually USE one of them in sruts 1.1. I'd do a search of the archive because I think this has come up before. An Obstacle is something you see when you take your eyes off the goal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 7:42 PM To: [EMAIL PROTECTED] Subject: Validator multiple message-resources Hi, I have successfully used validator with a single message resources file specified in the config file, everything works out fine. Since the project has gotten bigger, i created another message-resource file but when 'required' error happens, the message specifying the field name which is in the 2nd file doesn't come out. Only the validator part which is specified in the 1st file comes out. Amin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] MacOS X Java/Struts development (was RE: [OT] Maven (was Re: [ANNOUNCE] Struts 1.2.0 Test Build available))
It's included at the bottom of every message... An Obstacle is something you see when you take your eyes off the goal -Original Message- From: Tarik El Berrak [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 12:02 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: [OT] MacOS X Java/Struts development (was RE: [OT] Maven (was Re: [ANNOUNCE] Struts 1.2.0 Test Build available)) hi excuse me, can you tell me can i unsubscribe from this mailig list thanks a lot - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, March 01, 2004 5:36 PM Subject: RE: [OT] MacOS X Java/Struts development (was RE: [OT] Maven (was Re: [ANNOUNCE] Struts 1.2.0 Test Build available)) snip Feeling Like I Just Started Another OS Shouting Match /snip Yeh, cos windows is like really really g00d. Yeh. All us 133t [EMAIL PROTECTED] d00ds use it n' stuff. So dont be like putting it down cos its totally 133t and like .net will [EMAIL PROTECTED] owns linux and mac soon. Yeh. Ye gods! Mother warned me about staying up past bedtime. Looks like its all true. (Im outta here. Night all!) ;- -Original Message- From: Andy Engle [mailto:[EMAIL PROTECTED] Sent: Tuesday, 2 March 2004 00:24 To: Struts Users Mailing List Subject: RE: [OT] MacOS X Java/Struts development (was RE: [OT] Maven (was Re: [ANNOUNCE] Struts 1.2.0 Test Build available)) Nguyen, Hien [EMAIL PROTECTED] wrote: I'm using Panther (OS X 10.3) with Eclipse, tomcat, mySQL and things are working perfectly fine. The latest JDK on OS X is 1.4.2. Same here. I like it all pretty well, but the only minor drawback is that sometimes I think the Eclipse interface in OS X is a little clunky. But that's just with Eclipse -- you might find that other IDEs aren't that way. All the other great features of OS X definitely make up for it though. I don't see how you could go wrong with getting rid of your Windoze setup. And after how many hours I spent in a failed effort yesterday trying to simply *install* XP on my in-laws computer, I'd encourage you to! I have no plans of ever going back to the Windoze world -- enough of that pathetic junk is enough. Feeling Like I Just Started Another OS Shouting Match, Andy - 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] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: hiding jsp files under WEB-INF
I usually code my index.jsp as follows: jsp:forward page=Welcome.do / If your index.jsp isn't being processed through the struts controller, I'm not sure how much the logic tags like that. That should eliminate at least one problem. An Obstacle is something you see when you take your eyes off the goal -Original Message- From: Dean A. Hoover [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 11:59 AM To: [EMAIL PROTECTED] Subject: hiding jsp files under WEB-INF I realized that the subject I filed this under (getting started) may not get attention. So I'm sending it out under this subject. Did some google searching but still don't see what the problem is. = I am experimenting with some code from Struts in Action but I am moving source code around abit. Specifically, I am moving all of the .jsp files into the WEB-INF directory except index.jsp. This is so that a user cannot hit a given .jsp directly. Anyway, I am getting an exception right from the get go and don't know what I am doing wrong. Here's the relevant pieces: == index.jsp === %@ taglib uri=/tags/struts-logic prefix=logic % logic:forward name=welcome/ == Welcome.jsp === ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN DTD/xhtml1-trans itional.dtd % taglib uri=/tags/struts-bean prefix=bean % % taglib uri=/tags/struts-html prefix=html % % taglib uri=/tags/struts-logic prefix=logic % html:html xhtml=true head titleWelcome World!/title html:base/ /head body logic:present scope=session name=user h3Welcome bean:write name=user property=username/!/h3 /logic:present logic:notPresent scope=session name=user h3Welcome World!/h3 /logic:notPresent html:errors/ ul lihtml:link forward=logonSign in/html:link/li logic:present scope=session name=user lihtml:link forward=logoffSign out/html:link/li /logic:present /ul /body /html:html === struts-config.xml === ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http:/jakarta.apache.org/struts/dtds/struts-config_1_1.dtd struts-config form-beans form-bean name=registerForm type=app.RegisterForm/ form-bean name=logonForm type=app.LogonForm/ /form-beans global-forwards forward name=welcome path=/Welcome.do/ /global-forwards action-mappings action path=/Welcome type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/Welcome.jsp/ action path=/Logon type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/Logon.jsp/ action path=/LogonSubmit type=app.LogonAction name=logonForm scope=request validate=true input=/WEB-INF/Logon.jsp/ action path=/Logoff type=app.LogoffAction forward name=success path=/WEB-INF/Welcome.jsp/ /action action path=/Register type=app.RegisterAction name=registerForm input=/WEB-INF/Register.jsp forward name=success path=/WEB-INF/success.jsp/ forward name=failure path=/WEB-INF/failure.jsp/ /action /action-mappings /struts-config Here's the exception: *exception* javax.servlet.ServletException: Exception forwarding for name welcome: javax.servlet.ServletException org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI mpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:800) org.apache.jsp.index_jsp._jspService(index_jsp.java:66) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 11) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) *root cause* javax.servlet.jsp.JspException: Exception forwarding for name welcome: javax.servlet.ServletException org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:173) org.apache.jsp.index_jsp._jspx_meth_logic_forward_0(index_jsp.java:82) org.apache.jsp.index_jsp._jspService(index_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 11) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) What am I doing wrong? Dean Hoover - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
RE: hiding jsp files under WEB-INF
Also, are sure sure welcome is not supposed to be Welcome? (case sensitive?) An Obstacle is something you see when you take your eyes off the goal -Original Message- From: Dean A. Hoover [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 11:59 AM To: [EMAIL PROTECTED] Subject: hiding jsp files under WEB-INF I realized that the subject I filed this under (getting started) may not get attention. So I'm sending it out under this subject. Did some google searching but still don't see what the problem is. = I am experimenting with some code from Struts in Action but I am moving source code around abit. Specifically, I am moving all of the .jsp files into the WEB-INF directory except index.jsp. This is so that a user cannot hit a given .jsp directly. Anyway, I am getting an exception right from the get go and don't know what I am doing wrong. Here's the relevant pieces: == index.jsp === %@ taglib uri=/tags/struts-logic prefix=logic % logic:forward name=welcome/ == Welcome.jsp === ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN DTD/xhtml1-trans itional.dtd % taglib uri=/tags/struts-bean prefix=bean % % taglib uri=/tags/struts-html prefix=html % % taglib uri=/tags/struts-logic prefix=logic % html:html xhtml=true head titleWelcome World!/title html:base/ /head body logic:present scope=session name=user h3Welcome bean:write name=user property=username/!/h3 /logic:present logic:notPresent scope=session name=user h3Welcome World!/h3 /logic:notPresent html:errors/ ul lihtml:link forward=logonSign in/html:link/li logic:present scope=session name=user lihtml:link forward=logoffSign out/html:link/li /logic:present /ul /body /html:html === struts-config.xml === ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http:/jakarta.apache.org/struts/dtds/struts-config_1_1.dtd struts-config form-beans form-bean name=registerForm type=app.RegisterForm/ form-bean name=logonForm type=app.LogonForm/ /form-beans global-forwards forward name=welcome path=/Welcome.do/ /global-forwards action-mappings action path=/Welcome type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/Welcome.jsp/ action path=/Logon type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/Logon.jsp/ action path=/LogonSubmit type=app.LogonAction name=logonForm scope=request validate=true input=/WEB-INF/Logon.jsp/ action path=/Logoff type=app.LogoffAction forward name=success path=/WEB-INF/Welcome.jsp/ /action action path=/Register type=app.RegisterAction name=registerForm input=/WEB-INF/Register.jsp forward name=success path=/WEB-INF/success.jsp/ forward name=failure path=/WEB-INF/failure.jsp/ /action /action-mappings /struts-config Here's the exception: *exception* javax.servlet.ServletException: Exception forwarding for name welcome: javax.servlet.ServletException org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI mpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:800) org.apache.jsp.index_jsp._jspService(index_jsp.java:66) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 11) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) *root cause* javax.servlet.jsp.JspException: Exception forwarding for name welcome: javax.servlet.ServletException org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:173) org.apache.jsp.index_jsp._jspx_meth_logic_forward_0(index_jsp.java:82) org.apache.jsp.index_jsp._jspService(index_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 11) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) What am I doing wrong? Dean Hoover - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation
RE: hiding jsp files under WEB-INF
Whoops, didn't see that. Now I'm more inclined to think this will not work as this page is not being handled by the struts controller. An Obstacle is something you see when you take your eyes off the goal -Original Message- From: Dean A. Hoover [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 12:35 PM To: Struts Users Mailing List Subject: Re: hiding jsp files under WEB-INF Mainguy, Mike wrote: Also, are sure sure welcome is not supposed to be Welcome? (case sensitive?) The way I understand it, welcome is globally forwarded to /Welcome.do, as per the struts-config.xml. An Obstacle is something you see when you take your eyes off the goal -Original Message- From: Dean A. Hoover [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 11:59 AM To: [EMAIL PROTECTED] Subject: hiding jsp files under WEB-INF I realized that the subject I filed this under (getting started) may not get attention. So I'm sending it out under this subject. Did some google searching but still don't see what the problem is. = I am experimenting with some code from Struts in Action but I am moving source code around abit. Specifically, I am moving all of the .jsp files into the WEB-INF directory except index.jsp. This is so that a user cannot hit a given .jsp directly. Anyway, I am getting an exception right from the get go and don't know what I am doing wrong. Here's the relevant pieces: == index.jsp === %@ taglib uri=/tags/struts-logic prefix=logic % logic:forward name=welcome/ == Welcome.jsp === ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN DTD/xhtml1-trans itional.dtd % taglib uri=/tags/struts-bean prefix=bean % % taglib uri=/tags/struts-html prefix=html % % taglib uri=/tags/struts-logic prefix=logic % html:html xhtml=true head titleWelcome World!/title html:base/ /head body logic:present scope=session name=user h3Welcome bean:write name=user property=username/!/h3 /logic:present logic:notPresent scope=session name=user h3Welcome World!/h3 /logic:notPresent html:errors/ ul lihtml:link forward=logonSign in/html:link/li logic:present scope=session name=user lihtml:link forward=logoffSign out/html:link/li /logic:present /ul /body /html:html === struts-config.xml === ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http:/jakarta.apache.org/struts/dtds/struts-config_1_1.dtd struts-config form-beans form-bean name=registerForm type=app.RegisterForm/ form-bean name=logonForm type=app.LogonForm/ /form-beans global-forwards forward name=welcome path=/Welcome.do/ /global-forwards action-mappings action path=/Welcome type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/Welcome.jsp/ action path=/Logon type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/Logon.jsp/ action path=/LogonSubmit type=app.LogonAction name=logonForm scope=request validate=true input=/WEB-INF/Logon.jsp/ action path=/Logoff type=app.LogoffAction forward name=success path=/WEB-INF/Welcome.jsp/ /action action path=/Register type=app.RegisterAction name=registerForm input=/WEB-INF/Register.jsp forward name=success path=/WEB-INF/success.jsp/ forward name=failure path=/WEB-INF/failure.jsp/ /action /action-mappings /struts-config Here's the exception: *exception* javax.servlet.ServletException: Exception forwarding for name welcome: javax.servlet.ServletException org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCon textI mpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte xtImp l.java:800) org.apache.jsp.index_jsp._jspService(index_jsp.java:66) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j ava:3 11) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) *root cause* javax.servlet.jsp.JspException: Exception forwarding for name welcome: javax.servlet.ServletException org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:173) org.apache.jsp.index_jsp._jspx_meth_logic_forward_0(index_jsp.java:82) org.apache.jsp.index_jsp._jspService(index_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j ava:3 11
RE: java.lang.NullPointerException struts form is null
It seems like that user is getting that text automagically added to the top of his messages... An Obstacle is something you see when you take your eyes off the goal -Original Message- From: Daniel Kalcevich [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 11:57 AM To: Struts Users Mailing List; Tarik El Berrak Subject: RE: java.lang.NullPointerException struts form is null Try sending an empty email to [EMAIL PROTECTED] Daniel -Original Message- From: Tarik El Berrak [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 9:02 AM To: Struts Users Mailing List Subject: Re: java.lang.NullPointerException struts form is null hi excuse me, can you tell me can i unsubscribe from this mailig list thanks a lot - Original Message - From: Daniel Kalcevich [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, March 01, 2004 5:40 PM Subject: RE: java.lang.NullPointerException struts form is null Try changing the name attribute in your config file to be TeacherAddForm instead of teacherAddForm. HTH. Daniel -Original Message- From: as as [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 8:29 AM To: [EMAIL PROTECTED] Subject: java.lang.NullPointerException struts form is null Hi, Struts form is giving null in my action class .execute().Below are my files.Hep appreciated.Thanks import java.io.IOException; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * * @struts.action * path=/addTeacher * name=teacherAddForm * scope=request * validate=false * * @struts.action-forward * name=success * path=/teachers.jsp * * @struts.action-forward * name=failure * path=/error.jsp */ public final class TeacherAddAction extends Action { /** * @param actionmapping The ActionMapping * @param actionform The ActionForm object * @param httpservletrequest The httpservletrequest of the incoming request * @param httpservletresponse The httpservletresponse corresponding to the request * @param ActionForward The return path */ public ActionForward execute( ActionMapping mapping, ActionForm actionform, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { System.out.println(In TeacherAddAction:); TeacherAddForm teacherAddForm = (TeacherAddForm) actionform; if (teacherAddForm == null) teacherAddForm = new TeacherAddForm(); else System.out.println(teacherAddForm is not null); try { Teacher teacher= null; teacher.setLast(teacherAddForm.getLast()); ** Thanks! - Do you Yahoo!? Get better spam protection with Yahoo! Mail - 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] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] extension [WAS] RE: Action not forwarding to another Action
Wow, that's almost like me setting the mapping extension to .asp and confusing the heck out of the people I was talking too. Has that issue come up? An Obstacle is something you see when you take your eyes off the goal -Original Message- From: Au-Yeung, Stella H [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 5:51 PM To: '[EMAIL PROTECTED]' Subject: Action not forwarding to another Action Hi: I have a similar problem that I can't invoke OrderSearchAction.exe from OrderMaintainAction. I set a debug breakpoint at the beginning of OrderSearchAction and never get there. actionpath=/app/DeleteOrder type=com.cat.action.OrderMaintainAction name=OrderFormBean scope=request validate=false forward name=Content path=/app/ListOfOrder.exe redirect=true / forward name=ContentError path=/app/DeleteError.jsp/ /action actionpath=/app/ListOfOrder type=com.cat.action.OrderSearchAction name=OrderSearchFormBean scope=request validate=false forward name=Content path=/app/ListOfOrder.jsp/ forward name=ContentError path=/app/OrderError.jsp/ /action I have two other questions: 1) Can someone also tell me if I have a Request attribute defined in OrderMaintainAction, if the above redirection works, will I be able to see the same Request attribute in OrderSearchAction? 2) A general question: if formA is linked to formB through a 'link'. If I click on the 'link' in formA, can I get to the passed parameter of FormA by doing Request.geParameter(id) or I can only retrieve 'id' throught a 'submit' rather than through a 'link'? Thanks for any help! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Phase in Tiles?
Sure, you can refer to both tiles definitions and .jsp files in the same application. -Original Message- From: Marcella Turner [mailto:[EMAIL PROTECTED] Sent: Monday, February 23, 2004 9:34 AM To: [EMAIL PROTECTED] Subject: Phase in Tiles? I'm interesting in converting an existing Struts application with traditional JSP's and Actions into a Tiles application. Can I take a phased in approach where some forwards point to the tiles-def.xml and some do not? Or is the tiles-def.xml approach all or nothing? Thanks, Marcella _ Say good-bye to spam, viruses and pop-ups with MSN Premium -- free trial offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] - Request against Session
Just to throw a little liquid (gasoline or water) on this fire... Let's say there are two ways to look at determining your current session state: #1 Is the Deterministic Automaton (for any set of inputs there is an output) #2 Is the Nondeterministic Automaton (for any set of inputs the output is unknown) Some, if not many, applications can have the user interface abstracted as a #1. If this is the case, you can simply pass a series of tokens (the inputs) to determine which page you SHOULD be on. In these cases, passing hidden fields is an highly desirable way of doing business (lends to clustering, no dead sessions hanging around, etc...) On the other hand, other types of interfaces don't lend themselves to this way of doing business: (i.e. they are dependant on internal or unknown factors to determine what to do/display). In these cases, may or may not need a session to determine where you are/where you are going to maintain the proper flow/state of the application. ??Comments?? -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Monday, February 16, 2004 10:42 AM To: Struts Users Mailing List Subject: Re: [OT] - Request against Session Ah.. I'm having a bad hibernate day instead today so I'm a bit more distracted from this debate. Truth is I'm pretty stupid, my simplistic way of looking at the world tells me that if i need to temporally store data collected from some forms that storing in the session is a way to do this. The api says. The session persists for a specified time period, across more than one connection or page request from the user. Seems to fit the bill to me. Each form is a request and i need a structure in the web tier to store the data. Until such a time when the user is ready to complete whatever s/he is doing and thus commit everything to the model. I even concede I'm out-gunned in terms of the folk advocating such things, but I just cant see why everyone's so against sessions. I'm in crisis attempting to resolve the incongruity between my and folk's, who know better than me, views, but I just don't get it. But when did sessions become the root of all evil? What are they there for? I even like the idea of dynamically generating hidden values as an alternative or an optimization but surely session is a valid tool to use. Perhaps my understanding of data-mining is erroneous but I fail to see how storing data collected via a view (in the web tier) for a short time has anything to do with it. Data mining is the process of discovering meaningful new correlations, patterns and trends by sifting through large amounts of data stored in repositories, using pattern recognition technologies as well as statistical and mathematical techniques. (Gartner Group). Another definition I found is Data Mining follows an inductive strategy of analyzing data where users apply machine learning algorithms to gain non-obvious knowledge from the data. [http://www.jcp.org/en/jsr/detail?id=073] I'm not suggesting any such thing, I'm not forming any analysis on the data collected and stored in httpsession as that would be silly. Nor do i see that the proposed alternative as having anything to do with datamining. While I can see how a high traffic site need an alternative to httpsession the storing data collected from the view temporarily before its ready to be permanently stored (What i understand of what Andrew has been saying, and I think craig's recommendations). I cant see how the syllogism all use of httpsession is bad can be justified. Not on all fours but purring like a kitten :o) Mark On 16 Feb 2004, at 15:56, Michael McGrady wrote: You [Mark Lowe] said: Perhaps HttpSession is a blunt instrument, and would need to be substituted by another persistence mechanism like say writing to a temporary text file, but IMO this would be something that one would want to fix in the case that something were broken. Hi, Mark, Your reading generating dynamic views as somehow relating to alternative forms of persistence is not correct. The idea is to get AWAY from this PERSISTENCE solution and to start using view LOGIC. Michael And you [Mark Lowe] said: i know its a naive position but I thought part of the scope of the java language was in part an attempt to abstract software development from the hardware. Yes. But you are misreading completely what I said. I have no idea how you got to here from what I said. I was doing the opposite, viz. trying to get you to deal with an API for the logic of your views. This has nothing remotely to do with persistent mechanisms or hardware. I suspect we are two ships passing in the night here. You [Mark Lowe] said: Okay agreed that generating hidden fields would be a reasonable means of persistence. Yes I was assuming, perhaps in error, that what was being suggested was writing hidden fields. In fact I think I may do this. Also agreed that if the
RE: Re-populating form after validate fails
I've seen this happen a couple of times with different people (myself included). It seems like the default (expected) behavior is: use the bean value unless it's blank, then use the html i.e. if html= and bean=text it should be the bean value if the bean= and the html=asdasdf then it should be asdasdf. And if you have html=foo and bean=bar then it should be bar. -Original Message- From: Paul Barry [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 8:24 AM To: [EMAIL PROTECTED] Subject: Re: Re-populating form after validate fails I finally figured this out. It was a stupid mistake. I had html:text property=username value= /. The value= overrides what was in the bean. Once I removed this, problem solved. Paul Barry wrote: If validate fails, your action won't even be processed. You can't use any of the forwards that you may set up for your action, because your action never executes, you can't do a mapping.findForward(failure). Once validate fails, it forwards to the input. The struts example has validate=false (it uses the default) for the LogonAction. It uses the validator to validate the form, so that is a different example. I found the answer to my extra credit question, you can use input=forwardName in your action if you have inputForward set to true in your controller config. I have this set up, but it doesn't change any thing. Here is the log of what happens when I fill in a username and no password: Processing a 'POST' for path '/myaccount/loginAction' Storing ActionForm bean instance in scope 'request' under attribute key 'LoginForm' Populating bean properties from this request Validating input form properties Validation failed, returning to 'myaccount/login' processForwardConfig(ForwardConfig[name=myaccount/login,path=/myaccount/logi n.do,redirect=false,contextRelative=false]) Processing a 'POST' for path '/myaccount/login' Storing ActionForm bean instance in scope 'request' under attribute key 'LoginForm' Populating bean properties from this request Looking for Action instance for class myapp.struts.actions.ForwardAction Returning existing Action instance From toString in my ForwardAction - Path=[/WEB-INF/jsp/myaccount/login.jsp],Form=[Username=sdfdsf,Password=] processForwardConfig(ForwardConfig[name=null,path=/WEB-INF/jsp/myaccount/log in.jsp,redirect=false,contextRelative=true]) I have removed all the info from these messages to make it easier to read. All of these messages are DEBUG messages that come from the RequestProcessor, except the toString that I am printing out near the end. This all looks like exactly what I would want to happen. The original POST goes to loginAction, the validate method is called and fails, so it forwards to myaccount/login. The form is stored in the request scope. When I call the toString method after the form has been populated, you can see the username property is populated. This makes sense. The request was forwarded from the original action to this action. The request parameters are still the same as the original request, so when the form is populated, the username field is populated. What doesn't make sense to me is that when I look at my form on the HTML page (which is /WEB-INF/jsp/myaccount/login.jsp in this case), the username property is not populated. This doesn't make sense to me. The html:form tag should see that the form property for username is populated, so therefore the 'html:test property=username' field should be populated with that value. What am I missing here? Subject: Re: Re-populating form after validate fails From: [EMAIL PROTECTED] Date: Wed, 4 Feb 2004 12:50:17 +1100 To: Struts Users Mailing List [EMAIL PROTECTED] oops, you could be right. I left that out when I was genericising my action tag... just trying to make it more generic. However, my point is still that when validate fails then the errors will not be empty... that is where your action tells struts to forward as: forward = mapping.findForward(failure); and in your struts entry you can see (in my example) that failure is defined as the same form (but it could be anything) an example of this is in the sample struts project in the struts tutorial where the login screen forwards to welcome if login was okay, or back to login if it failed. so I'm not sure if the input parameter is responsible for the forward... it could be the default? Cheers, Heya Gosper CSC Australia 212 Northbourne Ave, Braddon ACT 2612 Ph: +61 (0) 2 6246 8155 Fax: +61 (0) 2 62468100 MOB: 0401 611779 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential
RE: [POLL] Your PSE? Struts, Tomcat, Java, Apache, SSL, mod_jk, e tc.. .
Current: Tomcat 4.1, IIS, mod_jk2, Windows 2000, SSL on external device Future: Websphere 5.1, Apache 2.0, HP-UX 11, SSL on external device Preference: Tomcat 4.1, Apache 2.0, mod_jk2, Linux (Redhat 8), mod_ssl The future is defined by the suits and their money, not by my personal preference. I don't know of any poll sites, but that might be an interesting project. -Original Message- From: Viggio, Alex [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 21, 2004 4:45 PM To: 'Struts Users Mailing List' Subject: [POLL] Your PSE? Struts, Tomcat, Java, Apache, SSL, mod_jk, etc.. . A quick poll as my group considers migrating a Struts web app to a more up-to-date environment. What production environment(s) are your Struts web applications running under? What operating system? What versions of Struts, Tomcat (or other JSP/Servlets container), Java, Apache (or other HTTP server), SSL plug-in (e.g. Ben-SSL), connector plug-in (e.g. mod_jk), etc.? If someone knows of an existing online poll covering this or of a more effective way to conduct this poll using a *free* online polling service please post that information! I think others might find this interesting. An unrelated, but interesting question: Are you planning another future upgrade of your Struts web app to an updated environment, or will you divert that energy into migrating to a different web framework/platform all together? Thanks, - Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Eclipse/Tomcat WebappLoader
If that class never changes just deploy it in a jar... No matter what we use today, sooner or later I'm sure we'll be using something else -Ted Husted -Original Message- From: Raphaël di Cicco [mailto:[EMAIL PROTECTED] Sent: Friday, January 09, 2004 5:11 AM To: Struts Mailing List Subject: [OT] Eclipse/Tomcat WebappLoader Hi, I know this is a little off topic but this has to do with J2EE deployment so it might be useful for some people. In my environment, I use Eclipse with Struts 1.1, Tomcat 4.1 and Sun JDK 1.4. Eclipse makes it possible to recompile and redeploy my classes every time I change them. This is very convenient. I understand that the WebAppLoader reloads the whole application if there is a change in one of the files. However, I have a static class that loads an enormous amount of data into memory. Therefore after 2 or 3 changes in my code I run into a OutOfMemory exception that is very annoying (the exception usually occurs somewhere in Win32FileSystem.class). I would like to prevent the webappLoader from reloading this particular class, and I know that it is is possible to prevent a jar file from beeing reloaded, but I don't know about a class. Thanks in advance Raphaël - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Checkboxes with session-scoped DynaActionForms
I think there is a common misconception that if you use DynaActionForms you don't need to write an ActionForm AT ALL. While this is true, you may also subclass the DynaForm and provide a similar level of functionality as a normal form. Kmart Tech News news://uskihsvtfinsys The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 4:47 PM To: Struts Users Mailing List Subject: Re: Checkboxes with session-scoped DynaActionForms Wendy Barrett - Thanks for your help! Both of your answers helped me fix the problem I was having with checkboxes and session-scoped DynaActionForms. Wendy - I feel like the reset method of the DynaActionForm should be able to automatically take care of checkboxes, perhaps with a little extra help like specifying clearOnReset=true or isCheckbox=true in the set-property element for the property, but oh well... I'm not going to push it on the dev list. Matt - Original Message - From: Wendy Smoak [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 3:03 PM Subject: RE: Checkboxes with session-scoped DynaActionForms From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Also, It looks like I am going to have to subclass DynaActionForm or DynaValidatorForm so that I can reset the checkboxes in the reset() method of the form bean. That seems like quite a pain (kind of defeats the purpose of Dyna forms, doesn't it?). Dyna forms merely free you of the need to write all those get/set methods. Defining the properties in struts-config.xml does not mean you can't or shouldn't override the 'reset' and/or 'validate' methods. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] 833r
IMHO Schoefferhoffer hefe-weisen is probably one of the best beers in the world... Of course it is impossible to get in the states so I'm stuck with JW Dundee's Honey brown lager. Note, anyone in the Heidelberg/ area who could fax me a few Schoefferhoffers I'll reimburse you the long distance charges. The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance. -Original Message- From: Craig Tataryn [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 10:29 AM To: [EMAIL PROTECTED] Subject: RE: [OT] Beer And the only thing good about that Marca Bavaria are the comercials :) Craig W. Tataryn From: Chappell, Simon P [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: [OT] Beer Date: Fri, 12 Dec 2003 09:26:11 -0600 I don't like Miller's either, and I live closer to Milwaukee than Chippewa Falls. -Original Message- From: Hookom, Jacob [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 9:10 AM To: Struts Users Mailing List Subject: RE: [OT] Beer What about Leinie's? If you live in Wisconsin, it's a requirement to love Leinie's-- you should know that Simon. Wisconsin-- where you have to bring your own fun. Jake -Original Message- From: Chappell, Simon P [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 8:58 AM To: Struts Users Mailing List Subject: RE: [OT] Beer I think that these replies kinda prove my point! :-) (Notice how no one ever defends American beer!) Simon -Original Message- From: Brice Ruth [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 8:54 AM To: Struts Users Mailing List Subject: Re: [OT] Beer Or Ireland or Germany, for that matter. You need stray no further than Guiness (your stout) and Hacker Pschorr, your Hefeweiss. Set for life :) VAN BROECK Jimmy wrote: Then you were lucky that at that moment no one from Belgium was active or they would have proved otherwise. ;) -Original Message- From: Chappell, Simon P [mailto:[EMAIL PROTECTED] Sent: vrijdag 12 december 2003 15:51 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: [OT] Beer Andrew, A few of the recent conversations about beer, took a geopolitical turn ... especially when I pointed out that all American beer is recycled and the only good stuff comes from England! :-P Simon -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 1:22 AM To: Struts Users Mailing List Subject: RE: [OFF TOPIC - VERY OT] STRUTS PROGRAMMER JOB. snip thank god they have a free trade agreement with the rest of the world /snip I would suggest that this thread is veering dangerously towards a discussion of global geopolitical economics. Such discussions are inappropriate for the struts list (imho somewhat more so than the usual OT stuff). This being Friday Id suggest you return to a far more appropriate topic. ie: BEER -Original Message- From: Mike Deegan [mailto:[EMAIL PROTECTED] Sent: Friday, 12 December 2003 15:14 To: Struts Users Mailing List Subject: Re: [OFF TOPIC - VERY OT] STRUTS PROGRAMMER JOB. they are but to get a fair price for one??? who knows ... thank god they have a free trade agreement with the rest of the world .. ohhh sorry let me re-phrase a free trade agreement with whoever they see fit at the time of the agreement ! - Original Message - From: Marcus Peixoto [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, December 11, 2003 12:28 PM Subject: Re: [OFF TOPIC] STRUTS PROGRAMMER JOB. Are you kidding ? Are programmers for sale in US ? Em Qui, 2003-12-11 às 20:59, Martin Gainty escreveu: Going rate is about 6$/hr - Original Message - From: Tiago Henrique Costa Rodrigues Alves [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, December 11, 2003 1:37 PM Subject: RE: [OFF TOPIC] STRUTS PROGRAMMER JOB. I wrote my email wrong: [EMAIL PROTECTED] YOU DONT NEED TO REPLY TO THE MAILING LIST send me an email ([EMAIL PROTECTED]) Sorry for the off topic, but I just need to hear from you guys... I am looking for an American Job, I live in Brazil and I have 2 years experience in Java + Struts + OJB + Apache + TomCat + UML + PHP + ASP. Web in General How much an Web/Java Developer can make? How easy can I get a job from Brazil? Thanks, Tiago Henrique C. R. Alves - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
RE: Cahin actions and GZIP filter
Just as a side note, if you are using apache as a web server, you could also just turn on the mod_deflate or mod_gzip in apache and not have to screw around the the filter in your servlet engine. Kmart Tech News news://uskihsvtfinsys The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance. -Original Message- From: Jose Ramon Diaz [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 2:26 AM To: 'Struts Users Mailing List' Subject: Cahin actions and GZIP filter Hello, I´m trying to use a filter to compress my application using GZIP. I have read: http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p3.html and it seems to work except when I chain actions. It uses a RequestWrapper for not writing the stream to the response. If I call one action which executes a forward to another action, I get te exception: java.io.IOException: Cannot flush a closed output stream at es.aranzadi.base.controller.CompressionResponseStream.flush(CompressionRespo nseStream.java:84) at es.aranzadi.base.controller.CompressionResponseWrapper.flushBuffer(Compressi onResponseWrapper.java:38) at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher. java:244) at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.GetParametersRequestDispatcher.forward(GetParametersReques tDispatcher.java:189) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 69) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces sor.java:455) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at es.aranzadi.base.controller.CompressionFilter.doFilter(CompressionFilter..jav a:67) at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.j ava:560) at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDis patcher.java:306) at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java: 767) at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.ja va:803) at java.lang.Thread.run(Thread.java:484) Why the stream is closed? My application never colses the response stream. Can anybody help me? Jose R. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Digester does not like ''
Yes, you can't use '' for the same reason you can't use '' or (potentially) ''. They are special characters. There are ways around this, for a (very) little more info: http://www.xml.com/pub/a/2003/02/26/qa.html Kmart Tech News news://uskihsvtfinsys The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance. -Original Message- From: Andy Schmidgall [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 12:44 PM To: Struts Users Mailing List Subject: RE: Digester does not like '' Well, I know amp; is the character entity for , but I'm just not clear on why amp; works in this case... Is it simply because '' is flagged in the parser as reserved for entities of the form xxx;, or is there another reason? That's all I was asking. Sorry if I wasn't clear :) -Andy -Original Message- From: Christian Bollmeyer [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 11, 2002 11:35 AM To: Struts Users Mailing List Subject: Re: Digester does not like '' amp; is the character entity for the ampersand sign ''. -- Chris NB. This is so basic that you absolutely should look this up when seriously doing web development. - Original Message - From: Andy Schmidgall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, December 11, 2003 6:23 PM Subject: OT: Digester does not like '' I'm sure I'm demonstrating a lack of basic knowledge about character encoding here, but why does amp; work when '' doesn't? The thing that gets me is that they both have '' in them :) -Andy -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 10:54 AM To: Struts Users Mailing List Subject: RE: Digester does not like '' Try amp; -Original Message- From: Chiming Huang [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 11:51 AM To: Struts Users Mailing List Subject: Digester does not like '' Hi, We are using the Digester which comes with the Struts 1.1 for reading xml files. The Digester will throw exception if the data contains an '' character. Is there a way to work around this? Thanks, Chiming - Do you Yahoo!? Free Pop-Up Blocker - Get it now - 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] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question regarding ActionForms.
Welll, Common misconception, but, technically all java calls are by value. That is, there is no such thing in java as passing something by reference. The hook is, the value passed in when something is an Object is actually a reference (aka a pointer) to the existing object. While you can manipulate the thing that this points to, you cannot reassign it point to something else. I got all bunged up about this also and I think it's a pretty important point that can easily be missed if you came into java from another language that allows by reference calls. By saying that objects are passed by reference folks are actually making things more complicated than they need to be... For a really good explanation see http://www.yoda.arachsys.com/java/passing.html worse is better -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 10:52 AM To: [EMAIL PROTECTED] Subject: Re: Question regarding ActionForms. Welcome to java 101, formerly known as the struts-users mailing list. Object references are passed to method calls. While that reference cannot be changed, the object that it references can. On the other hand, if you create a new action form and assign it to the form parameter, nothing will happen because that reference cannot be changed. Larry [EMAIL PROTECTED] 12/01/03 8:42 AM Hi, I am currently using Struts 1.0.2 and have notice something with regard to handling of ActionForms. Why is it, that in the perform() method of my Action I am able to modify the passed-in ActionForm and all modifications that I make to the ActionForm in my Action have effect on the ActionForm in the session, without the need to reset the modified form in the session. e.g. public ActionForward peform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, )throws IOException, ServletException { MyForm myForm = (MyForm)form; form.setMemberA(valA); form.setMemberB(valB); // why dont I have to do the following: session.setAttribute (myFormName, myForm); return success; } I thought that since Java passes method arguments by value and not by reference, then I would have to reset my modifed copy back into the session for changes on the form to be visible in the form in the session ? Any insights on how this mechanism works would be greatly appreciated. Thanks, Sepand - 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] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Copy properties from DynaActionForm
Same thing, beanutils is designed to work with DynaBeans... worse is better -Original Message- From: Franck [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 4:15 PM To: 'Struts Users Mailing List' Subject: Copy properties from DynaActionForm Hi, With an ActionForm, there is a smart way To copy properties of the Form to another Bean : BeanUtils.copyProperties(userform, user); But is there a way to do something like this With a DynaActionForm or a DynaValidatorForm ? Thanks -- Franck Lefebure equipe web http://www.orangecaraibe.com mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Exception Handling
Welll, The way I've done this before is to wrap all Exceptions in a Custom type and throw it all the way back to struts. This seems to work well for trivial business style apps, I'm not sure how it would hold up in something with more complexity in the business layer. For example, My CRUD code would catch SQL exceptions, check out what the real problem is, and, if it is a genuine problem, throw a new FrameWorkException with the proper error message (or message key) contained in it. I would also be curious on how other folks do such things however... worse is better -Original Message- From: Baljinder Singh [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 9:55 AM To: Struts Users Mailing List Subject: Struts Exception Handling Hi All, I am looking for a robust exception handling approach in struts. Can somebody help me in that. My framework consists of struts interacting with session beans which then interact with DB through DAO. Now if during a CRUD operation, for example there is a duplicate key exception thrown, how should I handle it so that I can show the user exact message that duplicate key is being inserted. Same for all kind of database messages and validations. Thanks Regards, BS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Stress Test
I use Jmeter for this. Works very nicely. Assuming your application is easily scriptable, you can record a series of actions (via the built in proxy) and replay them in a very short time. It is much easier to use than QA load and about as easy to use as M$ webcat. It is, however about as flexible as QALoad and about much more flexible than M$ webcat. My $0.02 worse is better -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 10:56 AM To: 'Struts Users Mailing List' Subject: RE: [OT] Stress Test David, Nothing. Nada. Zip. ZIlch. The logs show basically no response; from the client perspective the web app simply stops responding. I suspect I've either got a memory leak, or a database connectivity issue. Hopefully I can stress test this thing enough today to identify where in the code it fails. Once I know where it fails I should be able to fix it. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:52 AM To: Struts Users Mailing List Subject: RE: [OT] Stress Test So after 6 hours, what do your log files (web server and java application server) show? Do they show struts actions being performed? Does it show out of memory errors? Anything like that? Regards, David -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 10:05 AM To: '[EMAIL PROTECTED]' Subject: [OT] Stress Test Hi All, I've got a problem with my current web app where it stops responding after about 6 hours. I need to set up a test environment and simulate multiple logon's so I can trap my way through the code and figure out where it is failing. I think there is a tool available that can be used to do this - HTTPerf (I think), but I'm not sure if this will do what I want. Does anyone have any experience with this? Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [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] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem
Also check $CATALINA_HOME/logs and see if there is more information in one of the log files. It is certainly not a struts specific problem and the tomcat-user list is probably a more appropriate location for this query. worse is better -Original Message- From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 8:17 AM To: Struts Users Mailing List Subject: Problem hi ALl I am in a trouble as when i shifted my site from windows to Linux it has been stopped working and giving me the following error Apache Tomcat/4.0.6 - HTTP Status 503 - Servlet action is currently unavailable type Status report message Servlet action is currently unavailable description The requested service (Servlet action is currently unavailable) is not currently available. Any help will be highly appreciated Regards Gary - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Actions which create sessions seem to hang
Perhaps you don't have a session timeout set in JBoss and you are hitting an upper limit (65K sessions or something)? worse is better -Original Message- From: Brian McSweeney [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 6:11 AM To: 'Struts Users Mailing List' Subject: Actions which create sessions seem to hang Hi guys, This is a bit of a vague question I know, but perhaps someone can help. It may be a struts issue or a jboss issue. I'm not sure. I'm using JBoss 3.2.2 and struts. After about 24 hours of my application running, struts actions which create a http session seem to hang. I have no idea why this would be. If I restart jboss the behaviour goes away. Is there anything I can do to see why this would be? Or what I could do about it? Any help would be so greatly appreciated. Thanks very much, Brian - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Lazy questions on this list [FRIDAY!]
Excellent! I've not seen that before, can we get that put on in a web form? Hmmm, maybe that's a weekend project worse is better -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 5:16 AM To: Struts Users Mailing List Subject: Re: Lazy questions on this list [FRIDAY!] I think that the balancing act between catering for the newbies and testing the patience of the grizzled struts listers is always a difficult one. Some lists that I have been which keep off-topic or lazy questions to a minimum do it in several ways. The css-discuss list has a list policy much like the 'how-to-ask-intelligent-questions' - fyi it's at http://www.css-discuss.org/policies.html All the css-discuss listers stick to it and police themselves pretty well. I posted what turned out to be off-topic questions a couple of times and got politely told so off-list just by other listers. Another list is just as busy as struts-user (visbas-l) when I used it, and in their case, listers publicly informed newbies immediately for any transgressions. I think the key thing for success on both those lists is that all listers did the policing and obviously stuck to the rules themselves. There were also lots more apologies for taking threads off-topic or whatever. Now for some [FRIDAY] input: we could of course use this: STANDARDIZED BONEHEAD REPLY FORM (c) copyright 1999 by someone else. (check all boxes that apply) Dear: [ ] Clueless Newbie [ ] Lamer [ ] Flamer [ ] Loser [ ] Spammer [ ] Troller [ ] Me too er [ ] Pervert [ ] Geek [ ] Freak [ ] Nerd [ ] Elvis [ ] Racist[ ] Fed [ ] Freak [ ] Fundamentalist[ ] Satanist [ ] Homeopath [ ] Unbearably self-righteous person I Took Exception to Your Recent: [ ] Email [ ] Post to struts-user It was (check all that apply): [ ] Lame [x] Stupid [ ] Abusive [ ] Clueless [x] Idiotic[ ] Brain-damaged [ ] Imbecilic [ ] Arrogant [ ] Malevolent [ ] Contemptible [ ] Libelous [x] Ignorant [x] Clueless [x] Stupid [ ] Fundamentalist [ ] Boring [x] Dim[ ] Cowardly [ ] Deceitful [x] Demented [ ] Self-righteous [ ] Crazy [ ] Weird [ ] Hypocritical [ ] Loathsome [ ] Satanic[ ] Despicable [ ] Belligerent[ ] Mind-numbing [ ] Maladroit [x] Much longer than any worthwhile thought of which you may be capable. Your Attention is Drawn to the Fact That: [ ] You posted what should have been emailed [ ] You obviously don't know how to read your newsgroups line [ ] You are trying to make money on a non-commercial newsgroup [ ] You self-righteously impose your religious beliefs on others [ ] You self-righteously impose your racial beliefs on others [ ] You posted a binary in a non-binaries group [ ] You don't know which group to post in [x] You posted something totally uninteresting [ ] You crossposted to *way* too many newsgroups [ ] I don't like your tone of voice [x] What you posted has been done before. [x] Not only that, it was also done better the last time. [ ] You quoted an *entire* post in your reply [ ] You started a long, stupid thread [x] You continued spreading a long stupid thread [ ] Your post is absurdly off topic for where you posted it [ ] You posted a followup to crossposted robot-generated spam [ ] You posted a test in a discussion group rather than in alt.test [ ] You posted a YOU ALL SUCK message [x] You posted low-IQ flamebait [x] You posted a blatantly obvious troll [ ] You followed up to a blatantly obvious troll [ ] You said me too to something [ ] You make no sense [x] Your sig/alias is dreadful [ ] You must have spent your life in a skinner box to be this clueless. [ ] You posted a phone-sex ad [ ] You posted a stupid pyramid money making scheme [ ] You claimed a pyramid-scheme/chain letter for money was legal [ ] Your margin settings (or lack of) make your post unreadable. Each line just goes on and on, not stopping at 75 characters, making it hard to read. [ ] You posted in ELitE CaPitALs to look k0OwL [ ] You posted a message in ALL CAPS, and you don't even own a TRS-80 [ ] Your post was FULL of RANDOM CAPS for NO APPARENT REASON [ ] You have greatly misunderstood the purpose of this newsgroup. [ ] You have greatly misunderstood the purpose of the Internet. [ ] You are a loser. [ ] This has been pointed out to you before. [ ] You pretended to be female to try to attract more replies. [ ] You didn't do anything specific, but appear to be so generally worthless that you are being flamed on general principles. It is Recommended That You: [ ] Get a clue [ ] Get a life [ ] Go away [ ] Grow up [ ] Never post again [ ] Read every newsgroup you posted to for a week [ ] stop reading Usenet news and get a life [ ] stop sending Email and get a life
RE: Actions which create sessions seem to hang
Are you using Tomcat as the servlet runner (I don't know a lot about Jboss) or is there a built-in one in Jboss? worse is better -Original Message- From: Brian McSweeney [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 8:54 AM To: 'Struts Users Mailing List' Subject: RE: Actions which create sessions seem to hang Hi Mike, Thanks very much for the reply. I think in jboss there is a standard session timeout anyway of 30 minutes. I've changed this now to 10 minutes. Is there a way to tell how many sessions you have running on an application server? Cheers, Brian -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: 21 November 2003 13:48 To: 'Struts Users Mailing List' Subject: RE: Actions which create sessions seem to hang Perhaps you don't have a session timeout set in JBoss and you are hitting an upper limit (65K sessions or something)? worse is better -Original Message- From: Brian McSweeney [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 6:11 AM To: 'Struts Users Mailing List' Subject: Actions which create sessions seem to hang Hi guys, This is a bit of a vague question I know, but perhaps someone can help. It may be a struts issue or a jboss issue. I'm not sure. I'm using JBoss 3.2.2 and struts. After about 24 hours of my application running, struts actions which create a http session seem to hang. I have no idea why this would be. If I restart jboss the behaviour goes away. Is there anything I can do to see why this would be? Or what I could do about it? Any help would be so greatly appreciated. Thanks very much, Brian - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URGENT: getting a Session Attribute from ActionForm
I agree with Richard and Wendy, you probably don't need to actually instantiate the form, get your bean from somewhere (the ether?) and do a BeanUtils.copyProperties(dest,source). This will allow a nice decoupling of your business code from your web application code Alternatively, I would recommend writing a function to push the data into your form and simply pass the form as a parameter to it. i.e. in your action.execute you could do it like so: execute (... ActionForm form) { ... Person person = (Person)Session.getAttribute(person); MyDataPopulator.populateFooData(form, person); ... Or ... Person person = (Person)Session.getAttribute(person); Object myBean = MyDataGetter.getMyData(person); BeanUtils.copyProperties(form, myBean) ... I personally prefer method 2 at this point, but I can see the value of method 1 (less moving data around). I actually wrote an app doing all the data access in the forms and, to be honest, I kinda like it that way too. The only caveat is that your app and all your data/business code becomes Struts-only. If you can live with that, then perhaps the road you are pursuing is ok. worse is better -Original Message- From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 4:58 PM To: 'Struts Users Mailing List' Subject: RE: URGENT: getting a Session Attribute from ActionForm Mohan, I agree with Wendy. Prepopulate the form by instantiating it in the action that forwards to the page that displays the page. Perhaps you can create a constructor in the ActionForm that takes a userinfo object and invoke this from your Action.execute method. Regards, Richard -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 8:22 AM To: [EMAIL PROTECTED] Subject: RE: URGENT: getting a Session Attribute from ActionForm My aim is to get a session Attribute called as userinfo in the ActionForm. In the ActionForm i have methods called getAddress,getAddress1,getAddress2. These are all addresses of this person. So what i want to do is, if all the info is already present in the db, i want to pre-populate it.If not the user should beable to fill out the form. In my getAddress() method i want to do something like this public Address getAddress(){ Userinfo userinfo = session.getAttribute(userinfo); Person p = userinfo.getPerson(); Address addr = p.getAddress(Appl Home Address); if(addr!=null) return addr else return new Address() } similarly public Address getAddress1(){ Userinfo userinfo = session.getAttribute(userinfo); Person p = userinfo.getPerson(); Address addr = p.getAddress(Work Address); if(addr!=null) return addr else return new Address() } This is the reason why i need to access the session Attribute --Thank you Mohan From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] When the user logons to the system, it takes him to a form. Based on the logon values, if the user already has filled the form, form should be populated with values the user can then modify existing values save, if not the user can fill in the fresh form and save it. For this i need to get this user logon info in my ActionForm so that i can write the getters and setters in the ActionForm accordingly Have you closely examined the struts-example webapp? It does exactly what you're talking about. Search the archives for 'pre-populate form' and variations, it's a common topic. Once your user is logged in, I'm guessing you are putting something in session scope. In your Action, you can call session.getAttribute(userName) and use that to retrieve the values from wherever they are stored. Then pre-populate the ActionForm and forward to the 'edit' page. I would not put user info in a hidden field on the form. It would make it easier for someone to impersonate another user. (Depends on how sensitive your data is whether that's an issue.) -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may
RE: Fruits of your help
Cool, my wife uses that stuff all the time... However, just in case you're interested... HTTP Status 400 - Invalid path /US/crafts/crafts/category was requested type Status report message Invalid path /US/crafts/crafts/category was requested description The request sent by the client was syntactically incorrect (Invalid path /US/crafts/crafts/category was requested). Apache Tomcat/4.1.27 worse is better -Original Message- From: Brice Ruth [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 11:40 AM To: Struts Users Mailing List Subject: Re: Fruits of your help Thanks for the feedback, I'll get this into our issue tracker :) Btw, in case anyone's interested - this site deploys as an 80.0MB WAR file ... wow! All managed under CVS using Eclipse and Dreamweaver MX 2004. Carl wrote: Very nice site, I hope to be able to master Struts as you ! Browsing it, I've found 2 mistakes : - in French (in the menu) Garden should be translated in Jardin - under mozilla 1.5, the select country in the firste jsp display curuiously (instead of the country's names it display html tags) Carl Brice Ruth wrote: Thanks to all on this list that helped me with my JSP/Servlet/Struts/Tiles issues ... the fruit of your help is now live (under a MUCH accelerated schedule and not nearly enough time for QA/QC, but what's new?) http://www.fiskars.com/ If the first thing you see isn't a Flash movie, and the home page isn't distinctively orange, then you're probably seeing the old site because of DNS propagation delays. This site makes use of heavy internationalization, is almost entirely Tiles driven from tiles-defs.xml, only a handful of pages still use the Struts ForwardAction to an actual .jsp file. A lot of XML on the backend, loaded parsed into application context for optimization, iBATIS access to a MySQL database (transparent to the application, our testing servers connect directly to an AS/400 DB2 instance - thank you iBATIS!), and of course, Struts/Tiles/JSTL used throughout. I couldn't have done it without this list's help ... thank you again!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tokens
Call saveToken() in GET (or read) Test isTokenValid() in the POST (or write) to see if it is a dupe (duplicate returns false [bad token]) worse is better -Original Message- From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 11:19 PM To: Struts Users Mailing List Subject: Re: Tokens hi Ramadoss Thanks for your help. But this is not i m looking for. I may not be able to explain my question proeprly . But i m looking for saveTOken() method implementation in struts which does not allow duplicate entry of records into the database when the user click on submit button twice. - Original Message - From: Ramadoss Chinnakuzhandai [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 7:56 PM Subject: RE: Tokens Hi Gurpreet, If what I understand is correct from your question, you can use split function the same way as you use String Token...following is sample snap shot String str = botherouioero:and:foroffo:mar:ssod:slave; String[] arr = str.split(:, 9); System.out.println(length of arr[] is: + arr.length); for (int i = 0; i arr.length; i++) { System.out.println(value is : + arr[i]); } String[] ar = str.split(o, 8); System.out.println(length of arr[] is: + ar.length); for (int i = 0; i ar.length; i++) { System.out.println(value is : + ar[i]); } Where the number 9 and 8 denotes number of occurences you want to consider after which it will be treated as whole single string and will be included into your String Array. Hope this help, -Ram -Original Message- From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 6:19 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Tokens hi All Can somebody explain small code snap shot of using Tokens. AS i am trying to use it in one of my application. but due to some unknown reason it is not working. I may be doing something wrong. Any help will be appreciated Regards GAry - 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] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form data vs request attributes
Although, I don't really see a major problem with storing the options in the form itself (just to make things simple). Anybody have a compelling reason NOT to do this? i.e. I put my statesCollection as a property on my ActionForm with a List datatype. Then I can just use the form property to populate my options. worse is better -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 6:10 PM To: Struts Users Mailing List Subject: Re: Form data vs request attributes ActionForm objects are representation of a form and the data in the form. It holds the values of your INPUT, SELECT, TEXTAREA and other form controls. The options of a SELECT control are only used to help the user choose a value; its only purpose is to give the SELECT control a value and isn't itself a value of the form. Think of it this way: the form doesn't lose any data by changing your SELECT into an INPUT type=text. Confused? Think of it another way: The OPTION values don't get submitted, only the value of the SELECT. So: 1) The ActionForm helps you get to the values submitted with the form, and so suburb is required there because it's part of the form. 2) The ActionForm doesn't hold OPTION values, only the value of the SELECT. 3) You need a way to tell html:options what to show, and you can do it by specifying a collection that's in scope (doesn't have to be the request scope). Hope all that didn't confuse you further. --- Craig Edwards [EMAIL PROTECTED] wrote: I've been fiddling around with Struts for a while now and am still a little puzzled as to whether JSPs should be getting their data from my DynaActionForm or from the session/request context. For example, if my JSP contains: html:select property=selectedCustomer size=5 html:options collection=customers property=id/ /html:select html:text property=suburb size=16 maxlength=18/ The way I have this working currently is by adding customers to the request context and by having suburb declared in my DynaActionForm. I don't appear to have to declare customers in the form, but if I don't declare suburb, I get an error... what is the difference? P.S. If it helps clarify things, the JSP I have displays a list of customers and some input fields. The user can update the input fields, press submit and they see the same page (with the new details displayed in the list). Many thanks. -- Craig Edwards Sydney, Australia __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to Run Java App. as an NT Service?
Javaservice will do this for you... Check out the tomcat distribution, they have an example. worse is better -Original Message- From: Vicky [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2003 6:17 PM To: [EMAIL PROTECTED] Subject: How to Run Java App. as an NT Service? Hello All, Sorry for off the topic question. Does anyone know how can i run my java application program as an NT service? Any pointers, code examples will be appreciated. Thanks, Vicky - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Semi OT] When does a servlet get a session?
That does not compute Your servlet HttpSession is associated with a set of requests that a specific user makes to a particular servlet. You will, at any point have many sessions for 1 instance of your servlet. I believe a session will be created when you call getSession() if one does not already exist (it's specified in the spec and I'm too lazy to look it up). -Original Message- From: Chappell, Simon P [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2003 12:40 PM To: Struts Mailing List (E-mail) Subject: [Semi OT] When does a servlet get a session? OK, I have a servlet running alongside my Struts application and it is basically used to start (from the init() method) a separate network listener for handling network requests from a number of PLC units that are incapable of generating HTTP traffic, only straight socket connections, blasting a wierd protocol called DF1 and then waiting for a reply. We have all of that working. But now we want to store a piece of information in the servlet session so that we can load-balance on a WAS cluster. When we call back into the servlet to store the information, our session information is null. My question is ... when does a servlet get a session and can we force one from the init method? This servlet never gets called, so we never have an HttpSession. Can we force it to create an HttpSession? Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 Never give in - never, never, never, never, in nothing great or small, large or petty, never give in except to convictions of honor and good sense. - Sir Winston Churchill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Poll] Action Form data types
Here's my weekly(ish) question: For the purposes of this discussion, ActionForms also mean DynaActionForms and the like... Where does everyone cast their (String) request parameters to the 'proper' datatype? #1 My ActionForms only have Strings, I manually cast stuff somewhere else. #2 My ActionForms only have Strings, I let (BeanUtils, JDBC,...) cast stuff for me somewhere else. #3 My ActionForms have java Datatypes, I let Struts(yeah, beanutils, I know) cast stuff for me. #4 I use strings for everything, I don't need to cast. - This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot find BEAN in any scope
Generally this means you did not specify the name properly i.e. bean:write name=MyForm property=whatever/ Where MyForm= your formbean name property (or any bean stuffed in your request for that matter) -Original Message- From: Pat Young [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 11:22 AM To: [EMAIL PROTECTED] Subject: Cannot find BEAN in any scope I get this error when trying to use a bean write tag... Cannot find bean org.apache.struts.taglib.html.BEAN in any scope org.apache.jasper.JasperException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 48) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) . . . Does this mean I have something set up incorrectly? I'm not sure what to make of this error. Any help is greatly appreciated. - Do you Yahoo!? The New Yahoo! Shopping - with improved product search This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: any known issues with WAS 4.0?
I've not had ANY problems in struts-1.1 that where websphere specific (mostly they where me not exactly knowing what I was doing). Have you tried to go directly to welcome.do in your browser? It could be a problem with the logic:redirect tag in you index.jsp (I've personally never used it). -Original Message- From: Bender, James [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:19 AM To: '[EMAIL PROTECTED]' Subject: any known issues with WAS 4.0? Hi, I am new to Struts and installed Struts-example, Struts-blank etc from the stable 1.1 release at jakarta.apache.org/struts. None of these work on my WAS 4.0. I get all sorts of errors and I dug through news groups applying patches that never worked all of yesterday trying to get one of them to work. Then, I installed the struts-stub (struts 1.0) example from the tutorials on the site and that one deployed perfectly. Does Struts 1.1 just not work on WAS 4.0? On struts-blank I get Error 500: through the web -- no error context provided on the line index.jsp::logic:redirect forward=welcome/ The activity log reports: IBM WebSphere AEs 4.0.1 a0131.07 #com.ibm.servlet.engine.srt.WebGroup 327cd30d 3072 2kws100900202/Default Server Servlet Error: {0}: {1} %com.ibm.ejs.resources.seriousMessages java.lang.NullPointerException at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:521) at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:436) at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:396) at org.apache.struts.taglib.logic.RedirectTag.doEndTag(RedirectTag.java:294) at index_jsp_4._jspService(index_jsp_4.java:95) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:139) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja va:286) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:415) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:544) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager .java:827) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl eServlet.java:159) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle t.java:286) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle Servlet.java:106) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47 2) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan ager.java:1012) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag er.java:913) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W ebAppRequestDispatcher.java:499) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest Dispatcher.java:278) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD ispatcher.java:105) at com.ibm.servlet.engine.webapp.SimpleFileServlet.doGet(SimpleFileServlet.java :198) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager .java:827) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl eServlet.java:159) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle t.java:286) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle Servlet.java:106) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47 2) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan ager.java:1012) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag er.java:913) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W ebAppRequestDispatcher.java:499) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest Dispatcher.java:278) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD ispatcher.java:105) at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker. java:123) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn vocation.java:67) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ estProcessor.java:122) at
RE: any known issues with WAS 4.0?
Do you have struts-1.1.jar in your /WEB-INF/lib directory? -Original Message- From: Bender, James [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:26 AM To: 'Struts Users Mailing List' Subject: RE: any known issues with WAS 4.0? I've tried jumping straight to welcome.do. at my URL: http://localhost:9080/struts-blank/welcome.do I get the error: Error 500: Failed to load target servlet [action] I am totally new to this. It sounds like I'm just doing something wrong. Does this error help guess what I might need to change? Thanks!, Jim -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:23 AM To: 'Struts Users Mailing List' Subject: RE: any known issues with WAS 4.0? I've not had ANY problems in struts-1.1 that where websphere specific (mostly they where me not exactly knowing what I was doing). Have you tried to go directly to welcome.do in your browser? It could be a problem with the logic:redirect tag in you index.jsp (I've personally never used it). -Original Message- From: Bender, James [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:19 AM To: '[EMAIL PROTECTED]' Subject: any known issues with WAS 4.0? Hi, I am new to Struts and installed Struts-example, Struts-blank etc from the stable 1.1 release at jakarta.apache.org/struts. None of these work on my WAS 4.0. I get all sorts of errors and I dug through news groups applying patches that never worked all of yesterday trying to get one of them to work. Then, I installed the struts-stub (struts 1.0) example from the tutorials on the site and that one deployed perfectly. Does Struts 1.1 just not work on WAS 4.0? On struts-blank I get Error 500: through the web -- no error context provided on the line index.jsp::logic:redirect forward=welcome/ The activity log reports: IBM WebSphere AEs 4.0.1 a0131.07 #com.ibm.servlet.engine.srt.WebGroup 327cd30d 3072 2kws100900202/Default Server Servlet Error: {0}: {1} %com.ibm.ejs.resources.seriousMessages java.lang.NullPointerException at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:521) at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:436) at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:396) at org.apache.struts.taglib.logic.RedirectTag.doEndTag(RedirectTag.java:294) at index_jsp_4._jspService(index_jsp_4.java:95) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:139) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja va:286) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:415) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:544) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager .java:827) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl eServlet.java:159) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle t.java:286) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle Servlet.java:106) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47 2) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan ager.java:1012) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag er.java:913) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W ebAppRequestDispatcher.java:499) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest Dispatcher.java:278) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD ispatcher.java:105) at com.ibm.servlet.engine.webapp.SimpleFileServlet.doGet(SimpleFileServlet.java :198) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager .java:827) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl eServlet.java:159) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle t.java:286) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle Servlet.java:106) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47 2) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan ager.java:1012) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag er.java:913
RE: any known issues with WAS 4.0?
Maybe, in your /WEB-INF/web.xml there is a servlet called action correct? Something like this... servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-valueWEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet -Original Message- From: Bender, James [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:30 AM To: 'Struts Users Mailing List' Subject: RE: any known issues with WAS 4.0? hmmm... this might be it. I have a file struts.jar in the lib directory. I noticed it contains dtds for struts 1.0 AND struts 1.1 in it. Do you think I installed the wrong release maybe? I'll hunt down the right jar file and see if that fixes it... -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:27 AM To: 'Struts Users Mailing List' Subject: RE: any known issues with WAS 4.0? Do you have struts-1.1.jar in your /WEB-INF/lib directory? -Original Message- From: Bender, James [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:26 AM To: 'Struts Users Mailing List' Subject: RE: any known issues with WAS 4.0? I've tried jumping straight to welcome.do. at my URL: http://localhost:9080/struts-blank/welcome.do I get the error: Error 500: Failed to load target servlet [action] I am totally new to this. It sounds like I'm just doing something wrong. Does this error help guess what I might need to change? Thanks!, Jim -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:23 AM To: 'Struts Users Mailing List' Subject: RE: any known issues with WAS 4.0? I've not had ANY problems in struts-1.1 that where websphere specific (mostly they where me not exactly knowing what I was doing). Have you tried to go directly to welcome.do in your browser? It could be a problem with the logic:redirect tag in you index.jsp (I've personally never used it). -Original Message- From: Bender, James [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:19 AM To: '[EMAIL PROTECTED]' Subject: any known issues with WAS 4.0? Hi, I am new to Struts and installed Struts-example, Struts-blank etc from the stable 1.1 release at jakarta.apache.org/struts. None of these work on my WAS 4.0. I get all sorts of errors and I dug through news groups applying patches that never worked all of yesterday trying to get one of them to work. Then, I installed the struts-stub (struts 1.0) example from the tutorials on the site and that one deployed perfectly. Does Struts 1.1 just not work on WAS 4.0? On struts-blank I get Error 500: through the web -- no error context provided on the line index.jsp::logic:redirect forward=welcome/ The activity log reports: IBM WebSphere AEs 4.0.1 a0131.07 #com.ibm.servlet.engine.srt.WebGroup 327cd30d 3072 2kws100900202/Default Server Servlet Error: {0}: {1} %com.ibm.ejs.resources.seriousMessages java.lang.NullPointerException at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:521) at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:436) at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:396) at org.apache.struts.taglib.logic.RedirectTag.doEndTag(RedirectTag.java:294) at index_jsp_4._jspService(index_jsp_4.java:95) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:139) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja va:286) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:415) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:544) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager .java:827) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl eServlet.java:159) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle t.java:286) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle Servlet.java:106
RE: any known issues with WAS 4.0?
Do you get any other errors in the websphere console? -Original Message- From: Bender, James [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:54 AM To: '[EMAIL PROTECTED]' Subject: RE: any known issues with WAS 4.0? I am behind a firewall -- didn't even think of that! I tried removing the dtds from the jar and placing them in WEB-INF and changing struts-config.xml to !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN struts-config_1_1.dtd and also to !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN /WEB-INF/struts-config_1_1.dtd but no luck:[ Also, Struts1.1 jar is the same as my struts.jar -- both 313 files and 1,181kb I still get Error 500: Failed to load target servlet [action] -Original Message- From: Hibbs, David [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:39 AM To: 'Bender, James'; 'Struts Users Mailing List' Subject: RE: any known issues with WAS 4.0? In that case, the problem is likely that the Action servlet failed to load its struts-config.xml file. Under WAS, this is typically because it can't access the proper DTD (are you behind a firewall?). On WAS 4.0, if you keep a copy of the DTD under WEB-INF and alter the struts-config.xml DOCTYPE to indicate !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN struts-config_1_1.dtd instead of the whole URL for the DTD it will likely be much happier. On WAS 5.0, you need to give it a URL that it can always access. David Hibbs Staff Programmer / Analyst American National Insurance Company -Original Message- From: Bender, James [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 9:26 AM To: 'Struts Users Mailing List' Subject: RE: any known issues with WAS 4.0? I've tried jumping straight to welcome.do. at my URL: http://localhost:9080/struts-blank/welcome.do I get the error: Error 500: Failed to load target servlet [action] I am totally new to this. It sounds like I'm just doing something wrong. Does this error help guess what I might need to change? Thanks!, Jim -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:23 AM To: 'Struts Users Mailing List' Subject: RE: any known issues with WAS 4.0? I've not had ANY problems in struts-1.1 that where websphere specific (mostly they where me not exactly knowing what I was doing). Have you tried to go directly to welcome.do in your browser? It could be a problem with the logic:redirect tag in you index.jsp (I've personally never used it). -Original Message- From: Bender, James [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 10:19 AM To: '[EMAIL PROTECTED]' Subject: any known issues with WAS 4.0? Hi, I am new to Struts and installed Struts-example, Struts-blank etc from the stable 1.1 release at jakarta.apache.org/struts. None of these work on my WAS 4.0. I get all sorts of errors and I dug through news groups applying patches that never worked all of yesterday trying to get one of them to work. Then, I installed the struts-stub (struts 1.0) example from the tutorials on the site and that one deployed perfectly. Does Struts 1.1 just not work on WAS 4.0? On struts-blank I get Error 500: through the web -- no error context provided on the line index.jsp::logic:redirect forward=welcome/ The activity log reports: IBM WebSphere AEs 4.0.1 a0131.07 #com.ibm.servlet.engine.srt.WebGroup 327cd30d 3072 2kws100900202/Default Server Servlet Error: {0}: {1} %com.ibm.ejs.resources.seriousMessages java.lang.NullPointerException at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:521) at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:436) at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:396) at org.apache.struts.taglib.logic.RedirectTag.doEndTag(RedirectTa g.java:294) at index_jsp_4._jspService(index_jsp_4.java:95) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:139) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service (JspServlet.ja va:286) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet .java:415) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:544) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService( ServletManager .java:827) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service( StrictLifecycl eServlet.java:159) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictL
RE: [POLL] ActionFrom vs DynaActionForm
BeanUtils.copyProperties also works with DynaForms (They implement DynaBean and BeanUtils treats them (for the most part) as POJB's (c). I will concede that code completion is a definite plus. My only counter to that would be that, if I'm simply copying all my properties to another class (Torque Object, EJB, Business Object of some sort) why would I ever need code completion for my action forms? Code completion is a good point anyway though... -Original Message- From: Pratik Patel [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 01, 2003 7:29 AM To: [EMAIL PROTECTED] Subject: Re: [POLL] ActionFrom vs DynaActionForm +1 ActionForms -1 Dyna*Forms Brandon Goodin wrote: #1 Reasons: -Dynas massive struts configs are annoying and the runtime errors bite. -DynaForm time saving is insignificant (how long does it take for your ide to generate getters/setters?). snip more reasons: - Easy to copy properties from ActionForm to domain object (using BeanUtils.copyProperties ) - code completion can be used with ActionForms cheers, Pratik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[POLL] ActionFrom vs DynaActionForm
Next in my series of struts-user polls (please complain if this gets old). What sort of ActionForms does everyone use? #1 ActionForm #2 DynaActionForm Personally, I'm an advocate of the DynaActionForm as it seems to be able to do 80-90% of everything I need to do and everything else can be done in my business tier. I have, however, run into another person who is dead set against using it. His rationale is that you are then unable to do custom validation when you use the DynaValidatorForm... I think you can still do it, it's just a little more difficult, but, I'm polling to see if I'm out in left field... This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Action Design Question
You know, this is an enhancement I've been thinking about. You could certainly add it as a parameter in the action mapping. action path=/EmpTblDisplay type=ProjectAction name=EmpTblFormBean scope=request input=EmpTblDisplayTile validate=false parameter=Read forward name=display path=EmpTblDisplayTile/ /action And then you're all set... Of course, then you don't really need a dispatch action, you need to create your own version that reads this parameter instead of the request parameters. But I'm wondering if there isn't a better way. -Original Message- From: Graham Lounder [mailto:[EMAIL PROTECTED] Sent: Friday, September 26, 2003 8:13 AM To: [EMAIL PROTECTED] Subject: Action Design Question Hey all, After reading the [Poll] action mappings thread, I now have a couple of design questions. I've got a lot of actions right now and I'd like to group related functionality into one action. I'm thinking of extending the DispatchAction and creating functions to search/view/create/update/delete/load my objects. I'd like to create separate action mappings for each function. My question is, can I hardcode my dispatch parameter in the action mapping or do I have to send it in ever request from the page? Thanks in advance, Graham Graham Lounder - Java Developer CARIS Spatial Components Division [EMAIL PROTECTED] Phone: (506) 458-8533 Fax:(506) 459-3849 NO BINDING CONTRACT WILL RESULT FROM THIS EMAIL UNTIL SUCH TIME AS A WRITTEN DOCUMENT IS SIGNED ON BEHALF OF THE COMPANY. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to make a form pre-filled from an action class
Just call the setters on the ActionForm from your Action class and fill the form with data. -Original Message- From: EL AKARI Mehdi [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 6:58 AM To: Struts Users Mailing List Subject: How to make a form pre-filled from an action class Hi! I need to prefill a form with valus (that a get in a struts action), how can i do this? thanks Mehdi This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Poll] action mappings
So far the results are as follows: #1 5 #2 1 #3 2 #4 0 I added myself to both 1 and 3 as I've done a project both ways... Now I wonder, how does everyone determine which operation you are doing? As a parameter in the action mapping? A big case-style (if else) statement? -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 11:06 AM To: [EMAIL PROTECTED] Subject: [Poll] action mappings I have yet another opinion poll for struts-user... What are folks currently doing for action mappings in relation to CRUD operations? Are you: #1 creating a unique Action mapping for each atomic operation (potentially mapped to the same action class) /createUser.do - UserAction.java /readUser.do - UserAction.java /updateUser.do - UserAction.java /deleteUser.do - UserAction.java #2 creating a unique Action mapping for each atmoic operation with each action having a unique class /createUser.do - CreateUserAction.java /readUser.do - ReadUserAction.java /updateUser.do - UpdateUserAction.java /deleteUser.do - DeleteUserAction.java #3 creating an aggregate action class with a unique action mapping with multiple operations and using form/request variable to accomplish CUD /editUser.do - UserAction.java (?OP=Update, ?OP=Create, ?OP=Delete) /displayUser.do- UserAction.java #4 creating an aggregate action class with a unique action mapping with multiple operations /editUser.do - EditUserAction.java /displayUser.do- DisplayUserAction.java Some other way (or a combination) ... This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Poll] action mappings
You don't have to create a different ActionClass for every Operation with the same display/FormBean... I.E. If you use the same formbean and display component, you don't want to also always create another ActionClass... Similar to dispatchaction except you use the pathmapping instead of the request parameters. I actually wrote a variant of dispatchAction that, instead of calling a specific execute method on my ActionClass, it maps the request to another Command style class that performs an operation with only the FormBean and a security context as the input, and a List or DynaBean as the output. This let me completely decouple my data access layer from any web stuff and use request parameters to determine which business operation I was performing. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 9:54 AM To: Struts Users Mailing List Subject: Re: [Poll] action mappings I think for #3 it would be silly not to use a DispatchAction or LookupDispatchAction, right? It seems like you would also want DispatchAction or LookupDispatchAction for #1, but I really don't understand why people are using #1 at all. Is there some reason multiple action mappings are needed for the same Action? Matt - Original Message - From: Mainguy, Mike [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 25, 2003 9:47 AM Subject: RE: [Poll] action mappings So far the results are as follows: #1 5 #2 1 #3 2 #4 0 I added myself to both 1 and 3 as I've done a project both ways... Now I wonder, how does everyone determine which operation you are doing? As a parameter in the action mapping? A big case-style (if else) statement? -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 11:06 AM To: [EMAIL PROTECTED] Subject: [Poll] action mappings I have yet another opinion poll for struts-user... What are folks currently doing for action mappings in relation to CRUD operations? Are you: #1 creating a unique Action mapping for each atomic operation (potentially mapped to the same action class) /createUser.do - UserAction.java /readUser.do - UserAction.java /updateUser.do - UserAction.java /deleteUser.do - UserAction.java #2 creating a unique Action mapping for each atmoic operation with each action having a unique class /createUser.do - CreateUserAction.java /readUser.do - ReadUserAction.java /updateUser.do - UpdateUserAction.java /deleteUser.do - DeleteUserAction.java #3 creating an aggregate action class with a unique action mapping with multiple operations and using form/request variable to accomplish CUD /editUser.do - UserAction.java (?OP=Update, ?OP=Create, ?OP=Delete) /displayUser.do- UserAction.java #4 creating an aggregate action class with a unique action mapping with multiple operations /editUser.do - EditUserAction.java /displayUser.do- DisplayUserAction.java Some other way (or a combination) ... This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message
RE: Value assignment to html:hidden field...
I personally would assign that value in the Action or somewhere else in the java code (even default it in the form bean perhaps), not in the jsp. I'm not sure that you can use a scriptlet variable in a CustomTag. -Original Message- From: Abhijeet Mahalkar [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 5:39 AM To: Struts Users Mailing List Subject: Value assignment to html:hidden field... how can we assign the JSP value to the hidden field code is as follows String date = session.getValue(BussinessDate); this date variable i want to assign to following field... html:hidden property=txtBusidate width=15 size=25 maxlength=25 / will this work ? html:hidden value = %=date % property=txtBusidate width=15 size=25 maxlength=25/ please suggest abbey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Poll] action mappings
That is exactly the method signature I use (well, different names, but exactly the concept). I actually use +++ Public string commandParameter = ProjectAction Public List commandFoo(DynaBean bean, WebSecurityHolder security) { ..do stuff.. return ArrayList (or whatever) with a bunch of DynaBeans } Public DynaBean commandFoo(DynaBean bean, WebSecurityHolder security) {} +++ Where Foo is the name of a request parameter. I have another class that acts as a broker and maps the request parameters to these command objects. The end result is for a request /servlet.do?ProjectAction=Foo My BaseActionClass will automagically invoke the method Foo. In addition, the websecurityholder has a simple method to allow you to query if the user is in a specific role. The cool thing is that if you use DynaForms (or DynaValidatorForms) you can map a sql query straight into a DynaBean (or a list of) using BeanUtils and therefore get automagic form population without a lot of muss and fuss. I agree that #3 is probably better, but it seems that #1 is pretty popular and I want to make sure I'm not missing some significant advantage to doing it that way. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 10:14 AM To: Struts Users Mailing List Subject: Re: [Poll] action mappings OK, I think I understand #1 now. However, I still disagree with it ;) If you are using the same form bean and display components, you can define a single action mapping and thus eliminate duplicate configuration information in the struts-config file. I am a zealot when it comes to violations of the DRY (don't repeat yourself) principle, so in my opinion #3 is superior to #1. Before I get flamed on my strong stance here, let me just mention that I do understand #3 is unworkable if you need to use different form beans for some reason. I like your variant of DispatchAction, and will likely do something similar myself soon. So your Command class has a signature something like below, right? public List execute(ActionForm form, ISecurityInfo info) One issue I have been grappling with over the last couple days is whether your're really decoupling yourself from the Web by using an ActionForm as your transfer object. The ActionForm class seems pretty tightly coupled to the servlet API to me. Sure its methods don't return or take as parameters anything directly from the javax.servlet.* API, but it does return references to things like the ActionServlet which clearly are dependent on the servlet API. Thoughts? Matt - Original Message - From: Mainguy, Mike [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 25, 2003 9:59 AM Subject: RE: [Poll] action mappings You don't have to create a different ActionClass for every Operation with the same display/FormBean... I.E. If you use the same formbean and display component, you don't want to also always create another ActionClass... Similar to dispatchaction except you use the pathmapping instead of the request parameters. I actually wrote a variant of dispatchAction that, instead of calling a specific execute method on my ActionClass, it maps the request to another Command style class that performs an operation with only the FormBean and a security context as the input, and a List or DynaBean as the output. This let me completely decouple my data access layer from any web stuff and use request parameters to determine which business operation I was performing. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 9:54 AM To: Struts Users Mailing List Subject: Re: [Poll] action mappings I think for #3 it would be silly not to use a DispatchAction or LookupDispatchAction, right? It seems like you would also want DispatchAction or LookupDispatchAction for #1, but I really don't understand why people are using #1 at all. Is there some reason multiple action mappings are needed for the same Action? Matt - Original Message - From: Mainguy, Mike [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 25, 2003 9:47 AM Subject: RE: [Poll] action mappings So far the results are as follows: #1 5 #2 1 #3 2 #4 0 I added myself to both 1 and 3 as I've done a project both ways... Now I wonder, how does everyone determine which operation you are doing? As a parameter in the action mapping? A big case-style (if else) statement? -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 11:06 AM To: [EMAIL PROTECTED] Subject: [Poll] action mappings I have yet another opinion poll for struts-user... What are folks currently doing for action mappings in relation to CRUD operations? Are you: #1 creating a unique Action mapping for each atomic
RE: [Poll] action mappings
#2 and #3 are, to me, flip sides of the same coin. Our team is really divided over which is better. Currently, we're using #3 and I personally think it's the best way, but, the argument that has been made that it is much simpler to understand the application if there is a 1 to 1 mapping and developers can more readily see the flow of information in a class diagram. The other advantage that has been proposed is that you can then use your containers security mechanism to limit access based on Role without resorting to custom code. My point of contention is that I don't want to have 4 classes for every single screen (1 for Create, Read, Update, and Delete) plus 4 action mappings... It may be ok for a simple system, but in a large system I can see that becoming unmanageable very quickly. Not only that, but I tend to make my apps very stateless, so, every single request needs to use the Read operation so I end up with a bunch of duplicate code (i.e. Update and Create also need to perhaps call read when they are done). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 10:25 AM To: [EMAIL PROTECTED] Subject: RE: [Poll] action mappings Thats what prompted me to vote for 2... Why to have unnecessary have this case statement in every action? HAve the actions as simple handlers.Performing just simple atomic operations and acting on whatever configuration they are provided to decide navigation Something like execute(){ //Getdata from form bean //validate(if automatic validation turned off or u have special validation requirements) //model.getData or model.updateData //may be form.setData return mapping.findForward(success); } And the voing results are wrong..I have seen 2 votes to #2 including myself.. -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 3:47 PM To: 'Struts Users Mailing List' Subject: RE: [Poll] action mappings So far the results are as follows: #1 5 #2 1 #3 2 #4 0 I added myself to both 1 and 3 as I've done a project both ways... Now I wonder, how does everyone determine which operation you are doing? As a parameter in the action mapping? A big case-style (if else) statement? -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 11:06 AM To: [EMAIL PROTECTED] Subject: [Poll] action mappings I have yet another opinion poll for struts-user... What are folks currently doing for action mappings in relation to CRUD operations? Are you: #1 creating a unique Action mapping for each atomic operation (potentially mapped to the same action class) /createUser.do - UserAction.java /readUser.do - UserAction.java /updateUser.do - UserAction.java /deleteUser.do - UserAction.java #2 creating a unique Action mapping for each atmoic operation with each action having a unique class /createUser.do - CreateUserAction.java /readUser.do - ReadUserAction.java /updateUser.do - UpdateUserAction.java /deleteUser.do - DeleteUserAction.java #3 creating an aggregate action class with a unique action mapping with multiple operations and using form/request variable to accomplish CUD /editUser.do - UserAction.java (?OP=Update, ?OP=Create, ?OP=Delete) /displayUser.do- UserAction.java #4 creating an aggregate action class with a unique action mapping with multiple operations /editUser.do - EditUserAction.java /displayUser.do- DisplayUserAction.java Some other way (or a combination) ... This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately
RE: [Poll] action mappings
Right, that's the way I look at it too. I guess you could call it a model or data centric perspective of the system. To me personally, any business system is centered around a logical data model. I tend to build (grow) everything from the model out to the view. It seems like the perspective you are talking about is to build the system around each atomic transaction that the system is designed to support. This is, to me, also a very valid way of looking at it, but, it seems like you would end up seeing a whole bunch of trees instead of the entire forest (if you get my drift). I like to be able to start out with a BIG picture and break it down into smaller pictures until I get the level that I'm comfortable with. It sounds like you are more comfortable with a higher level of (finer grained) detail in your implementation than I am. -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 10:44 AM To: Struts Users Mailing List Subject: Re: [Poll] action mappings I just find it naturally easier to grasp what is going on with one Action and one form bean for each object in my model (and normally one factory or 'business delegate') plus a host of mappings. On 09/25/2003 03:59 PM Mainguy, Mike wrote: You don't have to create a different ActionClass for every Operation with the same display/FormBean... I.E. If you use the same formbean and display component, you don't want to also always create another ActionClass... Similar to dispatchaction except you use the pathmapping instead of the request parameters. I actually wrote a variant of dispatchAction that, instead of calling a specific execute method on my ActionClass, it maps the request to another Command style class that performs an operation with only the FormBean and a security context as the input, and a List or DynaBean as the output. This let me completely decouple my data access layer from any web stuff and use request parameters to determine which business operation I was performing. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 9:54 AM To: Struts Users Mailing List Subject: Re: [Poll] action mappings I think for #3 it would be silly not to use a DispatchAction or LookupDispatchAction, right? It seems like you would also want DispatchAction or LookupDispatchAction for #1, but I really don't understand why people are using #1 at all. Is there some reason multiple action mappings are needed for the same Action? Matt - Original Message - From: Mainguy, Mike [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 25, 2003 9:47 AM Subject: RE: [Poll] action mappings So far the results are as follows: #1 5 #2 1 #3 2 #4 0 I added myself to both 1 and 3 as I've done a project both ways... Now I wonder, how does everyone determine which operation you are doing? As a parameter in the action mapping? A big case-style (if else) statement? -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 11:06 AM To: [EMAIL PROTECTED] Subject: [Poll] action mappings I have yet another opinion poll for struts-user... What are folks currently doing for action mappings in relation to CRUD operations? Are you: #1 creating a unique Action mapping for each atomic operation (potentially mapped to the same action class) /createUser.do - UserAction.java /readUser.do - UserAction.java /updateUser.do - UserAction.java /deleteUser.do - UserAction.java #2 creating a unique Action mapping for each atmoic operation with each action having a unique class /createUser.do - CreateUserAction.java /readUser.do - ReadUserAction.java /updateUser.do - UpdateUserAction.java /deleteUser.do - DeleteUserAction.java #3 creating an aggregate action class with a unique action mapping with multiple operations and using form/request variable to accomplish CUD /editUser.do - UserAction.java (?OP=Update, ?OP=Create, ?OP=Delete) /displayUser.do- UserAction.java #4 creating an aggregate action class with a unique action mapping with multiple operations /editUser.do - EditUserAction.java /displayUser.do- DisplayUserAction.java Some other way (or a combination) ... This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately
RE: [Poll] action mappings
Whoops!, I goofed up my response, let me clarify. From: Sgarlata Matt [mailto:[EMAIL PROTECTED] I just find it naturally easier to grasp what is going on with one Action and one form bean for each object in my model (and normally one factory or 'business delegate') plus a host of mappings. Right, that's the way I look at it too. I guess you could call it a model or data centric perspective of the system. To me personally, any business system is centered around a logical data model. I tend to build (grow) everything from the model out to the view. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] The point of being easy to understand is very important for a big application especially I think. And I don't understand why u need code duplication? The save action after doing update if needs to read, the forward can point to readAction ... That's what we have done al over our application.So to get the same screen , always call same read action from any other save action using proper forward... So this way you have 2 types of action in your system.openActions and save actions .And this approach helps you to solve many other problems as well. It seems like the perspective YOU are talking about is to build the system around each atomic transaction that the system is designed to support. This is, to me, also a very valid way of looking at it, but, it seems like you would end up seeing a whole bunch of trees instead of the entire forest (if you get my drift). I like to be able to start out with a BIG picture and break it down into smaller pictures until I get the level that I'm comfortable with. It sounds like you are more comfortable with a higher level of (finer grained) detail in your implementation than I am. This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
BeanMapping WAS: [Poll] action mappings
I think your way is perfectly acceptable. I like to try and use the supplied interfaces (i.e. DynaBean) if they suit my needs and, to date, DynaBean has served me well. You can use BeanUtils to map DynaBeans to POJO's and visa versa (as a matter of fact you can to it to/from maps also I believe). My only gripe with using the commons-beanutils would be that I would perhaps like to have a couple levels of DynaBean and perhaps at the simplest level only have an interface like you describe (i.e. fewer methods in implement). [OT] I guess I need to start using webmail, the disclaimer at the bottom of all my messages is exposing all of struts-user to the risk of prosecution (and me of termination). -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 10:53 AM To: Struts Users Mailing List Subject: Re: [Poll] action mappings Very cool :) However, I am hesitant to depend even on DynaBean. What if I want to use a normal POJO bean? Here's what I'm thinking of doing: IInputForm.java: public interface IInputForm { } IDynaInputForm.java: public itnerface IDynaInputForm extends IInputForm { public Object get(String name); public void set(String name, Object object); /* and maybe some other getters/setters like the ones in DynaActionForm */ } MyDynaValidatorForm.java: public MyDynaValidatorForm extends DynaValidatorForm implements IDynaInputForm { } Now my execute method becomes (* added for emphasis): public List execute(*IInputForm* form, ISecurityInfo info) Now I'm not depending on any APIs other than my own :) What do you think? BTW, I like that you have methods that test if a user is in a role in your WebSecurityHolder class. I have no clue how this didn't occur to me earlier, and will be adding this to my API in the next few minutes. Matt - Original Message - From: Mainguy, Mike [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 25, 2003 10:28 AM Subject: RE: [Poll] action mappings That is exactly the method signature I use (well, different names, but exactly the concept). I actually use +++ Public string commandParameter = ProjectAction Public List commandFoo(DynaBean bean, WebSecurityHolder security) { ..do stuff.. return ArrayList (or whatever) with a bunch of DynaBeans } Public DynaBean commandFoo(DynaBean bean, WebSecurityHolder security) {} +++ Where Foo is the name of a request parameter. I have another class that acts as a broker and maps the request parameters to these command objects. The end result is for a request /servlet.do?ProjectAction=Foo My BaseActionClass will automagically invoke the method Foo. In addition, the websecurityholder has a simple method to allow you to query if the user is in a specific role. The cool thing is that if you use DynaForms (or DynaValidatorForms) you can map a sql query straight into a DynaBean (or a list of) using BeanUtils and therefore get automagic form population without a lot of muss and fuss. I agree that #3 is probably better, but it seems that #1 is pretty popular and I want to make sure I'm not missing some significant advantage to doing it that way. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 10:14 AM To: Struts Users Mailing List Subject: Re: [Poll] action mappings OK, I think I understand #1 now. However, I still disagree with it ;) If you are using the same form bean and display components, you can define a single action mapping and thus eliminate duplicate configuration information in the struts-config file. I am a zealot when it comes to violations of the DRY (don't repeat yourself) principle, so in my opinion #3 is superior to #1. Before I get flamed on my strong stance here, let me just mention that I do understand #3 is unworkable if you need to use different form beans for some reason. I like your variant of DispatchAction, and will likely do something similar myself soon. So your Command class has a signature something like below, right? public List execute(ActionForm form, ISecurityInfo info) One issue I have been grappling with over the last couple days is whether your're really decoupling yourself from the Web by using an ActionForm as your transfer object. The ActionForm class seems pretty tightly coupled to the servlet API to me. Sure its methods don't return or take as parameters anything directly from the javax.servlet.* API, but it does return references to things like the ActionServlet which clearly are dependent on the servlet API. Thoughts? Matt - Original Message - From: Mainguy, Mike [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, September 25, 2003 9:59 AM Subject: RE: [Poll] action mappings You don't have to create a different ActionClass for every Operation
RE: .do as welcome-file
I haven't tried it, but I've been told that, in tomcat, if you create a file with that exact name it will work properly. Evidently you cannot specify a servlet path as a welcome file. -Original Message- From: Adolfo Miguelez [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 7:00 AM To: [EMAIL PROTECTED] Subject: .do as welcome-file Does anyone has figured out how to do this? welcome-file-list welcome-file/start/start.do/welcome-file /welcome-file-list I am not able to make it work. TIA, Adolfo. _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: .do as welcome-file
This is actually the way I do it. -Original Message- From: Menke, John [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 9:58 AM To: 'Struts Users Mailing List' Subject: RE: .do as welcome-file I guess it's all the same as long as it works. You solution might be simpler actually no web.xml configs for the servlet -Original Message- From: Christian Bollmeyer [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 9:52 AM To: Struts Users Mailing List Subject: Re: .do as welcome-file I usually just put s/th like this in my index.jsp jsp:forward page=/main.do / and that's it. Whats the possible advantage of using a redirect or other solutions that also require a physical file in the root dir? -- Chris - Original Message - From: Menke, John [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 3:28 PM Subject: RE: .do as welcome-file Here's a trick to get an action to execute as home page in your webapp without having to do the jsp redirect. Put a file called webapp.launch in the root directory of your webapp Then configure these settings in your web.xml servlet servlet-nameredirector/servlet-name servlet-classyourpackage.Redirector/servlet-class /servlet servlet-mapping servlet-nameredirector/servlet-name url-pattern*.launch/url-pattern /servlet-mapping package yourpackage; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; /** * Redirector to start application on browse to root url * */ public class Redirector extends HttpServlet { /** * Stub method */ public void destroy() { } /** * Forward the user to start page of webapp * [EMAIL PROTECTED] request [EMAIL PROTECTED] response [EMAIL PROTECTED] ServletException [EMAIL PROTECTED] IOException */ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.sendRedirect(home.do); } /** * Description of the Method */ public void init() throws ServletException { } } -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 9:05 AM To: Struts Users Mailing List Subject: Re: .do as welcome-file I can confirm that this hack works for tomcat. Create the dummy file start/start.do and tomcat will be happy, and you will still get the actual struts mapping. On 09/23/2003 02:06 PM Mainguy, Mike wrote: I haven't tried it, but I've been told that, in tomcat, if you create a file with that exact name it will work properly. Evidently you cannot specify a servlet path as a welcome file. -Original Message- From: Adolfo Miguelez [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 7:00 AM To: [EMAIL PROTECTED] Subject: .do as welcome-file Does anyone has figured out how to do this? welcome-file-list welcome-file/start/start.do/welcome-file /welcome-file-list I am not able to make it work. TIA, Adolfo. _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - 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
RE: getting the current thread inside an action
Thread.currentThread()??? -Original Message- From: Menke, John [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 10:49 AM To: Struts (E-mail) Subject: getting the current thread inside an action Is there a way to get reference to the current thread from within an Action? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Poll] action mappings
I have yet another opinion poll for struts-user... What are folks currently doing for action mappings in relation to CRUD operations? Are you: #1 creating a unique Action mapping for each atomic operation (potentially mapped to the same action class) /createUser.do - UserAction.java /readUser.do - UserAction.java /updateUser.do - UserAction.java /deleteUser.do - UserAction.java #2 creating a unique Action mapping for each atmoic operation with each action having a unique class /createUser.do - CreateUserAction.java /readUser.do - ReadUserAction.java /updateUser.do - UpdateUserAction.java /deleteUser.do - DeleteUserAction.java #3 creating an aggregate action class with a unique action mapping with multiple operations and using form/request variable to accomplish CUD /editUser.do - UserAction.java (?OP=Update, ?OP=Create, ?OP=Delete) /displayUser.do- UserAction.java #4 creating an aggregate action class with a unique action mapping with multiple operations /editUser.do - EditUserAction.java /displayUser.do- DisplayUserAction.java Some other way (or a combination) ... This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Refreshing Form Submission and Duplicates
I.E. in your Action Class Public ActionMapping execute ... boolean isValidSynchronizerToken= isTokenValid(request); this.saveToken(request); if (request.getMethod().equals(POST)) if (isValidSynchronizerToken) { return doPost(); } else { return doGet(); } } else { return doGet(); } private ActionMapping doGet() { } private ActionMapping doPost() { } ... -Original Message- From: Shane Mingins [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:26 PM To: 'Struts Users Mailing List' Subject: RE: Refreshing Form Submission and Duplicates I noticed this the other day at http://husted.com/struts/catalog.html Use the Action Token methods to prevent duplicate submits There are methods built into the Struts action to generate one-use tokens. A token is placed in the session when a form is populated and also into the HTML form as a hidden property. When the form is returned, the token is validated. If validation fails, then the form has already been submitted, and the user can be apprised. - saveToken(request) - on the return trip, isTokenValid(request) resetToken(request) I am not sure if that is of any help as I have yet to use it ... although I have just this minute found a case in my own application to do so ;- Shane -Original Message- From: John Reynolds [mailto:[EMAIL PROTECTED] Sent: Friday, 19 September 2003 2:16 p.m. To: [EMAIL PROTECTED] Subject: Refreshing Form Submission and Duplicates Hi, I have a question about a bug in my application using a Struts Form. This happens in multiple areas of my site, but the one example I will use is a Message Board feature. The problem is that when a user goes to a list of messages, fills out the form to post a message and ends up back on the list page, the message will be submitted twice if they refresh the page following the form submission. this has caused duplicate messages throughout the message board, as it is the nature of message boards to refresh the list of messages often to check for new ones. Keep in mind, my app strictly follows the approach of the O'Reilly book. I'll try to make this easy to follow: 1. the user goes to a message board with a list of messages from other users. this page is /messagelist.do the action looks like this: action path=/messagelist name=messageListForm type=myapp.framework.actions.MessageListAction scope=request forward name=Success path=/templates/messagelist.jsp/ /action (the messageListForm is a struts form bean with a List of message objects) 2. at the bottom of the page is a form to post your own message 3. the user enters their Name, Subject and Message Body and submit the form 4. the form is processed by a Struts Action. the action tag in struts-config.xml looks like this: action path=/messageinsert name=messageDetailForm type=myapp.framework.actions.MessageInsertAction scope=request validate=false forward name=Success path=/messagelist.do/ /action - From the naming convention, you can see that the Action inserts the message into storage (database) and upon success the user is forwarded to the same /messagelist.do action Now, when the form is submitted and this is displayed, the URL in the browser says: http://myapp.com/myapp/messageinsert.do I expect that this is correct because the HTML form itself was form action=/messageinsert.do method=POST. The user's submitted message will be found on the list of messages. HOWEVER, IF THEY REFRESH THE SCREEN, THE MESSAGE WILL BE SUBMITTED AGAIN. This should not happen. If i'm the customer, i've already submitted the form, and now i'm seeing a list of messages. refreshing should have no effect on the form that i just submitted. Does anyone have a suggested fix? Thanks all, JR - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not
[OT] RE: Connection Pooling
Can any one explain,What does one mean by Connection Pooling? Is it advisable to prcatice Connection Pooling and if so,in WHAT CIRCUMSTANCES and Is there any aspect which should be kept in mind/taken care of while using Connection Pooing how connection pooling changes the working of an Web Application or J2EE architecture. Wa off topic STFW 4 Connection Pooling http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=connection+pooling This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Reuse of JSP's and relative links
Just so I'm clear, the problem is you have 2 different actions that link to the same jsp and your intent is to have the jsp map to itself under BOTH paths? That's an interesting question, you could probably use the href attribute instead of the action attribute... Href=show.do instead of action=show.do -Original Message- From: Anders [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 10:08 AM To: [EMAIL PROTECTED] Subject: Reuse of JSP's and relative links Hi, How can i get html:link to use relative links? I'm trying to reuse actions and JSP several places under different paths. My problem is: The user enters through /secure/articles/Show.do and it displays the page with articles. The links on the page lets you go to the next page and read the full article. I then use the same action class for /secure/news/Show.do, and want to use the same JSP's. It all works fine until the user clicks a link which directs him to /secure/articles/Show.do?page=2 . How can i make html:link use relative paths? I would like to specify html:link action=Show.do?page=2 and that would lead to /secure/news/Show.do because the originating url said so. Thanks, Anders, -- Anders Rene Sveen +47-9244-3820 [EMAIL PROTECTED] -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [repost] Special view information - ActionForm or request?
I also would like other's opinion on this. Right now, use a service locator style class to stuff all my lookup stuff into the request object manually. I have, however, used collections in the formbeans for this. I can't, off the top of my head, think of any significant advantages to using a form bean. One disadvantage, however, is you can only have 1 form bean per action, so lookups across multiple actions will need to have duplicate code. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:15 AM To: Struts Users Mailing List Subject: [repost] Special view information - ActionForm or request? Sorry for the repost. Has this already been discussed? I couldn't find it in the archives. Original message: Sometimes views need special information to display correctly, like a bean with the values needed to render a dropdown list. Is it considered a Struts best-practice to include this information in the ActionForm or should the Action which prepares this information store the information in the request instead? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is it possible to remove *.do or /do/* from the URL
Hmmm, that could be entertaining... Change the extension to .asp and sell it to a microsoft shop... -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:34 PM To: Struts Users Mailing List Subject: Re: Is it possible to remove *.do or /do/* from the URL On Thu, 18 Sep 2003, Vic Cekvenich wrote: Date: Thu, 18 Sep 2003 10:39:51 -0400 From: Vic Cekvenich [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Is it possible to remove *.do or /do/* from the URL How about a hack: *.jsp It looks as jsp on top but it's a do. Or you can even say *.asp, or anything. Just pick a word marketing likes. Using the same extension for both JSP pages and the action invocation will cause grief, but any combination of different values would at least work. .V Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [repost] Special view information - ActionForm or request?
As far as the forms are concerned, I whole-heartedly agree that the current notion of populating the form one the way to getting mapped to the view seems pretty clumsy. I would almost advocate having the forms to be pulled (as above) out of some persistant service thingy (highly technical term). Of course, it would then require that we have some sort of populate or load method that will do something before we process anything. It seems also like a variation of how the dispatchaction works would be kinda cool. Allowing, either based on URL or some other request info, you to determine if you are doing a read or a write before you even get to the action would be the better way to go. Of course, that's just my perspective, but, your notion of the clumsiness of stuffing data into the form in the Action (especially after the request data has already been stuffed in there once) struck a chord with me. Evidently the development in struts is a little more active than I thought, I may have to start pulling down snapshots... -Original Message- From: Joe Germuska [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 1:29 PM To: Struts Users Mailing List Subject: RE: [repost] Special view information - ActionForm or request? I don't have a very strong opinion, but for form *choices*, I've always preferred to put them into some page-accessible context before dispatching to a page. I wrote a class called DigestingPlugIn which was added to Struts after the 1.1 release which is designed to make it easy to put a menu like this into the application context so that it's always available to all your pages, even if they don't go through an action before display. Of course, if the choices are dynamic and specific to the request or the session, this doesn't work, but for things like sharing a menu of states or countries, it works pretty well. If you aren't comfortable using unreleased Struts code, you can get a library version of this class from http://demo.jgsullivan.com/struts/ Another alternative for request/session-specific options would be to extend the OptionsCollection tag to be smarter about how it gets the collection for iteration -- this would allow you to route people directly to the JSP without needing to go through an action class. We've been having a vigorous discussion over the last couple of days about the best way to prefill form *values* in a pre-validation context, and to be honest, I feel like this is a use case which Struts doesn't address very well. It feels clumsy to fool around with creating an ActionForm and populating it on the way to the view; should I just get over that? Or is this something about Struts that deserves a closer look with an eye towards addressing the use case more directly? I've been meaning to search the archives to see what discussions have come up, but since I'm sending this message, I guess I'll just dump it out there and see what people think... Joe At 12:35 -0400 9/18/03, Mainguy, Mike wrote: I also would like other's opinion on this. Right now, use a service locator style class to stuff all my lookup stuff into the request object manually. I have, however, used collections in the formbeans for this. I can't, off the top of my head, think of any significant advantages to using a form bean. One disadvantage, however, is you can only have 1 form bean per action, so lookups across multiple actions will need to have duplicate code. -Original Message- From: Sgarlata Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:15 AM To: Struts Users Mailing List Subject: [repost] Special view information - ActionForm or request? Sorry for the repost. Has this already been discussed? I couldn't find it in the archives. Original message: Sometimes views need special information to display correctly, like a bean with the values needed to render a dropdown list. Is it considered a Struts best-practice to include this information in the ActionForm or should the Action which prepares this information store the information in the request instead? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e
RE: FormBean question...
This is by design. If you want to ensure this will not happen, you need to set all the values to or null beforehand for fields that should be empty. The short answer is change the field name. Especially if you are going to store data in a form in the session you will have a big mess on your hands if you have overlapping field names in multiple forms. My $.02... -Original Message- From: alanbrown [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 2:18 AM To: [EMAIL PROTECTED] Subject: FormBean question... I am using 2 different beans to populate 2 forms on 2 pages. However some of the fields have the same names, as both customers and contacts have addresses and both companies and contacts have descriptions and notes associated with them. After entering a company the user is prompted to enter some details of a person within that company with, hopefully, some of the form already filled out (the address fields have default values for instance taken from the company info that was just entered). However the description field and the notes field are also filled out with the values entered in the addCompany.jsp page and this should not happen. This seems very strange as I've got 2 different formBeans used to populate the fields. Here are the relevant parts of the strutsconfig file. form-bean name=companyForm type=com.alan.crm.forms.CompanyForm /form-bean form-bean name=contactForm type=com.alan.crm.forms.ContactForm /form-bean and. action path=/addCompany type=com.alan.crm.controller.AddCompanyAction scope=request name=companyForm validate=true input=/add/company.jsp forward name=Success path=/addContactView.do/ forward name=Failure path=/add/company.jsp/ /action action path=/addContactView type=com.alan.crm.controller.PrepareAddContactAction scope=request name=contactForm validate=false forward name=next path=/add/contact.jsp/ /action As you can see they are using different types of form so I find it very odd that the description and note fields are pre populated as well as the address. The way I've tried to populate the fields I want pre-polulated is by having the following code at the end of my addCompanyAction class ContactForm contactForm = new ContactForm(new Integer(companyId).toString(), companyForm.getAddress()); request.setAttribute(addContactForm, contactForm); return mapping.findForward(Success); and then, when forwarded to the prepareAddContactAction class, have the following code. public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, UserContainer container) { ContactForm contactForm = (ContactForm)request.getAttribute(addContactForm); //if addContactForm is not null in the request scope then we should use it to populate our form. form = contactForm == null? form : contactForm; ((ContactForm)form).setContactStatus(open); return mapping.findForward(next); } But somehow I'm getting all the companyForm's fields populating the contact form. IE. I put a company description in the addCompany jsp and it shows up as a contact description in the addContact jsp, and I don't pass the description field to the contactForm. Is there something I'm not understanding about the struts architecture? Help is, of course, greatly appreciated. alan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Retrieving the ModuleConfig object
I'm not sure what you mean by backwork, but it is accessible from the Action Class by overridding the setServlet Method.. E.g. ModuleConfig moduleConfig = (ModuleConfig) servlet.getServletContext().getAttribute( Globals.MODULE_KEY); -Original Message- From: Marco Tedone [mailto:[EMAIL PROTECTED] Sent: Saturday, September 13, 2003 5:28 AM To: Struts-user-list Subject: Retrieving the ModuleConfig object Hi, is it possible to retrieve a ModuleConfig object (with the module configuration information) directly from within an Action without any backwork? Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Easy Question
The property attribute of the tag should point to a boolean property of the FormBean. If that property is true the box will be checked. ...unless you're using an old(er) version of the checkbox tag... I know in the older (1.0x) versions this was rather broken (i.e. only a string of 'T' or 'F' or something like that would work)... If you're using 1.1 all should be well. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Subject line filter tag
Maybe we could use Struts Technical Forum Users [STFU] Errr, maybenot. This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Passing variables for logic:iterate
1st, Thank you, I didn't realize the logic:Iterate tag had those two properties, so you've indirectly saved me some effort. 2nd, After looking at the source code for the iterate tag, it looks like it tries to look up those two values straight out of the pageContext. This would imply to me, that it doesn't look up the property on the form as it appears you want it to do. (i.e. if you do a request.setParameter(pageOffset,5) in your Action Class) or use a html:hidden property=pageOffset/ tag on your jsp page, it should work correctly. I think both ways are valid, but my gut is that the way you where going at it is the way anybody unfamiliar with the tag would try to use it. Perhaps this is a candidate for refactoring, I'd personally like a way to choose either way. It just seems bad practice to have one field be sucked from the bean, and two others be read from the page context (and it appears to be a simple 2 line fix). -Original Message- From: Gregory F. March [mailto:[EMAIL PROTECTED] Sent: Monday, September 15, 2003 12:00 PM To: [EMAIL PROTECTED] Subject: Passing variables for logic:iterate Ok, this is probably a dumb questio, but here it goes... I am trying to iterate over a portion of a list. I have calculated the portion (the offset and length) in my action. I have two entries in my DynaValidatorForm: form-property name=pageOffset type=java.lang.String/ form-property name=pageLength type=java.lang.String/ And I am doing a myform.set(pageOffset, String.valueOf(myCalcOffset)); etc. The iterate is: logic:iterate id=item name=bfData type=...lc.web.dto.BfFullEntryData offset=pageOffset length=pageLength indexId=index It just plain doesn't work. If I substitute something like 5 for pageOffset or pageLength, it works like a champ. What am I missing? It's got to be something simple... Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Bug :: Replace \n Character with #
It might be that \n is interpreted as a char(13) and only 1/2 of the crlf pair is getting replaced. -Original Message- From: Chawla, Yogesh [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 1:22 AM To: 'Struts Users Mailing List' Subject: Bug :: Replace \n Character with # Hi All, I am getting some values from user from a HTML textarea which is entered by the user. The user is entering a enter key and my value comes with these data. Now before inserting these data into the database, I want to replace this enter key with #. However when I call the string.replace method like this dataInput = dataInput.replace('\n', '#'); System.out.println(dataInput Value is + dataInput + End of DataInput); The final value comes input with the # but the enter key is not removed and the final value is still something like this dataInput Value is New Jersey State Data Country Data End of DataInput. Appreciate your help. Regards, Yogesh DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Problem stopping Tomcat 4.1.18
Perhaps, I have also seen this if you start the server as root then try to shut it down as a different user... -Original Message- From: Suresh Addagalla [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 8:44 AM To: [EMAIL PROTECTED] Subject: [OT] Problem stopping Tomcat 4.1.18 Hi, I am running Tomcat 4.1.18 on RHL 7.x. When I execute shutdown.sh to stop tomcat, a lot of java process still remain unterminated. If any one knows how to troubleshoot this, please let me know. My web applications have a DB interface as well as an RMI client. Can these cause the processes to remain in some way? Thanks, Suresh **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What's a well defined Struts Project Structure?
I'm kinda in the middle of this whole process too and this is what I'm leaning toward MyProject |- source(doesn't get deployed) |- documentation (doesn't get deployed) |- static (webserver stuff) |- styles |- javascript |- images |- WEB-INF |- pages -tiles (jsp) content pages |- templates -tiles (jsp) templates |- classes |- tld struts-config.xml *-config.xml I would say also that you could potentially have many subdirectories under the pages/templates directories to reflect the complexity of your app... i.e. |- pages |- employeeScreens |- payrollScreens |- accountsPayableScreens -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2003 12:37 PM To: 'Struts Users Mailing List' Subject: What's a well defined Struts Project Structure? What a well defined struts project structure would look like? I am always a bit hesitant with where to put things Right now, I have: MyProject |- documentation |- images |- jsps |- styles |- javascript |- WEB-INF |- classes |- bin struts-config.xml *.tld project.xml ... But I always run into problems with too many files in one folder or too few files in one folder. I searched the apache CVS tree, and found that it's a mess there too. Just compare Tomcat and Struts, you will know what I am talking about. Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What's the best strategy to handle this kind of thread issues ?
I think, however that this proposed solution (almost) entirely defeats the purpose of having a multithreaded environment. If you try and synchronize all responses and disregard duplicates, you will most likely end up with a slow and cumbersome application. I would say to achieve the sort of efficiencies you are describing one would be better served to look into the app/web server code. Doing this at a servlet level will most likely just get one into a big mess. It actually seems like a good idea (if it isn't already there) for a caching proxy or appserver, but certainly not a web application. Just my $.02 -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 10, 2003 4:18 AM To: Struts Users Mailing List Subject: RE: What's the best strategy to handle this kind of thread issues? My undertsanding was that the browser will only show the response to the the second of the requests - forgetting about the first. The server of course hasnt forgetten about it and keeps processing (one hopes). Im not quite sure what happens to its response stream (null?) but the browser is now only waiting for the second requests response - which I presume is a seperate connection? Now if we are using tokens or some such mechanism to detect that its a second request and thus illigitimate then we can of course return some kind of error to the user instead of processing the request (since we know its already been processed). This however isnt very friendly. What we really want to do is to have the second request return the same response as would have been returned by the first request after it did its work. I have no practical solution for this :-( Hmm. Actually I have an idea. Not a good one, but maybe worth a passing thought: (Thinking off the top of my head here btw (and the following will not work in a distributed environment unless one has sticky sessions so that all requests for a particular session are gauranteed to be processed by the same JVM)): 0. Requests A,B,C,N come in in rapid succession and cause threads to be started in the container to process the requests - probably but not necessarily in the order they came in. 1. Thread B (or any other thread) is lucky enough to start running first and. Synchronizing on some global object (probably its own Class object if its a singleton) it checks the session for a token (under a key that was generated earlier and submitted as a request param in a hidden field). Not finding it, it creates it and stores it in the session, and proceeds to marshall the data needed to render a response - whatever it is the action is supposed to actually do. 2. Threads A,C,N also sync on the global object and check the session. Unlike thread B, they find the token, so they all call wait() on the token object. 3. Having doing the processing read/updated the db (or whatever), and obtained the necessary info, etc... Thread B is finally ready to render a response. It doesnt know however if it is the 'lucky last' thread that the browser is actually waiting for. What it does then is to add the necessary information to render the response to the session (perhaps the token could provide getters for it?), and having done so it calls notifyAll() on the token object, and then proceeds itself to forward to the view. 4. Threads A,C,N are woken up by the notify(), and proceed to grab the necessary info from the session to render the same response that B is now rendering and forward to the view. (NB: we shall assume that the view (jsp or velocity template or whatever *only* renders the view and doesnt change any of the information is uses to render the view (with one notable exception) - and that that info can be read by multiple threads at once!). One of these 4 threads is the lucky one (N in this example) that will actually have their response output on the browser. 3 of them are wasting time rendering to nowhere - but they are all rendering identical html, and the user will get an appropriate response page instead of an error. 5. After they have finished rendering and flushed the 4 threads all try to remove the token from the session. (You will note that if another request comes in at this point we are in trouble. We could of course leave the token in the session along with all the response data just in case but then we would run out of memory after a while... (maybe we could use some kind of self expiring cache? hmmm)) -Original Message- From: Jing Zhou [mailto:[EMAIL PROTECTED] Sent: Wednesday, 10 September 2003 15:17 To: Struts Users Mailing List Subject: What's the best strategy to handle this kind of thread issues? As we realize so far, a browser window may send request A to a server. The server starts thread A to handle it. Before the thread A returns, the same window may send request B to the server, therefore the server creates thread B to handle it. Assuming thread B finishes earlier than thread A, we could have the
RE: Any potential drawbacks with this design
I'm interested in folks response to this also. This is the approach I have used on 2 different projects and seems to work very nicely. In addition, I modified the signature of my abstract method (in this case executeTask) to take a custom ActionForm with some additional functionality. It seems to be a convenient way to provide extra/common functionality for free using inheritance, but, I'd like to hear if anyone can think of any significant disadvantages to doing it this way. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2003 4:54 AM To: [EMAIL PROTECTED] Subject: Any potential drawbacks with this design Hi All, Please give me your comments/suggestions on the below design. I need to perform some common functionality across all the application action classes, so I have written an abstract MyOwnAction class inheriting from STRUTS Action class. All application action classes will be extending MyOwnAction class. I have overridden the execute() method in MyOwnAction class in which I am doing my desired common functionality. I am also publishing an abstract method executeTask() which should be overridden by the all the application action classes The executeTask() method is called by the execute() method of MOwnAction class. Basically the executeTask() is now the method where the application action classes will write the application code as opposed to execute(). Regards Sreekant G This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Searching facility questions
Hide your .jsp files in /WEB-INF/foo (I use /WEB-INF/pages) so that the user cannot navigate directly to them. Alternatively hide them ANYWHERE so they cannot directly link to them. -Original Message- From: Marco Tedone [mailto:[EMAIL PROTECTED] Sent: Sunday, September 07, 2003 2:03 PM To: Struts-user-list Subject: Searching facility questions Ok, let's say that I would like to translate system's specific URLs (i.e. D:\Tomcat\webapps\foo\foo\bar.jsp and so on...) into web-context specific URLs (i.e. http://myServer/foo/foo/bar.jsp). Well, if I immagine to replace D:\Tomcat\webapps with http://myServer things seem quite easy. My first question is: did anyone encountered this problem before? Secondly a JSP page not necessarily can be executed without passing from a Struts Action (i.e. an Action prepared some data to display, and if we try to access the JSP directly we could have some bad 5 minutes), so my question is: did anyone encountered this kind of problem? Did you find any solution? For this second subject, I could think to a sort of mapping file between JSPs and relevant actions, so that we can assume that if the user clicks on a JSP link, instead the relevant action for that JSP will be executed and then the JSP displayed. The mainteinance for this solution seems CRAP. Hope someone of you will help, Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: populating Drop down -pls help
Are those typos in your jsp? ===htrml If so, that may be part of the problem... Also, I'd check to verify that the values are not padded (i.e. CHAR(2) datatype may yield m instead of m which is not the same value. -Original Message- From: Goldy J [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 5:38 AM To: [EMAIL PROTECTED] Subject: populating Drop down -pls help Hello, I have a JSP in which there are number of dropdown along with text boxes. I am using struts tag lib for getting the value when I submit the form. The problem is when I try to populate the dropdown in th JSP with the data that i get from the databse . For example I have dropdown for gender with option M,F.Now when I select and submit it I am OK but when I query and get the value from DB It doesnt set to appropiate value but always with the deafult M. same for others dropdowns. Iam using the following in my JSP html:select property =genderhtrml:option value=m/html:optionhtrml:option value=f/html:option/html:select In formbean String gender; setGender{}; getGender{}; Any help will be highly appreciated Thanks in advance. - Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts begineer mahavir
They left out a very import piece... the struts piece! Add a file called hello-world/WEB-INF/struts-config.xml (you should have gotten an error that it was missing I would think) and put the following content in it... ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config action path=/hello type=org.apache.struts.actions.ForwardAction parameter=/hello.jsp / message-resources parameter=helloworld.HelloWorldResources/ /struts-config Then access the page with the following path /hello-world/hello.do That should do the trick. -Original Message- From: mahavir [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 5:44 AM To: Struts Users Mailing List Subject: struts begineer mahavir Hi Friends i am begineer to struts,i searched on the net to start studing struts.i got following one document,according to which i had written program but i am geetting the error.The error is at the end And the document that i got from the net is Create a Directory Structure The first step in creating any web application is creating the base directory that stores all of your information. We´ll call this base directory hello-world. Inside the hello-world base directory, create a WEB-INF directory in which to store application-level classes and information. For more information on the structure of a web application, see the Servlet specification. Copy Necessary Files The struts.jar file contains all necessary classes to run a Struts application, including the ActionServlet class and the taglib classes. In a normal binary distribution, the struts.jar file is located in the lib subdirectory of the installation. Copy it to the hello-world/WEB-INF/lib directory. The struts-bean.tld file contains all necessary taglib information to utilize the Struts message tag. In a binary distribution, the struts-bean.tld file can also be found in the lib subdirectory. Copy this file to your hello-world/WEB-INF directory. Create the .properties File A properties file is a file that contains a newline (\n) separated list of name-value pairs. In our hello world application, we need just one entry called hello.message. Property resources are located using the classloader, so make sure the properties file is in the CLASSPATH or that the servlet container automatically places the files in the CLASSPATH of the hello-word/WEB-INF/classes directory. Create a file called HelloWorldResources.properties, and save it in WEB-INF/classes/helloworld. This makes it accessible to the class identifier helloworld.HelloWorldResources. The following illustrates how one entry in the properties file should appear: hello.message=Hello Struts Developer Create the web.xml File The web.xml file (deployment descriptor) describes your web application. After creating this file, place it in the WEB-INF folder of the application. A typical Struts web.xml file defines a servlet identifier for ActionServlet using the servlet tags. Beneath the servlet tag, use init-param to define the parameters that initialize the servlet. For this simple application, we´ll define the servlet and one init-param to define where our application resources are loaded. We´ll also define a taglib reference for use within a JSP: web-app servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class !--Below is the init-param-- !--This defines where your application resources are located.-- !--It uses the classloader to find the file.-- !--The .properties extension isn´t used to locate resources.-- init-param param-nameapplication/param-name param-valuehelloworld.HelloWorldResources/param-value /init-param load-on-startup1/load-on-startup /servlet !--The following section defines a URI to use to retrieve the struts taglib -- taglib taglib-uri/WEB-INF/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib !--This section defines what file to open first if none is specified -- welcome-file-list welcome-filehello.jsp/welcome-file /welcome-file-list /web-app Create the Display Page The last step before actually running the application is to create the JSP display page. The display page is a normal JSP page that uses the Struts taglib and one Struts tag. The display page should reside in the root directory of your web application, in this case hello-world. We´ll name it hello.jsp, and it should look like this: %@ page language=java % !--Import the taglib -- %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % !--Now use the tag to display the message -- bean:message key=hello.message / error Error: 500 Location:
RE: Copying DynaActionForm to Map DTO
BeanUtils.copyProperties (but I'd use a DynaBean instead). -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 1:22 PM To: 'Struts Users Mailing List' Subject: Copying DynaActionForm to Map DTO Hi all, I am using both DynaActionForm and a DTO that is implemented as a HashMap. What is the best way to copy or transfer the properties from the DynaActionForm to the HashMap DTO? Thanks in advance, Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Migrating to struts
If you are using scriptlets, move the scriptlet code to an Action class. Then link through the Action class to run that code first. If the code created scripting variables before, use request properties instead. Likewise, any place where you were using request parameters, start using request properties when you move that workflow over to Struts. Just out of curiosity, what are request properties? Did you mean attributes or am I missing something... This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: basic struts question...
It looks like your webapp is named taglib, if so, change your action mapping to 'path=/jsp/submit ' and all should be well. The action mapping path is relative to your webapp (or module, but, that's for a later date). -Original Message- From: Bradley Handy [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 4:28 PM To: Struts Users Mailing List Subject: RE: basic struts question... You need to append the .do extension to your request URL. -Original Message- From: Pady Srinivasan [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 3:35 PM To: [EMAIL PROTECTED] Subject: basic struts question... If I have an action-mapping defined as action-mappings actionpath=/taglib/jsp/submit type=com.heroix.firenze.webui.actions.TabChangeAction forward name=success path=/jsp/tiles_insert.jsp/ /action /action-mappings When I access http://myserver/taglib/jsp/submit.do I get an error Invalid path /jsp/submit was requested. My web.xml does have *.do mapped to ActionServlet. What am I doing wrong ? Thanks -- pady [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: J2EE IDE
I would have said netbeans a year ago, but now I'm an eclipse 2 (2.1) fan. Haven't tried any recent (last 6 months) IDEs other than eclipse. -Original Message- From: Greg Reddin [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 5:09 AM To: Struts Users Mailing List Subject: Re: J2EE IDE +1 on NetBeans although I've not used Eclipse. I tend to stop looking when I find something that works. However, I find that 90% of the time it's quicker for me to just use vi and Ant. I use NetBeans for debugging though. And if I'm forced to use Windows for my development I'll immediately install NetBeans. Greg Mick Wever wrote: Looks like another IDE war coming on :-) You need to check out them out yourself. As you will no doubt soon see, each of us have different likes and requirements. NetBeans is known for its outstanding GUI (Form) editor and JSP editing. It also has excellent support for CVS and Ant integration. While Eclipse is very good at refactoring. I prefer to use NetBeans as it suits more for the power user. You can change just about anything under its hood from within the IDE. At my new job they were all using JDeveloper, a commercial product, and it only took me 3 weeks to convert all of them to NetBeans. NetBeans now has some nice features in it's suggestion module that will automatically fix code for you, examples are: - missing javadoc tags, - missing import statements, - missing object castings, - and more... I find it just heaven when an IDE fixes your code for you before you have even compiled it. I don't like Eclipse because it is not all written in java. It is written in a mixture of languages and therefore cannot run on all platforms. You also cannot use the different LookFeels that are out there for java. Eclipse is also very short on features compared to NetBeans. This abundance of features can (naturally) slow it down, make sure to turn off all the features you won't be using after you have given them a test run. Again, find out your requirements, and try them all out :) Mick. DISCLAIMER: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT} RE: Small request...
I have had this problem too. I'm not sure why this happens, but, at home I very often get messages that are far into the future (or past). I'm thinking it's an Evolution problem because I don't have the same problem under outlook. -Original Message- From: Keith Pemberton [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 12:17 PM To: Struts Users Mailing List Subject: RE: Small request... Well, I am using Evolution (you know, under linux) to read email and I sort all the messages by date. Whether that date is sent date or received date I am not entirely positive, but I assume that it is received date. You know, I hate it when ppl freak out over someone just making a request like this. It seems that asking someone to do something these days is just all bad and wrong and ppl get offended. Jeez ppl, chill out! On Mon, 2003-08-25 at 15:50, David Friedman wrote: Keith, What are you doing? Sorting your mailbox on the 'sent' times so it shows up out of order because of the different timzones and countries of members posting to this list? I'm sorting on the 'received' time and everything is readable and makes perfect sense. Well, everything except this quetion. :) Regards, David -Original Message- From: Keith Pemberton [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 3:03 PM To: [EMAIL PROTECTED] Subject: Small request... I know that this is way off topic but it would be a bit help for my inbox. Could the people associated with this list please check the clock on there computers and set the correct date and time? I really would appreciate this small request. -- Keith Pemberton [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts as a framework
After some research into what the heck you are talking about, I would say that struts is a white box framework that most people end up designing a grey box framework from...(I.E., struts is the framework framework). -Original Message- From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 9:55 AM To: 'Struts Users Mailing List' Subject: RE: Struts as a framework I will drop the matter now :-) All I wanted to know was what kind of framework Struts is. During one of the presentations I was asked to define frameworks and class libraries. Have been bitten by the design bug lately. Mohan -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 8:26 PM To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]' Subject: RE: Struts as a framework For those of us who think outside the box could you elaborate on what you are asking? My copy of struts was downloaded from the internet, it came with no box ;) -Original Message- From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 10:37 AM To: 'Struts Users Mailing List' Subject: Struts as a framework Hi This is a general question to understand Struts better. Is Struts a black-box or a gray-box framework ? Mohan This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts as a framework
For those of us who think outside the box could you elaborate on what you are asking? My copy of struts was downloaded from the internet, it came with no box ;) -Original Message- From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 10:37 AM To: 'Struts Users Mailing List' Subject: Struts as a framework Hi This is a general question to understand Struts better. Is Struts a black-box or a gray-box framework ? Mohan This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please Guide : STRUTS Versions
1.1 is no longer beta. It has been released since the end of July. I haven't heard of any show stopping problems with it and am fairly confident it is a good choice for any projects going forward. I think the document you are referring to is a bit dated. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 5:27 AM To: [EMAIL PROTECTED] Subject: Please Guide : STRUTS Versions Hi All, I need to make a decision whether to use STRUTS 1.0 or STRUTS 1.1 for the application that I am going to develop. The application is fairly a large sized application. I would like to know which would be a better choice out of your experience. I have gone through the documentation @ http://www.theserverside.com/resources/articles/Struts1_1/article.html which concludes with the below paragraph If your project is a new one, the decision to use Struts 1.1 mainly depends on the amount of risk your project can take. Struts 1.0 is a proven technology but Struts 1.1 is still in beta. Besides, migrating backwards is always more difficult than migrating forwards. Once you start with Struts 1.1, it will involve a lot of hard work to go back to Struts 1.0. While the extra risk in using Struts 1.1 is generally very low (as the quality of work from Apache's developer community has been consistently very good), it is still a non-negligible factor you have to consider. Regards Sreekant G This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why would I want to use the ActionForm validate() method
The short answer is, you cannot always depend on javascript. There is a small percentage (Probably less than 1% I would expect) of users who either disable javascript or don't have it in their browser (e.g. lynx). In these cases you will have no validation. Also there are differences between how each browser handles the DOM and javascript in general. -Original Message- From: Madhu Nair [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:33 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Why would I want to use the ActionForm validate() method Hi, Why would I want to use the Struts ActionForm validate() method when I can achieve the same functionality using Javascript? I assume that the user would never disable javascript. Regards , Madhu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mesage message account
I will put money on the fact that nobody on this list wants to read about your idiotic conspiracy theories. Please amuse yourself by trolling on Slashdot or usenet and stop wasting our time. -Original Message- From: object worlds [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 9:42 AM To: [EMAIL PROTECTED] Subject: mesage message account Did you take my message message account off the list ? Is that because that white shit Mark Galbreath said so and that shit Craig Mclanahan agreed. _ Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mesage message account
Only if they involve Microsoft, the CIA, and/or the Oil Cartels... -Original Message- From: Bill Chmura [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 4:15 PM To: 'Struts Users Mailing List' Subject: RE: mesage message account I've been off the list for awhile, and just wanted to double check that conspiracy theorys were still tolerated on fridays... -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:19 PM To: 'Struts Users Mailing List' Subject: RE: mesage message account I will put money on the fact that nobody on this list wants to read about your idiotic conspiracy theories. Please amuse yourself by trolling on Slashdot or usenet and stop wasting our time. -Original Message- From: object worlds [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 9:42 AM To: [EMAIL PROTECTED] Subject: mesage message account Did you take my message message account off the list ? Is that because that white shit Mark Galbreath said so and that shit Craig Mclanahan agreed. _ Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts and synchronization (Off Topic)
I don't this this is struts related. Unless you have a lot of synchronized code called by your execute method, it sounds more like a Tomcat/Apache issue. If you do have a bunch of code in your execute method that needs to be synchronized you have most likely shot yourself in the foot and should seek medical attention promptly. One of my first attempts at a J2EE application was very much hampered by an over-zealous attempt to create my own pooling mechanism which had a number of flaws that required very serious surgery to function properly. off-topic In regards to your configuration, it sounds like you are using (at least) two physical tiers for your web/app-server configuration. By this, I mean you have 1 set of machines for the web server portion, and another set for the servlet portion (I'm omitting everything else right now). You want to check on your servlet machine in the conf/server.xml and ensure you have enough request processors for whatever load you are throwing at the machine. Most connectors have a minProcessors and a maxProcessors as well as an acceptCount setting among other things. Make sure they are set appropriately high. If you have long running servlet on a fat machine, bump your acceptCount down and your min/max processors up. This will cause the servlet engine to do more concurrent work instead of queueing up network requests. There are some configuration settings on the web server side set in worker.properties that can also be tweaked. The most important (probably) of these would be if you are load balancing one web server to multiple servlet engines. Finally, if you have a lot of large/static content on every request, put it on the web server for high load. /off-topic -Original Message- From: Micael [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 8:20 PM To: Struts Users Mailing List; Struts Users Mailing List; Struts Users Mailing List Subject: Re: Struts and synchronization This will also, of course, lead to better performance, period, in your case. Sounds to me like you need something like a WorkerQueue where you put requests in a regular queque and a thread pool of anonymous worker threads run a FIFO collection. This is fairly standard stuff with Doug Lea's stuff on concurrent programming (try oswego doug lea in google). If you are single threaded, you will not be able to consistent. And, if you are multi-threaded, in the model, then there are numerous things you can do, even if the WorkerPool (or whatever Doug calls it, I forget) is but one thread. You an return the thread while the database is doing its stuff. Why not? There are a lot of creative solutions, once you use concurrent techniques. I hope this is helpful. If you don't need to return the results of the database, but just to update, then you can really make it hum, having the database stuff just in queque until the right time. I do this with helper computers doing little tasks for me on modem based home computers (with the consent of friends). I just have them pass a notice of what there ip address is to a queque with a time, and when I need a little work done, I pass it via a tunnel to the freshest ip address, which is held at the application level. Of course, it is even easier with static ips. But, my friends, like me, don't have static ips. We are POOR! LOL. Micael At 04:54 PM 8/11/2003 -0700, Micael wrote: Have you thought about using a multi-threaded solution with a queque such that when your database is busy you can notify the user that things are being processed and giving them a link to check back on? At 12:46 PM 8/11/2003 0500, Nathan Rogers wrote: The request path for a standard action within my code goes something like this : Struts servlet - action - model - database - model - action - Velocity servlet Here's what I know about each issue you've brought up. #1 - Tomcat is configured to work with the Warp connector. I don't know exactly how this works (if it passes all requests to Tomcat or just the ones registered to a servlet) #2 - I'll have to check with the sysadmin. Where is the number of request processors defined? #3 - I'm using the Jakarta Commons PoolingDataSource. I have used this before without any problems #4 - Something to look into. I'm closing my result sets, statements and connections (which returns them to the pool), but it might not be done in the best way. Mainguy, Mike wrote: The closest I ever came to this sort of problem involved the following: #1 Sending static content (and lots of it) through the servlet engine instead of using the web server. #2 Not having enough request processors and listeners configured. #3 Not using pooling for my connections and killing the DBMS with new connection requests. #4 Not properly closing/releasing my DBMS connections and consuming all available memory. So there you go, everything you should NOT do in a nutshell. Unless you're 100% proof-positive sure
RE: How to maintain data b/w pages?
Is the ActionForm in session scope? -Original Message- From: Swati [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 4:37 AM To: [EMAIL PROTECTED] Subject: How to maintain data b/w pages? Hi, I have a wizard to add objects, each wizard screen has back/next/cancel/finish buttons. There is one ActionForm class, and several action classes, corresponding to each screen. The action classes extend LookupDispatchAction. My problem is that the data is not maintained between the pages, i.e. enter data on a page, click next, and then click back. The data entered on the page is lost. I could solve it partially by keeping the String data in html:hidden tags in my jsp pages. But, how can I keep the data whose get method returns an array of string or HashMap. html:hidden tags do not work in that case. Is there any other way to do so? Thanks, Swati - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: where is the correct place to create DAO ?
Action class (or another class that it contains). Your taglibs should be for display and format only. They should be a consumer of data, not a producer. -Original Message- From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2003 4:53 AM To: Struts Users Mailing List Subject: where is the correct place to create DAO ? Normally we are creating DAO objects inside action clases, then binding them to request or sesssion to access from JSPs,Tags . it is also possible to create DAO objects inside Tag classes then access them inside tag class. for the DAO objects accessed from TAG classes where is the correct place to create DAO objects, Action class or inside Tag class? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Signup Wizard and Edit mode
I usually do it exactly as you described, with a hidden field that is called Command or Action. There seems to be a split on whether this is a good practice or not. I, for one, like this way of doing it because you get to reuse code from the action class and you can very often do your CRUD logic without a proliferation of assorted actions for each noun. Some folks would suggest that you should create a new action class and refactor your design to move the logic that is shared either to a superclass or a helper class. I think this is also a valid way of doing it, but, can't see any overwhelming advantage over using a hidden field and sharing the same action class. If it eases your pain any, I am currently trying to poll users to see what their opinions on this matter are. We are currently building a framework/best practices application based on struts and this is a big point of divergence right now. We very much don't want to confuse novice users by saying you can do it this way OR that way without providing a good example of why/when to do it one way or the other. -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2003 7:49 AM To: 'Struts Users Mailing List' Subject: Signup Wizard and Edit mode I have a user signup wizard running through several pages. After the signed up process is done I let the users update their registration information. I have an action named 'SignupAction'. Since I already wrote those pages I want to reuse them in the Edit actions. How can I do it? One way I thought of, since those pages already have their html:form action=/SignupAction.do, I will pass the SignupAction a hidden parameter with the mode or action = Edit and category=BasicInfo. That way it would that it is running in edit mode, and the category is the basic info (what was entered in the page #1 in wizard mode). 1) Can this work? 2) Is there a better way to do that? 3) How can I add arguments to the html:form action=/SignupAction.do?args...? can someone give an example here? Many thanks, Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design consideration
Crap! Sorry, I forgot outlook formatted my email as HTML (don't use outlook at home). Accept my apologies. -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 11:45 AM To: [EMAIL PROTECTED] Subject: Struts design consideration Hello fellow struts-users. I have a quick question. In what manner is everyone mapping their actions? Do you have multiple actions per action class or just one action per action class. We're working on a demo application and extension framework, but are rather undecided on whether to make each possible atomic action it's own class, or provide a mechanism to embed (sub)actions in the form data to ease the proliferation of classes and mappings that the other way would seem to cause. I.E. do you have ProjectCreate.class ProjectRead.class ProjectUpdate.class ProjectDelete.class Or do you have ProjectAction.class (with a mapping mechanism to map the various functions to what you're doing with your project). I understand that the former is rather the direction that struts is probably best suited for, but it seems to have a high potential to make maintenance a nightmare (or more nightmarish). This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: J2EE certified [Off-Topic]
I'll certify it for $1000 -Original Message- From: Mohd Amin Mohd Din [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 12:02 PM To: [EMAIL PROTECTED] Subject: J2EE certified A colleague mentioned to me something about getting J2EE certified. I could only find getting an application server certified not the application. Anyone knows how to get a web application J2EE certified or is there a certification for Java web apps? Amin This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts design consideration
Hello fellow struts-users. I have a quick question. In what manner is everyone mapping their actions? Do you have multiple actions per action class or just one action per action class. We're working on a demo application and extension framework, but are rather undecided on whether to make each possible atomic action it's own class, or provide a mechanism to embed (sub)actions in the form data to ease the proliferation of classes and mappings that the other way would seem to cause. I.E. do you have ProjectCreate.class ProjectRead.class ProjectUpdate.class ProjectDelete.class Or do you have ProjectAction.class (with a mapping mechanism to map the various functions to what you're doing with your project). I understand that the former is rather the direction that struts is probably best suited for, but it seems to have a high potential to make maintenance a nightmare (or more nightmarish). This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts and synchronization
The closest I ever came to this sort of problem involved the following: #1 Sending static content (and lots of it) through the servlet engine instead of using the web server. #2 Not having enough request processors and listeners configured. #3 Not using pooling for my connections and killing the DBMS with new connection requests. #4 Not properly closing/releasing my DBMS connections and consuming all available memory. So there you go, everything you should NOT do in a nutshell. Unless you're 100% proof-positive sure that it is a synchronization issue in your database portion, I would take a look at the above issues as potential problem areas. As far as synchronization is concerned, the only thing I can recommend is to be sure you aren't using your ActionServlet or something high in the food chain as your target, otherwise that would seem to cause that sort of a problem. -Original Message- From: Nathan Rogers [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 12:51 PM To: [EMAIL PROTECTED] Subject: Struts and synchronization I am using Struts 1.1 along with the Velocity tools to develop a fairly simple servlet (there are probably going to be no more than twenty actions total) The problem that I am facing is a deadlock situation where Tomcat simply refuses to respond to any new requests and just stalls. I think it may be due to some code in the model where I am using PreparedStatements (which are declared as synchronized). Has anyone else run into a similar problem where the Struts framework takes an unreasonably long time to handle a request due to synchronized methods? Is there any workaround, other than only using Statements in my model? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts is incomplete [OT]
Hmmm, and I thought all the trolls lived in Slashdot... ;) -Original Message- From: Jitesh Sinha [mailto:[EMAIL PROTECTED] Sent: Sunday, August 10, 2003 11:08 AM To: Struts Users Mailing List Subject: Struts is incomplete I guess Struts development is not yet complete. Since one of the things Struts does is providing tag libraries...now if these tags cannot do some basic functionalities(like iteration over a constant numbers which I had posted in the this mailing list),one cannot rely on it completely to develop his app Documentation is even worseone has to do hit and trial to understand what this tag will do... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pre-populating forms dynamically
public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { MyDynaValidatorActionForm ourForm = (MyDynaValidatorActionForm) form; ... Do all our magic to get the data into something called torqueBean ... BeanUtils.copyProperties(ourForm, torqueBean); return mapping.findForward(display); } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2003 4:43 PM To: Struts Users Mailing List Subject: Pre-populating forms dynamically When passing data back from persistence layer, what are the options for prepopulating a form. Can i prepopulate forms if using DynaValidatorForm? Do I just populate an ActionForm in an Action and pass that back to the form jsp? Or if I do this is a new instance of the form created when the form is created? It doesn't seem to work but may be an error somewhere else? Is anyone using the prepopulate using the reset method, as they explain in the Struts, OJB, Velocity book but with dynamic values rather than pulling static values from the message resources. Have been stuck on this for a few days and would appreciate any help. Ross - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Retrieve all messages ever sent to this list
I believe on the apache site there is a full mbox archive or something like that. -Original Message- From: Filip Polsakiewicz [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 11:01 AM To: Struts Users Mailinglist Subject: [OT] Retrieve all messages ever sent to this list Hi, is there a way to retrieve all messages which have been sent to this mailinglist until now? I'd like to save all messages on my Laptop as a kind of reference. Thanks, Filip This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaValidatorForm question
My gut reaction would be to use a depends=required on both fields. This should give you the behavior you desire. -Original Message- From: Jones, Marty B. [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 5:37 PM To: [EMAIL PROTECTED] Subject: DynaValidatorForm question I have a class that extends Action (LoginAction) and references a DynaValidatorForm for form validation. I have noticed that if I directly reference a url say http://myserver/control/login that it instantiates the LoginAction as it should. My question is, what is the best way to not allow the Action class to be fired if no request arguments are on the request so that the login.jsp file will paint to allow the user to enter usename and password information in. I am pretty sure that I could use a normal ActionForm and in the validation method check to see if the username and password values are both null. If they are then return a mapping to go back to the login screen. Is there a way to do this with the DynaValidatorForm? Thanks in advance, Marty Jones Marty B. Jones Senior Software Engineer DailyAccess.Com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Buttons and Actions without forms
#1 you could just include javascript in the jsp #2 you could use validator to create a rule (I believe) that could do that for you. -Original Message- From: Todor Sergueev Petkov [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 7:59 AM To: Struts Users Mailing List Subject: Buttons and Actions without forms Hello everybody, I was wandering if Struts framework and taglibs permit to have a button and an action associated with this button with no forms however. Example - when I click on that button just a pop up window comes up ? Todor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:radio..javascript
I my html:javascript looks like this html:javascript formName=logonSubmit dynamicJavascript=true staticJavascript=true/ don't know if those other two attributes matter or not... In addition, I put the html:javascript tag at the bottom of my page. For What It's Worth -Original Message- From: Prashant Samant [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 7:17 AM To: Struts Users Mailing List (E-mail) Subject: html:radio..javascript Hello Group, I want to put javascript validations on my page. In simple words i have 4 radio buttons and submit button. if i don't click any of the radio buttons and click submit, then i should get a javascript error. I tried a lot.I am getting the error using html:errors tag on the page. But i am not getting the javascript POPUP. My Html page is as follows %@ page language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html locale=true body html:javascript formName=logonForm/ html:form action=/logonSubmit focus=username onsubmit=return validateLogonForm(this); UserName : html:text property=username / Password : html:password property=password / Radio 1 :html:radio property=selectRad value=rad1/ Radio 2 :html:radio property=selectRad value=rad2/ Radio 3 :html:radio property=selectRad value=rad3/ Radio 4 :html:radio property=selectRad value=rad4/ html:submit property=submit value=submit / /html:form /body /html:html My struts-config file contains form-beans form-bean name=logonForm type=org.apache.struts.validator.DynaValidatorForm form-property name=username type=java.lang.String/ form-property name=password type=java.lang.String/ form-property name=selectRad type=java.lang.Boolean/ /form-bean /form-beans action-mappings actionpath=/logonSubmit type=ValidateAction name=logonForm scope=request validate=true input=/validateeg.jsp /action /action-mappings plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml,/WEB-INF/mVtrVal idation.xml,/WEB-INF/mVtrValidator-rules.xml/ /plug-in My validation.xml is as follows form-validation !-- == Default Language Form Definitions = -- formset form name=logonForm field property=username depends=required,minlength,maxlength arg0 name=required key=logonForm.userName.displayName/ arg0 key=logonForm.userName.displayName/ arg1 name=minlength key=${var:minlength} resource=false/ var var-nameminlength/var-name var-value3/var-value /var arg0 key=logonForm.userName.displayName/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemaxlength/var-name var-value6/var-value /var /field field property=selectRad depends=required arg0 name=required key=logonForm.userName.selectRadio/ /field /form /formset can anybody throw some light. Best Regards, Prashant S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts and Jetspeed
I'll agree, if you're already using Turbine, then struts is really a waste of time and effort. Just use the turbine framework (it's more complete anyway IMHO). If you really want to use struts for portlets, I'd recommend using struts in a different servlet context and then wrapping it in a portlet so you don't end up with a confused mish-mash of technologies. -Original Message- From: Joe Germuska [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 9:49 AM To: Struts Users Mailing List Subject: Re: Struts and Jetspeed At 22:22 -0600 7/30/03, jakarta-lists wrote: Has anyone successfully use Struts with Jetspeed? I'm looking into the possiblilty of having jetspeed do the authentication, templating and layout.. while struts will handle the control of the app. It sounds like a good idea to me, but I haven't worked with struts enough yet to know for sure and I would like to know about pitfalls if any. It doesn't sound like there's much left for Struts to do once you use Jetspeed (or Turbine, its underlying framework) for authentication, templating, and layout. Once you're talking about providing content to individual portlets in your Jetspeed installation, you can do it with much less work than adding Struts in to the mix. Joe -- -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com If nature worked that way, the universe would crash all the time. --Jaron Lanier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts access to protected jsp
You should be able to go to cramerLoad.do and all will be well. I put my .jsp files in WEB-INF with not problems... I Noticed that you didn't capitalize WEB-INF, that could be a potential problem. -Original Message- From: Tridev Kodamasingh [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 9:55 AM To: '[EMAIL PROTECTED]' Subject: struts access to protected jsp Hello everybody, I want to access a jsp which is inside /web-inf/ directory. I am using tomcat4.1.18. There is an entry inside the action maaping in structs-config.xml as following:- action path=/cramerLoad type=com.web..action.LoadPageAction forward name=loadPage path=/Web-inf/homepage.jsp/ /action My basic idea to put jsp's under /web-inf/ is not to allow the user to access the jsp's directly. Am I missing out something in the configurating struts ? Is there anyway, struts can access this jsp?? Any idea would be greatly appreciated. cheers Tridev - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSTL and Struts
I'm in a quandary. We're examining a way to do simple formatting of our model data. For example, when currency data comes out of the database, it needs to be rendered as $1,000.00 or whatever. This is a very common thing and we where going to do it using a custom formatting object to do this when we move the data from the model into the form (and visa versa). After some examination, it turns out the JSTL does this, but it doesn't appear to support it for input tags. How is this possible!? Am I missing something? Why would that not be the case, how often (in a business app) would you need to format data for display, but not for edit? Does anyone have any insight on best practices/direction in this arena? Typically we would do this in a utility class in the manner described above, but it seems a little clunky doing it this way given the state of the current tag-libs. This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL and Struts
I did it that way in a previous application and it seemed to work well, but it just seems like this functionality is so necessary that it would be built into the presentation taglib (and perhaps with the validator framework). Is it safe to say that perhaps it has not been implemented or discussed because it is an obvious shortcoming and something that will be better addressed by JSF than by rewriting chunks of the delivered stuff? -Original Message- From: Vic Cekvencih [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:39 AM To: [EMAIL PROTECTED] Subject: Re: JSTL and Struts One way is to localize inside the getter of the formbean. .V Mainguy, Mike wrote: I'm in a quandary. We're examining a way to do simple formatting of our model data. For example, when currency data comes out of the database, it needs to be rendered as $1,000.00 or whatever. This is a very common thing and we where going to do it using a custom formatting object to do this when we move the data from the model into the form (and visa versa). After some examination, it turns out the JSTL does this, but it doesn't appear to support it for input tags. How is this possible!? Am I missing something? Why would that not be the case, how often (in a business app) would you need to format data for display, but not for edit? Does anyone have any insight on best practices/direction in this arena? Typically we would do this in a utility class in the manner described above, but it seems a little clunky doing it this way given the state of the current tag-libs. This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]