RE: Application Resource reload.
Hello, `http://localhost:8080/web-app/admin/reload.do' This surely is useful, but the original struts-conifg.xml has a little comment over it saying this should be protected by some security measure in an real application. Now I wonder how it can be done. Any ideas? -- kazumi
problems with passing Japanese text as GET parameter
Hello struts-users, I am having problems passing a Japanese text as a GET parameter from one JSP to another. I am using struts 1.0 with resin 2.0.0 on redhat linux 6.2. I have the following JSP file: --- : %@ page contentType=text/html; charset=UTF-8 % : bean:define id=jText name=someBean property=japaneseText/ jsp:useBean id=params class=java.util.Hashtable/ % params.put(p1, jText); // a Japanese text parameter params.put(p2, 1234); // a numeric parameter % html:link page=/receiving.jsp name=params .../html:link : --- someBean.getJapaneseText() returns a piece of Japanese text. Doing bean:write name=jText/ in this JSP correctly produces this text string encoded in UTF-8. So far so good. Here is the receiving.jsp. I want to capture these GET parameters. --- : %@ page contentType=text/html; charset=UTF-8 % : bean:parameter id=jText name=p1/ bean:parameter id=aNum name=p2/ : --- When receiving.jsp is evaluated, I get the error: 500 Servlet Exception javax.servlet.jsp.JspException:No parameter p2 was included in this request at org.apaceh.struts.taglib.bean.ParameterTag.doStartTag (ParameterTag.java:174) : What is going on? One more thing. If I remove %@ page contentType=...% from receiving.jsp, the above error disappears, but the captured jText turns out to be all garbage when doing bean:write name=jText/ in this page. Weird. I appreciate any info on this matter. Regards, - kazumi iwane
subclassing ActionServlet?
Hello struts-users, My webapp needs bunch of beans that should be available all the time and accessible from all JSP pages, so I guess I have to create the beans at the startup time and set them to the application context. How should I do this? My candidates are, 1) create a subclass of ActionServlet and do it there, 2) create a subclass of Servlet (unrelated to ActionServlet) and do it there. Which is better, or are there any other standard ways? I don't see any examples that use subclasses of ActionServlet, and I am wondering if there are some reasons not to. Thanks in advance, - kazumi
who provides ActionMapping class?
Hello struts-users, A newbie question: Who is responsible for providing ActionMapping class? My prototype webapp runs fine with action-mappings descriptions in the struts-config.xml, I did not have to write ActionMapping.java for this myself. I must be missing something. Digester documetation seems to me to imply that I'd have to write a class to parse struts-config.xml and create ActionMapping.java using Digester. I am confused. - kazumi
RE: wizard style example, anywhere?
Hi, I wrote: Specifically, an application that uses "wizard" style, multiple-page input forms would be very nice. Couple of Struts documents I looked mention that Struts works well with wizard style application, but I get confused when it comes to writing struts-config.xml, JSPs that share the same ActionForm or Action, etc.. Marouane Louah wrote: you can try the example provided with the installation Well, I did look at the struts-example, and I don't think that is what I want. The example has relatively few JSPs, and each JSP page has its own ActionForm. What I have in mind is something like this: 1) A big ActionForm (i.e., many attributes for a user to fill in). 2) Several JSP pages each filling a part of the ActionForm, sequentially. 3) Along the way of the above sequence, there are several actions interleved, i.e., pre-calculating possible next choises for a user, etc.. In the above scenario, how do I structure Actions, how do I write config file, do I need to rely on session, etc, etc, I have many questions I can't even phrase very well. Let me ask again: any examples out there? - kazumi
wizard style example, anywhere?
Hello struts-users, I am very new to Struts (or JSP for that matter), and in need of some examples that I can get my hands on. Specifically, an application that uses "wizard" style, multiple-page input forms would be very nice. Couple of Struts documents I looked mention that Struts works well with wizard style application, but I get confused when it comes to writing struts-config.xml, JSPs that share the same ActionForm or Action, etc.. I gotta see it working before I start building mine. Good examples, anywhere, anyone? thanks, - kazumi