question about struts
respected sir, I want to download struts framework documentation. where can I get. please tell me. ---ravikonam. _ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com
Extending struts classes
I want to add a function to all of my forms in which the form is capable of initialising its contents. e.g. public void initUsingSession(HttpSession session) I want to pass the session to this function so that I can populate values on the form depending on what is stored in the session. The trouble with this is that when would I call this function? I looked in the FormTag class, and I noticed that if it couldn't find the form class then it just created a new instance of it. This means I can't call that function. Any ideas? Cheers Kris
Re: SSL and Struts
I'm finding a similar problem with Resin - under SSL it connects fine but the html:link tags resolve to a /a. I tried adding the handler at the command line (as also recommended by http://java.sun.com/products/jsse/INSTALL.html - item 7). java -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol but got the standard help screen in return, like I used an invalid option, although -Dname=value is listed as an option. I'm using java version "1.3.0_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02) Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode) And a Thawte certificate (PKCS #7 Certificate Chain format). The jsse.jar is in my /jre/lib/ext directory, and everything not involving hyperlinks seems fine. Any ideas why this didn't take at the command line? If not, I guess the next thing to try would be to subclass ActionServlet, extend init, and try it at runtime. (BTW, it seems that Catalina adds this protocol automatically, but apparently other containers are not so clever ;-) Dan Miser wrote: Here's the reply I just posted on Bugzilla about this: This isn't a bug of Struts, but a misconfiguration of SSL. In addition to the comments in Tomcat's server.xml, you need to define a system property to tell Java where it should find the classes for SSL support. You can do this either in code (System.setProperty(key, value)) or by passing the property in on the command line (-Dkey=value). This is the property I used with JSSE, and it works fine. java.protocol.handler.pkgs = com.sun.net.ssl.internal.www.protocol If anything, I would argue that the bug here is to report the MalformedURLException in RequestUtils.absoluteURL to a log file. Dan Miser From: "Michael Wilimsky" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: SSL and Struts Date: Tue, 10 Apr 2001 17:54:48 +0200 i tried to establish a SSL-Connection with Tomcat / Struts using openSSL but when using https protocol url-rewriting seems to fail somehow... is there a solution for that... p.s. i am working on a w2k machine with ie5 michael
Re: question about struts
Dear Sir, I believe that if you downloaded the Struts framework, then you have already downloaded the documenation. Let's say you unzipped Struts at c:\jakarta-struts-1.0-b1. If you go to c:\jakarta-struts-1.0-b1\webapps, you'll see a file called struts-documentation.war. Copy this file to your Web Server's "webapps" directory. In Resin, for example, that would be c:\{resinhome}\webapps. You can then view the documentation by going to http://localhost:8080/struts-documentation Hope this helps. Stanley Tan At 08:20 AM 4/11/01 +, you wrote: respected sir, I want to download struts framework documentation. where can I get. please tell me. ---ravikonam. _ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com
Re: The Joy of File : New Window
I recently asked this question (over and over and over). I pretty much beat it to death. Using some suggestions from this list (check the archives for 'session'), we came up with a pretty solid approach. Thank you to those that helped. :) It is ugly, but it solves all situations. The only way that we have found to determine if the user has opened a new window (through either a File -- new window or right-click -- open in New window) is to check the window.name property. However, we do not really like this approach, so if anyone knows a better way, please speak up. :) When a new window is created, the window name is empty. This is a settable property, so after you find a window, set it to something. Remember, if you are using frames, set window.top.name You would think that there would be a window.ID or something that is unique for every window. However, according to my javascript books and searching the web, there doesn't appear to be. Again, I hope that I am wrong. :) So.. Now that you know you have a new window, what now? Here is one solution: You can manage your own session objects. Yep, I said it was ugly. Each new window is assigned a unique ID. Each page must store this ID and pass it on to the next page. The action classes use this ID to retrieve session objects from the common session object that is shared by all windows. Your app's session objects are stored in a hashmap (or something) which is stored in the common session object using the unique ID. Therefore, each action class has the ability to retrieve the correct object to work on for its specific window. What does the javascript check do? When the javascript identifies that a new window has been generated, it can redirect to a new page (or the same one with a querystring flag signifying that this is a new window and the action class should create a new ID) We struggled with this for a couple weeks to work out the bugs. I believe that now we have everything worked out so that no matter what the user does, he/she cannot stumble on another windows object. HTH, Pete Erik Horstkotte wrote: I've run into a problem that seems to lie in the borders between Struts and Tomcat. We're developing a fairly large JSP EJB - based project and have just run into the fun fact that when a user (of IE 5.5 or Communicator 4.61 at least) "splits" the window, the session id cookie is inherited by the new window, and therefore *both* windows start sharing the same form beans. This causes havoc. I don't see how our app can even *detect* the condition, much less *deal* with it. How are you others out there dealing with this issue? -- Erik begin:vcard n:; x-mozilla-html:FALSE org:BRIMG SRC="http://www.irista.com/logo/irista.gif"BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain adr:;; version:2.1 end:vcard
RE: The Joy of File : New Window ... alternate approach
Hi All, An other approach is to use a Flow Controller (a state machine) and a Session Manager in your project. This is a pure server side solution (with minimum javascript). The reason we have to go for this solution is because our project is run on any device...so javascript is out of the question for WAP enabled browsers in cell phones or PDA's. The 'Session Manager' manages the user's session(s) (if he /she logs in multiple times) based on the user id. If the user opens a new window say from FILE -- new window, he/she might be able to get past the first flow. When the user tries to navigate from the old window, the Flow Controller will catch the user and determines that the user is in an invalid flow. Therefore the user is send a kill page for the old window( in webbrowsers it is window.close). The user is therefore forced to close the old window. In case of wap browsers, a flag is set in the 'Session Manager' for that session. So whenever a user makes a request from that session id, the session will be invalidated. When the user opens a new separate browser window and logs in, the Session Manager detects that the user has logged in more than once. It then sends a page to the user informing him/her that the user was already logged in and presents the user with options . Close this window and continue working in the old session. . Log out of the other window. ( If user selects this option next time whenever a request is made from the old window, a kill page is send thus destroying the web browser ). . A security breach has occured, therefore lock your account and call customer service. Hope this helps for somebody interested in a pure server-side solution. NOTE : In struts 1.1 there is talk of a Flow Controller ( a state machine) which manages states, so in the long run using this kind of approach would be befitting, cause all you have to do is write a Session Manager. Any comments / suggestions welcome. cheers, Amar.. -Original Message- From: Peter Alfors [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 10:15 AM To: [EMAIL PROTECTED] Subject: Re: The Joy of File : New Window I recently asked this question (over and over and over). I pretty much beat it to death. Using some suggestions from this list (check the archives for 'session'), we came up with a pretty solid approach. Thank you to those that helped. :) It is ugly, but it solves all situations. The only way that we have found to determine if the user has opened a new window (through either a File -- new window or right-click -- open in New window) is to check the window.name property. However, we do not really like this approach, so if anyone knows a better way, please speak up. :) When a new window is created, the window name is empty. This is a settable property, so after you find a window, set it to something. Remember, if you are using frames, set window.top.name You would think that there would be a window.ID or something that is unique for every window. However, according to my javascript books and searching the web, there doesn't appear to be. Again, I hope that I am wrong. :) So.. Now that you know you have a new window, what now? Here is one solution: You can manage your own session objects. Yep, I said it was ugly. Each new window is assigned a unique ID. Each page must store this ID and pass it on to the next page. The action classes use this ID to retrieve session objects from the common session object that is shared by all windows. Your app's session objects are stored in a hashmap (or something) which is stored in the common session object using the unique ID. Therefore, each action class has the ability to retrieve the correct object to work on for its specific window. What does the javascript check do? When the javascript identifies that a new window has been generated, it can redirect to a new page (or the same one with a querystring flag signifying that this is a new window and the action class should create a new ID) We struggled with this for a couple weeks to work out the bugs. I believe that now we have everything worked out so that no matter what the user does, he/she cannot stumble on another windows object. HTH, Pete Erik Horstkotte wrote: I've run into a problem that seems to lie in the borders between Struts and Tomcat. We're developing a fairly large JSP EJB - based project and have just run into the fun fact that when a user (of IE 5.5 or Communicator 4.61 at least) "splits" the window, the session id cookie is inherited by the new window, and therefore *both* windows start sharing the same form beans. This causes havoc. I don't see how our app can even *detect* the condition, much less *deal* with it. How are you others out there dealing with this issue? -- Erik
Where are Struts messages found?
I'm working with Struts and I'm trying to build an error page for my JSP application. In looking at the Struts tag code I see statements which look like this: throw new JspException(messages.getMessage("getter.bean", beanName))); which looks like it should be populating the exception with some useful information. However, when I execute this code in a debugger, the message assigned to the Exception is null because there is no message with the name "getter.bean". Where would I find definitions for messages such as "getter.bean", "optionsTag.iterator", etc?
iPlanet - struts
Hello, I have seen this mentioned on several other messages but I have not been able to get a resolution. I am attempting to use struts with iPlanet 6.0 sp2. I have a tag that is html:html local="true". When this is compiled in iPlanet I get the following error: compiled_jsp\jsp\APPS\aces\index.java:75: Incompatible type for method. Can't convert java.lang.String to boolean. ((org.apache.struts.taglib.html.HtmlTag)_JSP__26).setLocale("true"); I have seen the JRUN 3.0 workaround for this html:html local=%= true % . I have tried this and I get the following: [11/Apr/2001 10:30:37:9] error: Exception: SERVLET-compile_failed: Failed in com piling template: /aces/index.jsp, JSP Error: Error while parsing attributes of t ag: locale=%= Exception Stack Trace: java.lang.Exception: JSP Error: Error while parsing attributes of tag: locale=%= at com.netscape.jsp.JSP.parseAttributes(Unknown Source) at com.netscape.jsp.JSP.parseUserTag(Unknown Source) at com.netscape.jsp.JSP.parseTag(Unknown Source) at com.netscape.jsp.JSP.parseNext(Unknown Source) at com.netscape.jsp.JSP.parseBlock(Unknown Source) at com.netscape.jsp.JSP.parse(Unknown Source) at com.netscape.jsp.JSP.compile(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.JSPtoJava (Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileJSP (Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP (Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance (Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse. callJspCompiler(Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse. callUri(Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse. callUriRestrictOutput(Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformRequestDispatcher.fo rward(Unknown Source) at com.netscape.server.servlet.jsp.JSPRunner.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at com.netscape.server.servlet.servletrunner.ServletInfo.service (Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unkno wn Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.thread.ThreadBasic.run(Native Method) at java.lang.Thread.run(Thread.java:479) I have read in the archives that there are people using struts with iPlanet successfully. Can anyone tell me if this is true? If there are other issues with iPlanet and struts I would appreciate someone letting me know. I don't want to go down this path too far if I'm going to have nothing but headaches. Any suggestions would be appreciated. -- Jason Smith [EMAIL PROTECTED]
RE: Session scope
I'm trying to do something similar. I have a hashtable that I want to serialize pass to the next page in a form bean. Here's how I write store the hashtable in a string "s" to be put into a hidden field. // write hashtable sf ByteArrayOutputStream bout = new ByteArrayOutputStream(); ObjectOutputStream o = new ObjectOutputStream(bout); o.writeObject(sf); o.close(); String s = new String(bout.toByteArray()); // read hashtable ObjectInputStream i = new ObjectInputStream(new ByteArrayInputStream(serializedsf.getBytes())); Hashtable sf = (Hashtable) i.readObject(); Here's the error message I get when it tries to create the new ObjectInputStream. java.io.StreamCorruptedException: Version Mismatch, Expected 5 and got 1395 Is this even possible? Any ideas? Thanks. Wayne [EMAIL PROTECTED] -Original Message- From: Trieu, Danny [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 12:46 PM To: '[EMAIL PROTECTED]' Subject: RE: Session scope serialize your form beans into hidden fields -Original Message- From: Girish Baxi [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 9:41 AM To: Struts-User@Jakarta. Apache. Org (E-mail) Subject: Session scope I am a new strut user as far as i know , isnt it a bad idea to store data in the session scope simply becoz its not scalable for a multiple web server scenario ... is there any work around to using session scope in case of form beans that span more than one html page ??? any guidance is appreciated, thanx
ActionFormBean
Hi! All, I understand the function of an ActionForm, but do not understand the function of ActionFormBean how it is to be used. Can somebody be kind enough to explain. Thanks Rajan __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Re: Where are Struts messages found?
Nevermind. I found them in places like org/apache/struts/util/LocalStrings.properties. I'm running Tomcat/Struts from within VisualAge and I hadn't properly imported the Struts resources and I was missing these properties files. At 11:33 AM 4/11/2001 -0400, you wrote: I'm working with Struts and I'm trying to build an error page for my JSP application. In looking at the Struts tag code I see statements which look like this: throw new JspException(messages.getMessage("getter.bean", beanName))); which looks like it should be populating the exception with some useful information. However, when I execute this code in a debugger, the message assigned to the Exception is null because there is no message with the name "getter.bean". Where would I find definitions for messages such as "getter.bean", "optionsTag.iterator", etc? James W. Howe mailto:[EMAIL PROTECTED] Allen Creek Software, Inc. pgpkey: http://ic.net/~jwh/pgpkey.html Ann Arbor, MI 48103
relative url problems.
Hi guys, I have a problem with relative urls. If I have an entry like actionpath="/showDetails" type="" forward name="success" path="/details/show.jsp" / /action and then /details/show.jsp starts to use relative paths, then things like images do not get found, because the browser believes the file is actually from the directory "/" (from the /showDetails.do). Is there some kind of way around this? I know there are a few tags I can use, but the problem is dreamweaver is not going to let me do that kind of thing easily, and it could be a big problem with css links in the page. Cheers Ned
Re: question about struts
You should be able to download that with the package itself. But you will have to move the war file in your webapps directory restart your server --- bommaku murali [EMAIL PROTECTED] wrote: From: "ravi konam" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Subject: question about struts Date: 11 Apr 2001 08:20:36 - respected sir, I want to download struts framework documentation. where can I get. please tell me. ---ravikonam. _ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
RE: Where are Struts messages found?
Your application's web.xml file (probably in your WEB-INF directory) should include a servlet tag that defines and configures the ActionServlet. Part of that is something like: init-param param-nameapplication/param-name param-valuecom.yourdomain.yourpackage.Resources/param-value /init-param This is used to find the messages file, which in this case would be the file at: WEB-INF/classes/com/yourdomain/yourpackage/Resources.properties Scott -Original Message- From: James Howe [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 8:34 AM To: [EMAIL PROTECTED] Subject: Where are Struts messages found? I'm working with Struts and I'm trying to build an error page for my JSP application. In looking at the Struts tag code I see statements which look like this: throw new JspException(messages.getMessage("getter.bean", beanName))); which looks like it should be populating the exception with some useful information. However, when I execute this code in a debugger, the message assigned to the Exception is null because there is no message with the name "getter.bean". Where would I find definitions for messages such as "getter.bean", "optionsTag.iterator", etc?
RE: Extending struts classes
When an action request is received by the ActionServlet, one of the things it tries to do is set up the form bean (specified by a combination of a form-bean tag and your action tag in your struts-config.xml file). It tries to reuse one, and if it can't find one under the attribute name you gave, it creates one. Then it calls one of the util routines to populate it from the request using reflection. So, you should have an instance of your form bean, saved in the request under the attribute name you specified, available when your Action class' perform() method is called. I'm trying to figure out some similar "timing" things, and what I was thinking of doing was to create a base class that extends Action. Then I can do things in that class that are common to all (or a set of) my Actions and then continue with the perform activities specific to a particular Action. So, for example (pseudo code): public class BaseAction extends Action { ... public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ... stuff for all Actions ... } } public class MyAction extends BaseAction { ... public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { super.perform(...); ... do my stuff ... OR, you could do... initUsingSession(...); // assuming this is defined in your BaseAction ... do my stuff ... } } Hope this helps, Scott -Original Message- From: Steve A Drake [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 9:02 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Extending struts classes On Wed, 11 Apr 2001 [EMAIL PROTECTED] wrote: I want to add a function to all of my forms in which the form is capable of initialising its contents. e.g. public void initUsingSession(HttpSession session) I want to pass the session to this function so that I can populate values on the form depending on what is stored in the session. The trouble with this is that when would I call this function? I looked in the FormTag class, and I noticed that if it couldn't find the form class then it just created a new instance of it. This means I can't call that function. Any ideas? Don't know if it'll meet your needs but, instead of invoking your JSP directly, you could invoke the associated action class. In this class, you can get a handle on the session object and your action form object. Once you've initialized the ActionForm, forward to the view JSP.
upload file not working
Hi, may be a stupid question but I can't get the example (struts-upload) working on a win2000 box with resin2.2+ . As sun as I I hit the submit button I get an Servlet exception. 500 Servlet Exception java.io.IOException: Das System kann den angegebenen Pfad nicht finden at java.io.Win32FileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1159) at java.io.File.createTempFile(File.java:1244) at org.apache.struts.upload.MultipartIterator.createLocalFile(MultipartIterator.java:465) at org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.java:201) at org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMultipartRequestHandler.java:70) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:447) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:1910) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1521) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:142) at javax.servlet.http.HttpServlet.service(HttpServlet.java:103) at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:82) at com.caucho.server.http.Invocation.service(Invocation.java:259) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:146) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:238) at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:157) at com.caucho.server.TcpConnection.run(TcpConnection.java:140) at java.lang.Thread.run(Thread.java:484) btw. there is no file in the system tmp directory. So it looks like there is some problem with writing the file. Any idea?? Soeren == Artificial intelligence is better than none.
Url Rewrting and Cache problems
Hi There, I am developing my new website using struts and have found it to be excellent. I use tomcat in stand-alone mode during development but on deploying the web application to my web server I am experiancing a few problems which I hope you learned fellows might be able to help me with. Firstly here is my set-up: Red Hat 6.2 Apache 1.3.12 Tomcat 3.2 Beta8 (using mod_jk) And now here are my questions: 1. Apache does not recognise the jsessionid appended by Tomcat. I am aware of the following RewriteRule but when I tried this the problem remained. IfModule mod_rewrite.c RewriteEngine On RewriteRule ^(/.*;jsessionid=.*)$ $1 [T=jserv-servlet] /IfModule I guess the jserv-servlet mime type is for mod_jserv users. How to I add this mime-type to allow me to handle requests with mod_jk? Alternatively, I have thought of adding the following to my config to achieve the same result: JkMount /appdir/*;jsessionid=* ajp13 Where appdir is the appropriate application context. It seems to work ok. Does this seem feasible? 2. Secondly, I am having major problems with caching under MSIE. I am using the templating tags to give a uniform layout to all of my pages. I am also following the model demonstrated by the struts-example application where more than one function is carried out per Action (using an 'action' parameter to control this). However, this results in different pages being displayed depending on request parameters and IE seems to ignore this and just pull out the cached version. I have set the nocache=true in the init config for the action servlet but this has made no difference. Can anybody help me with either of these problems? It would be a shame if I had to abandon Struts after having come so far. Many thanks, -James
Deployment on Sun's Reference Implementation
Has anyone deployed Struts using Sun's RI deployment tool? Where did you place the struts-config.xml? I am getting an error when trying to access a page via the *.do specification, and it appears as though the server is looking for a resource called page.do instead of accessing the config file. Where did you place the struts.jar? I am getting a message that class Action cannot be found. I've tried struts.jar in WEB-INF\lib and also in the library of the war file. Any help is appreciated. Thank you. Jessica
RE: Url Rewrting and Cache problems
Title: RE: Url Rewrting and Cache problems Hey James, Do you know beside changing the LinkTag code which write out the jsessionid, can i configure; say turn on or off with URL rewriting (jsessionid) without any code is changed? Thanks in advance! David Lim -Original Message- From: James Maggs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 1:11 PM To: [EMAIL PROTECTED] Subject: Url Rewrting and Cache problems Hi There, I am developing my new website using struts and have found it to be excellent. I use tomcat in stand-alone mode during development but on deploying the web application to my web server I am experiancing a few problems which I hope you learned fellows might be able to help me with. Firstly here is my set-up: Red Hat 6.2 Apache 1.3.12 Tomcat 3.2 Beta8 (using mod_jk) And now here are my questions: 1. Apache does not recognise the jsessionid appended by Tomcat. I am aware of the following RewriteRule but when I tried this the problem remained. IfModule mod_rewrite.c RewriteEngine On RewriteRule ^(/.*;jsessionid=.*)$ $1 [T=jserv-servlet] /IfModule I guess the jserv-servlet mime type is for mod_jserv users. How to I add this mime-type to allow me to handle requests with mod_jk? Alternatively, I have thought of adding the following to my config to achieve the same result: JkMount /appdir/*;jsessionid=* ajp13 Where appdir is the appropriate application context. It seems to work ok. Does this seem feasible? 2. Secondly, I am having major problems with caching under MSIE. I am using the templating tags to give a uniform layout to all of my pages. I am also following the model demonstrated by the struts-example application where more than one function is carried out per Action (using an 'action' parameter to control this). However, this results in different pages being displayed depending on request parameters and IE seems to ignore this and just pull out the cached version. I have set the nocache=true in the init config for the action servlet but this has made no difference. Can anybody help me with either of these problems? It would be a shame if I had to abandon Struts after having come so far. Many thanks, -James
ActionFormBean
It is an internal class for storing information for a ActionForm. :) I think, we should differentiate between framework classes from classes which users of struts need to subclass or the naming convention could change. e.g. ActionMapping vs Action. Looking at it it is not possible to find out which needs to be subclassed by the user vs. which the struts framework uses. __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Re: Url Rewrting and Cache problems
Title: RE: Url Rewrting and Cache problems I'm not sure. If you turn off the session rewriting without enabling cookies then this will cause problems for the struts engine. I think features like the message internationalisation rely on the session info. Hope this helps, -James - Original Message - From: See Yam Lim To: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Sent: Wednesday, April 11, 2001 6:40 PM Subject: RE: Url Rewrting and Cache problems Hey James, Do you know beside changing the LinkTag code which write out the jsessionid, can i configure; say turn on or off with URL rewriting (jsessionid) without any code is changed? Thanks in advance! David Lim -Original Message- From: James Maggs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 1:11 PM To: [EMAIL PROTECTED] Subject: Url Rewrting and Cache problems Hi There, I am developing my new website using struts and have found it to be excellent. I use tomcat in stand-alone mode during development but on deploying the web application to my web server I am experiancing a few problems which I hope you learned fellows might be able to help me with. Firstly here is my set-up: Red Hat 6.2 Apache 1.3.12 Tomcat 3.2 Beta8 (using mod_jk) And now here are my questions: 1. Apache does not recognise the jsessionid appended by Tomcat. I am aware of the following RewriteRule but when I tried this the problem remained. IfModule mod_rewrite.c RewriteEngine On RewriteRule ^(/.*;jsessionid=.*)$ $1 [T=jserv-servlet] /IfModule I guess the jserv-servlet mime type is for mod_jserv users. How to I add this mime-type to allow me to handle requests with mod_jk? Alternatively, I have thought of adding the following to my config to achieve the same result: JkMount /appdir/*;jsessionid=* ajp13 Where appdir is the appropriate application context. It seems to work ok. Does this seem feasible? 2. Secondly, I am having major problems with caching under MSIE. I am using the templating tags to give a uniform layout to all of my pages. I am also following the model demonstrated by the struts-example application where more than one function is carried out per Action (using an 'action' parameter to control this). However, this results in different pages being displayed depending on request parameters and IE seems to ignore this and just pull out the cached version. I have set the nocache=true in the init config for the action servlet but this has made no difference. Can anybody help me with either of these problems? It would be a shame if I had to abandon Struts after having come so far. Many thanks, -James
problem getting form bean
I am trying to implement a webapp using weblogic51 model after the struts example. One of the page contain a simple form just like the 'registration.jsp' in the example, here is a the piece of jsp where I have the form: --- html:form action="/saveEClient" html:hidden property="action"/ table border="0" width="100%" tr th align="right" bean:message key="prompt.eclientid"/ /th td align="left" html:text property="eClientId" size="50"/ /td /tr --- Here is the exception I got: Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Processi ng a GET for /editEClient Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Setting locale 'en_US' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Looking for ActionForm bean under attribute 'eClientForm' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Creatin g new ActionForm instance of class 'com.emat.mchv.EClientForm' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Storing instance under attribute 'eClientForm' in scope 'request' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Populat ing bean properties from this request Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Validat ing input form properties Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Looking for Action instance for class com.emat.mchv.EditEClientAction Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Double checking for Action instance already there Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Creati ng new Action instance Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: EditECli entAction: Processing Add action Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Setting transactional control token Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Forward ing to 'success' page javax.servlet.jsp.JspException: No getter method for property eClientId of bean org.apache.struts.taglib.html.BEAN at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:234) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.ja va:220) at jsp_servlet._mchv._eclient._jspService(_eclient.java:361) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:106) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:124) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat cherImpl.java:154) at org.apache.struts.action.ActionServlet.processActionForward(ActionSer vlet.java:1697) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:154 0) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:106) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon textImpl.java:907) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon textImpl.java:851) at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet ContextManager.java:252) at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav a:364) at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129) javax.servlet.ServletException: runtime failure in custom tag 'text' at jsp_servlet._mchv._eclient._jspService(_eclient.java:383) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:106) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:124) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat cherImpl.java:154) at org.apache.struts.action.ActionServlet.processActionForward(ActionSer vlet.java:1697) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:154 0) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:106) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon textImpl.java:907) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
Re: problem getting form bean
If your method is getEClientId, then your html:text should be. html:text property="EClientId" size="50"/ It's in the spec on JavaBean propertys. David --- Alex Tso [EMAIL PROTECTED] wrote: I am trying to implement a webapp using weblogic51 model after the struts example. One of the page contain a simple form just like the 'registration.jsp' in the example, here is a the piece of jsp where I have the form: --- html:form action="/saveEClient" html:hidden property="action"/ table border="0" width="100%" tr th align="right" bean:message key="prompt.eclientid"/ /th td align="left" html:text property="eClientId" size="50"/ /td /tr --- Here is the exception I got: Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Processi ng a GET for /editEClient Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Setting locale 'en_US' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Looking for ActionForm bean under attribute 'eClientForm' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Creatin g new ActionForm instance of class 'com.emat.mchv.EClientForm' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Storing instance under attribute 'eClientForm' in scope 'request' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Populat ing bean properties from this request Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Validat ing input form properties Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Looking for Action instance for class com.emat.mchv.EditEClientAction Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Double checking for Action instance already there Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Creati ng new Action instance Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: EditECli entAction: Processing Add action Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Setting transactional control token Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Forward ing to 'success' page javax.servlet.jsp.JspException: No getter method for property eClientId of bean org.apache.struts.taglib.html.BEAN at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:234) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.ja va:220) at jsp_servlet._mchv._eclient._jspService(_eclient.java:361) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:106) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:124) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat cherImpl.java:154) at org.apache.struts.action.ActionServlet.processActionForward(ActionSer vlet.java:1697) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:154 0) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:106) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon textImpl.java:907) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon textImpl.java:851) at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet ContextManager.java:252) at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav a:364) at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129) javax.servlet.ServletException: runtime failure in custom tag 'text' at jsp_servlet._mchv._eclient._jspService(_eclient.java:383) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:106) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:124) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat cherImpl.java:154) at org.apache.struts.action.ActionServlet.processActionForward(ActionSer vlet.java:1697) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:154 0) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
Re: iPlanet - struts
Someone posted a solution to the iPlanet mailing list. You may want to look for it there. At 10:32 AM 4/11/2001 -0500, you wrote: Hello, I have seen this mentioned on several other messages but I have not been able to get a resolution. I am attempting to use struts with iPlanet 6.0 sp2. I have a tag that is html:html local="true". When this is compiled in iPlanet I get the following error: compiled_jsp\jsp\APPS\aces\index.java:75: Incompatible type for method. Can't convert java.lang.String to boolean. ((org.apache.struts.taglib.html.HtmlTag)_JSP__26).setLocale("true"); I have seen the JRUN 3.0 workaround for this html:html local=%= true % . I have tried this and I get the following: [11/Apr/2001 10:30:37:9] error: Exception: SERVLET-compile_failed: Failed in com piling template: /aces/index.jsp, JSP Error: Error while parsing attributes of t ag: locale=%= Exception Stack Trace: java.lang.Exception: JSP Error: Error while parsing attributes of tag: locale=%= at com.netscape.jsp.JSP.parseAttributes(Unknown Source) at com.netscape.jsp.JSP.parseUserTag(Unknown Source) at com.netscape.jsp.JSP.parseTag(Unknown Source) at com.netscape.jsp.JSP.parseNext(Unknown Source) at com.netscape.jsp.JSP.parseBlock(Unknown Source) at com.netscape.jsp.JSP.parse(Unknown Source) at com.netscape.jsp.JSP.compile(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.JSPtoJava (Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileJSP (Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP (Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance (Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse. callJspCompiler(Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse. callUri(Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse. callUriRestrictOutput(Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformRequestDispatcher.fo rward(Unknown Source) at com.netscape.server.servlet.jsp.JSPRunner.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at com.netscape.server.servlet.servletrunner.ServletInfo.service (Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unkno wn Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.thread.ThreadBasic.run(Native Method) at java.lang.Thread.run(Thread.java:479) I have read in the archives that there are people using struts with iPlanet successfully. Can anyone tell me if this is true? If there are other issues with iPlanet and struts I would appreciate someone letting me know. I don't want to go down this path too far if I'm going to have nothing but headaches. Any suggestions would be appreciated. -- Jason Smith [EMAIL PROTECTED]
RE: Please explain these lines to me.
Alex, I'm guessing that the removal of the login bean from the session scope is only something done for a login action in order to remove the users password from the session. I can sorta see the sense in that. I copied/pasted the login page myself when I started my first struts app and was wondering why I was removing my beans. Since then I've removed those lines from my pages and am using the struts.config to manage my formbeans scopes etc. -Original Message- From: Alex Colic [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 8:52 AM To: Struts Subject: Please explain these lines to me. Hi, I amusing the example struts app to modify my present web app. I am using one bean across a number of forms. Each form populates this bean. In my loginaction servlet I create an instance of a bean and place it into the session. I then intend to have that bean used across all forms. In the second page I have the following lines in my Page2action servlet: if(mapping.getAttribute()!=null) { if("request".equals(mapping.getScope())) { request.removeAttribute(mapping.getAttribute()); } else { session.removeAttribute(mapping.getAttribute()); } } return (mapping.findForward("success")); Why are these lines there. I can understand that if the present bean being used is of request scope then take it out but then why are you also taking out a bean that is of session scope? When my app gets to page 3 the info entered on page one is gone. What I think is happening is that page 2 fills the bean, the page 2 action servlet removes the bean from the session. When page 3 gets the bean, it does not exist so it is created but it is empty. Should the remove bean from session lines be removed? Thanks Alex
help with images
I was wondering where you put the images in a tomcat webapp. I have an "images" folder at the top level of my app. and the following line in my JSP: A HREF="http://www.xxx.com"IMG SRC="/images/xxx.jpg" WIDTH="210" HEIGHT="59" ALT=""/A for some reason the app. can't find the image. Any ideas? thanks.
Re: Extending struts classes
I was interested in the same issue and did not find a good solution, so I submitted a bug report: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1289 It does make sense for an ActionForm to have access to the context: not just the session, but also request, response, servlet context and servlet config. ActionForms need to be able to access other beans held in the context, participate in i18n and do other context-dependent operations. However, I understand that the whole issue of associating forms with the context is a gnarly one. These forms are accessed by both actions and JSPs. JSPs access their context via PageContext, which conveniently aggregates all relevant pieces of context: request, response, session, servlet context and servlet config. Actions, on the other hand do not have anything of that sort, they get all these pieces separately. As a result of all this, it is unclear what the context-binding API on ActionForm should be. Maybe we need to create a whole new object: StrutsContext and make it aggregate all levels of the context. What do you think? Dmitri Plotnikov CTO PLOTNIX, Inc [EMAIL PROTECTED] wrote: I want to add a function to all of my forms in which the form is capable of initialising its contents. e.g. public void initUsingSession(HttpSession session) I want to pass the session to this function so that I can populate values on the form depending on what is stored in the session. The trouble with this is that when would I call this function? I looked in the FormTag class, and I noticed that if it couldn't find the form class then it just created a new instance of it. This means I can't call that function. Any ideas? Cheers Kris
RE: problem getting form bean
Thank you David! It works. However, I still don't understand the naming convention, I have 'getEClientId' as the method, and 'eClientId' as the bean property, so I thought I should put property="eClientId" within html:text. Is it an exception to property with double capitalization in the beginning? I didn't find any reference in the bean spec (maybe overlook), would you kindly explain this concept? I definitely stay away from weird naming capitalization from now on. thanks alex -Original Message- From: David Winterfeldt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 2:09 PM To: [EMAIL PROTECTED] Subject: Re: problem getting form bean If your method is getEClientId, then your html:text should be. html:text property="EClientId" size="50"/ It's in the spec on JavaBean propertys. David --- Alex Tso [EMAIL PROTECTED] wrote: I am trying to implement a webapp using weblogic51 model after the struts example. One of the page contain a simple form just like the 'registration.jsp' in the example, here is a the piece of jsp where I have the form: --- html:form action="/saveEClient" html:hidden property="action"/ table border="0" width="100%" tr th align="right" bean:message key="prompt.eclientid"/ /th td align="left" html:text property="eClientId" size="50"/ /td /tr --- Here is the exception I got: Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Processi ng a GET for /editEClient Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Setting locale 'en_US' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Looking for ActionForm bean under attribute 'eClientForm' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Creatin g new ActionForm instance of class 'com.emat.mchv.EClientForm' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Storing instance under attribute 'eClientForm' in scope 'request' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Populat ing bean properties from this request Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Validat ing input form properties Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Looking for Action instance for class com.emat.mchv.EditEClientAction Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Double checking for Action instance already there Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Creati ng new Action instance Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: EditECli entAction: Processing Add action Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Setting transactional control token Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Forward ing to 'success' page javax.servlet.jsp.JspException: No getter method for property eClientId of bean org.apache.struts.taglib.html.BEAN at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:234) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.ja va:220) at jsp_servlet._mchv._eclient._jspService(_eclient.java:361) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:106) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:124) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat cherImpl.java:154) at org.apache.struts.action.ActionServlet.processActionForward(ActionSer vlet.java:1697) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:154 0) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:106) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon textImpl.java:907) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon textImpl.java:851) at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet ContextManager.java:252) at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav a:364) at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129) javax.servlet.ServletException: runtime failure in custom tag 'text' at jsp_servlet._mchv._eclient._jspService(_eclient.java:383) at
RE: problem getting form bean
I found this paragraph in bean spec, which kind of explains it: Thus when we extract a property or event name from the middle of an existing Java name, we normally convert the first character to lower case. However to support the occasional use of all upper-case names, we check if the first two characters of the name are both upper case and if so leave it alone. So for example, "FooBah" becomes "fooBah" "Z" becomes "z" "URL" becomes "URL" We provide a method Introspector.decapitalize which implements this conversion rule. - good to know this detail alex -Original Message- From: Alex Tso [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 2:53 PM To: '[EMAIL PROTECTED]' Subject: RE: problem getting form bean Thank you David! It works. However, I still don't understand the naming convention, I have 'getEClientId' as the method, and 'eClientId' as the bean property, so I thought I should put property="eClientId" within html:text. Is it an exception to property with double capitalization in the beginning? I didn't find any reference in the bean spec (maybe overlook), would you kindly explain this concept? I definitely stay away from weird naming capitalization from now on. thanks alex -Original Message- From: David Winterfeldt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 2:09 PM To: [EMAIL PROTECTED] Subject: Re: problem getting form bean If your method is getEClientId, then your html:text should be. html:text property="EClientId" size="50"/ It's in the spec on JavaBean propertys. David --- Alex Tso [EMAIL PROTECTED] wrote: I am trying to implement a webapp using weblogic51 model after the struts example. One of the page contain a simple form just like the 'registration.jsp' in the example, here is a the piece of jsp where I have the form: --- html:form action="/saveEClient" html:hidden property="action"/ table border="0" width="100%" tr th align="right" bean:message key="prompt.eclientid"/ /th td align="left" html:text property="eClientId" size="50"/ /td /tr --- Here is the exception I got: Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Processi ng a GET for /editEClient Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Setting locale 'en_US' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Looking for ActionForm bean under attribute 'eClientForm' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Creatin g new ActionForm instance of class 'com.emat.mchv.EClientForm' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Storing instance under attribute 'eClientForm' in scope 'request' Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Populat ing bean properties from this request Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Validat ing input form properties Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Looking for Action instance for class com.emat.mchv.EditEClientAction Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Double checking for Action instance already there Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Creati ng new Action instance Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: EditECli entAction: Processing Add action Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Setting transactional control token Wed Apr 11 11:06:56 EDT 2001:I WebAppServletContext-approot action: Forward ing to 'success' page javax.servlet.jsp.JspException: No getter method for property eClientId of bean org.apache.struts.taglib.html.BEAN at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:234) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.ja va:220) at jsp_servlet._mchv._eclient._jspService(_eclient.java:361) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:106) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:124) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat cherImpl.java:154) at org.apache.struts.action.ActionServlet.processActionForward(ActionSer vlet.java:1697) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:154 0) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at
upload file (2)
Hi, some more information on the problem. I just tested it on tomcat and it's working with the tomcat. So could some one who is running a resin server test it? Soeren
Parse Error in the tag library descriptor: Element web-app does not allow servlet here
Hello, I am using jakarta tomcat 3.1 and stuts. I get this error org.apache.jasper.JasperException: Unable to open taglibrary /WEB-INF/struts.tld : Parse Error in the tag library descriptor: Element "web-app" does not allow "servlet" here. at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve ntListener.java:672) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList ener.java:116) at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215) at org.apache.jasper.compiler.Parser.parse(Parser.java:1073) at org.apache.jasper.compiler.Parser.parse(Parser.java:1038) at org.apache.jasper.compiler.Parser.parse(Parser.java:1034) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182) at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:149) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja va:161) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338 ) at java.lang.Thread.run(Thread.java:484) when I try to acces a jsp page which has this lines: %@ page language="java" % %@ taglib uri="/WEB-INF/struts.tld" prefix="struts" % %@ taglib uri="/WEB-INF/app.tld" prefix="app" % ... My web.xml file is: ?xml version="1.0" encoding="ISO-8859-1"? !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" web-app !-- Database Initialization Servlet Configuration -- servlet servlet-namedatabase/servlet-name servlet-classro.necomm.sites.company.connection.LoadConnectionFactory/ser vlet-classinit-param param-namedebug/param-name param-value2/param-value/init-param load-on-startup1/load-on-startup /servlet !-- Action Servlet Configuration -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuero.necomm.sites.company.ApplicationResources/param-value /init-paraminit-param param-nameconfig/param-name param-value/WEB-INF/action.xml/param-value/init-param init-param param-namedebug/param-name param-value2/param-value/init-paraminit-param param-namedetail/param-name param-value2/param-value /init-paramload-on-startup2/load-on-startup /servlet !-- Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-nameurl-pattern*.do/url-pattern /servlet-mapping !-- EMAIL Servlet Configuration -- servlet servlet-nameemailForm/servlet-name servlet-classro.necomm.util.EMailFormServlet/servlet-class init-param param-nameconfigFile/param-name param-value/Config/EMailFormServletConfig.properties/param-value /init-paraminit-param param-namedebug/param-name param-value2/param-value/init-paraminit-param param-namedetail/param-name param-value2/param-value /init-paramload-on-startup3/load-on-startup /servlet servlet-mappingservlet-nameemailForm/servlet-name url-pattern/email/url-pattern /servlet-mapping !-- The Welcome File List -- welcome-file-list welcome-file/zeelandia/admin.jsp/welcome-file /welcome-file-list !-- Struts Tag Library Descriptor -- taglib taglib-uri/WEB-INF/struts.tld/taglib-uri taglib-location/WEB-INF/struts.tld/taglib-location /taglib !-- Application Tag Library Descriptor -- taglib taglib-uri/WEB-INF/app.tld/taglib-uri taglib-location/WEB-INF/app.tld/taglib-location /taglib /web-app What is wrong in my web.xml? I ask this because everything was ok before. Thank you in advance, Adrian
RE: Parse Error in the tag library descriptor: Element web-app does not allow servlet here
Hi Adrian, Try putting all servlet tags together, and then all servlet-mapping tags together. The DTD specifies the following: !ELEMENT web-app (icon?, display-name?, description?, distributable?, context-param*, servlet*, servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?, error-page*, taglib*, resource-ref*, security-constraint*, login-config?, security-role*, env-entry*, ejb-ref*) hope this helps, Iraklis -Original Message- From: Adrian Perju [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 2:03 PM To: [EMAIL PROTECTED] Subject: Parse Error in the tag library descriptor: Element "web-app" does not allow "servlet" here Hello, I am using jakarta tomcat 3.1 and stuts. I get this error org.apache.jasper.JasperException: Unable to open taglibrary /WEB-INF/struts.tld : Parse Error in the tag library descriptor: Element "web-app" does not allow "servlet" here. at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve ntListener.java:672) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList ener.java:116) at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215) at org.apache.jasper.compiler.Parser.parse(Parser.java:1073) at org.apache.jasper.compiler.Parser.parse(Parser.java:1038) at org.apache.jasper.compiler.Parser.parse(Parser.java:1034) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182) at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:149) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja va:161) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338 ) at java.lang.Thread.run(Thread.java:484) when I try to acces a jsp page which has this lines: %@ page language="java" % %@ taglib uri="/WEB-INF/struts.tld" prefix="struts" % %@ taglib uri="/WEB-INF/app.tld" prefix="app" % ... My web.xml file is: ?xml version="1.0" encoding="ISO-8859-1"? !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" web-app !-- Database Initialization Servlet Configuration -- servlet servlet-namedatabase/servlet-name servlet-classro.necomm.sites.company.connection.LoadConnectionFactory/ser vlet-classinit-param param-namedebug/param-name param-value2/param-value/init-param load-on-startup1/load-on-startup /servlet !-- Action Servlet Configuration -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuero.necomm.sites.company.ApplicationResources/param-value /init-paraminit-param param-nameconfig/param-name param-value/WEB-INF/action.xml/param-value/init-param init-param param-namedebug/param-name param-value2/param-value/init-paraminit-param param-namedetail/param-name param-value2/param-value /init-paramload-on-startup2/load-on-startup /servlet !-- Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-nameurl-pattern*.do/url-pattern /servlet-mapping !-- EMAIL Servlet Configuration -- servlet servlet-nameemailForm/servlet-name servlet-classro.necomm.util.EMailFormServlet/servlet-class init-param param-nameconfigFile/param-name param-value/Config/EMailFormServletConfig.properties/param-value /init-paraminit-param param-namedebug/param-name param-value2/param-value/init-paraminit-param param-namedetail/param-name param-value2/param-value /init-paramload-on-startup3/load-on-startup /servlet servlet-mappingservlet-nameemailForm/servlet-name url-pattern/email/url-pattern /servlet-mapping !-- The Welcome File List -- welcome-file-list welcome-file/zeelandia/admin.jsp/welcome-file /welcome-file-list !-- Struts Tag Library Descriptor -- taglib taglib-uri/WEB-INF/struts.tld/taglib-uri taglib-location/WEB-INF/struts.tld/taglib-location /taglib !-- Application Tag Library Descriptor -- taglib taglib-uri/WEB-INF/app.tld/taglib-uri taglib-location/WEB-INF/app.tld/taglib-location /taglib /web-app What is wrong in my web.xml? I ask this because everything was ok before. Thank you in advance, Adrian
Re: Parse Error in the tag library descriptor: Element web-app does not allow servlet here
- Original Message - From: "Iraklis Kourtidis" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 11, 2001 8:23 PM Subject: RE: Parse Error in the tag library descriptor: Element "web-app" does not allow "servlet" here Hi Adrian, Try putting all servlet tags together, and then all servlet-mapping tags together. The DTD specifies the following: !ELEMENT web-app (icon?, display-name?, description?, distributable?, context-param*, servlet*, servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?, error-page*, taglib*, resource-ref*, security-constraint*, login-config?, security-role*, env-entry*, ejb-ref*) hope this helps, This was the error. Thank you very much. Adrian Iraklis
Re: The Joy of File : New Window ... alternate approach
This is a good idea. I hadn't thought of that. I really don't like using the javascript,, and this method removes the need for it. Correct me if I am reading this wrong... The Flow Controller will keep track of the current user's state. (Where he was last, and where he is now) This will then allow the Flow Controller to determine when more than one window is open because the user will eventually move to a different page. So now, the new window is the valid flow and any previously opened windows are invalidated because past and current location of the user (in the previous window) will not match what the Flow controller has listed. Using this method, again if I understand it correctly, the user may never have more than one window open (and still navigate). Using the Flow Controller concept, would it be possible to allow a user to have more than one window open at a time and navigate in both?? If the Flow controller is keeping track of the past and present locations of the logged in user, then each time he/she switches windows, the previous one will be invalidated. Im wondering if there is a way to merge the flow controller concept into what we are using, so that we can get rid of the javascript. Maybe the controller would only be responsible for determining that the user has opened a new window, and not actually invalidate the previous one? In our app (which is web browser only), the user will most likely want to open more than one window to view records side by side. Therefore, we must allow multi-window session management for usability. thanks, Pete "Nanduri, Amarnath" wrote: Hi All, An other approach is to use a Flow Controller (a state machine) and a Session Manager in your project. This is a pure server side solution (with minimum javascript). The reason we have to go for this solution is because our project is run on any device...so javascript is out of the question for WAP enabled browsers in cell phones or PDA's. The 'Session Manager' manages the user's session(s) (if he /she logs in multiple times) based on the user id. If the user opens a new window say from FILE -- new window, he/she might be able to get past the first flow. When the user tries to navigate from the old window, the Flow Controller will catch the user and determines that the user is in an invalid flow. Therefore the user is send a kill page for the old window( in webbrowsers it is window.close). The user is therefore forced to close the old window. In case of wap browsers, a flag is set in the 'Session Manager' for that session. So whenever a user makes a request from that session id, the session will be invalidated. When the user opens a new separate browser window and logs in, the Session Manager detects that the user has logged in more than once. It then sends a page to the user informing him/her that the user was already logged in and presents the user with options . Close this window and continue working in the old session. . Log out of the other window. ( If user selects this option next time whenever a request is made from the old window, a kill page is send thus destroying the web browser ). . A security breach has occured, therefore lock your account and call customer service. Hope this helps for somebody interested in a pure server-side solution. NOTE : In struts 1.1 there is talk of a Flow Controller ( a state machine) which manages states, so in the long run using this kind of approach would be befitting, cause all you have to do is write a Session Manager. Any comments / suggestions welcome. cheers, Amar.. -Original Message- From: Peter Alfors [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 10:15 AM To: [EMAIL PROTECTED] Subject: Re: The Joy of File : New Window I recently asked this question (over and over and over). I pretty much beat it to death. Using some suggestions from this list (check the archives for 'session'), we came up with a pretty solid approach. Thank you to those that helped. :) It is ugly, but it solves all situations. The only way that we have found to determine if the user has opened a new window (through either a File -- new window or right-click -- open in New window) is to check the window.name property. However, we do not really like this approach, so if anyone knows a better way, please speak up. :) When a new window is created, the window name is empty. This is a settable property, so after you find a window, set it to something. Remember, if you are using frames, set window.top.name You would think that there would be a window.ID or something that is unique for every window. However, according to my javascript books and searching the web, there doesn't appear to be. Again, I hope that I am wrong. :) So.. Now that you know you have a new window, what now? Here is one solution: You can manage your own session objects. Yep, I said it was ugly. Each new
RE: WebSphere 3.5.3
Hi Chris: Deployment Structure: Frollowing directories contain the web-assets default_host\default_app\web\*.jsp default_host\default_app\web\web-inf\*.tld default_host\default_app\web\web-inf\web.xml default_host\default_app\web\web-inf\struts-config.xml default_host\default_app\servlets\struts.jar default_host\default_app\servlets\xerces.jar default_host\default_app\servlets\app\*.class default_host\default_app\servlets\app\*.properties There is no error reported in the log files. I tried accessing it in the Netscape this time and it came back with some information, at least. IE was just complaining. Netscape Message (in a dialog box): The document contained no data Try aging later, or contact the server's adminstrator. IE Message (in the browser window): The page cannot be diplayed It looks like that the generated servlet is not sending any information back to the browser? I don't know where the problem is? Can you point me where I need to look at? Thanks, Mu --- "Assenza, Chris" [EMAIL PROTECTED] wrote: Go into Explorer and find your WebSphere install. Look under WebSphere/AppServer/logs/default_host_stdout.log and see if there are any ugly Java Servlet exceptions in there. It sounds a lot like struts-config.xml isn't getting parsed right and looking in this file will confirm that. :) Chris Assenza -Original Message- From: MA [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 2:12 PM To: [EMAIL PROTECTED] Subject: WebSphere 3.5.3 Hi I'm using WebSphere 3.5.3 on Windows NT and have installed and configured the struts framework according to the instructions posted on the struts site. I was trying to use the logon example and strange thing is happening? I loaded the application by converting the war file. I'm able to hit the index.jsp and when I click on the link on the page which is supposed to take me to the logon.jsp; it complains that it can't find the jsp? Both the jsp's are in the same doc-root I checked that the class file is generated for the logon.jsp but it says that "page can't b e found" Any ideas? Thanks, Mu __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Re: Url Rewrting and Cache problems
Further to my previous email, the caching in IE is becoming beyond a joke. The browser seems to just pick files at random from the cache when it displays a page. In response to a request for the root index.jsp file for my site it returned the source of an external javascript file linked to the document it was just displaying!!! I know this is a problem with IE and not struts itself but has anyone found a solution to the caching problem? And, moreover, a solution that works across all browsers? Many thanks, -James - Original Message - From: "James Maggs" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 11, 2001 6:11 PM Subject: Url Rewrting and Cache problems Hi There, I am developing my new website using struts and have found it to be excellent. I use tomcat in stand-alone mode during development but on deploying the web application to my web server I am experiancing a few problems which I hope you learned fellows might be able to help me with. Firstly here is my set-up: Red Hat 6.2 Apache 1.3.12 Tomcat 3.2 Beta8 (using mod_jk) And now here are my questions: 1. Apache does not recognise the jsessionid appended by Tomcat. I am aware of the following RewriteRule but when I tried this the problem remained. IfModule mod_rewrite.c RewriteEngine On RewriteRule ^(/.*;jsessionid=.*)$ $1 [T=jserv-servlet] /IfModule I guess the jserv-servlet mime type is for mod_jserv users. How to I add this mime-type to allow me to handle requests with mod_jk? Alternatively, I have thought of adding the following to my config to achieve the same result: JkMount /appdir/*;jsessionid=* ajp13 Where appdir is the appropriate application context. It seems to work ok. Does this seem feasible? 2. Secondly, I am having major problems with caching under MSIE. I am using the templating tags to give a uniform layout to all of my pages. I am also following the model demonstrated by the struts-example application where more than one function is carried out per Action (using an 'action' parameter to control this). However, this results in different pages being displayed depending on request parameters and IE seems to ignore this and just pull out the cached version. I have set the nocache=true in the init config for the action servlet but this has made no difference. Can anybody help me with either of these problems? It would be a shame if I had to abandon Struts after having come so far. Many thanks, -James
RE: Url Rewrting and Cache problems
i think this is solution for all browsers... use meta tag in html for pragma no-cache and also use response.setHeader("Pragma","no-cache") from server side.. this should work for IE also.. Nishit -Original Message- From: James Maggs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 5:12 PM To: [EMAIL PROTECTED] Subject: Re: Url Rewrting and Cache problems Further to my previous email, the caching in IE is becoming beyond a joke. The browser seems to just pick files at random from the cache when it displays a page. In response to a request for the root index.jsp file for my site it returned the source of an external javascript file linked to the document it was just displaying!!! I know this is a problem with IE and not struts itself but has anyone found a solution to the caching problem? And, moreover, a solution that works across all browsers? Many thanks, -James - Original Message - From: "James Maggs" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 11, 2001 6:11 PM Subject: Url Rewrting and Cache problems Hi There, I am developing my new website using struts and have found it to be excellent. I use tomcat in stand-alone mode during development but on deploying the web application to my web server I am experiancing a few problems which I hope you learned fellows might be able to help me with. Firstly here is my set-up: Red Hat 6.2 Apache 1.3.12 Tomcat 3.2 Beta8 (using mod_jk) And now here are my questions: 1. Apache does not recognise the jsessionid appended by Tomcat. I am aware of the following RewriteRule but when I tried this the problem remained. IfModule mod_rewrite.c RewriteEngine On RewriteRule ^(/.*;jsessionid=.*)$ $1 [T=jserv-servlet] /IfModule I guess the jserv-servlet mime type is for mod_jserv users. How to I add this mime-type to allow me to handle requests with mod_jk? Alternatively, I have thought of adding the following to my config to achieve the same result: JkMount /appdir/*;jsessionid=* ajp13 Where appdir is the appropriate application context. It seems to work ok. Does this seem feasible? 2. Secondly, I am having major problems with caching under MSIE. I am using the templating tags to give a uniform layout to all of my pages. I am also following the model demonstrated by the struts-example application where more than one function is carried out per Action (using an 'action' parameter to control this). However, this results in different pages being displayed depending on request parameters and IE seems to ignore this and just pull out the cached version. I have set the nocache=true in the init config for the action servlet but this has made no difference. Can anybody help me with either of these problems? It would be a shame if I had to abandon Struts after having come so far. Many thanks, -James
RE: Url Rewrting and Cache problems
This may work for IE. IE has the option of either caching or not caching (if you use this meta-tag option). Personally i would not trust this to work on IE cause i have been there. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 5:18 PM To: '[EMAIL PROTECTED]' Subject: RE: Url Rewrting and Cache problems i think this is solution for all browsers... use meta tag in html for pragma no-cache and also use response.setHeader("Pragma","no-cache") from server side.. this should work for IE also.. Nishit -Original Message- From: James Maggs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 5:12 PM To: [EMAIL PROTECTED] Subject: Re: Url Rewrting and Cache problems Further to my previous email, the caching in IE is becoming beyond a joke. The browser seems to just pick files at random from the cache when it displays a page. In response to a request for the root index.jsp file for my site it returned the source of an external javascript file linked to the document it was just displaying!!! I know this is a problem with IE and not struts itself but has anyone found a solution to the caching problem? And, moreover, a solution that works across all browsers? Many thanks, -James - Original Message - From: "James Maggs" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 11, 2001 6:11 PM Subject: Url Rewrting and Cache problems Hi There, I am developing my new website using struts and have found it to be excellent. I use tomcat in stand-alone mode during development but on deploying the web application to my web server I am experiancing a few problems which I hope you learned fellows might be able to help me with. Firstly here is my set-up: Red Hat 6.2 Apache 1.3.12 Tomcat 3.2 Beta8 (using mod_jk) And now here are my questions: 1. Apache does not recognise the jsessionid appended by Tomcat. I am aware of the following RewriteRule but when I tried this the problem remained. IfModule mod_rewrite.c RewriteEngine On RewriteRule ^(/.*;jsessionid=.*)$ $1 [T=jserv-servlet] /IfModule I guess the jserv-servlet mime type is for mod_jserv users. How to I add this mime-type to allow me to handle requests with mod_jk? Alternatively, I have thought of adding the following to my config to achieve the same result: JkMount /appdir/*;jsessionid=* ajp13 Where appdir is the appropriate application context. It seems to work ok. Does this seem feasible? 2. Secondly, I am having major problems with caching under MSIE. I am using the templating tags to give a uniform layout to all of my pages. I am also following the model demonstrated by the struts-example application where more than one function is carried out per Action (using an 'action' parameter to control this). However, this results in different pages being displayed depending on request parameters and IE seems to ignore this and just pull out the cached version. I have set the nocache=true in the init config for the action servlet but this has made no difference. Can anybody help me with either of these problems? It would be a shame if I had to abandon Struts after having come so far. Many thanks, -James
RE: Url Rewrting and Cache problems
Try to have a complete server-side solution. Basically use a flow controller to map your flow and write a state machine which controls your flow. This will then work irrespective of your client interface (i.e the client can use a cell phone WAP browser also) and this would still work. cheers, Amar.. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 5:18 PM To: '[EMAIL PROTECTED]' Subject: RE: Url Rewrting and Cache problems i think this is solution for all browsers... use meta tag in html for pragma no-cache and also use response.setHeader("Pragma","no-cache") from server side.. this should work for IE also.. Nishit -Original Message- From: James Maggs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 5:12 PM To: [EMAIL PROTECTED] Subject: Re: Url Rewrting and Cache problems Further to my previous email, the caching in IE is becoming beyond a joke. The browser seems to just pick files at random from the cache when it displays a page. In response to a request for the root index.jsp file for my site it returned the source of an external javascript file linked to the document it was just displaying!!! I know this is a problem with IE and not struts itself but has anyone found a solution to the caching problem? And, moreover, a solution that works across all browsers? Many thanks, -James - Original Message - From: "James Maggs" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 11, 2001 6:11 PM Subject: Url Rewrting and Cache problems Hi There, I am developing my new website using struts and have found it to be excellent. I use tomcat in stand-alone mode during development but on deploying the web application to my web server I am experiancing a few problems which I hope you learned fellows might be able to help me with. Firstly here is my set-up: Red Hat 6.2 Apache 1.3.12 Tomcat 3.2 Beta8 (using mod_jk) And now here are my questions: 1. Apache does not recognise the jsessionid appended by Tomcat. I am aware of the following RewriteRule but when I tried this the problem remained. IfModule mod_rewrite.c RewriteEngine On RewriteRule ^(/.*;jsessionid=.*)$ $1 [T=jserv-servlet] /IfModule I guess the jserv-servlet mime type is for mod_jserv users. How to I add this mime-type to allow me to handle requests with mod_jk? Alternatively, I have thought of adding the following to my config to achieve the same result: JkMount /appdir/*;jsessionid=* ajp13 Where appdir is the appropriate application context. It seems to work ok. Does this seem feasible? 2. Secondly, I am having major problems with caching under MSIE. I am using the templating tags to give a uniform layout to all of my pages. I am also following the model demonstrated by the struts-example application where more than one function is carried out per Action (using an 'action' parameter to control this). However, this results in different pages being displayed depending on request parameters and IE seems to ignore this and just pull out the cached version. I have set the nocache=true in the init config for the action servlet but this has made no difference. Can anybody help me with either of these problems? It would be a shame if I had to abandon Struts after having come so far. Many thanks, -James
RE: Url Rewrting and Cache problems
For IE, in html page if you use meta tag for pragma, no-cache, still it will cache it...but if you use response.setHeader, IE won't do it...so to be on safer side, use at both place.. Nishit -Original Message- From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 5:25 PM To: '[EMAIL PROTECTED]' Subject: RE: Url Rewrting and Cache problems This may work for IE. IE has the option of either caching or not caching (if you use this meta-tag option). Personally i would not trust this to work on IE cause i have been there. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 5:18 PM To: '[EMAIL PROTECTED]' Subject: RE: Url Rewrting and Cache problems i think this is solution for all browsers... use meta tag in html for pragma no-cache and also use response.setHeader("Pragma","no-cache") from server side.. this should work for IE also.. Nishit -Original Message- From: James Maggs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 5:12 PM To: [EMAIL PROTECTED] Subject: Re: Url Rewrting and Cache problems Further to my previous email, the caching in IE is becoming beyond a joke. The browser seems to just pick files at random from the cache when it displays a page. In response to a request for the root index.jsp file for my site it returned the source of an external javascript file linked to the document it was just displaying!!! I know this is a problem with IE and not struts itself but has anyone found a solution to the caching problem? And, moreover, a solution that works across all browsers? Many thanks, -James - Original Message - From: "James Maggs" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 11, 2001 6:11 PM Subject: Url Rewrting and Cache problems Hi There, I am developing my new website using struts and have found it to be excellent. I use tomcat in stand-alone mode during development but on deploying the web application to my web server I am experiancing a few problems which I hope you learned fellows might be able to help me with. Firstly here is my set-up: Red Hat 6.2 Apache 1.3.12 Tomcat 3.2 Beta8 (using mod_jk) And now here are my questions: 1. Apache does not recognise the jsessionid appended by Tomcat. I am aware of the following RewriteRule but when I tried this the problem remained. IfModule mod_rewrite.c RewriteEngine On RewriteRule ^(/.*;jsessionid=.*)$ $1 [T=jserv-servlet] /IfModule I guess the jserv-servlet mime type is for mod_jserv users. How to I add this mime-type to allow me to handle requests with mod_jk? Alternatively, I have thought of adding the following to my config to achieve the same result: JkMount /appdir/*;jsessionid=* ajp13 Where appdir is the appropriate application context. It seems to work ok. Does this seem feasible? 2. Secondly, I am having major problems with caching under MSIE. I am using the templating tags to give a uniform layout to all of my pages. I am also following the model demonstrated by the struts-example application where more than one function is carried out per Action (using an 'action' parameter to control this). However, this results in different pages being displayed depending on request parameters and IE seems to ignore this and just pull out the cached version. I have set the nocache=true in the init config for the action servlet but this has made no difference. Can anybody help me with either of these problems? It would be a shame if I had to abandon Struts after having come so far. Many thanks, -James
RE: Url Rewrting and Cache problems
Hi all, I have a cheesy but functional solution that has seemed to work in the past. Append a bogus argument to your URL, whose value is the current time in milliseconds, so that your URL looks sort of like this: http://localhost/somepage.jsp?dummyarg=94023134255 Your browsers will not cache the page(s) at all, because the URL will be different each time. Iraklis -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 4:29 PM To: '[EMAIL PROTECTED]' Subject: RE: Url Rewrting and Cache problems For IE, in html page if you use meta tag for pragma, no-cache, still it will cache it...but if you use response.setHeader, IE won't do it...so to be on safer side, use at both place.. Nishit -Original Message- From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 5:25 PM To: '[EMAIL PROTECTED]' Subject: RE: Url Rewrting and Cache problems This may work for IE. IE has the option of either caching or not caching (if you use this meta-tag option). Personally i would not trust this to work on IE cause i have been there. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 5:18 PM To: '[EMAIL PROTECTED]' Subject: RE: Url Rewrting and Cache problems i think this is solution for all browsers... use meta tag in html for pragma no-cache and also use response.setHeader("Pragma","no-cache") from server side.. this should work for IE also.. Nishit -Original Message- From: James Maggs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 5:12 PM To: [EMAIL PROTECTED] Subject: Re: Url Rewrting and Cache problems Further to my previous email, the caching in IE is becoming beyond a joke. The browser seems to just pick files at random from the cache when it displays a page. In response to a request for the root index.jsp file for my site it returned the source of an external javascript file linked to the document it was just displaying!!! I know this is a problem with IE and not struts itself but has anyone found a solution to the caching problem? And, moreover, a solution that works across all browsers? Many thanks, -James - Original Message - From: "James Maggs" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 11, 2001 6:11 PM Subject: Url Rewrting and Cache problems Hi There, I am developing my new website using struts and have found it to be excellent. I use tomcat in stand-alone mode during development but on deploying the web application to my web server I am experiancing a few problems which I hope you learned fellows might be able to help me with. Firstly here is my set-up: Red Hat 6.2 Apache 1.3.12 Tomcat 3.2 Beta8 (using mod_jk) And now here are my questions: 1. Apache does not recognise the jsessionid appended by Tomcat. I am aware of the following RewriteRule but when I tried this the problem remained. IfModule mod_rewrite.c RewriteEngine On RewriteRule ^(/.*;jsessionid=.*)$ $1 [T=jserv-servlet] /IfModule I guess the jserv-servlet mime type is for mod_jserv users. How to I add this mime-type to allow me to handle requests with mod_jk? Alternatively, I have thought of adding the following to my config to achieve the same result: JkMount /appdir/*;jsessionid=* ajp13 Where appdir is the appropriate application context. It seems to work ok. Does this seem feasible? 2. Secondly, I am having major problems with caching under MSIE. I am using the templating tags to give a uniform layout to all of my pages. I am also following the model demonstrated by the struts-example application where more than one function is carried out per Action (using an 'action' parameter to control this). However, this results in different pages being displayed depending on request parameters and IE seems to ignore this and just pull out the cached version. I have set the nocache=true in the init config for the action servlet but this has made no difference. Can anybody help me with either of these problems? It would be a shame if I had to abandon Struts after having come so far. Many thanks, -James
How to use the html:image tag?
Hello, How do you use html:image tag inside my html:tag? I need to have two image buttons namely login, forgotPassword. Which is the right one to use, either the html:image tag or directly use the input type=image? Say for example I define the html:image inside my html:form tag as .. html:form action="/login" focus="userId" UserId: html:text property="userId" size="15" maxlength="15" / br Password: html:password property="password" size="16" maxlength="16" / br html:image page="/images/login.gif" alt="Login" property="loginButton" / html:image page="/images/forgotpassword.gif" alt="Forgot Password" property="forgotPasswordButton" / /html:form What methods should I code inside my LoginForm corresponding to those two buttons? I'm more concerned about whether a particular button is clicked rather then their co-ordinates. Thanks Senthil Kumar.S ** The Information transmitted herewith is sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
html:select with indexed property problem
Hi, I'm having trouble getting an html:select tag to properly set an indexed bean property. The tag I'm using looks like: html:select property="values[0]" My Action form includes the following: protected String[]mValues; public void setValues(int index, String value) { if (mValues == null) { mValues = new String[10]; } mValues[index] = value; } public String getValues(int index) { return mValues[index]; } public String[] getValues() { return mValues; } public void setValues(String[] vals) { mValues = vals; } The attempt to set the values[0] property fails in the SelectTag doStartTag() method with an InvocationTargetException, which results in the following JspException: Root cause: javax.servlet.jsp.JspException: Getter for property values[0] threw exception: java.lang.NullPointerException: at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:301) I've successfully used the same form, and set the indexed properties using html:hidden, but cannot get the html:select to work. Any thoughts? Thanks, Dennis
RE: Confusion with form beans
Craig, Thanks for that. I'd been passing stuff as session var's, but grabbing the next page's form is much cleaner. Having problems getting it working though - seems to be creating a blank new form in the action I forward to. In the action after the first page is submitted, I did the following: //set parameters we need for next page in it's form bean LogForm logForm = new LogForm(); logForm.setFilename(filename); logForm.setEntryPoints(entryPoints); //add in request scope request.setAttribute("LogForm", logForm); // Forward control to the parameters page return(mapping.findForward("success")); (have in struts_config: forward name="success" path="/ShowLog.do" / for this action) However, when I grab the form that I get in the ShowLogAction, it seems to create a new blank form. If I actually get the form from the request object by doing LogForm myLogForm = (LogForm) request.getAttribute("LogForm"); I do get the form I created! The name of the form in struts-config is LogForm - so don't understand it. Any ideas? Dave "Craig R. McClanahan" [EMAIL PROTECTED] on 04/09/2001 10:47:46 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: Confusion with form beans On Wed, 4 Apr 2001 [EMAIL PROTECTED] wrote: Nigel, Hi. Just to confirm...I would really like to have access to the first form in the action that creates the second form. Can I do that, or do I have to pass the info in as parameters? ie will the first bean PERSIST in the session so I can access it in the following action? It seems that the persisting way is much cleaner. Please let me know if that doesn't make sense!! Dave I *think* the following approach is what you are asking for: * Two forms, "form1.jsp" and "form2.jsp". * Each form has an associated bean ("form1Bean" and "form2Bean"). * Have the "form1.jsp" page submit to an action "/saveForm1". * The corresponding Action for "/saveForm1" can then: - Receive the form1Bean bean that contains the form1.jsp fields - Create a new form2Bean instance, and store it in request scope - Forward to "form2.jsp" * Now, the bean for "form2.jsp" will be pre-initialized, based on whatever processing was done by the Action. This can, of course, including things like copying values from the form1Bean instance. Craig McClanahan
RE: Use of Mapping in ActionForm's validate() method
I use mapping.getName() as part of my user input validation strategy. Basically its part of the key for retrieving validation rules out from my resources file. For example, my "contactForm" would use the following keys: contactForm.required.fields=firstName,lastName,emailAddress contactForm.email.fields=emailAddress contactForm.date.fields=birthDate If your curious, see the attached ValidatingForm, ValidatingFormAdapter ContactForm Feedback is always welcome.. Levi Cook -Original Message- From: Rajan Gupta [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 2:33 PM To: [EMAIL PROTECTED] Subject: Use of Mapping in ActionForm's validate() method Hi! All Can anybody provide me with a use for mapping parameter in validate() method of ActionForm? If u have used this parameter for something please let me know. Thanks in advance. Rajan __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ ValidatingForm.java ValidatingFormAdapter.java ContactForm.java
RE: Confusion with form beans
I am not sure what the default is but you should specify redirect="false" if you are passing things on the request object. That will cause a forward instead of a redirect. If the default for redirect is true then the /ShowLog.do action will be requested with a new request. forward name="success" path="/ShowLog.do" redirect="false" / -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 6:02 PM To: [EMAIL PROTECTED] Subject: RE: Confusion with form beans Craig, Thanks for that. I'd been passing stuff as session var's, but grabbing the next page's form is much cleaner. Having problems getting it working though - seems to be creating a blank new form in the action I forward to. In the action after the first page is submitted, I did the following: //set parameters we need for next page in it's form bean LogForm logForm = new LogForm(); logForm.setFilename(filename); logForm.setEntryPoints(entryPoints); //add in request scope request.setAttribute("LogForm", logForm); // Forward control to the parameters page return(mapping.findForward("success")); (have in struts_config: forward name="success" path="/ShowLog.do" / for this action) However, when I grab the form that I get in the ShowLogAction, it seems to create a new blank form. If I actually get the form from the request object by doing LogForm myLogForm = (LogForm) request.getAttribute("LogForm"); I do get the form I created! The name of the form in struts-config is LogForm - so don't understand it. Any ideas? Dave "Craig R. McClanahan" [EMAIL PROTECTED] on 04/09/2001 10:47:46 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: Confusion with form beans On Wed, 4 Apr 2001 [EMAIL PROTECTED] wrote: Nigel, Hi. Just to confirm...I would really like to have access to the first form in the action that creates the second form. Can I do that, or do I have to pass the info in as parameters? ie will the first bean PERSIST in the session so I can access it in the following action? It seems that the persisting way is much cleaner. Please let me know if that doesn't make sense!! Dave I *think* the following approach is what you are asking for: * Two forms, "form1.jsp" and "form2.jsp". * Each form has an associated bean ("form1Bean" and "form2Bean"). * Have the "form1.jsp" page submit to an action "/saveForm1". * The corresponding Action for "/saveForm1" can then: - Receive the form1Bean bean that contains the form1.jsp fields - Create a new form2Bean instance, and store it in request scope - Forward to "form2.jsp" * Now, the bean for "form2.jsp" will be pre-initialized, based on whatever processing was done by the Action. This can, of course, including things like copying values from the form1Bean instance. Craig McClanahan
FW: FW: Fwd: China
Title: FW: FW: Fwd: China And while you are thinking about this email, ask your Congressmen why they vote every year to send billions of your tax dollars to the World Bank to be spent on development projects in China. Thisfrees up Chinese government funds that can thenbe used toward further development of the Chinese military--whose expenditures are increasing at a rate of 10% per year. BM__MailData Subject: China must release our military and our property Written by W. E. May Dianne May Harlingen,Texas Last Christmas my family was quite disturbed while shopping. It seemed everything was "MADE IN CHINA." Today, I went to the mall to purchase a pair of shoes. I went to several of the upgrade stores and found many items made in China. I encourage you to look at how much is being shipped into our country from the Republic of China. It is my understanding from our government that we are the # 2 country purchasing from China. Many of our factories are moving to China for "cheap" labor. There are electronics from most of the major manufacturers, apparel from Levi , Hagger, Carter Baby Clothes, among countless others-all produced in China. Now China is blaming the United States of America for the collision which occurred in international air space. This is where a military jet from the Chinese Air Force (and we understand a "HOTDOG" Pilot) collided with our U.S. Navy aircraft. What the Navy aircraft was doing is irrelevant. It was in international airspace. The writer of this piece is a pilot with over 8000 hours flying time. When a private or military aircraft broadcasts a "MAYDAY" on 121.5, the international frequency, all airports in any country are "Safe Havens" for the aircraft. Any airport receiving the "MAYDAY" call will open all runways for the distressed aircraft. In a "MAYDAY" situation, should the distressed aircraft make it to any runway; the country owning the runway is to receive that aircraft as an assistance to a Mayday Call. If you will watch the news, the Chinese are detaining 24 American service men and women, pouring over our aircraft, removing instruments and demanding an apology from the USA. We have nothing to apologize for and we should not oblige them further. HERE IS WHAT WE SHOULD DO--- Effective this date every person in America should tell the stores where they shop that until our Navy Personnel are released and our aircraft is released, there will be a BOYCOTT of all Chinese produced merchandise in this county. Please REMEMBER AMERICA...UNITE, STAND TOGETHER - against a country attempting to hold our military personnel. These are sons, daughters, mothers and fathers. We cannot allow this to continue. Our government is doing the diplomatic and military moves. We should aid and assist. Don't buy anything produced in China until we have resultsour people back home. PLEASE SEND THIS TO EVERY PERSON YOU KNOW. HIT the Chinese WHERE IT HURTS... IN THE POCKET. They will learn very soon how strong the American people are.Please send it to every person you know.
Parse Error in the tag library descriptor: Element web-app does not allow servlet here
Hello,I am using jakarta tomcat 3.1 and stuts.I get this errororg.apache.jasper.JasperException: Unable to open taglibrary /WEB-INF/struts.tld : Parse Error in the tag library descriptor: Element "web-app" does not allow "servlet" here. at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:672) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116) at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215) at org.apache.jasper.compiler.Parser.parse(Parser.java:1073) at org.apache.jasper.compiler.Parser.parse(Parser.java:1038) at org.apache.jasper.compiler.Parser.parse(Parser.java:1034) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182) at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:149) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338) at java.lang.Thread.run(Thread.java:484) when I try to acces a jsp page which has this lines:%@ page language="java" %%@ taglib uri="/WEB-INF/struts.tld" prefix="struts" %%@ taglib uri="/WEB-INF/app.tld" prefix="app" %...My web.xml file is:?xml version="1.0" encoding="ISO-8859-1"?!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"web-app !-- Database Initialization Servlet Configuration -- servlet servlet-namedatabase/servlet-name servlet-classro.necomm.sites.company.connection.LoadConnectionFactory/servlet-class init-param param-namedebug/param-name param-value2/param-value /init-param load-on-startup1/load-on-startup /servlet !-- Action Servlet Configuration -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuero.necomm.sites.company.ApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/action.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- EMAIL Servlet Configuration -- servlet servlet-nameemailForm/servlet-name servlet-classro.necomm.util.EMailFormServlet/servlet-class init-param param-nameconfigFile/param-name param-value/Config/EMailFormServletConfig.properties/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param load-on-startup3/load-on-startup /servlet servlet-mapping servlet-nameemailForm/servlet-name url-pattern/email/url-pattern /servlet-mapping !-- The Welcome File List -- welcome-file-list welcome-file/zeelandia/admin.jsp/welcome-file /welcome-file-list !-- Struts Tag Library Descriptor -- taglib taglib-uri/WEB-INF/struts.tld/taglib-uri taglib-location/WEB-INF/struts.tld/taglib-location /taglib !-- Application Tag Library Descriptor -- taglib taglib-uri/WEB-INF/app.tld/taglib-uri taglib-location/WEB-INF/app.tld/taglib-location /taglib/web-appWhat is wrong in my web.xml? I ask this because everything was ok before.Thank you in advance,Adrian
Finding DTD when disconnected from Internet
Well, here I am again - new problem. :| (BTW, thanks to all for helping, this is by far one of the best list I've been on). Problem: Okay, I've been working with WebSphere and JBoss to get a Struts app working. So far my efforts have been very successful. However, today I hit a new bug. Assume your PC is not connected to the Internet -- ie. its just a local app. In WebSphere in particular, but also in JBoss, Struts will fail because it goes out to find the DTD for web_app_2_2 from Sun and struts-config from the Jakarta site. After countless efforts to make Digester search for the DTD locally, I have had no success. I am required to use the SYSTEM identifier and not PUBLIC. The only thing I've had success with is making the two xml files standalone (ie. standalone="yes"). SAX returns beaucoup errors, but the app "half-works" -- pages will at least come up. Does anyone know how to fix this easily...without connecting the machine to the Net (it's an Intranet app). My knowledge of XML is okay, DTD's fairly week (incl. !DOCTYPE). Thanks, Chris Assenza
Re: Finding DTD when disconnected from Internet
Update to the latest nightly build, this problem was fixed about 5 weeks ago. -Rob "Assenza, Chris" wrote: Well, here I am again - new problem. :| (BTW, thanks to all for helping, this is by far one of the best list I've been on). Problem: Okay, I've been working with WebSphere and JBoss to get a Struts app working. So far my efforts have been very successful. However, today I hit a new bug. Assume your PC is not connected to the Internet -- ie. its just a local app. In WebSphere in particular, but also in JBoss, Struts will fail because it goes out to find the DTD for web_app_2_2 from Sun and struts-config from the Jakarta site. After countless efforts to make Digester search for the DTD locally, I have had no success. I am required to use the SYSTEM identifier and not PUBLIC. The only thing I've had success with is making the two xml files standalone (ie. standalone="yes"). SAX returns beaucoup errors, but the app "half-works" -- pages will at least come up. Does anyone know how to fix this easily...without connecting the machine to the Net (it's an Intranet app). My knowledge of XML is okay, DTD's fairly week (incl. !DOCTYPE). Thanks, Chris Assenza
RE: html:select with indexed property problem
I found my problem - sorry for the bother. I had an unitialized array in there that was getting returned to the SelectTag. Thanks anyway.. Dennis -Original Message- From: Dennis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 4:03 PM To: [EMAIL PROTECTED] Subject: html:select with indexed property problem Hi, I'm having trouble getting an html:select tag to properly set an indexed bean property. The tag I'm using looks like: html:select property="values[0]" My Action form includes the following: protected String[]mValues; public void setValues(int index, String value) { if (mValues == null) { mValues = new String[10]; } mValues[index] = value; } public String getValues(int index) { return mValues[index]; } public String[] getValues() { return mValues; } public void setValues(String[] vals) { mValues = vals; } The attempt to set the values[0] property fails in the SelectTag doStartTag() method with an InvocationTargetException, which results in the following JspException: Root cause: javax.servlet.jsp.JspException: Getter for property values[0] threw exception: java.lang.NullPointerException: at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:301) I've successfully used the same form, and set the indexed properties using html:hidden, but cannot get the html:select to work. Any thoughts? Thanks, Dennis
RE: Finding DTD when disconnected from Internet
Short of taking the nightly build, I just extracted the required DTDs out of the struts.jar file and put them beneath WEB-INF/classes (I'm using resin). That seemed to work fine, but, of course, it would be nice if the software could find them in struts.jar. ;-) Scott -Original Message- From: Rob Leland [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 4:13 PM To: [EMAIL PROTECTED] Subject: Re: Finding DTD when disconnected from Internet Update to the latest nightly build, this problem was fixed about 5 weeks ago. -Rob "Assenza, Chris" wrote: Well, here I am again - new problem. :| (BTW, thanks to all for helping, this is by far one of the best list I've been on). Problem: Okay, I've been working with WebSphere and JBoss to get a Struts app working. So far my efforts have been very successful. However, today I hit a new bug. Assume your PC is not connected to the Internet -- ie. its just a local app. In WebSphere in particular, but also in JBoss, Struts will fail because it goes out to find the DTD for web_app_2_2 from Sun and struts-config from the Jakarta site. After countless efforts to make Digester search for the DTD locally, I have had no success. I am required to use the SYSTEM identifier and not PUBLIC. The only thing I've had success with is making the two xml files standalone (ie. standalone="yes"). SAX returns beaucoup errors, but the app "half-works" -- pages will at least come up. Does anyone know how to fix this easily...without connecting the machine to the Net (it's an Intranet app). My knowledge of XML is okay, DTD's fairly week (incl. !DOCTYPE). Thanks, Chris Assenza
Re: My struts-template is broken - repeat (newbie)
I am having this same problem with i-planet App server v6.0 sp2 and struts from the april 5th nightly build. Did anyone else using struts on iAS face this problem? I had been playing with just the binary distribution. Does the change that Bram suggested still hold good? Or is my problem unrelated? Please let me know. Thanks for youe help Vijay From: bram Subject: Re: My struts-template is broken Date: Mon, 05 Mar 2001 17:16:26 -0800 we had the same problem over here(with ibm websphere), and fixed it by adding a pageContext.getout.flush() before the pageContext.include in the Include and get tags of the template tags. If you go thrue the cvs reposetory, than you can see that this line was in the source an month ago (or so) but it has been removerd(for the reasons check the comments in the cvs)... - Original Message - From: "Tom Miller" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 05, 2001 5:13 PM Subject: Re: My struts-template is broken Turned out the problem was using Tomcat 3.1, templates seem to work properly with Tomcat 3.2.1. Tom Miller wrote: Whew! Somehow or other my 1.0b1 struts-template webapp is refusing to place the header, sidebar, content and footer in their respective places as per the template. Instead these components are placed one after another vertically down my browser page. I've redeployed the 1.0b1 struts-template.war, rebooted Tomcat, rebooted the machine, started over. Tried Netscape and IE5. Even replicated the process on another computer. Does anyone know why this might happen? It may a cockpit error, but I'm at a loss. I think I saw it working correctly the first time I looked at it today, but now I'm doubting that memory. TIA -- Tom Miller Miller Associates, Inc. [EMAIL PROTECTED] 641.469.3535 Phone 413.581.6326 FAX -- Tom Miller Miller Associates, Inc. [EMAIL PROTECTED] 641.469.3535 Phone 413.581.6326 FAX
Date formatting (simple question)
Hi folks, Can I format java.util.Date presentations with bean:write, or do I need to do something at the property getter? TKS. Matt.
RE: My struts-template is broken - iPlanet Application Server 6.0 sp2 and Struts (newbie)
Yes. This problem is solved after incorporating Bram's suggestion. Going through the archive worked out well!!! Thanks -Original Message- From: Vijaya Narasimha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 6:17 PM To: '[EMAIL PROTECTED]' Subject: Re: My struts-template is broken - repeat (newbie) I am having this same problem with i-planet App server v6.0 sp2 and struts from the april 5th nightly build. Did anyone else using struts on iAS face this problem? I had been playing with just the binary distribution. Does the change that Bram suggested still hold good? Or is my problem unrelated? Please let me know. Thanks for youe help Vijay -- -- From: bram Subject: Re: My struts-template is broken Date: Mon, 05 Mar 2001 17:16:26 -0800 -- -- we had the same problem over here(with ibm websphere), and fixed it by adding a pageContext.getout.flush() before the pageContext.include in the Include and get tags of the template tags. If you go thrue the cvs reposetory, than you can see that this line was in the source an month ago (or so) but it has been removerd(for the reasons check the comments in the cvs)... - Original Message - From: "Tom Miller" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 05, 2001 5:13 PM Subject: Re: My struts-template is broken Turned out the problem was using Tomcat 3.1, templates seem to work properly with Tomcat 3.2.1. Tom Miller wrote: Whew! Somehow or other my 1.0b1 struts-template webapp is refusing to place the header, sidebar, content and footer in their respective places as per the template. Instead these components are placed one after another vertically down my browser page. I've redeployed the 1.0b1 struts-template.war, rebooted Tomcat, rebooted the machine, started over. Tried Netscape and IE5. Even replicated the process on another computer. Does anyone know why this might happen? It may a cockpit error, but I'm at a loss. I think I saw it working correctly the first time I looked at it today, but now I'm doubting that memory. TIA -- Tom Miller Miller Associates, Inc. [EMAIL PROTECTED] 641.469.3535 Phone 413.581.6326 FAX -- Tom Miller Miller Associates, Inc. [EMAIL PROTECTED] 641.469.3535 Phone 413.581.6326 FAX
GUI classes, and a config file problem
Hi Susan, To patch the webgui, do this: 1) remove the tomcat/webapps/ROOT/WEB-INF/classes directory 2) copy the file 'classes.jar' from gate into tomcat/webapps/ROOT/WEB-INF/. 3) run $JAVA_HOME/bin/jar -xf classes.jar (this will replace your old classes dir) 4) restart the webgui - check the log files for errors! I have a problem with the config file wizard. I need your help asap since Avasta is waiting on this. If you could look at it during your next long wait it would really help. On moonlight7 there's a config file at /webdev/webapps/ml-web/fixmeSusan.config . If you look at the file '/opt/stuff/simpleApp/logfile.log' (on the file system) you'll see that it's different from the one in the depot (which is /tmp/wiz/boxCapture61875.tmp/). Here's the problem: when I audit localhost using that config, the result is CONSISTENT even though that log file is different. Could you take a look at the config file and see what I'm doing wrong? I'm using /usr/local/moonlight/2.1.21-1234/. Thanks. John
RE: rollover effects on html:link
Doh! that looks like it'll do the trick but it has highlighted another problem... The link is generated inside an iterate and each image iteration is given it's own name so that the image swapping code can refernce it... the desired output is supposed to be along the lines: img name="image1" src="..."a href="..." onmouseover="swap('image1')... ... /a img name="image2" src="..."a href="..." onmouseover="swap('image2')... ... /a img name="image3" src="..."a href="..." onmouseover="swap('image3')... ... /a img name="image4" src="..."a href="..." onmouseover="swap('image4')... ... /a Has anyone done this before? Thanks again... Matt.
Re: GUI classes, and a config file problem
Doh! John Raley wrote: Hi Susan, To patch the webgui, do this: 1) remove the tomcat/webapps/ROOT/WEB-INF/classes directory 2) copy the file 'classes.jar' from gate into tomcat/webapps/ROOT/WEB-INF/. 3) run $JAVA_HOME/bin/jar -xf classes.jar (this will replace your old classes dir) 4) restart the webgui - check the log files for errors! I have a problem with the config file wizard. I need your help asap since Avasta is waiting on this. If you could look at it during your next long wait it would really help. On moonlight7 there's a config file at /webdev/webapps/ml-web/fixmeSusan.config . If you look at the file '/opt/stuff/simpleApp/logfile.log' (on the file system) you'll see that it's different from the one in the depot (which is /tmp/wiz/boxCapture61875.tmp/). Here's the problem: when I audit localhost using that config, the result is CONSISTENT even though that log file is different. Could you take a look at the config file and see what I'm doing wrong? I'm using /usr/local/moonlight/2.1.21-1234/. Thanks. John
html:option
I can't figure out the struts way to do this: html:select property="staffId" logic:iterate id="staffId" name="breakForm" property="staffIds" scope="request" OPTION value="bean:write name="staffId" property="key" /"bean:write name="staffId" property="value" //OPTION /logic:iterate /html:select The staffIds bean property is a hashtable. I wanted to use html:option or even html:options but the syntax eludes me. I can change the hashtable to some type of collection, but this way the screen looks right. The functionality of repopulate is missing, though because I'm not allowing struts to render the OPTION. Any ideas? Anthony It is by caffeine alone I set my mind in motion. It is by the Beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning. It is by caffeine alone I set my mind in motion.
RE: Debugging struts exceptions - get SP9 for WL5.1
It appears that SP9 for WebLogic5.1 (recently released) fixes this problem. The informative exception is now reported! -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Monday, April 09, 2001 10:33 PM To: [EMAIL PROTECTED] Subject: Re: Debugging struts exceptions On Wed, 4 Apr 2001, Will Spies/Towers Perrin wrote: I didn't get any response so I'm going to try again. Here is another exception: Wed Apr 04 10:53:26 EDT 2001:E WebAppServletContext-tpsampleapp Root cause of ServletException javax.servlet.ServletException: runtime failure in custom tag 'form' at jsp_servlet._employee._jspService(_employee.java, Compiled Code) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) You might want to complain to WebLogic about this. The actual exception that is thrown *does* contain a more useful error message -- it's just that WebLogic is not telling you about it. Alternatively, you can declare an error page to handle runtime errors. The Struts tags that throw exceptions store a copy of the underlying exception as a request attribute under key "org.apache.struts.action.EXCEPTION", so you can display it yourself. Craig McClanahan
A quick Struts project post-mortem
I'm just wrapping up a fairly major project which was built on top of Struts (thereby giving me a chance to learn it). I'm a little mixed about the experience, not being entirely sure the value add was there. I definitely feel "helped" by Struts' form validation infrastructure, and I would probably appreciate the message resource bundling more if my application needed to be internationalized (which it didn't). On the flip side, the Action/ActionMapping system, while elegant, only covered about half of my application (since I had to write roughly as many custom JSP tags as I did Struts actions). Lastly (and this last comment is independent of Struts), I've come to the conclusion that a strict adherence to the MVC pattern is by no means a magic pill to perfect application manageability.. that is, plenty of worms still manage to crawl out of the woodwork, and I have a sense that the Java community needs something more than just a good MVC system in order to build an elegent (and robust) web application. The application was also based upon EJB, for even more fun and complexity. On the tags vs. actions dilemma - I took the approach recommended in various other publications etc., which is: 1. if the Java code will alter your Model, then put it in an Action (or equivalent). 2. if the Java code is only reading your Model to aid in rendering some portions of it, the put it in a custom JSP tag. Some quick metrics and "factoids" about my project: 1. 19 Struts actions 2. 18 custom JSP tags (for which I could find little in Struts to add value) 3. 15 ActionForms 4. 13 database tables 5. Since the application uses EJB session beans for all business logic, virtually all of the Struts actions as well as JSP custom tags ended up being very shallow pass-throughs of parameters to the EJB bean, and return values back to the JSP pages. I'm wondering if there are others out there who have finished projects and reached similar conclusions as mine (in particular, about having to implement lots of Tags and not finding much value-add in incorporating Struts classes into them). I am also interested in someone graciously providing a birds-eye view of Struts and Turbine, with relative strengths and weaknesses. I'm sure that, on the whole, Turbine probably has a completely different "central focus" than Struts (apples and oranges), but as someone who is just coming off a Struts project and is a bit daunted by the Turbine "welcome literature" (as I was initially with Struts), I would sure love someone's overview from a Struts-centric perspective. Lastly, I'm not leaving this group, as I am responsible for managing the lifecycle of the application I've described above, even though development is basically "done" (for now!). Thanks, Bryan
Re: Date formatting (simple question)
Hello Matthew, Thursday, April 12, 2001, 5:55:21 AM, you wrote: MOH Can I format java.util.Date presentations with bean:write, or do I need to MOH do something at the property getter? You can do it in getter method and by special version of bean:write tag - with parameters to define formatting type and locale. I can send you one, if you interested. -- Best regards, Olegmailto:[EMAIL PROTECTED]
RE: A quick Struts project post-mortem
Bryan, I am also interested in someone graciously providing a birds-eye view of Struts and Turbine, with relative strengths and weaknesses. I'm sure You might check out these http://barracuda.enhydra.org/Barracuda/docs/landscape.html http://barracuda.enhydra.org/Barracuda/docs/events/sample_presentation_flows .html but keep in mind they're a little dated and may not provide the level of detail you're looking for. If anyone can make these better please let me know and I'd be happy to update it... I have a sense that the Java community needs something more than just a good MVC system in order to build an elegent (and robust) web application. I would contend that there's a big difference between Model 2 (which is "MVCish") and MVC (in the Swing sense, where you have strongly typed "model" interfaces, etc). In Barracuda we're trying to provide both: Model 2 event dispatching for flow control, plus strongly typed MVC UI components for actually manipulating/rendering client views. Whether or not it yields better mileage probably depends on your specific problem domain... Christian Christian Cryder [EMAIL PROTECTED] Barracuda - Open-source MVC Component Framework for Webapps http://barracuda.enhydra.org "What a great time to be a Geek" -Original Message- From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 9:12 PM To: [EMAIL PROTECTED] Subject: A quick Struts project post-mortem I'm just wrapping up a fairly major project which was built on top of Struts (thereby giving me a chance to learn it). I'm a little mixed about the experience, not being entirely sure the value add was there. I definitely feel "helped" by Struts' form validation infrastructure, and I would probably appreciate the message resource bundling more if my application needed to be internationalized (which it didn't). On the flip side, the Action/ActionMapping system, while elegant, only covered about half of my application (since I had to write roughly as many custom JSP tags as I did Struts actions). Lastly (and this last comment is independent of Struts), I've come to the conclusion that a strict adherence to the MVC pattern is by no means a magic pill to perfect application manageability.. that is, plenty of worms still manage to crawl out of the woodwork, and I have a sense that the Java community needs something more than just a good MVC system in order to build an elegent (and robust) web application. The application was also based upon EJB, for even more fun and complexity. On the tags vs. actions dilemma - I took the approach recommended in various other publications etc., which is: 1. if the Java code will alter your Model, then put it in an Action (or equivalent). 2. if the Java code is only reading your Model to aid in rendering some portions of it, the put it in a custom JSP tag. Some quick metrics and "factoids" about my project: 1. 19 Struts actions 2. 18 custom JSP tags (for which I could find little in Struts to add value) 3. 15 ActionForms 4. 13 database tables 5. Since the application uses EJB session beans for all business logic, virtually all of the Struts actions as well as JSP custom tags ended up being very shallow pass-throughs of parameters to the EJB bean, and return values back to the JSP pages. I'm wondering if there are others out there who have finished projects and reached similar conclusions as mine (in particular, about having to implement lots of Tags and not finding much value-add in incorporating Struts classes into them). I am also interested in someone graciously providing a birds-eye view of Struts and Turbine, with relative strengths and weaknesses. I'm sure that, on the whole, Turbine probably has a completely different "central focus" than Struts (apples and oranges), but as someone who is just coming off a Struts project and is a bit daunted by the Turbine "welcome literature" (as I was initially with Struts), I would sure love someone's overview from a Struts-centric perspective. Lastly, I'm not leaving this group, as I am responsible for managing the lifecycle of the application I've described above, even though development is basically "done" (for now!). Thanks, Bryan
A quick Struts project post-mortem
Bryan, I am also interested in someone graciously providing a birds-eye view of Struts and Turbine, with relative strengths and weaknesses. I'm sure You might check out these http://barracuda.enhydra.org/Barracuda/docs/landscape.html http://barracuda.enhydra.org/Barracuda/docs/events/sample_presentation_flows .html Keep in mind they're a little dated and may not provide the level of detail you're looking for. If anyone can make these better please let me know and I'd be happy to update them... I have a sense that the Java community needs something more than just a good MVC system in order to build an elegent (and robust) web application. I would contend that there's a big difference between Model 2 (which is "MVCish") and MVC (in the Swing sense, where you have strongly typed "model" interfaces, etc). In Barracuda we're trying to provide both: Model 2 event dispatching for flow control, plus strongly typed MVC UI components for actually manipulating/rendering client views. Whether or not it yields better mileage probably depends on your specific problem domain... Christian Christian Cryder [EMAIL PROTECTED] Barracuda - Open-source MVC Component Framework for Webapps http://barracuda.enhydra.org "What a great time to be a Geek" -Original Message- From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 9:12 PM To: [EMAIL PROTECTED] Subject: A quick Struts project post-mortem I'm just wrapping up a fairly major project which was built on top of Struts (thereby giving me a chance to learn it). I'm a little mixed about the experience, not being entirely sure the value add was there. I definitely feel "helped" by Struts' form validation infrastructure, and I would probably appreciate the message resource bundling more if my application needed to be internationalized (which it didn't). On the flip side, the Action/ActionMapping system, while elegant, only covered about half of my application (since I had to write roughly as many custom JSP tags as I did Struts actions). Lastly (and this last comment is independent of Struts), I've come to the conclusion that a strict adherence to the MVC pattern is by no means a magic pill to perfect application manageability.. that is, plenty of worms still manage to crawl out of the woodwork, and I have a sense that the Java community needs something more than just a good MVC system in order to build an elegent (and robust) web application. The application was also based upon EJB, for even more fun and complexity. On the tags vs. actions dilemma - I took the approach recommended in various other publications etc., which is: 1. if the Java code will alter your Model, then put it in an Action (or equivalent). 2. if the Java code is only reading your Model to aid in rendering some portions of it, the put it in a custom JSP tag. Some quick metrics and "factoids" about my project: 1. 19 Struts actions 2. 18 custom JSP tags (for which I could find little in Struts to add value) 3. 15 ActionForms 4. 13 database tables 5. Since the application uses EJB session beans for all business logic, virtually all of the Struts actions as well as JSP custom tags ended up being very shallow pass-throughs of parameters to the EJB bean, and return values back to the JSP pages. I'm wondering if there are others out there who have finished projects and reached similar conclusions as mine (in particular, about having to implement lots of Tags and not finding much value-add in incorporating Struts classes into them). I am also interested in someone graciously providing a birds-eye view of Struts and Turbine, with relative strengths and weaknesses. I'm sure that, on the whole, Turbine probably has a completely different "central focus" than Struts (apples and oranges), but as someone who is just coming off a Struts project and is a bit daunted by the Turbine "welcome literature" (as I was initially with Struts), I would sure love someone's overview from a Struts-centric perspective. Lastly, I'm not leaving this group, as I am responsible for managing the lifecycle of the application I've described above, even though development is basically "done" (for now!). Thanks, Bryan
Re: html:option
If you change staffIds to a Collection, i.e. staffIds.entrySet(), I *think* this will work: % Set set = staffIds.entrySet(); % html:select property="staffId" html:options collection="set" property="key" labelProperty="value"/ /html:select Anthony Martin wrote: I can't figure out the struts way to do this: html:select property="staffId" logic:iterate id="staffId" name="breakForm" property="staffIds" scope="request" OPTION value="bean:write name="staffId" property="key" /"bean:write name="staffId" property="value" //OPTION /logic:iterate /html:select The staffIds bean property is a hashtable. I wanted to use html:option or even html:options but the syntax eludes me. I can change the hashtable to some type of collection, but this way the screen looks right. The functionality of repopulate is missing, though because I'm not allowing struts to render the OPTION. Any ideas? Anthony It is by caffeine alone I set my mind in motion. It is by the Beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning. It is by caffeine alone I set my mind in motion.