forward problem with frames
Hi all, why have a frameset and open a link without this framset. Then I want to go back to the frameset with this forward. forward name=start_mitarbeiter path=/main.jsp/ the main.jsp is the page with the frameset. But this forward opens a new window? Why does it do that and how can I open this in the same Window? This forward called with a html:submit tag in the action class. With a link I have the target parameter but with the button I havn't nothing or ...? Can somebody help me? Stefan
Populating an HTML-Form
Hello, at a jsp-Page I want to populate the a form, the required data are in a bean. How do I populate it? I´m new at the struts framework and I didn´t find documentation for this. The Struts-Example-Webapplication is nonapparent for me. For Detail: The user has see a list as an dynamic html-Table with userdata, every row has a link to edit this userdata. When he clicks on it a new form has to appear with the userdata, now he can edit it and make an database-update. My Problem ist to fill the form with the data, I would be glad if you can help me with the necessary Struts-tags, Regards Maik Mrazovic T - S y s t e m s debis Systemhaus MEB GmbHBusiness Center Sales eBusiness, RD/VN Erich-Herion Str. 13 70736 Fellbach(Phone) +49 711 17-40549(Mobile) +49 170 832-5616(email) [EMAIL PROTECTED]Internet: http://www.t-systems.de
Re: Unit testing Actions
Hi John, If you don't get any answer on the struts-user mailing list please repost on the cactus-user list, I know for sure that several persons have done it and would be able to give you the code. Basically, there is no helper class for the time being, meaning that before calling your action, you'll need to create needed Struts objects. But as Struts is very well designed and is using the "composition" approach (meaning that objects are not hard-linked with each other but rather you initialize an object by passing it needed domain objects) there is no problem with that and it works fine. -Vincent - Original Message - From: John Yu To: [EMAIL PROTECTED] Sent: Tuesday, July 31, 2001 8:31 AM Subject: Unit testing Actions Is there any sample showing how to do unit testing for Actions? How do I use Cactus to do it? Thanks. -- John Yu Scioworks Technologies e: [EMAIL PROTECTED] w: +(65) 873 5989w: http://www.scioworks.com m: +(65) 9782 9610
struts and log4J
Hi all, I'm a newbie in struts. I'd like to use log4J with struts. I don't know where i must do the log4J configuration. In another servlet, i would do it in init method but i would like to use ActionServlet. Where can i put code like : BasicConfigurator.configure() . ? Thanks for help. Alexandre Duprat SOPRA. Direction France Sud. Bordeaux [EMAIL PROTECTED] ++ | Ce courrier ainsi que les fichiers joints sont confidentiels. | | Si vous avez recu ce courrier par erreur, veuillez en informer | | l'administrateur du systeme : [EMAIL PROTECTED] | | - | | Ce message confirme que le courrier a passe le controle| | antivirus du relais de messagerie Internet avec succes.| ++
indexed properties problems ArrayIndexOutOfBoundsException
Hi, I've followed various threads (Long Story Short etc) about Dave Hays index tags enhancement and after much hair tearing! The suggested code for the form bean is: private ArrayList parameterList = new ArrayList(); public ArrayList getParameterList() { return(this.parameterList); } public void setParameterList(ArrayList parameterList) { this.parameterList = parameterList; } public Parameter getParameter(int index) { System.out.println(index); if (idx parameterList.size()-1) { parameterList.add(index,new Parameter ()); } return (Parameter) parameterList.get(index); } The problem I'm getting is that struts is calling the getParameter(index) method out of sequence e.g. index=5 index=4 index=17 index=17 index=3 index=7 index=16 index=15 index=2 index=14 index=10 index=1 index=0 etc.. and so the calls to add and get on the ArrayList result in ArrayIndexOutOfBoundsException rather than building up the values. This problem would go away if I used session scope form beans but I'd rather not do that. Has anyone else seen this problem / found a neat solution? Cheers Nathan ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **
RE: struts and log4J
Hi all, I'm a newbie in struts. I'd like to use log4J with struts. I don't know where i must do the log4J configuration. In another servlet, i would do it in init method but i would like to use ActionServlet. Where can i put code like : BasicConfigurator.configure() . ? Hello Alexandre, I don't know if this is THE way of doing it, but what I did is create a servlet (which I name 'Initializer') that does all these thing (calling configure and stuff). I my web.xml I have: servlet servlet-nameinitializer/servlet-name servlet-classMyApp.Initializer/servlet-class display-nameInitializer/display-name load-on-startup1/load-on-startup /servlet servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class display-nameAction/display-name load-on-startup2/load-on-startup /servlet (lots of administration left out of these...) The 1 on the first servlet makes sure this one is loaded before the second one. All initialization is done in the 'init' method of Initializer. As I said, I don't know if this is the preferred way, but it works! Mark Schenk | Ceci n'est pas une signature Blackboard Project Manager | Delft University of Technology |E-mail: [EMAIL PROTECTED] Dept.: DTO |Phone: +31 152785448 (85448) Room: LB00.680 |Fax:+31 152786359 -
RE: Re: Embedded bean/param values
JSPTL allows you to do the following by using the Simplest Possible Expression Language (SPEL) provided with the reference implementation: tag attribute=$foo.bar.baz/ tag attribute=$param:paramName/ The above examples make things prettier but don't really add much functionality over JSP expressions. The original author in this thread was looking for something like: tag attribute=bean:write bean=... property=... / The problem is that the example isn't very good because it is only a bean:write which is pretty much just a lookup and can be handled with JSP expressions. But if we take another example such as: tag attribute=bean:message key=... / The problem is clearer. The bean:message taglib adds some significant functionality and isn't just a bean access. Stuff like this has caused me endless frustration. If SPEL had some way of calling a taglib as if it were a function, I'd be dancing on my desk. Something like: tag attribute=bean:message(key=yourkeyhere) / Seems like the hardest part of adding this is coming up with a reasonable syntax. But I don't believe it's been done yet. I do note, however, that that JSPTL provides a way of plugging in expression languages. So maybe this will encourage future experimentation in this direction. Devon
RE: struts and log4J
Why don't extends the Action servlet ??? You can create a MyActionServlet which extends ActionServlet and initialize log4J. Then you replace in the web xml the ActionServlet Class with the MyActionServlet Class. I didn't test it, but I think that it works. Arnaud H -Message d'origine- De: Mark Schenk [SMTP:[EMAIL PROTECTED]] Date: mardi 31 juillet 2001 11:25 A: [EMAIL PROTECTED] Objet: RE: struts and log4J Hi all, I'm a newbie in struts. I'd like to use log4J with struts. I don't know where i must do the log4J configuration. In another servlet, i would do it in init method but i would like to use ActionServlet. Where can i put code like : BasicConfigurator.configure() . ? Hello Alexandre, I don't know if this is THE way of doing it, but what I did is create a servlet (which I name 'Initializer') that does all these thing (calling configure and stuff). I my web.xml I have: servlet servlet-nameinitializer/servlet-name servlet-classMyApp.Initializer/servlet-class display-nameInitializer/display-name load-on-startup1/load-on-startup /servlet servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class display-nameAction/display-name load-on-startup2/load-on-startup /servlet (lots of administration left out of these...) The 1 on the first servlet makes sure this one is loaded before the second one. All initialization is done in the 'init' method of Initializer. As I said, I don't know if this is the preferred way, but it works! Mark Schenk | Ceci n'est pas une signature Blackboard Project Manager | Delft University of Technology |E-mail: [EMAIL PROTECTED] Dept.: DTO |Phone: +31 152785448 (85448) Room: LB00.680 |Fax:+31 152786359 -
RE: struts and log4J
Thanks Mark and Arnaud for help. Both soluces are working. -Message d'origine- De: Heritier Arnaud [mailto:[EMAIL PROTECTED]] Date: mardi 31 juillet 2001 11:36 À: '[EMAIL PROTECTED]' Objet: RE: struts and log4J Why don't extends the Action servlet ??? You can create a MyActionServlet which extends ActionServlet and initialize log4J. Then you replace in the web xml the ActionServlet Class with the MyActionServlet Class. I didn't test it, but I think that it works. Arnaud H -Message d'origine- De: Mark Schenk [SMTP:[EMAIL PROTECTED]] Date: mardi 31 juillet 2001 11:25 A: [EMAIL PROTECTED] Objet: RE: struts and log4J Hi all, I'm a newbie in struts. I'd like to use log4J with struts. I don't know where i must do the log4J configuration. In another servlet, i would do it in init method but i would like to use ActionServlet. Where can i put code like : BasicConfigurator.configure() . ? Hello Alexandre, I don't know if this is THE way of doing it, but what I did is create a servlet (which I name 'Initializer') that does all these thing (calling configure and stuff). I my web.xml I have: servlet servlet-nameinitializer/servlet-name servlet-classMyApp.Initializer/servlet-class display-nameInitializer/display-name load-on-startup1/load-on-startup /servlet servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class display-nameAction/display-name load-on-startup2/load-on-startup /servlet (lots of administration left out of these...) The 1 on the first servlet makes sure this one is loaded before the second one. All initialization is done in the 'init' method of Initializer. As I said, I don't know if this is the preferred way, but it works! Mark Schenk | Ceci n'est pas une signature Blackboard Project Manager | Delft University of Technology |E-mail: [EMAIL PROTECTED] Dept.: DTO |Phone: +31 152785448 (85448) Room: LB00.680 |Fax:+31 152786359 - ++ | Ce courrier ainsi que les fichiers joints sont confidentiels. | | Si vous avez recu ce courrier par erreur, veuillez en informer | | l'administrateur du systeme : [EMAIL PROTECTED] | | - | | Ce message confirme que le courrier a passe le controle| | antivirus du relais de messagerie Internet avec succes.| ++
Re: Returning to called page after loggin on...
Craig's slides for BOF #1291, Approaches to User Authentication and Access Control in Web Applications is available for download at http://husted.com/about/struts/resources.htm#new True to the school, it's in Open Office format http://www.openoffice.org/ . Craig R. McClanahan wrote: I also did a BOF at JavaOne that covered container-managed security at a pretty high level, but is useful to read after you've read the servlet spec chapter on security. You can write to me privately if you want a copy.
Re: Are form tags tied to beans?!!!
I know. This is what I had and didnt like. So we are saying that we need to re-design the html form tags to handle this in an elegant way, right? - Original Message - From: Ted Husted [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 31, 2001 7:12 AM Subject: Re: Are form tags tied to beans?!!! If you want the value of a control to be dynamic and determined from an object other than an ActionForm, then use bean:write input type=hidden value=bean:write ... / Jonathan Asbell wrote: Yes I know, but I want some of the attributes to be dynamic - Original Message - From: Ted Husted [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, July 30, 2001 8:56 PM Subject: Re: Are form tags tied to beans?!!! You can mix and match the html:form tags with the standard HTML form tags. So, just code input type=hidden .. into your form. The html:form tags are a handy way to prepopulate the HTML form elements from a bean. But they are only a means to an end. If you don't need to prepopulate the field, then you don't need to use a html:form tag. If for any reason you wanted to pass a flag bean to your form, to set that dynamically, you could also pass a second form ActionForm bean. The default is to use the bean tied to the Action path, but you can also overide that on a tag by tag basis. Jonathan wrote: I need to dynamically fill a form with values. The problem is that html:text and other form tags REQUIRE the attribute property. However, there may be fields that I submit that I DONT want to be values in the bean. For example, I may want to add a hidden field that is NOT a value in the bean, but merely a flag in the request. How is this done in a clean way, considering that the form tags all require property as an attribute, and that value must be a member value in a bean?
RE: Using Struts in VisualAge for JAVA 3.5.3 WebSphere Test Environment
Hi, I have the same problem as Michael, trying the IBM employeelist example, and I don't know how to make it work. Has anybody have an idea about it? Regards. Maria Laura. -Mensaje original- De: Panayotou, Michael [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 05 de julio de 2001 9:02 Para: [EMAIL PROTECTED] Asunto: Using Struts in VisualAge for JAVA 3.5.3 WebSphere Test Environment I have dowloaded from IBM's site an article about making staruts work in Visual Age for Java 3.5.3 WebSphere Test Environment. (http://www7.software.ibm.com/vad.nsf/data/document2558?OpenDocumentp=1BCT =1Footer=1) I have followed all the instuctions mentioned in the article bau when i am trying to test it using the url http://localhost:8080/employeelist/ i am getting the following error : Error 503 An error has occured while processing request:http://localhost:8080/employeelist/ Message: Application is currently unavailable for service Target Servlet: null StackTrace: Root Error-1: Application is currently unavailable for service com.ibm.servlet.engine.webapp.ApplicationUnavailableException: Application is currently unavailable for service java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) javax.servlet.ServletException(java.lang.String) com.ibm.websphere.servlet.error.ServletErrorReport(java.lang.String) com.ibm.servlet.engine.webapp.WebAppErrorReport(java.lang.String) com.ibm.servlet.engine.webapp.ApplicationUnavailableException(com.ibm.servle t.engine.webapp.WebApp) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(c om.ibm.servlet.engine.webapp.WebAppRequest, javax.servlet.http.HttpServletResponse, boolean) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet .ServletRequest, javax.servlet.ServletResponse, boolean) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet. ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(java.lang.Obje ct) void com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(java.lan g.Object) void com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(java.lang.S tring, com.ibm.servlet.engine.srp.ISRPConnection) void com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(com.ibm.ser vlet.engine.oselistener.api.IOSEConnection) void com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection( java.net.Socket) void com.ibm.servlet.engine.http_transport.HttpTransportHandler.run() void java.lang.Thread.run() Could anybody give me some help. Regards Michael Panagiotou
RE: Wrong ordering of rendered html elements when using templates under WAS 3.5.x
Title: Wrong ordering of rendered html elements when using templates under WAS 3.5.x You need to use flush="true" on your template:get tags. :) WebSphere needs it's hand held to do the include properly. :-P (ex. template:get name="main" flush="true" / ) -Chris Christopher Assenza Phone: 412.201.6026 Fax: 412.201.6060 Email: [EMAIL PROTECTED] ACCESSDATA Moving Your Business from Point A to Point e.SM http://www.accessdc.com/ -Original Message-From: Nik Malenovic [mailto:[EMAIL PROTECTED]]Sent: Monday, July 30, 2001 8:00 PMTo: [EMAIL PROTECTED]Subject: Wrong ordering of rendered html elements when using templates under WAS 3.5.x Hello personable people, We've got a live one over here - using templates under WebSphere 3.5.4 (don't ask) with struts 1.0 (plus a fix or two that is required to get struts functioning properly under WAS3.5.x) produces misordered rendered html elements. Here's what I mean: Actors: --- Home.jsp Home_content.jsp Home_template.jsp Home.jsp: - [%@ taglibs here % ] !-- home.jsp:My Title -- template:insert template="home_template.jsp" template:put name="title" direct="true"My Title/template:put template:put name="content" content="home_content.jsp" / /template:insert Home_content.jsp: -- [%@ taglibs here % ] table width="100%" border="0" cellspacing="0" cellpadding="0" tr tdfoo/td /tr /table Home_template.jsp -- [%@ taglibs here % ] html:html locale="true" head titletemplate:get name="title" / /title /head body bgcolor="#FF" text="#00" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" table width="100%" border="0" cellspacing="0" cellpadding="0" height="24" tr SOME MORE WILD TEXT HERE /tr /table !-- begin content -- template:get name="content" / !-- end content -- /body /html:html Output of glorious home.jsp hosted by WAS3.5.x (notice out of order rendering!): - table width="100%" border="0" cellspacing="0" cellpadding="0" tr tdfoo/td /tr /table html lang="en" head title My Title /title /head body bgcolor="#FF" text="#00" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" table width="100%" border="0" cellspacing="0" cellpadding="0" height="24" tr SOME MORE WILD TEXT HERE /tr /table !-- begin content -- !-- end content -- /body /html !-- home.jsp:My Title -- See the problem? :-) I'd appreciate anyone with a clue to send me one. Thanks, Nik -- Nik Malenovic mailto:nmalenovi[EMAIL PROTECTED]
action-mapping: why must the action-Attribute path be equivalent to the name of the jsp?
Hello, does anyone have an idea, how to use the same physical jsp page in different action mappings (with different actions). I do not see a way to describe that my action path should be a locigal path using a page, which does not fit to the pathname of the page. Example: JSP is page1.jsp with one button if I call this page as /page1 it should fire TheFirstAction, if I call this page as /page2 it should fire TheSecondAction But which parameter in the action mapping gives me a possibilty to declare that page1.jsp should be found as page1.jsp AND as page2.jsp? action-mappings action path=/page1 type=TheFirstAction name=Page1Form NOTKNOWNATTRIBUTE=page1.jsp forward name=success path=/page3.jsp/ /action action path=/page2 type=TheSecondAction name=Page1Form NOTKNOWNATTRIBUTE=page1.jsp forward name=success path=/page4.jsp/ /action action-mappings The problem is: why must the action-Attribute path be equivalent to the name of the jsp? If anyone has understood what I am looking for, I would be very happy and thankful for help Peter
Branch too large, Internal restriction. (?!)
Having *a lot* of input fields (50+ hidden and non-) on my JSP appearently results in the exception below. Has anyone seen this one before? Is this due to WebSphere's outdated version of Jasper? At first I thought it was a limitation in the WTE only but WAS 3.5.3 throws the same exception. regards, S. Bro org.apache.jasper.JasperException: C:\Program Files\IBM\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\temp\JSP1_1\mywebapp\_persinfo_xjsp.java:19: Branch is too large, Internal restriction. public class _persinfo_xjsp extends HttpJspBase { ^ 1 error java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) javax.servlet.ServletException(java.lang.String) org.apache.jasper.JasperException(java.lang.String) boolean com.ibm.ivj.jsp.jasper.compiler.JspDebugPageCompiler.javaToClass(java.lang.String, java.lang.String, java.io.ByteArrayOutputStream, boolean) boolean org.apache.jasper.compiler.Compiler.compile() boolean com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet.compile(org.apache.jasper.compiler.Compiler, java.lang.Class) boolean com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet.loadJSP(java.lang.String, java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictLifecycleServlet. _service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engine.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.servlet.engine.webapp.ServletInstanceReference, javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(com.ibm.servlet.engine.webapp.WebAppRequest, javax.servlet.http.HttpServletResponse, boolean) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, boolean) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.struts.action.ActionServlet.processActionForward(org.apache.struts.action.ActionForward, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void
RE: Branch too large, Internal restriction. (?!)
This is an evil error but it's not really Struts' fault. Basically the error is the fact that a compiled JSP (servlet really) can't have a single method greater then 64k - but with all those tags being compiled in directly the size grows pretty large. I asked this a while back and Martin Cooper was kind enough to help - his explanation is below. Note that with Struts 1.0 to solve this all you need to do is pull out a few html:input, etc. fields and include them using jsp:include - you're problem will be solved. :) -Chris From Martin Coooper I am, unfortunately, intimately familiar with this problem. The problem is that there is a limit on the size of a compiled method in a Java class file, and that limit is what we're running up against. Recall that a JSP page is compiled into a servlet, and into essentially only one method in that servlet. Hence, if your page contains many, many tags, that method becomes too big, and up comes the exception that you're seeing. There are a couple of (partial) solutions. 1) Break your giant page up into multiple smaller pages and bring them together at run time using jsp:include. Note that %@include won't work, because that's a compile-time include, which will get you straight back to the original problem. 2) Look for places to save on tags. For example, the html:option tag was recently extended to allow the specification of the text to display, so that you can replace this: html:option ... bean:message key=foo//html:option with this: html:option ... key=foo/ If you have a lot of cases of this pattern, it can help quite a bit. In addition to the html:option tag, some other Struts tags allow the same shortcut to including the text. Also, you might consider replacing html:option sequences with html:options if you can build an appropriate collection up front. Unfortunately, we can't use solution (1), because our giant page is almost entirely one html:form. (Please don't ask... :-} ) Many of the html:* tags won't work if they are on a separate page from the html:form tag itself. That means I've spent quite some time on option (2). We have several of our own tags, too, so that was the next place for me to look. I discovered that changing some frequently used tags from extending BodyTagSupport to extending TagSupport, and marking them with bodycontentempty/bodycontent in the .tld file, made a significant reduction in generated code size. Of course, this is not always feasible, but it helped us quite a bit. One other trick is to create custom tags for frequently used groups of related elements. For example, I created a simple DatePickerTag which is a Struts-like tag that combines three drop-down boxes for month, day and year, with the localized strings obtained from the JVM, and the current values pulled from a bean. That's about all I can think of that I've tried so far. All our pages are now within the limit, but one is very close to breaking it. I really want to put a do not touch notice on that file! Hope this helps. -- Martin Cooper -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 31, 2001 9:16 AM To: [EMAIL PROTECTED] Subject: Branch too large, Internal restriction. (?!) Having *a lot* of input fields (50+ hidden and non-) on my JSP appearently results in the exception below. Has anyone seen this one before? Is this due to WebSphere's outdated version of Jasper? At first I thought it was a limitation in the WTE only but WAS 3.5.3 throws the same exception. regards, S. Bro org.apache.jasper.JasperException: C:\Program Files\IBM\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\temp\JSP1_1\mywebapp\_persinfo_xjsp.java:19: Branch is too large, Internal restriction. public class _persinfo_xjsp extends HttpJspBase { ^ 1 error java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) javax.servlet.ServletException(java.lang.String) org.apache.jasper.JasperException(java.lang.String) boolean com.ibm.ivj.jsp.jasper.compiler.JspDebugPageCompiler.javaToClass(java.lang.S tring, java.lang.String, java.io.ByteArrayOutputStream, boolean) boolean org.apache.jasper.compiler.Compiler.compile() boolean com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet.compile(org.apache.jasper.com piler.Compiler, java.lang.Class) boolean com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet.loadJSP(java.lang.String, java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(javax .servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet
Re: Are form tags tied to beans?!!!
What elegant way did you have in mind? Personally, I'd either add a property to the bean to represent the flag, or send a second ActionForm bean down as a helper and specify that as the name attribute for the tag. If the value is dynamic, it has to be coming from somewhere, so why not an ActionForm bean? Jonathan Asbell wrote: I know. This is what I had and didnt like. So we are saying that we need to re-design the html form tags to handle this in an elegant way, right? - Original Message - From: Ted Husted [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 31, 2001 7:12 AM Subject: Re: Are form tags tied to beans?!!! If you want the value of a control to be dynamic and determined from an object other than an ActionForm, then use bean:write input type=hidden value=bean:write ... / Jonathan Asbell wrote: Yes I know, but I want some of the attributes to be dynamic - Original Message - From: Ted Husted [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, July 30, 2001 8:56 PM Subject: Re: Are form tags tied to beans?!!! You can mix and match the html:form tags with the standard HTML form tags. So, just code input type=hidden .. into your form. The html:form tags are a handy way to prepopulate the HTML form elements from a bean. But they are only a means to an end. If you don't need to prepopulate the field, then you don't need to use a html:form tag. If for any reason you wanted to pass a flag bean to your form, to set that dynamically, you could also pass a second form ActionForm bean. The default is to use the bean tied to the Action path, but you can also overide that on a tag by tag basis. Jonathan wrote: I need to dynamically fill a form with values. The problem is that html:text and other form tags REQUIRE the attribute property. However, there may be fields that I submit that I DONT want to be values in the bean. For example, I may want to add a hidden field that is NOT a value in the bean, but merely a flag in the request. How is this done in a clean way, considering that the form tags all require property as an attribute, and that value must be a member value in a bean?
RE: some comparision between JSP/struts and velocity
I tend to agree with Tim here, but only in certain circumstances. If you place very specific HTML code in your tag library then that tag library has become very restricted in its use - basically it can only be used in the original context for which it was designed, otherwise the HTML will probably not match up properly. That makes re-using your taglibs pretty difficult, at least without re-writing the HTML within each time. On the other hand, if you don't care about cross-project reusability, then embedding HTML into a tag isn't such a bad idea since you only care about it for the current project and current needs. Personally, I think it's ideal to generate the minimalist amount of generic HTML as possible in a tag and then wrap it in HTML on the JSP when you use the tag. Again, that's only if you're going for maximum reusability. Right now, I've got some HTML embedded in our tags, but it's very generic HTML that can be used again and again without much actual change to the Java code itself. :) -Chris -Original Message- From: Tim Colson [mailto:[EMAIL PROTECTED]] Sent: Monday, July 30, 2001 9:20 PM To: [EMAIL PROTECTED] Subject: RE: some comparision between JSP/struts and velocity Niall Pemberton suggested ...if the Struts tags dont do what you want then write your own. Then you dont have to use scriptlets, you have a re-useable bit of functionality, the web designers are happy and you dont have to use Velocity. While a custom tag is an option; this bit of functionality would have required embedding javascript code and html inside the custom tag lib. To me, putting view specific code like inside a tag library is also a slippery slope in the quest to keep thing separated. Cheers, Timothy
Re: Returning to called page after loggin on...
This looks like a very useful paper but how do you open and read the paper if you only come equipped with the text tools from the microsoft monster? Scott Ryan Developer First Bank Data Corporation Work: (303) 235-1485 Cell:(303 263-3044 [EMAIL PROTECTED] 07/31/01 05:19AM Craig's slides for BOF #1291, Approaches to User Authentication and Access Control in Web Applications is available for download at http://husted.com/about/struts/resources.htm#new True to the school, it's in Open Office format http://www.openoffice.org/ . Craig R. McClanahan wrote: I also did a BOF at JavaOne that covered container-managed security at a pretty high level, but is useful to read after you've read the servlet spec chapter on security. You can write to me privately if you want a copy.
Re: struts and log4J
The easiest way is to let the log4j static initializer work for you. Place log4j.jar in your WEB-INF/lib directory and your log4j.properties file in WEB-INF/classes. - Original Message - From: DUPRAT Alexandre [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 31, 2001 5:03 AM Subject: struts and log4J Hi all, I'm a newbie in struts. I'd like to use log4J with struts. I don't know where i must do the log4J configuration. In another servlet, i would do it in init method but i would like to use ActionServlet. Where can i put code like : BasicConfigurator.configure() . ? Thanks for help. Alexandre Duprat SOPRA. Direction France Sud. Bordeaux [EMAIL PROTECTED] ++ | Ce courrier ainsi que les fichiers joints sont confidentiels. | | Si vous avez recu ce courrier par erreur, veuillez en informer | | l'administrateur du systeme : [EMAIL PROTECTED] | | - | | Ce message confirme que le courrier a passe le controle| | antivirus du relais de messagerie Internet avec succes.| ++
Re: action-mapping: why must the action-Attribute path be equivalent to the name of the jsp?
At this time, the current ActionMapping is not exposed to the JSP, so it really can't tell which ActionMapping was used to call it. (Though, it would be cool they could;-) You might want to route control first through an Action, and then to the JSP. This way you can put something in the request context to help write the control. Right now, the simplest thing would be to put two copies of the button in your JSP, enclosed within logic:equal tags. The tags could then check to see if they should write the button for TheFirstAction or TheSecondAction. + Action inserts fire bean into rquest context + Forward to JSP + JSP checks to see if fire==first. If so, write TheFirstAction button + JSP checks to see if fire==second. If so, write TheSecondActon button -Ted. [EMAIL PROTECTED] wrote: Hello, does anyone have an idea, how to use the same physical jsp page in different action mappings (with different actions). I do not see a way to describe that my action path should be a locigal path using a page, which does not fit to the pathname of the page. Example: JSP is page1.jsp with one button if I call this page as /page1 it should fire TheFirstAction, if I call this page as /page2 it should fire TheSecondAction But which parameter in the action mapping gives me a possibilty to declare that page1.jsp should be found as page1.jsp AND as page2.jsp? action-mappings action path=/page1 type=TheFirstAction name=Page1Form NOTKNOWNATTRIBUTE=page1.jsp forward name=success path=/page3.jsp/ /action action path=/page2 type=TheSecondAction name=Page1Form NOTKNOWNATTRIBUTE=page1.jsp forward name=success path=/page4.jsp/ /action action-mappings The problem is: why must the action-Attribute path be equivalent to the name of the jsp? If anyone has understood what I am looking for, I would be very happy and thankful for help Peter
Antigen found =*.vcf file
Antigen for Exchange found Taylor, Michael(LIT).vcf matching =*.vcf file filter. The file is currently Deleted. The message, HTTP Session Usage, was sent from Taylor, Michael(LIT) and was discovered in IMC Queues\Inbound located at IBC/PA1/MG01.
Re: Returning to called page after loggin on...
Open Office is a free download, and available even to the monsters amongst us ;-) Scott Ryan wrote: This looks like a very useful paper but how do you open and read the paper if you only come equipped with the text tools from the microsoft monster? Scott Ryan Developer First Bank Data Corporation Work: (303) 235-1485 Cell:(303 263-3044 [EMAIL PROTECTED] 07/31/01 05:19AM Craig's slides for BOF #1291, Approaches to User Authentication and Access Control in Web Applications is available for download at http://husted.com/about/struts/resources.htm#new True to the school, it's in Open Office format http://www.openoffice.org/ . Craig R. McClanahan wrote: I also did a BOF at JavaOne that covered container-managed security at a pretty high level, but is useful to read after you've read the servlet spec chapter on security. You can write to me privately if you want a copy.
Re: forward problem with frames
There is a target attribute in the html:FormTag Have you tried setting the target to _top ? HTH, Pete Stefan Faist wrote: Hi all, why have a frameset and open a link without this framset. Then I want to go back to the frameset with this forward. forward name=start_mitarbeiter path=/main.jsp/ the main.jsp is the page with the frameset. But this forward opens a new window? Why does it do that and how can I open this in the same Window? This forward called with a html:submit tag in the action class. With a link I have the target parameter but with the button I havn't nothing or ...? Can somebody help me? Stefan
RE: Automatic Form Validation
Thanks for the reply David. Yeah, 'action' checking is another way of determining wether or not to do the validation. I guess I was wondering if it was possible to configure the Form to prevent first time checking ? Would anyone else find this useful ? Given the recent discussions about preventing direct acces to JSP's, it seems that the Form validation is designed [in default operation] in such a way as to expect that you have gone directly to the JSP first. This is one thing I wouldnt really ever want to do, as I prefer all requests to go through an action - even if it is just to redirect to the JSP [call me a control freak! but there area lot of others that feel the same :) ] I wonder if the Auto Validation should accomodate the more common scenario [certainly in larger applications] where you do want to force requests thru actions and avoid direct JSP access, but avoid first time validation. I guess Action Form could be extended to provide this, but I was hoping it would already be there - as it seems quite obvious and important. I dont think we should be encouraging people to go directly to the JSP as part of the Struts framework [just my 2p] Picking up on what you mentioned David, about handling all 'actions' todo with a form in the one Action class. We have some sceanrios where this is just not practical. What about those scenarios ?! Thanks anyway David. Any other comments ? G -Original Message- From: David Winterfeldt [mailto:[EMAIL PROTECTED]] Sent: 31 July 2001 16:46 To: [EMAIL PROTECTED] Subject: RE: Automatic Form Validation If you have a variable called action that keeps track of what type of action you are performing (create, update, delete), you could check for this in the validate method and only validate on create or update. The Struts example webapp has an action field to keep track of this. I wouldn't do that personally. I've always done my validation from the Action so I could use the same action for everything associated with a form/table. For example, delete doesn't need validation or sending someone through the action to the view for the first time (as you mentionded). So I don't think there is anything wrong with not using the automatic validation. I think it just depends on your design preference. David --- Emaho, Ghoot [EMAIL PROTECTED] wrote: Some further details on my question: I understand that you can have the request go straight to the JSP and avoid the first time validation. This is acceptable in some circumstance, but in other circumstances you may wish to have your action do some work before presenting the page (a common requirement in more complex applications), and you may wish to avoid access to any JSP's directly. How then (with this extra clarification) can you prevent the behaviour described in the original posting ? Many thanks for any help Ghoot PS Please someone respond ! So i dont get too disillusioned :) -Original Message- From: Emaho, Ghoot Sent: 31 July 2001 15:49 To: [EMAIL PROTECTED] Subject: Automatic Form Validation Quick question on Form validation, using the Automatic Validation offerred by Struts. If i have a form bean which performs some validation on the validate method, and an action has it's definition of validate set to true, then the Form Bean's validate method gets called before the action's perform method. However, this then displays my error messages on the form page the first time i go to the page ! Am I missing something ? Now i can get round this with some checking in the validate method to ignore it the first time round - as there will be no data yet. As i understand, the bean is created if it isnt found. So if it's just been created, and then the validate method is called of course there will be nothing there ? Any suggestions ? Or does someone want to point out the obvious ?! In our Struts implementations to date, we have avoided using this feature and done our validation from within the Action. But I am investigating this feature and would like to know why this is so / what i am doing wrong ! Many thanks G __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
BUILDING A URL FOR A REFRESH META TAG
can anyone please helpi want to redirect the user to another page, after showing a page with a message, for a few seconds. This is what I have META HTTP-EQUIV=Refresh CONTENT=5; URL=/logon.jsp This URL doesn't work though!! Please help ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **
Re: AW: action-mapping: why must the action-Attribute path be equivalent to the name of the jsp?
The usual solution would be to design your forms to contain hidden fields that tell the Action which operation to perform with the next request. So typically, there would be one button with a hidden field that conveyed whether this was the FirstAction or the SecondAction. These would all go back to a single Action that either performed all the operations, or forwarded onto another Action. If you will be using this button that much, you might also consider writing your own custom tag so the button could program itself from the request. In general, the request is meant to convey information to the presentation layer about how it is suppose to write itself. In my own projects, I am experimenting with ways to make the current ActionMappings available to the JSP, as they are to perform() and validate(), which starts to open several doors. [EMAIL PROTECTED] wrote: Thanks, at least it's a working work-around. But the ugly thing is, that in both cases the same action is called and I am forced to call the real action from the first action depending on the pushed button. + Action inserts fire bean into rquest context + Forward to JSP + JSP checks to see if fire==first. If so, write TheFirstAction button + JSP checks to see if fire==second. If so, write TheSecondActon button + submit fires action + action does nothing and forwards to the real action depending on the button. In my real world the page will be reused at least 5 or six times. So rather than putting the Control part of MVC in the struts-config.xml I start piggypacking info in the request and analysing this in the dummy action. However again thanks. Peter
Included Actions
Hi all, is it somehow possible to include the output of an action in one JSP? Now, when I try to include a *.do page, the server complains, it cannot forward to the action's jsp (of course, since I don't want to forward, I want to inlcude). The only solution I've found, is to len the Action's perform method return null and include the action (*.do) as well as the jsp. (Which I really do not like, since then the including page plays the role of the controller) Where should I start if I wanted to change the Action servlet, to include instead of forward? (I include actions' output in my templates. Where one part is the content and another part is the in an action generated menu) -- gR
RE: Automatic Form Validation
--- Emaho, Ghoot [EMAIL PROTECTED] wrote: Thanks for the reply David. Yeah, 'action' checking is another way of determining wether or not to do the validation. I guess I was wondering if it was possible to configure the Form to prevent first time checking ? Would anyone else find this useful ? Given the recent discussions about preventing direct acces to JSP's, it seems that the Form validation is designed [in default operation] in such a way as to expect that you have gone directly to the JSP first. This is one thing I wouldnt really ever want to do, as I prefer all requests to go through an action - even if it is just to redirect to the JSP [call me a control freak! but there area lot of others that feel the same :) ] I think it is good to go through the controller if you really want to keep the view separate. I wonder if the Auto Validation should accomodate the more common scenario [certainly in larger applications] where you do want to force requests thru actions and avoid direct JSP access, but avoid first time validation. I guess Action Form could be extended to provide this, but I was hoping it would already be there - as it seems quite obvious and important. I dont think we should be encouraging people to go directly to the JSP as part of the Struts framework [just my 2p] You could always have one Action class that handles all things that are auto-validatded and another for things that shouldn't be validated. I'm not sure how you could have the framework handle something that is specific for your application unless there was a parameter that could turn off the auto-validation for the current request (org.apache.struts.action.Action.VALIDATE=false). Picking up on what you mentioned David, about handling all 'actions' todo with a form in the one Action class. We have some sceanrios where this is just not practical. What about those scenarios ?! You can of course have as many actions to go with a form as you want. I just prefer keeping it to a minimum. Thanks anyway David. Any other comments ? G -Original Message- From: David Winterfeldt [mailto:[EMAIL PROTECTED]] Sent: 31 July 2001 16:46 To: [EMAIL PROTECTED] Subject: RE: Automatic Form Validation If you have a variable called action that keeps track of what type of action you are performing (create, update, delete), you could check for this in the validate method and only validate on create or update. The Struts example webapp has an action field to keep track of this. I wouldn't do that personally. I've always done my validation from the Action so I could use the same action for everything associated with a form/table. For example, delete doesn't need validation or sending someone through the action to the view for the first time (as you mentionded). So I don't think there is anything wrong with not using the automatic validation. I think it just depends on your design preference. David --- Emaho, Ghoot [EMAIL PROTECTED] wrote: Some further details on my question: I understand that you can have the request go straight to the JSP and avoid the first time validation. This is acceptable in some circumstance, but in other circumstances you may wish to have your action do some work before presenting the page (a common requirement in more complex applications), and you may wish to avoid access to any JSP's directly. How then (with this extra clarification) can you prevent the behaviour described in the original posting ? Many thanks for any help Ghoot PS Please someone respond ! So i dont get too disillusioned :) -Original Message- From: Emaho, Ghoot Sent: 31 July 2001 15:49 To: [EMAIL PROTECTED] Subject: Automatic Form Validation Quick question on Form validation, using the Automatic Validation offerred by Struts. If i have a form bean which performs some validation on the validate method, and an action has it's definition of validate set to true, then the Form Bean's validate method gets called before the action's perform method. However, this then displays my error messages on the form page the first time i go to the page ! Am I missing something ? Now i can get round this with some checking in the validate method to ignore it the first time round - as there will be no data yet. As i understand, the bean is created if it isnt found. So if it's just been created, and then the validate method is called of course there will be nothing there ? Any suggestions ? Or does someone want to point out the obvious ?! In our Struts implementations to date, we have avoided using this feature and done our validation from within the Action. But I am
best way to create front end to web.xml
Hi, I need to create a GUI front end to the web.xml file. This way the file can be configured from a web page. What I thought about doing was to create an admin screen, have the user log in, and check against a file etc. Then I was going to get the servletContext, open a stream and read the web.xml file. Then populate a vector and pass it to a struts page that would set up a series of labels and textboxes with prefilled info. Once the user has submitted the page I was going to read through the parameters and update the file. Sound good? Regards Alex Alex Colic.vcf
Antigen found =*.vcf file
Antigen for Exchange found Alex Colic.vcf matching =*.vcf file filter. The file is currently Deleted. The message, best way to create front end to web.xml, was sent from Alex Colic and was discovered in IMC Queues\Inbound located at IBC/PA1/MG01.
Silly Question - Where is the notEmpty tag?
It is on the web page's documentation but nowhere to be found in the source or TLD...I'm assuming it's been deprecated. It may be a good idea to take it off the page cause I was all excited about it until my JSP screamed at me. :P Chris
Re: Included Actions
Hi All, I have just started with Structs and JSP. I would like to get an idea from the group if they know of a open-source/free IDE for Linux to develop JSP/Struts pages. I would like to have source level debugging etc with Tomcat support. Thanks for the recommendation in advance. Kumar Hi all, is it somehow possible to include the output of an action in one JSP? Now, when I try to include a *.do page, the server complains, it cannot forward to the action's jsp (of course, since I don't want to forward, I want to inlcude). The only solution I've found, is to len the Action's perform method return null and include the action (*.do) as well as the jsp. (Which I really do not like, since then the including page plays the role of the controller) Where should I start if I wanted to change the Action servlet, to include instead of forward? (I include actions' output in my templates. Where one part is the content and another part is the in an action generated menu) -- gR -- Kumar Ramchandran
RE: Problem with Struts in VAJ 3.5.3 WTE
Hi!, I'm María Laura, and I have the problem mentioned here: the employeelist app index.jsp page throws the following error: Mensaje: Server caught unhandled exception from servlet [jsp]: Missing message for key index.title Firstly, I edited the ApplicationResourses.properties files, adding the key index.title, because it wasn't here. Second, I have added the extra-path: c:\archivos de programa/ibm/visualage for java/ide/project_resources/ibm websphere test environment/hosts/default_host/employeelist/WEB-INF/classes and the following directory structure : employeelist- index.jsp jsp- *.jsp *.webapp WEB-INF- *.tld, *.xml, *.dtd classes- ApplicationResourses.properties WEB-INF- *.tld, *.xml, *.dtd classes- ApplicationResourses.properties And it didn't work. Also, I edited the EmployeeEdit.jsp page and added the following line (that appears in index.jsp): titlebean:message key=index.title//title Surprisingly, I hadn't the error for the key index.title, but the title for my page was: bean:message key=index.title/ !!! Has anybody some idea about this? how can I solve this problem? Excuse me for my english. Regards. ML -Mensaje original- De: Lock, Steven [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 21 de junio de 2001 10:57 Para: [EMAIL PROTECTED] Asunto: Re: Problem with Struts in VAJ 3.5.3 WTE Hi Thanks John, I tried recreating the directory structure of your webapp but it unfortunately didn't help (I take it your employeelist webapp thus has a document root of $approot$/web is that correct?). Igor, that you have it working without changes makes me think that there may be something wrong with my setup. This is my webapp definition: websphere-webgroup name=employeelist descriptionEmployeeList Webgroup/description document-root$approot$/document-root classpath$approot$/classpath root-uri/employeelist/root-uri auto-reload enabled=true polling-interval=3000/ shared-contextfalse/shared-context /websphere-webgroup and my directory structure: employeelist -index.jsp jsp -employeeEdit.jsp -employeeList.jsp -employeeSearch.jsp Web-inf -all the .XML, .DTD and .TLD files classes -ApplicationResources.properties I also have va root/ide/project_resources/ibm websphere test environment/hosts/default_host/employeelist/WEB-INF/classes; va root/ide/project_resources/ibm websphere test environment/hosts/default_host/employeelist/WEB-INF; in the extra directories list. The webapp itself works ok (I tested the HelloWorld servlet). Is index.jsp necessary for the employeelist demo? Thanks Steve -Ursprüngliche Nachricht- Von: Karmanov, Igor [mailto:[EMAIL PROTECTED]] Gesendet am: Donnerstag, 21. Juni 2001 14:49 An: [EMAIL PROTECTED] Betreff: RE: Problem with Struts in VAJ 3.5.3 WTE I've got the employeelist working fine in WTE 3.5.3 without any changes and now I'm testing my app with the same structure. It looks like the key for access to ApplicationResources.properties file is to put the following in extra class path in WTE: d:/program files/ibm/visualage for java/ide/project_resources/ibm websphere test environment/hosts/default_host/myApp/WEB-INF/classes Igor Karmanov -Original Message- From: O'Neill, John H [SMTP:JohnH.O'[EMAIL PROTECTED]] Sent: June 21, 2001 08:38:AM To: '[EMAIL PROTECTED]' Subject: RE: Problem with Struts in VAJ 3.5.3 WTE Hi Steve, I had this very same problem yesterday with a different example. Though I got lots of suggestions (thanks to everyone) on how to fix this issue none of what was suggested worked. I eventually started to try a diferrent example (the employeelist one you are using) and I had no problems with that. I don't understand what is going on fully but from what was suggested yesterday the problem seems to stem from where you put the ApplicationResources.properties file in your directory structure and what value you give the 'application' attribute in your .webapp file for the ActionServlet servlet (should be ApplicationResources). Here is my directory structure employeelist web jsp Web-inf classes Web-inf classes I have the ApplicationResources.propeties file in both of the classes directory. I would like to find out what is going on more fully here also so if anyone has
Re: Stuts behind a firewall.
Craig, You say that you should be able to run with no problems, without trying to access the network. But it seems to me that the internal DTDs are used only after an attempt to access them via the network times out. Am I mistaken on this? It seems that when I start my server (either orion or resin) without internet access, it stalls for a pretty good amount of time. While this timeout may be fine when you are demoing some apps on your laptop, it can be a real pain in the a$$ while developing. Is there anyway to configure struts to use the internal DTDs without trying to find them on the network first? Or anyway to change the timeout? Bill It seems that the internal copies of the DTDs are only accessed after Craig R. McClanahan wrote: Struts maintains internal copies of the DTDs it uses (for struts-config.xml and web.xml). As long as you use the correct public identifier on your configuration files (and your XML parser is correctly implemented) you should be able to run with no problems, without trying to access the network fr the DTDs. In fact, I run Struts-based apps all the time on a completely disconnected laptop (with Tomcat and JAXP/1.1) with no problems. Craig On Mon, 16 Jul 2001, Grant Davies wrote: Hi, I'm trying to test our first struts app with weblogic and our web.xml file goes out to sun for the DTD to validate the web.xml file We are behind a firewall that uses a proxy on port 8080 for http requests, but our proxy requires us to login every time a new HTTP session is invoked. Is there anyone who can help me configure our stuts for this? I know this may be more of a JAVA question that stuts, but I've been lucky enough to use relaxed firewalls in the past. Is it simpler just to remove the DTD url from the web.xml so it does not get validated? Thanks Grant Davies Insolutions Inc.
Data Object and Calendar
I have a Data Object (DO) that we use to throw b/w our EJBs and forms. 1. In one particular DO, I am using the Gregorian Calendar to set day, month and year. 2. I am using the validation framework to validate that day is b/w 1-31, that month is b/w 1-12 and year is b/w 2001 and 2100. The validation framework is not validating day or month, because with the gregorian calendar in my getters/setters - you can set a day or a month to any number and it will simply increment the calendar. Does anyone know of a way to get around this? I'd like to NOT use Javascript, but I want to validate the value the user entered, rather than the value from the DO using getValue(); Thanks, Matt __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Any Comments on Layout tags
Hello struts users, I followed up with olivierbazoud's post yesterday regarding the layout tags listed at http://struts.application-servers.com/ . I definitely liked the underlying motives for the tags and the efforts to simplify even further programming of standard maintenance screens: Hundreds of screens Developers with very different backgrounds, including people with 20 years of experience in Cobol and without a good knowledge of new technology All developers need to be able to develop application screens. That kind of application has 3 types of very simple screens: selectors, lists and cards. The look and feel of the applications is very strict. The screen designers have no freedom to choose it. They seem, indeed, to simplify programming. My question: are folks using these widely? Does anyone have any tips/techniques words of wisdom on their use? thanks in advance, bill milbratz
Re: Data Object and Calendar
Do you have setLenient(false) on the GregorianCalendar class? It should reject inappropriate dates then. I don't know why it doesn't default to this behavior. David --- Matt Raible [EMAIL PROTECTED] wrote: I have a Data Object (DO) that we use to throw b/w our EJBs and forms. 1. In one particular DO, I am using the Gregorian Calendar to set day, month and year. 2. I am using the validation framework to validate that day is b/w 1-31, that month is b/w 1-12 and year is b/w 2001 and 2100. The validation framework is not validating day or month, because with the gregorian calendar in my getters/setters - you can set a day or a month to any number and it will simply increment the calendar. Does anyone know of a way to get around this? I'd like to NOT use Javascript, but I want to validate the value the user entered, rather than the value from the DO using getValue(); Thanks, Matt __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
struts jsp in web-inf question
Hi everyone, does anyone have problems referring to their jsp pages within the /WEB-INF dir? I tried to hide these jsp's so that users can't directly access them (without performing actions). I'm running this example: http://husted.com/about/struts/struts-stub.zip I'm trying it with WebLogic 6.0 and I always get a 404 when I access index.jsp. Did anyone else have a similar problem like this? It's really puzzling me and I've been trying to configure it with no luck. I hope you guys can help me out... Thanks in advance, Davin _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: Submission - Struts installation notes - JRun 3.0
Hello All, I just went through the installation for JRun, and there is one more change that needs to be made, which I just wanted to post for anyone searching the archives. In logon.jsp, where: redisplay=false change it to: redisplay=%= false % Have fun! Hilary
Re: Silly Question - Where is the notEmpty tag?
The logic:empty and logic:notEmpty tags are part of Struts 1.1, and hence only available in the nightly builds at this time. If you're using Struts 1.0, that would explain the problem you are seeing. For documentation that accurately reflects the build you are using, your best bet is to use the struts-documentation.war web app included in the distribution. -- Martin Cooper - Original Message - From: Assenza, Chris [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 31, 2001 12:22 PM Subject: Silly Question - Where is the notEmpty tag? It is on the web page's documentation but nowhere to be found in the source or TLD...I'm assuming it's been deprecated. It may be a good idea to take it off the page cause I was all excited about it until my JSP screamed at me. :P Chris