pass parameter between actions
Hi, I have to actions, action1 and action2, action path=/action1 type=JavaCodeAction1 name=action1Form scope=request validate=true forward name=success path=action1/ forward name=default path=/home.do/ /action action path=/action2 type=JavaCodeAction2 name=action2Form scope=request validate=true forward name=success path=something/ forward name=default path=/home.do/ /action Inside action1, protected ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse respose) throws Exception { String id = 100; //or other number } Once action1 is successful, I would like to call action2 with the link action2.do?id=100. However, I do not know how to pass the parameter id to action2. Could anyone help? Thanks, qq __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameter between actions
Hi, I have to actions, action1 and action2, action path=/action1 type=JavaCodeAction1 name=action1Form scope=request validate=true forward name=success path=action1/ forward name=default path=/home.do/ /action action path=/action2 type=JavaCodeAction2 name=action2Form scope=request validate=true forward name=success path=something/ forward name=default path=/home.do/ /action Inside action1, protected ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse respose) throws Exception { String id = 100; //or other number } Once action1 is successful, action1 will call action2. But there is not addtional parameters specified. I actually would like to call action2 with the link action2.do?id=100. Because the link is totally defined int the configuration file, It seems that I have no way to pass the parameter id to action2. Could anyone help? Thanks, qq __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pass parameter between actions
Hi, thank you very much. But I got the java.lang.IllegalStateException: Configuration is frozen exception. Could you please help me? Thanks, qq --- Givler, Eric [EMAIL PROTECTED] wrote: Can't you do something like this: fwd = mapping.findForward( gf_action2 ); fwd.setPath( fwd.getPath() + ?id=100); return fwd; gf_action2 would be a global-forward to action2. -Original Message- From: Tony Smith [mailto:[EMAIL PROTECTED] Sent: Friday, September 22, 2006 10:46 AM To: Struts Users Mailing List Subject: pass parameter between actions Hi, I have to actions, action1 and action2, action path=/action1 type=JavaCodeAction1 name=action1Form scope=request validate=true forward name=success path=action1/ forward name=default path=/home.do/ /action action path=/action2 type=JavaCodeAction2 name=action2Form scope=request validate=true forward name=success path=something/ forward name=default path=/home.do/ /action Inside action1, protected ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse respose) throws Exception { String id = 100; //or other number } Once action1 is successful, I would like to call action2 with the link action2.do?id=100. However, I do not know how to pass the parameter id to action2. Could anyone help? Thanks, qq __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot create iterator for this collection
Hi, I am using struts taglib. I have a object like public class myObject{ List myList; List getList(){ return myList; } ... } The myObject is send through aciton to the jsp. In my jsp, I have: ... bean:define id=l value=myObject.list/ logic:iterate id=obj collection=l ... /logic:iterate But it complains that Cannot create iterator for this collection which means myList is not reconginzed as a list. What is wrong? Thanks, qq --- Paul Benedict [EMAIL PROTECTED] wrote: Hakan, You need to store the error messages in the request or session after you retrieve them: ActionErrors errors = form.validate(); if ((errors != null) !errors.isEmpty()) { saveErrors(request, errors); return mapping.getInputForward(); } Paul __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
access session attribute with taglib
I have an attribute saved in session. In servlet, I can access it by request.getSession().getAttribute(my); In jsp, how can I access it without write java code? I am thinking about bean:page, but do not know how to use it. Thanks, __ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How can I refer a control in javascript which hava a . in its name
Hi everyone: Here is my jsp: html:form ... html:select ... onChange=change(this) ... /html:select html:text name=myForm property=myobject.subobject .../ /html:form If user change the selection in the select, I would like to change the content of the text. Thus, I write my change() function in javascript: script language=javascript function change(select){ document.form[0].myobject.subobject = select.options[select.selectedIndex]; } But looks like this does not work. The problem is the name of the text. In the html it is myobject.subobject. But seems that javascript does not take that How can I refer the text in javascript? Thanks, Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple Input Bean
Hi, Suppose I have a UserBean: class UserBean{ String name, String address, ... public String getName() ... } In one jsp page, I want to input multiple people beans and send back to server. The jsp UI is something like: People 1: Name [ ] address [] People 2: Name [ ] address [] People 3: Name [ ] address [] [Submit Button] How do I design my ActionForm and Action? Thanks, __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select onchange
Thank you very much for your post. I agree with you and some user were complaining about the effect your mentioned. My situition is that I have two selects, once the users update one, I need to populate the other with correspondent options. If I do not go to another page, what is the best way to do? WOuld you please give me some hits? THanks, again. --- Wendy Smoak [EMAIL PROTECTED] wrote: From: Tony Smith [EMAIL PROTECTED] html:select name=myform property=myfield onchange=location.href='mynewpage.do?para=XX' ... /html:select http://www.javascriptkit.com/jsref/select.shtml onChange=location.href='mynewpage.do?para='+options[selectedIndex].value; Keep in mind that this can be *very* annoying in terms of UI design. The user doesn't get a chance to correct a mistake; he changes one thing and suddenly he's off on some other page. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
calender in jsp
My jsp user interface contains one Textfield and button beside the textfiled. If that button is clicked , a calender should be displayed and the selected date in that particular calender is to be displayed in the textfield. how to do this in JSP? Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
nested html:form
If I have a html:form, can I have another html:form inside it and pointed to a different action? For example: html:form action=outter.do ... html:form action=inner.do ... /html:form /html:form __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:select onchange
I have html:select in my jsp. When user make a new seletion in the select, I could like to go ot a new page and use the current selected item as parameter. How can I do it? Here is my jsp: html:select name=myform property=myfield onchange=location.href='mynewpage.do?para=XX' ... /html:select X should be the new selected item in this select control which is just select by the user and triggered this event. Thanks, --- Tony Smith [EMAIL PROTECTED] wrote: If I have a html:form, can I have another html:form inside it and pointed to a different action? For example: html:form action=outter.do ... html:form action=inner.do ... /html:form /html:form __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: read init parameters in action
Thanks. Could you show me how to write such plug-in? --- Borislav Sabev [EMAIL PROTECTED] wrote: I think there are 2 cases: 1. you need a param that is available to the Servlet and is not uniquie to any particular Action for eample in my application users can uppload images, so after the upload I store them in a subfolder in the application. here is how I do it: a. this snippet I add in web.xml in servlet tag init-param param-nameimagesstorage/param-name param-valuestore_images/param-value /init-param b. here is the code to get the param in one of the actions (in fact I do this in one plugin because this path is constant all the time, so I read it only on startup) StringBuilder path = new StringBuilder(); path.append(servlet.getServletConfig().getServletContext().getRealPath(/)); path.append(servlet.getServletConfig().getInitParameter(imagesstorage)); 2. every separate Action needs some initial parameter. In this case why do you need to put as an init param? it's enough just to have static field in the Action class ... I hope this is usefull for you. Borislav For traditional servlets, you can set init parameters in the web.xml and read it in a static init method in servlet class. Can I have similar things for action? If I need some of these init parameter for my web app, what is the best way to do it with struts? Thansk, __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mit freundlichen Grüßen Borislav Sabev eventsoft GmbH Max-Planck-Str. 3 85716 Unterschleißheim Tel: 089 - 35 89 03 21 Fax: 089 - 35 89 03 70 [EMAIL PROTECTED] www.eventsoft.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Sell on Yahoo! Auctions no fees. Bid on great items. http://auctions.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
read init parameters in action
For traditional servlets, you can set init parameters in the web.xml and read it in a static init method in servlet class. Can I have similar things for action? If I need some of these init parameter for my web app, what is the best way to do it with struts? Thansk, __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generate image by servlet for large amount of requests
Any ideas? --- Tony Smith [EMAIL PROTECTED] wrote: Let's think about maps.yahoo.com. I do not know how they handle millions of request and generate the map pictures quickly. If I use a servlet, in the post or get method I use: BufferedImage mapImage = myTookKit.generateMap(String address); response.setContentType(image/png); OutputStream os = response.getOutputStream(); ImageIO.write(buffer, png, os); os.close(); Is servlet a good choice? If I use servlet, is the code above good enough to handle hundreds of request? Is the choice of BufferedImage a good one? What special technique I need to implement myTookKit to make it faster? I am thinking about JNI. Thanks, __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
access entries in MessageResources.properties from java code
How can I access entries in MessageResources.properties inside Action or Form code? Thanks, --- Rick Reumann [EMAIL PROTECTED] wrote: Hubert Rabago wrote the following on 7/8/2005 12:24 AM: There are several reasons why you shouldn't use VOs as your form beans and vice versa (as other msgs in this thread explain). Actually in this thread so far I haven't heard anyone explain why they are a 'bad' idea. The only way I see it being 'sort of' bad would be if... 1) You insist upon using the validation framework by having validation take place by setting validation=true in your struts-config mappings. (I like to call validation manually in my Actions so this isn't really a problem - it's like an extra line or two of code). 2) Sometimes you have some odd non-VO type properties that you want to send to your Action. If you insist these needed to be captured by some kind of bean/ActionForm than yea I guess that's a minor problem... but what's the big deal about using an occasional request.getParameter() or since you are using Struts you still 'have' to use an ActionForm just add the VO as a property and you can still a few other misc fields if you so desire. ActionForm == The Black Sheep of Struts :) -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterate without collection
How can I cast int to char in jsp? Thanks, --- Wendy Smoak [EMAIL PROTECTED] wrote: From: Tony Smith [EMAIL PROTECTED] I am using jsp to print out a table. The data (dxx) comes from a formbean. At the beginning of every row, I would like to print a character starting from 'A'. A d11 d12 d13... B d21 d22 d23... C d31 d32 d33... If you put the rows into a TreeMap and use A,B,C... for the keys, then they will come out in the correct order when you feed the Map to logic:iterate. But... your subject line says without collection so I'm still not sure what you need here. If you show the form bean property that goes with this table, and a snippet of JSP where you're trying to do the iteration, it might make more sense to me. In another message you asked how to convert 0 to A, 1 to B, etc. If you add 65 to the int and cast it to char, you'll get the right letter. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterate without collection
That is cool. But is this going to work: table logic:iterate id=cell indexId = idx name=myform propert=myListInForm tr td%= Character.toString (idx + 65) %/td td${id}/td /logic:iterate /tr /table Suppose I have a list in my form with data d1, d2, d3... I want to print out: A d1 B d2 C d3 ... --- Thomas Corte [EMAIL PROTECTED] wrote: Hi, Tony Smith wrote: How can I cast int to char in jsp? Try %= Character.toString (i + 65) % -- Thomas Corte [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Iterate without collection
If I just want to go through a loop and print out 1, 2, ...10, how can I do it with logic:iterate? Here is my jsp: logic:iterate id=index indexId=number length=10 $number /logic:iterate It complained that Null attribute name. THanks, __ Discover Yahoo! Stay in touch with email, IM, photo sharing and more. Check it out! http://discover.yahoo.com/stayintouch.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterate without collection
can I do it with logic:iterate? --- Wendy Smoak [EMAIL PROTECTED] wrote: From: Tony Smith [EMAIL PROTECTED] If I just want to go through a loop and print out 1, 2, ...10, how can I do it with logic:iterate? Here's a gentle shove in the JSTL direction... http://struts.apache.org/userGuide/dev_logic.html %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:forEach begin=0 end=10 var=num c:out value=${num} / /c:forEach (If you're on a JSP 2.0 container, you can drop the c:out and use the expression directly.) -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterate without collection
In jsp, with struts tag library, how can I change 0 to 'A', 1 to 'B', ... Thanks, --- Tony Smith [EMAIL PROTECTED] wrote: can I do it with logic:iterate? --- Wendy Smoak [EMAIL PROTECTED] wrote: From: Tony Smith [EMAIL PROTECTED] If I just want to go through a loop and print out 1, 2, ...10, how can I do it with logic:iterate? Here's a gentle shove in the JSTL direction... http://struts.apache.org/userGuide/dev_logic.html %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:forEach begin=0 end=10 var=num c:out value=${num} / /c:forEach (If you're on a JSP 2.0 container, you can drop the c:out and use the expression directly.) -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterate without collection
I am using jsp to print out a table. The data (dxx) comes from a formbean. At the beginning of every row, I would like to print a character starting from 'A'. Some my table looks like A d11 d12 d13... B d21 d22 d23... C d31 d32 d33... --- Wendy Smoak [EMAIL PROTECTED] wrote: From: Tony Smith [EMAIL PROTECTED] can I do it with logic:iterate? In jsp, with struts tag library, how can I change 0 to 'A', 1 to 'B', ... As far as I can tell from the docs... not without putting the things you want to display into a Collection. How about describing the problem you're trying to solve, instead of the one solution that you're trying to get working? It's quite possible that someone can suggest a better solution that works within your constraints. (Without knowing anything else about your project, I'd say just stick a scriptlet in the JSP to populate an ArrayList, put that in page scope, and then use logic:iterate on it.) Meanwhile... JSTL can do this... c:forTokens items=A,B,C,D,E delims=, var=token c:out value=${token}/ /c:forTokens -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Discover Yahoo! Stay in touch with email, IM, photo sharing and more. Check it out! http://discover.yahoo.com/stayintouch.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
use boolean field as property
I have a class public class mybean{ boolean isGood; public boolean getIsGood(){ return isGood; } public void setIsGood(boolean good){ this.isGood = good; } } Suppose I have a list of mybean, can I do this: logic:iterate id=obj name=mylist logic:equal name=obj property=isGood value=true xxxgood /logic:equal /logic:iterate My app throws a exception saying: No bean found under attribute key obj I do not know why Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running tomcat on port 80[Scanned]
Thank all for response. I loged on as root and changed server.xml to use port 80. When I start tomcat, it now compained that 80 is already in use. But I can not find out who is using it. I ran netstat -a, but I did not see anything like 80. Should I look at something else? I also tried telnet localhost 80, I got [EMAIL PROTECTED] telnet localhost 80 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. And it hang on there. I type in GET index.html HTTP/1.1 After a couple minutes, I got a 400 bad request from Apache/2.0.46. Looks like I have apache running. How can I stop the apache server? I am using linux. We are still in the developing stage and all users are internal. Thus, security is not a concern right now. --- Timo -Blazko- Boewing [EMAIL PROTECTED] wrote: On Tue, 2005-06-21 at 18:54 +0200, mario nee wrote: in Unix system you must have root permission to open a port under 1024. Hello, While this is right, I would not recommend to run Tomcat as root. Better run Tomcat with another port just like the default 8080 and use a firewall application such as iptables to internally forward incoming requests to port 8080; thus you avoid dangerous exploits in Tomcat's webapps. It can be done w/ something similar to this: iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 -- greetings, | /\ | \ / ASCII-Ribbon-Campaign Timo | X Against HTML Mail | / \ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running tomcat on port 80[Scanned]
Or, can I move my tomcat under apache so now port number is necessary in the address? --- Tony Smith [EMAIL PROTECTED] wrote: Thank all for response. I loged on as root and changed server.xml to use port 80. When I start tomcat, it now compained that 80 is already in use. But I can not find out who is using it. I ran netstat -a, but I did not see anything like 80. Should I look at something else? I also tried telnet localhost 80, I got [EMAIL PROTECTED] telnet localhost 80 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. And it hang on there. I type in GET index.html HTTP/1.1 After a couple minutes, I got a 400 bad request from Apache/2.0.46. Looks like I have apache running. How can I stop the apache server? I am using linux. We are still in the developing stage and all users are internal. Thus, security is not a concern right now. --- Timo -Blazko- Boewing [EMAIL PROTECTED] wrote: On Tue, 2005-06-21 at 18:54 +0200, mario nee wrote: in Unix system you must have root permission to open a port under 1024. Hello, While this is right, I would not recommend to run Tomcat as root. Better run Tomcat with another port just like the default 8080 and use a firewall application such as iptables to internally forward incoming requests to port 8080; thus you avoid dangerous exploits in Tomcat's webapps. It can be done w/ something similar to this: iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 -- greetings, | /\ | \ / ASCII-Ribbon-Campaign Timo | X Against HTML Mail | / \ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Eclipse plug-in for Struts
Is there an Eclipse plug-in for Struts or Tomcat so that I can develop, debug, and test my web app all in Eclipse? Right now, if I want to change something I have to write my program in Eclipse, write my jsp in another text editor, export the jar file from Eclipse to web-inf/lib, restart Tomcat, and open IE __ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
running tomcat on port 80
Hi, Can I run Tomcat 5.0 on port 80? After setting 80 as port number in the server.xml and starting tomcat, I got the following error message: SEVERE: Error starting endpoint java.net.BindException:permission denied:80 Thanks, Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running tomcat on port 80
How can I set the permission? It is my box, viturally I can do whatever I want. Thanks, --- Dave Newton [EMAIL PROTECTED] wrote: Tony Smith wrote: Hi, Can I run Tomcat 5.0 on port 80? After setting 80 as port number in the server.xml and starting tomcat, I got the following error message: SEVERE: Error starting endpoint java.net.BindException:permission denied:80 Sure, you can run it on any port you want, if you have permissions to that port. Evidence would suggest that you do not. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Discover Yahoo! Find restaurants, movies, travel and more fun for the weekend. Check it out! http://discover.yahoo.com/weekend.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
http 404 page
If there is a problem, e.g. an action/page can not be found, the ugly Http 404 page not found page will be display. Is there a way to handle such event as Struts Exception handling? Thanks, __ Discover Yahoo! Find restaurants, movies, travel and more fun for the weekend. Check it out! http://discover.yahoo.com/weekend.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Initial parameters
If I used traditional servlet, I can set initial parameters for every servlet in web.xml. How can I set parameters for Struts? Thanks, __ Discover Yahoo! Use Yahoo! to plan a weekend, have fun online and more. Check it out! http://discover.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
My IncludeAction-where to forward
My webapp is standard. It has a left side menu pane and right side content pane. Both are dynamic and generated by struts action. I would like to have two different Actions for menu and content. For the menu aciton, I would like to use IncludeAction so that is could be included in my jsps. Thus, I derived IncludeAction and put me stuff in execute. But the problem is after everything is done, where should the action go? Here is my action code: public class MenuAction extends IncludeAction { public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse respose) throws Exception { //my stuff... return mapping.; } } Here is my action defination in struts-config.xml: action path=/menu type=xxx.MenuAction name=menuForm scope=request validate=true parameter=/pages/menu.jsp/ Could anyone help? --- Ray Madigan [EMAIL PROTECTED] wrote: I would advise you read the sections http://struts.apache.org/userGuide/introduction.html that explain how an ActionForm works and how you get/set the form properties. You need an ActionForm linked to your Action and struts will scrape the properties from your page into the form and you just manage the form. -Original Message- From: Joe Smith [mailto:[EMAIL PROTECTED] Sent: Friday, June 10, 2005 11:01 PM To: user@struts.apache.org Subject: display the form values from view page register.jsp is the view page, and when the user click submit button, it will go to result.jsp based on struts-config.xml. The followings are the code fragment of each significant files. My question is for result.jsp, I am now using request.getParameter(name) to get the name property specified in the form. It is working code, I just want to ask if this is the best appraoch in struts application? Please advise. thanks!! register.jsp = html:form action=register.do PName: html:text property=name/html:text PAddress: html:text property=address/html:text PZIP: html:text property=zip/html:text html:submitRegister Online/html:submit /html:form result.jsp == H3Name = %= request.getParameter(name) %/H3 struts-config.xml = action-mappings action name=registerFormBean path=/register scope=request type=com.insights.struts.actions.RegisterAction input=register.jsp forward name=success path=/result.jsp/ /action /action-mappings RegisterAction.java === public ActionForward execute(...) { //etc... forward = mapping.findForward(success); } - 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] __ Discover Yahoo! Stay in touch with email, IM, photo sharing and more. Check it out! http://discover.yahoo.com/stayintouch.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts - view, create, update user page
So here is the situation: All data is in database. I have a user table with Fields like First Name, Last Name, Address, SSN, EMAIL, Telephone... I have Account table with fields like ID, Date, Balance,... Each user can have one or more Accounts. I have Transaction table with fields like ID, Date, Title, Status ... Each user account have one or more Transactions. ... I would like to have pages that can create user, display all users or individual users, edit user information, and delete user. I would like to have pages that can create account, display account, edit account information, and delete account... I would like to have pages that can create transaction, display transaction, edit transaction, and delete transaction... ... Thanks, --- Larry Meadors [EMAIL PROTECTED] wrote: Give us some more info Tony. Are you talking about a relational database with 20 tables, or is this user information just a few bits in an xml file? Larry On 6/6/05, Tony Smith [EMAIL PROTECTED] wrote: Hi, I am using struts to develop a webapp. One piece of work is the user information. I will allow user to create, view, and update his personal information. Usually, the three pages are very similar. What is the best way to do this with Struts? Is there any Pattern for this? I checked the Struts DispatchAction, but not sure how to do it... Thanks, __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts - view, create, update user page
What is the best way to implment this with Struts? Need help, please, please, please, So here is the situation: All data is in database. I have a user table with Fields like First Name, Last Name, Address, SSN, EMAIL, Telephone... I have Account table with fields like ID, Date, Balance,... Each user can have one or more Accounts. I have Transaction table with fields like ID, Date, Title, Status ... Each user account have one or more Transactions. ... I would like to have pages that can create user, display all users or individual users, edit user information, and delete user. I would like to have pages that can create account, display account, edit account information, and delete account... I would like to have pages that can create transaction, display transaction, edit transaction, and delete transaction... ... Thanks, --- Larry Meadors [EMAIL PROTECTED] wrote: Give us some more info Tony. Are you talking about a relational database with 20 tables, or is this user information just a few bits in an xml file? Larry On 6/6/05, Tony Smith [EMAIL PROTECTED] wrote: Hi, I am using struts to develop a webapp. One piece of work is the user information. I will allow user to create, view, and update his personal information. Usually, the three pages are very similar. What is the best way to do this with Struts? Is there any Pattern for this? I checked the Struts DispatchAction, but not sure how to do it... Thanks, __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts - view, create, update user page
Micheal: Could you show me how to build the one action? Thanks, --- Michael Jouravlev [EMAIL PROTECTED] wrote: If you want some kind of automation to build an HTML form or JSP for an arbitrary object on the fly, then Struts does not provide this service. You need to design pages yourself. Maybe there are some third-party libraries to do this. I might implement something like this as an example for Struts Dialogs library, your requirement seems to make a good use case. But even then I will need to create different pages for user list, user edit, user view, etc. I will use one action per each CRUD operation, though. Micahel. On 6/7/05, Tony Smith [EMAIL PROTECTED] wrote: So here is the situation: All data is in database. I have a user table with Fields like First Name, Last Name, Address, SSN, EMAIL, Telephone... I have Account table with fields like ID, Date, Balance,... Each user can have one or more Accounts. I have Transaction table with fields like ID, Date, Title, Status ... Each user account have one or more Transactions. ... I would like to have pages that can create user, display all users or individual users, edit user information, and delete user. I would like to have pages that can create account, display account, edit account information, and delete account... I would like to have pages that can create transaction, display transaction, edit transaction, and delete transaction... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
access session object
Hi: In my Action class, I stored a object in session with HttpSession session = request.getSession(); session.setAttribute(myobject, object); How can I access this object from jsp? Thanks, __ Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
link to a layout page
I used tiles defined one of my jsp page with as the following layout definition name=studyNewLayout extends=mainLayout put name=title value=New Studys / put name=body value=/pages/studynew.jsp / put name=menu value=/pages/commonstudysmenu.jsp / /definition At another jsp page, I would like to have a link pointed to this definition. How can I do it? I am currently using: html:link href=studyNewLayoutToStudyNew/html:link. But it does not seems to work. Thanks, __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts - view, create, update user page
Hi, I am using struts to develop a webapp. One piece of work is the user information. I will allow user to create, view, and update his personal information. Usually, the three pages are very similar. What is the best way to do this with Struts? Is there any Pattern for this? I checked the Struts DispatchAction, but not sure how to do it... Thanks, __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts - view, create, update user page
Thank yoy very much. --- Michael Jouravlev [EMAIL PROTECTED] wrote: On 6/6/05, Tony Smith [EMAIL PROTECTED] wrote: Hi, I am using struts to develop a webapp. One piece of work is the user information. I will allow user to create, view, and update his personal information. Maybe you would like to reconsider your three pages, and split them into edit new, vew existing and edit existing plus a separate action just to create a new userinfo? In that case you might find this worth reading: http://www.theserverside.com/articles/article.tss?l=RedirectAfterPost2 Usually, the three pages are very similar. What is the best way to do this with Struts? Is there any Pattern for this? I checked the Struts DispatchAction, but not sure how to do it... DispatchAction simply allows you to define handler methods for events, usually triggered by submit buttons. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts - view, create, update user page
Hi, I read your article and found it very informative. But in my situation, I have about 10 different items. If I use the technology described in the paper, I need to create about 40 forms and even more actions. Is there any other ways to get around of this? Thanks, --- Michael Jouravlev [EMAIL PROTECTED] wrote: On 6/6/05, Tony Smith [EMAIL PROTECTED] wrote: Hi, I am using struts to develop a webapp. One piece of work is the user information. I will allow user to create, view, and update his personal information. Maybe you would like to reconsider your three pages, and split them into edit new, vew existing and edit existing plus a separate action just to create a new userinfo? In that case you might find this worth reading: http://www.theserverside.com/articles/article.tss?l=RedirectAfterPost2 Usually, the three pages are very similar. What is the best way to do this with Struts? Is there any Pattern for this? I checked the Struts DispatchAction, but not sure how to do it... DispatchAction simply allows you to define handler methods for events, usually triggered by submit buttons. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Discover Yahoo! Use Yahoo! to plan a weekend, have fun online and more. Check it out! http://discover.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]