Please unsubscribe me from this list!.
- Original Message - From: Drew Sudell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 25, 2002 15:54 Subject: RE: i18n - Escape Codes -Original Message- From: Rustad, Aaron [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 24, 2002 4:01 AM To: '[EMAIL PROTECTED]' Subject: i18n - Escape Codes I am trying i18n my application by adding a Resources_ru.properties, and it seems to work. However, I can not get the Unicode characters to work correctly. I have looked at HP's example, and they use unicode escapes for their messagesis there an easy way to convert Strings to Unicode strings? http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/native2ascii.html -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
question about logic:equal
hello What if there is no request attribute with name READ ? NPE ? logic:equal name=READ scope=request value=true /logic:equal Maris Orbidans -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
O'Reilly Example
Hi All, Has any one tried struts example from O'Reilly (onjava). Am getting the flowing error : Parsing of JSP File '/Login.jsp' failed: /Login.jsp(-1): Error in tag library at: 'form': The Tag class 'org.apache.struts.taglib.html.ImageTag' has no setter method corresponding to TLD declared attribute 'path', (JSP 1.1 spec, 5.4.1) probably occurred due to an error in /Login.jsp line -1: Wed Feb 27 12:08:17 GMT-05:00 2002 Weblogic Logic log Wed Feb 27 12:29:43 GMT-05:00 2002:E WebAppServletContext-strutsSample Servl et failed with Exception weblogic.servlet.jsp.JspException: (line -1): Error in tag library at: 'form': T he Tag class 'org.apache.struts.taglib.html.ImageTag' has no setter method corr esponding to TLD declared attribute 'path', (JSP 1.1 spec, 5.4.1) at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.init(Compiled Code) at java.lang.Exception.init(Compiled Code) at java.lang.RuntimeException.init(RuntimeException.java:47) at weblogic.servlet.jsp.JspException.init(JspException.java:9) at weblogic.servlet.jsp.JspException.init(JspException.java:14) at weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java: 138) at weblogic.servlet.jsp.StandardTagLib.processTag(Compiled Code) at weblogic.servlet.jsp.StandardTagLib.processTagElements(Compiled Code) at weblogic.servlet.jsp.StandardTagLib.init(StandardTagLib.java:125) at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:95) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(Compiled Code) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(Compiled Code) at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(Compiled Code) at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1817) at weblogic.servlet.jsp.JspLexer.mTOKEN(Compiled Code) at weblogic.servlet.jsp.JspLexer.nextToken(Compiled Code) at weblogic.servlet.jsp.JspLexer.parse(Compiled Code) at weblogic.servlet.jsp.JspParser.doit(Compiled Code) at weblogic.servlet.jsp.JspParser.parse(JspParser.java:125) at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:109) at weblogic.utils.compiler.CodeGenerator.generate(Compiled Code) at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:227) at weblogic.servlet.internal.ServletStubImpl.getServlet(Compiled Code) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code ) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled C ode) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled C ode) at weblogic.servlet.internal.ServletContextManager.invokeServlet(Compile d Code) at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code) at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code) at weblogic.kernel.ExecuteThread.run(Compiled Code) Thanks in advance. Tapas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Please unsubscribe me from this list!.
Click at the bottom of the page the : To unsubscribe, e-mail . Follow the instructions. Konstantina - Original Message - From: Jack King (Unix) [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:03 AM Subject: Please unsubscribe me from this list!. - Original Message - From: Drew Sudell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 25, 2002 15:54 Subject: RE: i18n - Escape Codes -Original Message- From: Rustad, Aaron [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 24, 2002 4:01 AM To: '[EMAIL PROTECTED]' Subject: i18n - Escape Codes I am trying i18n my application by adding a Resources_ru.properties, and it seems to work. However, I can not get the Unicode characters to work correctly. I have looked at HP's example, and they use unicode escapes for their messagesis there an easy way to convert Strings to Unicode strings? http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/native2ascii.html -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
using digester and struts in an EAR file
I hava build all my source into an ear file that includes a webapp and ejb jar. But I got an error can't find org.apache.struts.taglib., it means the struts.jar can not be found in the classloader. So I use them - war and jar - seperately, it works! Am I missing something? Can anyone help me? Thanks, Wind
RE: using digester and struts in an EAR file
Did you include the application.xml in the Meta-Inf folder refer the URL http://e-docs.bea.com/wls/docs61/deployment/deployment.html#1179468 for further details -Original Message- From: wind.li [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 12:38 PM To: [EMAIL PROTECTED] Subject: using digester and struts in an EAR file I hava build all my source into an ear file that includes a webapp and ejb jar. But I got an error can't find org.apache.struts.taglib., it means the struts.jar can not be found in the classloader. So I use them - war and jar - seperately, it works! Am I missing something? Can anyone help me? Thanks, Wind This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Multiple Form Beans for the same for the same action
Hi Guyz, I have multiple forms submitted to the same action. Also both these forms are on the same page only one of the forms are rendered based on some condition. Unfortunately, the form bean is not getting instantiated ... I think the code that I've written is right but obviously therez some problem. I've listed the code below. Herez what the JSP looks like -- body % String param=request.getParameter(param); if((param!=null) (param.equals(first))) { % html:form action=/test name=first type=test.FormBeanOne scope=request html:submit value=First Hit / /html:form % } else { % html:form action=/test name=second type=test.FormBeanTwo scope=request html:submit value=Second Hit / /html:form % } % /body Since I'm giving the form name type in the form tag I do not mention this in my struts-config.xml. The action mapping of the struts-config is listed below : action-mappings action path=/test type=test.TestMultiFormAction validate=true /action /action-mappings Do you see anything wrong with what I've done ... Thanx in advance ... Cheers, VD. __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: The message during startup
Turn off your monitor. Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 10:40 PM Everytime the web server start, a lot of message shows in std out or startup log. How can I disable the message during startup? Regards, Vincent -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: The message during startup
Vincent, go to your start webserver script and set echo off -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 10:40 PM Everytime the web server start, a lot of message shows in std out or startup log. How can I disable the message during startup? Regards, Vincent -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [ANNOUNCE] Struts Console v1.5
How can I integrate with Together? Cal -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 14:52 To: Struts Users Mailing List Subject: [ANNOUNCE] Struts Console v1.5 Struts Console version 1.5 is now available. http://www.jamesholmes.com/struts/ http://www.jamesholmes.com/struts/struts-console-1.5.zip This release is a small bug release fix that I just wanted to get out there for those who are/were effected by some of the outstanding bugs Changes with Struts Console v1.5 *) Added ability to edit properties. *) Fixed bug with JBuilder plugin where exceptions were being thrown when JSP files were opened in JBuilder. *) Fixed NetBeans/Forte module to handle invalid config files. *) Fixed NetBeans/Forte module to support read only files. Thanks, -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
isCancelled() - method required to reset cancelled flag
Hi All, I've got the Cancel button on my forms. It is a heirarchy data structure for a eVote / poll app. First form creates a question set Then you can go to the next form and create a question They you can go to the 3rd form and create a question option In my Actions, I check at the start to see isCancelled() and if so, redirect to the previous form. However on the 3rd form, the Action redirects to the 2nd form via its Action but since the isCancelled() is still true, it also redirects to the first form. I need somehow to reset the flag when I first check the isCancelled(), so that the successive Actions do not read it as well. However the Constants.CANCEL_PROPERTY flags are actually request.getParameter settings, so I can't change them. I like to suggest an request Attribute that gets set somewhere early on, so that I can reset it. Does this sound generally useful, or am I wandering off on my own little tangent? Thanks Adam Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: question about logic:equal
I'd guess yes - but why don't you try it out tell us the answer? --- Maris Orbidans [EMAIL PROTECTED] wrote: hello What if there is no request attribute with name READ ? NPE ? logic:equal name=READ scope=request value=true /logic:equal Maris Orbidans -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = ~~ Search the archive:- http://www.mail-archive.com/struts-user%40jakarta.apache.org/ ~~ Keith Bacon - Looking for struts work - South-East UK. phone UK 07960 011275 __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: speed of struts
On Mon, Feb 11, 2002 at 03:01:12PM +, [EMAIL PROTECTED] wrote: I'm curious as to the limit here. I'm currently building an app which has huge form requirements - I may have upwards of 500 fields as html text inputs -- very spreadsheet like. Where is the limitation? Rendering into html, or parsing the request into beans? I've had not problems so far with rendering speed, though I'm using Mozilla, so browser speed hasn't been noticable to far.. I've just finished a struts project where I had to move to scriptlets away from struts tags for presentation logic. The problem was that every now and then the GC would take a second or so to run. This struck me as a VM issue (and may still have been, although it happened under linux jdk1.2.2 and 1.3.1), but when I profiled the page I found that the handful of tags I was using (10 - 20 logic equals, a few logic:iterates) were generating 6M of garbage. Is this typical for all taglibs? I dislike developing with scriptlets, but that's a pretty big performance hit to have to take for a bit of maintainability. Is this the same factor that limits pages to 50 form tags? What's the best solution for pages with complex presentation logic? jim Jim Downing [EMAIL PROTECTED] -Original Message- From: husted Sent: 06 February 2002 13:50 To: struts-user Cc: husted Subject: Re: speed of struts This comes up fairly often, and around 50 does seem to be a cut-off point for some reason. A number of things can affect the speed the form renders, including the browser and, as mentioned, the JVM. One interesting thing would be to try the same page under VelServlet. http://husted.com/struts/resources/velservlet.htm This is a drop-in extension, and you can mix and match Velocity templates with JSPs in the same application. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Struts wrote: I found out that if I include a lot of html form fields in a form (over 50). The jsp pages seems to be awfully slow to load (almost 10 seconds). I made it a little bit faster when I converted all radio button sets to drop down list, still it is very slow. The speed to load up seems to exponentially related to the number of form fields. Has anybody got the same problem? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: question about logic:equal
The answer is Yes :-) Maris -Original Message- From: keithBacon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:15 PM To: Struts Users Mailing List Subject: Re: question about logic:equal I'd guess yes - but why don't you try it out tell us the answer? --- Maris Orbidans [EMAIL PROTECTED] wrote: hello What if there is no request attribute with name READ ? NPE ? logic:equal name=READ scope=request value=true /logic:equal Maris Orbidans -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = ~~ Search the archive:- http://www.mail-archive.com/struts-user%40jakarta.apache.org/ ~~ Keith Bacon - Looking for struts work - South-East UK. phone UK 07960 011275 __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: question about logic:equal
thanks mate! --- Mâris Orbidâns [EMAIL PROTECTED] wrote: The answer is Yes :-) Maris -Original Message- From: keithBacon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:15 PM To: Struts Users Mailing List Subject: Re: question about logic:equal I'd guess yes - but why don't you try it out tell us the answer? --- Maris Orbidans [EMAIL PROTECTED] wrote: hello What if there is no request attribute with name READ ? NPE ? logic:equal name=READ scope=request value=true /logic:equal Maris Orbidans -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = ~~ Search the archive:- http://www.mail-archive.com/struts-user%40jakarta.apache.org/ ~~ Keith Bacon - Looking for struts work - South-East UK. phone UK 07960 011275 __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = ~~ Search the archive:- http://www.mail-archive.com/struts-user%40jakarta.apache.org/ ~~ Keith Bacon - Looking for struts work - South-East UK. phone UK 07960 011275 __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Displaying an array of Strings
What's a FileFolder? Mark -Original Message- From: Tadashi Ishikawa [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 8:05 PM % String [] fileNames = FileFolder.list(path); pageContext.setAttribute("Files", fileNames, PageContext.PAGE_SCOPE); % -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
User Registration with Struts query
I have a question regarding registering new users of a struts web app. If the web app is using container managed security, and say form-based authentication, and a registration action is available for new users, is there a way to implement the registration process that is portable ? For instance, if user info is stored in a 'database', the container manages the authentication checks during login. However when a new user completes the registration, the registraion action then needs to 'add' this user, but I dont really want to put the specifics of the user database etc into the registering action, as it may be deployed using LDAP somewhere else. All the other security stuff seems to be portable across implementations, and i know the spec doesnt deal with maintaining users, but does this really mean that I need to implement specific registration for each different user 'database' that may be used ? Ideally I want to do something like: realm.addUser(...) where 'realm' is the user database (LDAP, RDBMS whatever) which would keep the registration action portable. (Note: when I talk about the registration action being portable, i know in real terms this stuff would be in a helper bean/business delegate, so I could have different delegates deal with different databases - i just wanted to keep the question simple, so I say the registration action.) How have you dealt with this ? Is there a portable solution ? Thanks for any feedback Ghoot Emaho Development Team Leader Petrotechnics http://www.petrotechnics.co.uk/ Ltd
Re: Form Bean problem
if you can't solve it post the whole lot! --- Tim Sawyer [EMAIL PROTECTED] wrote: KeithBacon [EMAIL PROTECTED] wrote : does the form work OK if you remove dateOfBirth but leave the other form fields? Nope. I only have two fields on the form, and if I remove date of birth it complains about the second one... Is it possible you have 1 mapping that puts the form in the session another one that puts another form in the request but with the same name? That would explain it if you can find the form bean but struts doesn't? Or even give you 2 beans with same name but of different types. Hmmm. Unlikely. There are only four form beans defined in my struts-config.xml, and they all have unique names. Perhaps remove focus=dateOfBirth just in case Done that... err ran out of ideas for now! More tomorrow morning, but you must have the ansewr by then.! lol, you would think so! This is daft, it's got to be something obvious and simple! Perhaps time to step back and try and write the code again from scratch...if you hear a scream, I've got the same error again... Cheers, Tim. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = ~~ Search the archive:- http://www.mail-archive.com/struts-user%40jakarta.apache.org/ ~~ Keith Bacon - Looking for struts work - South-East UK. phone UK 07960 011275 __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Form Bean problem
I'm using the do something else and then come back to it debugging technique today, I'll get back onto this stuff later today or tomorrow... Tim. -Original Message- From: keithBacon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:54 PM To: Struts Users Mailing List; Tim Sawyer Subject: Re: Form Bean problem if you can't solve it post the whole lot! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How can I make my application international?
Could also try reading Jason Hunter's Java Servlet Programming, 2d ed., Chapter 13, or simply STFW. Mark -Original Message- From: Louis Leung [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 5:51 PM http://tagunov.newmail.ru/i18n/i18n.html I've been posting this link too many times .. :) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: speed of struts
I'm interested in hearing other opinion on this. I personally find the logic present/equals tags to be ugly and cumbersome (not to mention inefficient in terms of the generated servlet) and often find myself resorting to simple if/else scriptlets instead. I'm not sure the logic tags win even from a maintainabilit point of view. How does everyone else deal with complex display logic? Do you use the logic tags? -Original Message- From: Jim Downing [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 8:17 AM To: Struts Users Mailing List Subject: Re: speed of struts On Mon, Feb 11, 2002 at 03:01:12PM +, [EMAIL PROTECTED] wrote: I'm curious as to the limit here. I'm currently building an app which has huge form requirements - I may have upwards of 500 fields as html text inputs -- very spreadsheet like. Where is the limitation? Rendering into html, or parsing the request into beans? I've had not problems so far with rendering speed, though I'm using Mozilla, so browser speed hasn't been noticable to far.. I've just finished a struts project where I had to move to scriptlets away from struts tags for presentation logic. The problem was that every now and then the GC would take a second or so to run. This struck me as a VM issue (and may still have been, although it happened under linux jdk1.2.2 and 1.3.1), but when I profiled the page I found that the handful of tags I was using (10 - 20 logic equals, a few logic:iterates) were generating 6M of garbage. Is this typical for all taglibs? I dislike developing with scriptlets, but that's a pretty big performance hit to have to take for a bit of maintainability. Is this the same factor that limits pages to 50 form tags? What's the best solution for pages with complex presentation logic? jim Jim Downing [EMAIL PROTECTED] -Original Message- From: husted Sent: 06 February 2002 13:50 To: struts-user Cc: husted Subject: Re: speed of struts This comes up fairly often, and around 50 does seem to be a cut-off point for some reason. A number of things can affect the speed the form renders, including the browser and, as mentioned, the JVM. One interesting thing would be to try the same page under VelServlet. http://husted.com/struts/resources/velservlet.htm This is a drop-in extension, and you can mix and match Velocity templates with JSPs in the same application. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Struts wrote: I found out that if I include a lot of html form fields in a form (over 50). The jsp pages seems to be awfully slow to load (almost 10 seconds). I made it a little bit faster when I converted all radio button sets to drop down list, still it is very slow. The speed to load up seems to exponentially related to the number of form fields. Has anybody got the same problem? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How best to get SQL:JDBC data?
Hello Everyone, I am new to using struts and I have a design issue. Is it better to use an Action servlet to create a bean of data from a database, or is it better to create a taglibs that would return the bean. Another solution could be to use the dbTag taglibs from the Jakarta-taglibs and build the bean using jsp scripts (but I have read that this is not the ideal way if you are using the struts framework). My query is to find data in our inventory table, currently the system scripts the database (SQL:jdbc) calls as a jsp script and has different jsp:include files to return either prices or descriptions and create the form. Even if you have url links that I can do more research that would be great. I do have the WROX's Professional JSP 2nd edition, but so far I have not come across any examples using the jdbc database. I have set the database up using the datasource as suggest in the Utilities section of the struts documentation. // eom //Michael A. Brooke //Magstar Inc. // e-mail: [EMAIL PROTECTED] // phone: (416) 447-1442 x 273
AW: How best to get SQL:JDBC data?
Hi Mike, normally i take the Action classes to collect all my data. Maybe you should implement a Data Access Object which offers an API to access the database and returns the result. In the action you collect all the data you need (means you use the methods of your DAO ) and then on the JSP you simply present the collected Data. So you seperate business logic from database access and from presentation Oliver -Ursprungliche Nachricht- Von: Mike Brooke [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 27. Februar 2002 15:06 An: Struts Users Mailing List Betreff: How best to get SQL:JDBC data? Hello Everyone, I am new to using struts and I have a design issue. Is it better to use an Action servlet to create a bean of data from a database, or is it better to create a taglibs that would return the bean. Another solution could be to use the dbTag taglibs from the Jakarta-taglibs and build the bean using jsp scripts (but I have read that this is not the ideal way if you are using the struts framework). My query is to find data in our inventory table, currently the system scripts the database (SQL:jdbc) calls as a jsp script and has different jsp:include files to return either prices or descriptions and create the form. Even if you have url links that I can do more research that would be great. I do have the WROX's Professional JSP 2nd edition, but so far I have not come across any examples using the jdbc database. I have set the database up using the datasource as suggest in the Utilities section of the struts documentation. // eom //Michael A. Brooke //Magstar Inc. // e-mail: [EMAIL PROTECTED] // phone: (416) 447-1442 x 273 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: contains tag
Cool! Thanks for sharing. Mark -Original Message- From: Torgeir Veimo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 9:32 AM I've created a contains tag. It basically checks wether a key or a value is contained in a map, or if a value is contained in a collection / enumeration etc. Isn't this a logical extension of the logic taglib? I've attached a tld file and source file. -- -Torgeir -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to include struts.jar the proper way
I get the following error when i run my struts-application, and it tries to instantiate my ActionForm class: java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm As I see from the archives this is a pretty common problem, however none of the solutions i've found here seem to work, and many of them condradict eachother () This is my setup: - struts.jar is included in my WEB-INF/lib directory - struts.jar is not included in my server (WL6.1) lib directory or in its classpath - my application is deployed as an .ear (and must be) I've tried: - exluding WEB-INF/lib/struts.jar when building my .ear (using ant), both with and without struts.jar in the WL classpath and lib Any good suggestions on what's wrong? Thanks in advance - Ida ...mogul technology as... mogul technology ida dørum - software engineer mailto:[EMAIL PROTECTED] www.mogul.no ... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Complex display logic (was RE: speed of struts)
Hi, I was hoping someone could point me to an elegant solution for the following. I have an ArrayList of objects which I use the Iterate tag view, lets say there are 10 objects in it. My requirement is to display the contents of each object in a table cell and have three cells per row. I cant work out an elegant way of wrapping to the next row after every three iterates. At the moment, I get the iterate count and an if scriptlet to see if %3 == 0. If so, I add a /trtr. Then when the iterate has finished, I need to check the mod again with an if scriptlet and add extra TD/TD tags on the end before the closing /tr. I have put the code snippet below. The annoying thing is the extra amount of work if I move to 4 columns... Any help with doing this using struts tags would be appreciated as would design pointers on coding my own tag or tag set. Regards, Chris. %-- Scriptlet 0 - hold the idx value from iterate outside iterate scope --% % int iterateIdx = 0; % logic:iterate id=foo name=fooList indexId=idx %-- Scriptlet 1 - List foo 3 abreast --% % iterateIdx = idx.intValue(); % % if (idx.intValue() % 3 == 0) { % tr td colspan=3hr/td /tr tr % } // End if % %-- End Scriptlet 1 --% td width=33% table tr td bean:write name=foo property=bar/ /td /tr tr td html:link page=/anAction.do paramId=fooId paramName=foo paramProperty=bar_id app:img name=foo property=barImgPath/ /html:link /td /tr /table /td %-- Scriptlet 2 - List artwork 3 abreast --% % if (idx.intValue() % 3 == 2) { % /tr % } // End if % %-- End Scriptlet 2 --% /logic:iterate %-- Scriptlet 3 - Tidy up --% % if (iterateIdx % 3 == 0) { % tdnbsp;/td tdnbsp;/td /tr % } else if (iterateIdx % 3 == 1) { % tdnbsp;/td /tr % } % %-- End Scriptlet 3 --% -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 27 February 2002 14:17 To: [EMAIL PROTECTED] Subject: RE: speed of struts I'm interested in hearing other opinion on this. I personally find the logic present/equals tags to be ugly and cumbersome (not to mention inefficient in terms of the generated servlet) and often find myself resorting to simple if/else scriptlets instead. I'm not sure the logic tags win even from a maintainabilit point of view. How does everyone else deal with complex display logic? Do you use the logic tags? -Original Message- From: Jim Downing [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 8:17 AM To: Struts Users Mailing List Subject: Re: speed of struts On Mon, Feb 11, 2002 at 03:01:12PM +, [EMAIL PROTECTED] wrote: I'm curious as to the limit here. I'm currently building an app which has huge form requirements - I may have upwards of 500 fields as html text inputs -- very spreadsheet like. Where is the limitation? Rendering into html, or parsing the request into beans? I've had not problems so far with rendering speed, though I'm using Mozilla, so browser speed hasn't been noticable to far.. I've just finished a struts project where I had to move to scriptlets away from struts tags for presentation logic. The problem was that every now and then the GC would take a second or so to run. This struck me as a VM issue (and may still have been, although it happened under linux jdk1.2.2 and 1.3.1), but when I profiled the page I found that the handful of tags I was using (10 - 20 logic equals, a few logic:iterates) were generating 6M of garbage. Is this typical for all taglibs? I dislike developing with scriptlets, but that's a pretty big performance hit to have to take for a bit of maintainability. Is this the same factor that limits pages to 50 form tags? What's the best solution for pages with complex presentation logic? jim Jim Downing [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How best to get SQL:JDBC data?
Absolutely right, Oliver. Mike, here is a link to a JavaWorld article on this topic that may interest you: http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html Jim -Original Message- From: Oliver Refle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 8:26 AM To: Struts Users Mailing List Subject: AW: How best to get SQL:JDBC data? Hi Mike, normally i take the Action classes to collect all my data. Maybe you should implement a Data Access Object which offers an API to access the database and returns the result. In the action you collect all the data you need (means you use the methods of your DAO ) and then on the JSP you simply present the collected Data. So you seperate business logic from database access and from presentation Oliver -Ursprungliche Nachricht- Von: Mike Brooke [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 27. Februar 2002 15:06 An: Struts Users Mailing List Betreff: How best to get SQL:JDBC data? Hello Everyone, I am new to using struts and I have a design issue. Is it better to use an Action servlet to create a bean of data from a database, or is it better to create a taglibs that would return the bean. Another solution could be to use the dbTag taglibs from the Jakarta-taglibs and build the bean using jsp scripts (but I have read that this is not the ideal way if you are using the struts framework). My query is to find data in our inventory table, currently the system scripts the database (SQL:jdbc) calls as a jsp script and has different jsp:include files to return either prices or descriptions and create the form. Even if you have url links that I can do more research that would be great. I do have the WROX's Professional JSP 2nd edition, but so far I have not come across any examples using the jdbc database. I have set the database up using the datasource as suggest in the Utilities section of the struts documentation. // eom //Michael A. Brooke //Magstar Inc. // e-mail: [EMAIL PROTECTED] // phone: (416) 447-1442 x 273 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
indexed properties
hello Do I have to use Nightly Build to get subj. ? 1.0.2 says Lemums1.jsp: Attribute indexed invalid according to the specified TLD at line 194, column 5 html:text indexed=yes property=labCits size=20 maxlength=20/ Searched mail archive but didnt find any useful. Maris Orbidans -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with struts20020112.zip and JDK1.4
Subject: Re: Problem with struts20020112.zip and JDK1.4 From: Jeff [EMAIL PROTECTED] === God, what a relief. I spent most of yesterday trying (unsuccessfully) to get the sample apps from the currently-available nightly builds to compile, and had the exact problem you just described with the 1/12/02 build. I didn't bother to file a bug report for it since it's technically a long-dead nightly build anyway (aside from the fact that it's the one recent-but-not-TOO-recent nightly build still available today), and the 1.1 beta is apparently going to be available in a few days and render the whole issue moot anyway. I tried to build Struts from CVS last night, but Forte kept choking on the dynabeans-related classes. I suspect it might need a newer version of commons-beanUtils than 1.2, but it's also possible that the tree is just temporarily un-buildable right now. It would be a lot more convenient if all the third-party jarfiles required to build Struts (Xerces, Xalan, commons-*, etc.) were in Struts' own CVS tree, but I guess whomever's in charge of it has a good reason for not putting them in too... CyberZombie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... This nightly build (before the big change) has included some commons components. However, it does not include commons-logging. When used with JDK1.4, I get a NoSuchMethodError from the commons Digester into the Log looking for setLevel(I)V. Looking at the CVS for commons-logging, I note that a large change was made to that interface on 1/17. Is there an easy way to retrieve the state of the commons logging facility as it existed on 1/12? Or do I need to get/configure CVS so I can check out a copy for that date and build it myself (and dependancies?) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[OT] Using Transactions with Tomcat and MySQL
I need to control transactions within my application so I can rollback if SQLExceptions occur. The MySQL version I'm using supports transactions, as well as the 2.0.11 driver. So I'm wondering if I should lookup the javax.transaction.UserTransaction from JNDI (Tomcat 4.0) or use con.begin(), con.commit(), con.rollback() in my BusinessDelegate. ANY advice is appreciated. Thanks, Matt __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
View controls populated via Form Bean?
Hi, I'm still trying to figure-out the best practices for use of Struts... I do now understand about using an Action to initialize a Form bean before it's displayed via another action...if data is being retrieved from a backend or something... But, does it break the MVC/Struts model to use the Form bean as the source of html:options lists etc.? This is data that is strictly for pick lists, etc., and does come from the model, and is not input by the user themselves. It seems very handy to me to put both the list data retrieved from the model (during initialization) there, and have the users responses in the same object. Struts seems to approve of this approach, as the html:options tag is data for display only, but takes its data from the Form bean. But maybe this is just a case of Struts making it possible, and not a suggested approach. I realized I can put objects in the session/request, and have additional tags in the .jsp that would pull them out, and (I think) still let me use the html:options tag, but this just doesn't seem as nicely formalized as using the Form bean itself...especially within the context of the html:form tags. Is this a case where maybe the Struts approach might include another bean strictly for populating the view? Or is that just creating more work for a feature that's already possible, just not formalized? Thanks for any input and clarification... -Chris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: indexed properties
yup. Arron Maris Orbidans wrote: hello Do I have to use Nightly Build to get subj. ? 1.0.2 says Lemums1.jsp: Attribute indexed invalid according to the specified TLD at line 194, column 5 html:text indexed=yes property=labCits size=20 maxlength=20/ Searched mail archive but didnt find any useful. Maris Orbidans -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
changing from *.do to /do/* screws up everything?
Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything?
Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything?
Try to include in your JSP: head html:base/ /head That should fix your relative links. - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 9:39 AM Subject: changing from *.do to /do/* screws up everything? Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything?
Change this line: action path=/header forward=/WEB-INF/pages/header.jsp/ TO forward name=header path=/WEB-INF/pages/header.jsp/ and then use html:rewrite to render this in your JSP. HTH, Matt --- Rob Breeds [EMAIL PROTECTED] wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything?
Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- ---| | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | ---| Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Work around for setLocale(true) Problem
Has anyone successfully come up with a work around for the setLocale(true) problem in Struts on iPlanet 4.1 I've tried html:html locale=%= true % but that doesn't work. I've looked at Craig R. McClanahan's notes from http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10051.html. I've looked at http://java.sun.com/products/jsp/download.html for more information. I've looked everywhere. Can this gotcha be solved? Has anyone successfully deploy Struts Taglibs on iPlanet 4.1? Thanks! Adam __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: O'Reilly Example
encountered the same problem, if you look at the tld file in the error and the Class mentioned, you will find that the attribute path is mentioned only in the TLD file but if you look at the class definition there is no setter for this attribute. to make the example work, remove the complaining attributes from the TLD file and it will work fine. Tapas Bhattacharya [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Hi All, Has any one tried struts example from O'Reilly (onjava). Am getting the flowing error : Parsing of JSP File '/Login.jsp' failed: /Login.jsp(-1): Error in tag library at: 'form': The Tag class 'org.apache.struts.taglib.html.ImageTag' has no setter method corresponding to TLD declared attribute 'path', (JSP 1.1 spec, 5.4.1) probably occurred due to an error in /Login.jsp line -1: Wed Feb 27 12:08:17 GMT-05:00 2002 Weblogic Logic log Wed Feb 27 12:29:43 GMT-05:00 2002:E WebAppServletContext-strutsSample Servl et failed with Exception weblogic.servlet.jsp.JspException: (line -1): Error in tag library at: 'form': T he Tag class 'org.apache.struts.taglib.html.ImageTag' has no setter method corr esponding to TLD declared attribute 'path', (JSP 1.1 spec, 5.4.1) at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.init(Compiled Code) at java.lang.Exception.init(Compiled Code) at java.lang.RuntimeException.init(RuntimeException.java:47) at weblogic.servlet.jsp.JspException.init(JspException.java:9) at weblogic.servlet.jsp.JspException.init(JspException.java:14) at weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java: 138) at weblogic.servlet.jsp.StandardTagLib.processTag(Compiled Code) at weblogic.servlet.jsp.StandardTagLib.processTagElements(Compiled Code) at weblogic.servlet.jsp.StandardTagLib.init(StandardTagLib.java:125) at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:95) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(Compiled Code) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(Compiled Code) at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(Compiled Code) at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1817) at weblogic.servlet.jsp.JspLexer.mTOKEN(Compiled Code) at weblogic.servlet.jsp.JspLexer.nextToken(Compiled Code) at weblogic.servlet.jsp.JspLexer.parse(Compiled Code) at weblogic.servlet.jsp.JspParser.doit(Compiled Code) at weblogic.servlet.jsp.JspParser.parse(JspParser.java:125) at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:109) at weblogic.utils.compiler.CodeGenerator.generate(Compiled Code) at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:227) at weblogic.servlet.internal.ServletStubImpl.getServlet(Compiled Code) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code ) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled C ode) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled C ode) at weblogic.servlet.internal.ServletContextManager.invokeServlet(Compile d Code) at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code) at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code) at weblogic.kernel.ExecuteThread.run(Compiled Code) Thanks in advance. Tapas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: O'Reilly Example
from one of my earlier postings.. I got a similar error in an example complaining about the following attribute from the struts-form.tld for tag nameimage/name tagclassorg.apache.struts.taglib.html.ImageTag/tagclass attribute namepath/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameisKey/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute it complained about the setter for path and isKey and I looked at the class it did not have a setter. I removed these attribute from the tld file, the error was gone. I am using the 1.0.2 src. Tapas Bhattacharya [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Hi All, Has any one tried struts example from O'Reilly (onjava). Am getting the flowing error : Parsing of JSP File '/Login.jsp' failed: /Login.jsp(-1): Error in tag library at: 'form': The Tag class 'org.apache.struts.taglib.html.ImageTag' has no setter method corresponding to TLD declared attribute 'path', (JSP 1.1 spec, 5.4.1) probably occurred due to an error in /Login.jsp line -1: Wed Feb 27 12:08:17 GMT-05:00 2002 Weblogic Logic log Wed Feb 27 12:29:43 GMT-05:00 2002:E WebAppServletContext-strutsSample Servl et failed with Exception weblogic.servlet.jsp.JspException: (line -1): Error in tag library at: 'form': T he Tag class 'org.apache.struts.taglib.html.ImageTag' has no setter method corr esponding to TLD declared attribute 'path', (JSP 1.1 spec, 5.4.1) at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.init(Compiled Code) at java.lang.Exception.init(Compiled Code) at java.lang.RuntimeException.init(RuntimeException.java:47) at weblogic.servlet.jsp.JspException.init(JspException.java:9) at weblogic.servlet.jsp.JspException.init(JspException.java:14) at weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java: 138) at weblogic.servlet.jsp.StandardTagLib.processTag(Compiled Code) at weblogic.servlet.jsp.StandardTagLib.processTagElements(Compiled Code) at weblogic.servlet.jsp.StandardTagLib.init(StandardTagLib.java:125) at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:95) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(Compiled Code) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(Compiled Code) at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(Compiled Code) at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1817) at weblogic.servlet.jsp.JspLexer.mTOKEN(Compiled Code) at weblogic.servlet.jsp.JspLexer.nextToken(Compiled Code) at weblogic.servlet.jsp.JspLexer.parse(Compiled Code) at weblogic.servlet.jsp.JspParser.doit(Compiled Code) at weblogic.servlet.jsp.JspParser.parse(JspParser.java:125) at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:109) at weblogic.utils.compiler.CodeGenerator.generate(Compiled Code) at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:227) at weblogic.servlet.internal.ServletStubImpl.getServlet(Compiled Code) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code ) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled C ode) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled C ode) at weblogic.servlet.internal.ServletContextManager.invokeServlet(Compile d Code) at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code) at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code) at weblogic.kernel.ExecuteThread.run(Compiled Code) Thanks in advance. Tapas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything?
Then perhaps you can insert your own plain-jane base tag (not a JSP-rendered base tag) to point to the root of your web? Bryan On Wed, 2002-02-27 at 10:58, Rob Breeds wrote: Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- ---| | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | ---| Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything?
Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | --- | Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything?
It originally came up in response to inquiries about how to enforce MVC. If all the JSPs are under WEB-INF, then the only possible way to get to them is through an action. Users can't just bookmark a JSP and pop into the middle of something. Though, if you self-impose the recommended model of linking only to actions, the value of actually storing the pages under WEB-INF diminishes, since the address of the page is never directly exposed to the user. To make use of the multi-configuration capabilities in the nightly build, linking through actions is required, and so I expect to see fewer and fewer Struts applications that link directy to JSPs. -- Ted Husted, Husted dot Com, Fairport NY US -- Developing Java Web Applications with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services Eddie Bush wrote: Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | --- | Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
New Struts User - Pick list help
Can anyone help me with what I am doing wrong? The following is part of a form where I am trying to get a dynamic picklist generated: % java.util.ArrayList list = new java.util.ArrayList(); list.add("First"); list.add("Second"); list.add("Third"); list.add("Fourth"); list.add("Fifth"); pageContext.setAttribute("list", list, PageContext.PAGE_SCOPE); % form:select property="place" form:options property="list"/ /form:select Any help would be greatly appreciated... The error message I get is: javax.servlet.jsp.JspException: Must specify type attribute if name is specified void org.apache.struts.taglib.html.FormTag.lookup() int org.apache.struts.taglib.html.FormTag.doStartTag() void _body._provider__statement._providerStatementAdd._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/body/provider_statement/providerStatementAdd.jsp] void com.orionserver[Oracle9iAS (2.0.0.0) Containers for J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void oracle.jsp.runtimev2.JspPageTable.compileAndServe(oracle.jsp.runtimev2.JspPageInfo, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String) void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.EvermindPageContext.include(java.lang.String) int s1.struts.taglib.component.InsertTag$InsertHandler.doEndTag() int s1.struts.taglib.component.InsertTag.doEndTag() void _template._mainLayout._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/template/mainLayout.jsp] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything?
I figured there had to be a good reason =) Thanks Ted! - Original Message - From: Ted Husted [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 12:56 PM Subject: Re: changing from *.do to /do/* screws up everything? It originally came up in response to inquiries about how to enforce MVC. If all the JSPs are under WEB-INF, then the only possible way to get to them is through an action. Users can't just bookmark a JSP and pop into the middle of something. Though, if you self-impose the recommended model of linking only to actions, the value of actually storing the pages under WEB-INF diminishes, since the address of the page is never directly exposed to the user. To make use of the multi-configuration capabilities in the nightly build, linking through actions is required, and so I expect to see fewer and fewer Struts applications that link directy to JSPs. -- Ted Husted, Husted dot Com, Fairport NY US -- Developing Java Web Applications with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services Eddie Bush wrote: Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | --- | Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For
Re: changing from *.do to /do/* screws up everything?
Because then users can't get to your JSPs directly by entering/guessing the URL. (As recommended by Ted!) Rob |+ || Eddie Bush| || ekbush@swbell| || .net | ||| || 27/02/2002| || 18:44 | || Please respond| || to Struts| || Users Mailing | || List | ||| |+ ---| | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | ---| Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | --- | Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail:
RE: changing from *.do to /do/* screws up everything?
That's not were they're supposed to be Mark - Original Message - From: Rob Breeds [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything?
Matt I changed '/header' to 'header', but now if I enter /do/header in the browser address field it is now not found. Changed it back so it works For this example, I have one mapping and one JSP file (under WEB-INF) which has several references to CSS, JS and images each in their respective directories under the war directory. Using html:rewrite sorts out JS and CSS OK but to do this for every image is going to be painful for my 'big app'. Is this where someone tells me I should use the Struts image tag? :) btw, I'm not trying to access the JSP directly - this IS going via a mapping from do/header to the jsp! Thanks Rob |+ || Matt Raible | || matt_raible@y| || ahoo.com | ||| || 27/02/2002| || 18:03 | || Please respond| || to Struts| || Users Mailing | || List | ||| |+ ---| | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | ---| Change this line: action path=/header forward=/WEB-INF/pages/header.jsp/ TO forward name=header path=/WEB-INF/pages/header.jsp/ and then use html:rewrite to render this in your JSP. HTH, Matt --- Rob Breeds [EMAIL PROTECTED] wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: New Struts User - Pick list help
Yeah, change your font. Mark -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:59 PM Can anyone help me with what I am doing wrong? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything?
I expected that you would be trying to include the header in a JSP, rather than trying to access it directly. All the html:rewrite does is render the path prefixed with the context. Yep - img tag is what you need. Matt --- Rob Breeds [EMAIL PROTECTED] wrote: Matt I changed '/header' to 'header', but now if I enter /do/header in the browser address field it is now not found. Changed it back so it works For this example, I have one mapping and one JSP file (under WEB-INF) which has several references to CSS, JS and images each in their respective directories under the war directory. Using html:rewrite sorts out JS and CSS OK but to do this for every image is going to be painful for my 'big app'. Is this where someone tells me I should use the Struts image tag? :) btw, I'm not trying to access the JSP directly - this IS going via a mapping from do/header to the jsp! Thanks Rob |+ || Matt Raible | || matt_raible@y| || ahoo.com | ||| || 27/02/2002| || 18:03 | || Please respond| || to Struts| || Users Mailing | || List | ||| |+ ---| | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | ---| Change this line: action path=/header forward=/WEB-INF/pages/header.jsp/ TO forward name=header path=/WEB-INF/pages/header.jsp/ and then use html:rewrite to render this in your JSP. HTH, Matt --- Rob Breeds [EMAIL PROTECTED] wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything? - Jerry Springersums up...
OK, thanks Matt and Bryan for your help. It seems that migrating from a *.do to /do/* is not as straightforward as I'd hoped. Especially if putting JSPs under WEB-INF (which is better than leaving them exposed). While changing the servlet mapping is easy, it introduces an additional artificial 'do' directory in the path which means that relative links are relative to the base path/do/ rather than just the base path. For JSPs that use JavaScript libraries (mine are in war directory/scripts) and/or stylesheets (war directory/theme), this means either use a relative URL like '../scripts/thescript.js' or use html:rewrite like so: script language=JavaScript src=html:rewrite page='/ scripts/'/menu_functions.js/script Likewise for images, I can either get to the images directory with '../images/painting.gif' or use the Struts img tag, using page attribute rather than src. Using html:base seems a nice idea but if JSPs are under WEB-INF, any reference will include WEB-INF and getting to JSPs like this is not allowed by the spec. Thank you and good night :) Rob |+ || Matt Raible | || matt_raible@y| || ahoo.com | ||| || 27/02/2002| || 19:25 | || Please respond| || to Struts| || Users Mailing | || List | ||| |+ ---| | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | ---| I expected that you would be trying to include the header in a JSP, rather than trying to access it directly. All the html:rewrite does is render the path prefixed with the context. Yep - img tag is what you need. Matt --- Rob Breeds [EMAIL PROTECTED] wrote: Matt I changed '/header' to 'header', but now if I enter /do/header in the browser address field it is now not found. Changed it back so it works For this example, I have one mapping and one JSP file (under WEB-INF) which has several references to CSS, JS and images each in their respective directories under the war directory. Using html:rewrite sorts out JS and CSS OK but to do this for every image is going to be painful for my 'big app'. Is this where someone tells me I should use the Struts image tag? :) btw, I'm not trying to access the JSP directly - this IS going via a mapping from do/header to the jsp! Thanks Rob |+ || Matt Raible | || matt_raible@y| || ahoo.com | ||| || 27/02/2002| || 18:03 | || Please respond| || to Struts| || Users Mailing | || List | ||| |+ ---| | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | ---| Change this line: action path=/header forward=/WEB-INF/pages/header.jsp/ TO forward name=header path=/WEB-INF/pages/header.jsp/ and then use html:rewrite to render this in your JSP. HTH, Matt --- Rob Breeds [EMAIL PROTECTED] wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for
Re: changing from *.do to /do/* screws up everything?
In my opinion, this is a good solution. rewriting is too, but this seems to be easy. You put a plain: base href=/contextName In your JSPages, does this have any other unwanted side effect? João. Joao Guilherme Del Valle [EMAIL PROTECTED] Visionnaire Informática SA http://www.visionnaire.com.br Tel/Fax: +55 41 373-7400 r: 221 Curitiba / PR / Brasil - Original Message - From: Bryan Field-Elliot [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 3:17 PM Subject: Re: changing from *.do to /do/* screws up everything? Then perhaps you can insert your own plain-jane base tag (not a JSP-rendered base tag) to point to the root of your web? Bryan On Wed, 2002-02-27 at 10:58, Rob Breeds wrote: Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | --- | Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: changing from *.do to /do/* screws up everything? - Jerry Springer sums up...
They're only as exposed as you make them! A JSP is a presentation layer object and belongs in the web-app directory. Burying them in the same space as the controller invites sloppy designs and lazy coding. (Perhaps I should wait until Friday for this?) Mark -Original Message- From: Rob Breeds [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:54 PM It seems that migrating from a *.do to /do/* is not as straightforward as I'd hoped. Especially if putting JSPs under WEB-INF (which is better than leaving them exposed). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything? - JerrySpringer sums up...
Couldn't you easily acheive the same end result (ie. surfers not hitting certain pages) by simply checking the session for some attirbute to see that they are logged in, and, if they are not logged in, redirect them to the login page? While the end-result would (I believe) be the same, I'm simply not comfortable with putting pages under WEB-INF. I don't think they 'belong' there. Maybe I'm just being entirely too anal. Of course I can't claim to know why you have the pages restricted, but checking for a login is certainly one way (I would think) to acheive your goal and maintain your pages under the document base. Of course, they could still guess at the names and hit the page, but if the pages check for a login and redirect the user, what does it really matter? Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 1:53 PM Subject: Re: changing from *.do to /do/* screws up everything? - Jerry Springer sums up... OK, thanks Matt and Bryan for your help. It seems that migrating from a *.do to /do/* is not as straightforward as I'd hoped. Especially if putting JSPs under WEB-INF (which is better than leaving them exposed). While changing the servlet mapping is easy, it introduces an additional artificial 'do' directory in the path which means that relative links are relative to the base path/do/ rather than just the base path. For JSPs that use JavaScript libraries (mine are in war directory/scripts) and/or stylesheets (war directory/theme), this means either use a relative URL like '../scripts/thescript.js' or use html:rewrite like so: script language=JavaScript src=html:rewrite page='/ scripts/'/menu_functions.js/script Likewise for images, I can either get to the images directory with '../images/painting.gif' or use the Struts img tag, using page attribute rather than src. Using html:base seems a nice idea but if JSPs are under WEB-INF, any reference will include WEB-INF and getting to JSPs like this is not allowed by the spec. Thank you and good night :) Rob |+ || Matt Raible | || matt_raible@y| || ahoo.com | ||| || 27/02/2002| || 19:25 | || Please respond| || to Struts| || Users Mailing | || List | ||| |+ --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | --- | I expected that you would be trying to include the header in a JSP, rather than trying to access it directly. All the html:rewrite does is render the path prefixed with the context. Yep - img tag is what you need. Matt --- Rob Breeds [EMAIL PROTECTED] wrote: Matt I changed '/header' to 'header', but now if I enter /do/header in the browser address field it is now not found. Changed it back so it works For this example, I have one mapping and one JSP file (under WEB-INF) which has several references to CSS, JS and images each in their respective directories under the war directory. Using html:rewrite sorts out JS and CSS OK but to do this for every image is going to be painful for my 'big app'. Is this where someone tells me I should use the Struts image tag? :) btw, I'm not trying to access the JSP directly - this IS going via a mapping from do/header to the jsp! Thanks Rob |+ || Matt Raible | || matt_raible@y| || ahoo.com | ||| || 27/02/2002| || 18:03 | || Please respond| || to Struts| || Users Mailing | || List | ||| |+ -- -| | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything?
RE: changing from *.do to /do/* screws up everything? - Jerry Sp ringersums up...
Mark, see Ted's reasoning in prev. note. Rob |+ || Galbreath, | || Mark | || Galbreath@tes| || sco.com | ||| || 27/02/2002| || 20:02 | || Please respond| || to Struts| || Users Mailing | || List | ||| |+ ---| | | | To: 'Struts Users Mailing List' [EMAIL PROTECTED] | | cc: | | Subject: RE: changing from *.do to /do/* screws up everything? - Jerry Sp ringer sums up... | | | | | ---| They're only as exposed as you make them! A JSP is a presentation layer object and belongs in the web-app directory. Burying them in the same space as the controller invites sloppy designs and lazy coding. (Perhaps I should wait until Friday for this?) Mark -Original Message- From: Rob Breeds [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:54 PM It seems that migrating from a *.do to /do/* is not as straightforward as I'd hoped. Especially if putting JSPs under WEB-INF (which is better than leaving them exposed). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything? - Jerry Springer sums up...
I would tend to agree Mark - but it seems we may be in the minority. Eddie - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 2:02 PM Subject: RE: changing from *.do to /do/* screws up everything? - Jerry Sp ringer sums up... They're only as exposed as you make them! A JSP is a presentation layer object and belongs in the web-app directory. Burying them in the same space as the controller invites sloppy designs and lazy coding. (Perhaps I should wait until Friday for this?) Mark -Original Message- From: Rob Breeds [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:54 PM It seems that migrating from a *.do to /do/* is not as straightforward as I'd hoped. Especially if putting JSPs under WEB-INF (which is better than leaving them exposed). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Need help on archived issue RE: IllegalStateException on
I'm having the same issue that I found in the archive - it doesn't seem to be resolved yet. Does anyone know why this is happening? I have many JSPs which execute fine. .. 2002-02-27 14:57:22 action: Processing a GET for /showSelectPurchaseOrder 2002-02-27 14:57:22 action: Looking for ActionForm bean under attribute 'selectPurchaseOrderForm' 2002-02-27 14:57:22 action: Recycling existing ActionForm bean instance of class 'com.dcc.brum.po.SelectPurchaseOrderForm' 2002-02-27 14:57:22 action: Populating bean properties from this request 2002-02-27 14:57:22 action: Validating input form properties 2002-02-27 14:57:22 action: Looking for Action instance for class com.dcc.brum.po.GetPurchaseOrdersAction 2002-02-27 14:57:22 action: Double checking for Action instance already there 2002-02-27 14:57:22 action: Creating new Action instance 2002-02-27 14:57:24 jsp: init 2002-02-27 14:57:27 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:159) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:166) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:158) at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:205) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:176) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:198) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:193) at org.apache.jsp.index$jsp._jspService(index$jsp.java:66) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106) at java.lang.Thread.run(Thread.java:484) 2002-02-27 14:58:48 action: Processing a GET for /showSelectSample 2002-02-27 14:58:48 action: Looking for ActionForm bean under attribute 'sampleForm' 2002-02-27 14:58:48 action: Recycling existing ActionForm bean instance of class 'com.dcc.brum.sample.SampleForm' 2002-02-27 14:58:48 action: Populating bean properties from this request .. Andy Andrew Goodnough Dana Commercial Credit Programmer (419)
html:submit/
is there a way to use a graphic image in place of the standard button for html:submit/ and html:reset/? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: html:submit/
I believe html:image/ is used for that. - Original Message - From: "Dave Wellman" [EMAIL PROTECTED] To: "Struts Users Mailing List" [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 2:07 PM Subject: html:submit/ is there a way to use a graphic image in place of the standard button for html:submit/ and html:reset/? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: changing from *.do to /do/* screws up everything? - Jerry Sp ringersums up...
Are you saying that beer on friday contributes to sloppy designs and lazy coding? Jim Berg Sr. Software Specialist PSCI [EMAIL PROTECTED] Galbreath, Mark [EMAIL PROTECTED] 27-Feb-2002 15:02 Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' cc: Subject:RE: changing from *.do to /do/* screws up everything? - Jerry Sp ringer sums up... They're only as exposed as you make them! A JSP is a presentation layer object and belongs in the web-app directory. Burying them in the same space as the controller invites sloppy designs and lazy coding. (Perhaps I should wait until Friday for this?) Mark -Original Message- From: Rob Breeds [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:54 PM It seems that migrating from a *.do to /do/* is not as straightforward as I'd hoped. Especially if putting JSPs under WEB-INF (which is better than leaving them exposed). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: html:select / html:option question
Thanks alot!!! That worked. Jim Crossley jcrossley@ifTo: Struts Users Mailing List [EMAIL PROTECTED] leet.comcc: Subject: Re: html:select / html:option question 02/26/02 07:25 PM Please respond to Struts Users Mailing List Set the addressstate property of your form bean in your action prior to forwarding it to your page. I'm guessing you can use the same action that puts the states object in the request to go ahead and set the form bean, too. [EMAIL PROTECTED] writes: Hi folks: I wrote a bean to preload a collection of valid states (per-se) that will be incorporated into my JSP page as such: td html:select property=addressstate size =1 html:options collection=states property=value labelProperty=label/ /html:select /td Here's my question: All the time, the first entry is ALABAMA. I'd like to be able to load a record from the database and have that record's state be selected using the above construct. So if the record's state is Illinios, I'd like for Illinois to be displayed in the list but they could then update the combobox (in which case I'd save it to the database). Is there an easy way to do this with the above construct that I am using? thanks, Theron -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Jim Crossley http://www.lads.com/~jim -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: changing from *.do to /do/* screws up everything?
An alternative to putting it in the WEB-INF is to use Apache to filter the request, eg: Location /*.jsp Deny from all /Location This has the advantage of: - if you decide not to disallow JSPs, you can - when you are developing, it's often handy to view the JSPs without going through the actions first (eg want to see if your table looks ok) Some thoughts Keith -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 7:44 a.m. To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | --- | Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: changing from *.do to /do/* screws up everything?
Yes, but will that not demand that your index page be a HTML file rather than JSP? If you have an index page that has dynamic pieces as well as static ones - or uses, say, templates (struts templates that is), you've just shot yourself in the foot, haven't you? Additional Thoughts, Eddie - Original Message - From: Keith Chew [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 2:21 PM Subject: RE: changing from *.do to /do/* screws up everything? An alternative to putting it in the WEB-INF is to use Apache to filter the request, eg: Location /*.jsp Deny from all /Location This has the advantage of: - if you decide not to disallow JSPs, you can - when you are developing, it's often handy to view the JSPs without going through the actions first (eg want to see if your table looks ok) Some thoughts Keith -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 7:44 a.m. To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | --- | Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL
RE: html:submit/
I may have some syntax problem, but I'm trying to get the text for a submit button from the message bundle so it can be localized. if I code something like input type=submit value="bean:message key="global.prompt.submit"/" it works I can't figure out how to convert this an html:submit value= I keep getting parser/compiler errors thanks bp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: changing from *.do to /do/* screws up everything?
You could set up index.do as a 'welcome page'; but then it would depend on if the server would try to load this as a 'page' or via a URL which Struts would then pickup and handle. Not sure if that would work, but that's a though. Robert -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:26 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Yes, but will that not demand that your index page be a HTML file rather than JSP? If you have an index page that has dynamic pieces as well as static ones - or uses, say, templates (struts templates that is), you've just shot yourself in the foot, haven't you? Additional Thoughts, Eddie - Original Message - From: Keith Chew [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 2:21 PM Subject: RE: changing from *.do to /do/* screws up everything? An alternative to putting it in the WEB-INF is to use Apache to filter the request, eg: Location /*.jsp Deny from all /Location This has the advantage of: - if you decide not to disallow JSPs, you can - when you are developing, it's often handy to view the JSPs without going through the actions first (eg want to see if your table looks ok) Some thoughts Keith -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 7:44 a.m. To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | --- | Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken - CSS, images, JavaScript files e.g. I have a URL of 'rest of path/do/header' and this is specified in the config file as: action path=/header forward=/WEB-INF/pages/header.jsp/ The page loads OK but the JSP references images like this: img src=images/find_obj.gif This used to work because images was a directory directly under the war directory, but now, the image has a path of img src =/do/images/find_obj.gif which isn't found. Simarly for references to CSS files and JS files. why is the /do/ prefix being added? Please could anyone tell me what I have to do to get my JS, CSS and images to load without changing every reference to them in every JSP to include a /do/? Thanks Rob -- To unsubscribe, e-mail:
Re: changing from *.do to /do/* screws up everything?
I don´t know about the spec, but at least Tomcat *does not* accept this solution. I haven´t tried with a servlet, but an action doesn´t work. Maybe because the name of the tag in web.xml is welcome-file-list, it´s must be either a tag that accepts only files or a semantic problem in the spec. Joao Guilherme Del Valle [EMAIL PROTECTED] Visionnaire Informática SA http://www.visionnaire.com.br Tel/Fax: +55 41 373-7400 r: 221 Curitiba / PR / Brasil - Original Message - From: Robert [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 5:36 PM Subject: RE: changing from *.do to /do/* screws up everything? You could set up index.do as a 'welcome page'; but then it would depend on if the server would try to load this as a 'page' or via a URL which Struts would then pickup and handle. Not sure if that would work, but that's a though. Robert -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:26 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Yes, but will that not demand that your index page be a HTML file rather than JSP? If you have an index page that has dynamic pieces as well as static ones - or uses, say, templates (struts templates that is), you've just shot yourself in the foot, haven't you? Additional Thoughts, Eddie - Original Message - From: Keith Chew [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 2:21 PM Subject: RE: changing from *.do to /do/* screws up everything? An alternative to putting it in the WEB-INF is to use Apache to filter the request, eg: Location /*.jsp Deny from all /Location This has the advantage of: - if you decide not to disallow JSPs, you can - when you are developing, it's often handy to view the JSPs without going through the actions first (eg want to see if your table looks ok) Some thoughts Keith -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 7:44 a.m. To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | --- | Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet Because I found that the servlet spec doesn't allow partial URL mappings for security (eg. I can't specify a url-mapping of '/pub*'), I must now change my app to use /do/* Seems like a fine idea, and Ted says its cool :) So, I changed the servlet mapping to '/do/*' and references to '*.do' in my JSPs. Now my app sort of works but all relative links are now broken -
RE: changing from *.do to /do/* screws up everything?
Figures. Then I suppose you could have an index.jsp and deny all other .jsps... Or maybe have the index page do a redirect to the index.do. Maybe not as clean or elegant, but would work. -Original Message- From: João Guilherme Del Valle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:44 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? I don´t know about the spec, but at least Tomcat *does not* accept this solution. I haven´t tried with a servlet, but an action doesn´t work. Maybe because the name of the tag in web.xml is welcome-file-list, it´s must be either a tag that accepts only files or a semantic problem in the spec. Joao Guilherme Del Valle [EMAIL PROTECTED] Visionnaire Informática SA http://www.visionnaire.com.br Tel/Fax: +55 41 373-7400 r: 221 Curitiba / PR / Brasil - Original Message - From: Robert [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 5:36 PM Subject: RE: changing from *.do to /do/* screws up everything? You could set up index.do as a 'welcome page'; but then it would depend on if the server would try to load this as a 'page' or via a URL which Struts would then pickup and handle. Not sure if that would work, but that's a though. Robert -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:26 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Yes, but will that not demand that your index page be a HTML file rather than JSP? If you have an index page that has dynamic pieces as well as static ones - or uses, say, templates (struts templates that is), you've just shot yourself in the foot, haven't you? Additional Thoughts, Eddie - Original Message - From: Keith Chew [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 2:21 PM Subject: RE: changing from *.do to /do/* screws up everything? An alternative to putting it in the WEB-INF is to use Apache to filter the request, eg: Location /*.jsp Deny from all /Location This has the advantage of: - if you decide not to disallow JSPs, you can - when you are developing, it's often handy to view the JSPs without going through the actions first (eg want to see if your table looks ok) Some thoughts Keith -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 7:44 a.m. To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | --- | Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this problem. Bryan On Wed, 2002-02-27 at 10:39, Rob Breeds wrote: Hi I hope this is me being dumb but I have a working Struts application that uses a *.do servlet mapping for ActionServlet
RE: changing from *.do to /do/* screws up everything?
I have done this and it works. I have set index.do as the welcome page in Apache. It forwards it to Resin fine (I am confident that it'll work on Tomcat too). The trick is to create a dummy file called index.do. In this file I have one line, You have not setup Apache to talk to your JSP container properly. Please refer to installation manual. Without this file, Apache cannot forward it to Resin. Keith -Original Message- From: João Guilherme Del Valle [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 9:44 a.m. To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? I don´t know about the spec, but at least Tomcat *does not* accept this solution. I haven´t tried with a servlet, but an action doesn´t work. Maybe because the name of the tag in web.xml is welcome-file-list, it´s must be either a tag that accepts only files or a semantic problem in the spec. Joao Guilherme Del Valle [EMAIL PROTECTED] Visionnaire Informática SA http://www.visionnaire.com.br Tel/Fax: +55 41 373-7400 r: 221 Curitiba / PR / Brasil - Original Message - From: Robert [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 5:36 PM Subject: RE: changing from *.do to /do/* screws up everything? You could set up index.do as a 'welcome page'; but then it would depend on if the server would try to load this as a 'page' or via a URL which Struts would then pickup and handle. Not sure if that would work, but that's a though. Robert -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:26 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Yes, but will that not demand that your index page be a HTML file rather than JSP? If you have an index page that has dynamic pieces as well as static ones - or uses, say, templates (struts templates that is), you've just shot yourself in the foot, haven't you? Additional Thoughts, Eddie - Original Message - From: Keith Chew [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 2:21 PM Subject: RE: changing from *.do to /do/* screws up everything? An alternative to putting it in the WEB-INF is to use Apache to filter the request, eg: Location /*.jsp Deny from all /Location This has the advantage of: - if you decide not to disallow JSPs, you can - when you are developing, it's often handy to view the JSPs without going through the actions first (eg want to see if your table looks ok) Some thoughts Keith -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 7:44 a.m. To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | | --- | Put this inside the head block of all your JSP pages: html:base/ Here is a URL to the docs for this tag: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base It solves exactly this
Re: changing from *.do to /do/* screws up everything?
On Wed, 2002-02-27 at 11:56, Ted Husted wrote: It originally came up in response to inquiries about how to enforce MVC. If all the JSPs are under WEB-INF, then the only possible way to get to them is through an action. Users can't just bookmark a JSP and pop into the middle of something. Though, if you self-impose the recommended model of linking only to actions, the value of actually storing the pages under WEB-INF diminishes, since the address of the page is never directly exposed to the user. So Ted, one small gap in my Struts knowledge (in terms of best-practices) is, what's the recommended way to build a pass-through Action which really does just display a JSP page? I have a signup.jsp form, which for the sake of this discussion, is going to be underneath WEB-INF. I really don't need any processing in an action to execute prior to displaying the form -- I just want to link to the (empty) form. Since I can't link directly to it, I need some kind of really shallow Action to get at it. How do you usually build this? Bryan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: changing from *.do to /do/* screws up everything?
I have a SuccessAction which only has one line in the perform() method: return mapping.findForward (success); This action is used for pass-through pages, including index.jsp. Keith -Original Message- From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 9:54 a.m. To: Struts Users Mailing List; Ted Husted Subject: Re: changing from *.do to /do/* screws up everything? On Wed, 2002-02-27 at 11:56, Ted Husted wrote: It originally came up in response to inquiries about how to enforce MVC. If all the JSPs are under WEB-INF, then the only possible way to get to them is through an action. Users can't just bookmark a JSP and pop into the middle of something. Though, if you self-impose the recommended model of linking only to actions, the value of actually storing the pages under WEB-INF diminishes, since the address of the page is never directly exposed to the user. So Ted, one small gap in my Struts knowledge (in terms of best-practices) is, what's the recommended way to build a pass-through Action which really does just display a JSP page? I have a signup.jsp form, which for the sake of this discussion, is going to be underneath WEB-INF. I really don't need any processing in an action to execute prior to displaying the form -- I just want to link to the (empty) form. Since I can't link directly to it, I need some kind of really shallow Action to get at it. How do you usually build this? Bryan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:submit/
input is not working because it probably gets confused with the placements of in the tags. I am guessing that the value is set to 'bean:message key='. You might be able to use a different delimiter such as ' for the value tag. Better yet, use this: html:submit bean:message key=global.prompt.submit/ /html:submit Hope this help... - Saeid At 03:29 PM 2/27/2002 -0500, you wrote: I may have some syntax problem, but I'm trying to get the text for a submit button from the message bundle so it can be localized. if I code something like input type=submit value=bean:message key=global.prompt.submit/ it works I can't figure out how to convert this an html:submit value= I keep getting parser/compiler errors thanks bp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: changing from *.do to /do/* screws up everything? - Jerry Sp ringer sums up...
I read it; I do not see any fundamental disagreement. My point is that this is more than just a question of style. Mark -Original Message- From: Rob Breeds [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:04 PM Mark, see Ted's reasoning in prev. note. Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: New Struts User - Pick list help
I am not sure I understand what you mean by "change your font". -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 11:11 AM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help Yeah, change your font. Mark -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:59 PM Can anyone help me with what I am doing wrong? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[offtopic] frames
just after your (everybody on this list) professional opinion regarding frames. If you could reply to me personally and not to the list, and just say for or against and if you can also write why, I would be very greatful. We have a slight dispute at work regarding this, and decided to solve it via voting. Sorry for the trouble and many thanks in advance. Mike Dewhirst ++ =** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. **= *** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. ***
RE: [offtopic] frames
Against. Can't link from outside to a specific page. I know, I know... You're not supposed to, it's an _application_. But links are the great advantage of the web. Take that away and what do you have? -Original Message- From: Mike Dewhirst [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 12:56 PM To: 'Struts Users Mailing List' Subject: [offtopic] frames just after your (everybody on this list) professional opinion regarding frames. If you could reply to me personally and not to the list, and just say for or against and if you can also write why, I would be very greatful. We have a slight dispute at work regarding this, and decided to solve it via voting. Sorry for the trouble and many thanks in advance. Mike Dewhirst ++ =** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. **= *** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [offtopic] frames
They suck. -Original Message- From: Mike Dewhirst [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:56 PM -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: New Struts User - Pick list help
Thanks Mark...Hopefully people can read this. Can anyone help me with what I am doing wrong? The following is part of a form where I am trying to get a dynamic picklist generated: % java.util.ArrayList list = new java.util.ArrayList(); list.add("First"); list.add("Second"); list.add("Third"); list.add("Fourth"); list.add("Fifth"); pageContext.setAttribute("list", list, PageContext.PAGE_SCOPE); % form:select property="place" form:options property="list"/ /form:select Any help would be greatly appreciated... The error message I get is: javax.servlet.jsp.JspException: Must specify type attribute if name is specified void org.apache.struts.taglib.html.FormTag.lookup() int org.apache.struts.taglib.html.FormTag.doStartTag() void _body._provider__statement._providerStatementAdd._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/body/provider_statement/providerStatementAdd.jsp] void com.orionserver[Oracle9iAS (2.0.0.0) Containers for J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void oracle.jsp.runtimev2.JspPageTable.compileAndServe(oracle.jsp.runtimev2.JspPageInfo, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String) void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.EvermindPageContext.include(java.lang.String) int s1.struts.taglib.component.InsertTag$InsertHandler.doEndTag() int s1.struts.taglib.component.InsertTag.doEndTag() void _template._mainLayout._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/template/mainLayout.jsp] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:14 PM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help You are posting in MS PGothic 10-point font and it is difficult to read (and anyone having HTML turned on will reply in the same font). Change to Arial, Helvetica, or other standard web font. Mark -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 4:02 PM I am not sure I understand what you mean by "change your font". -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 11:11 AM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help Yeah, change your font. Mark -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:59 PM Can anyone help me with what I am doing wrong? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: New Struts User - Pick list help
Try form:options name="list"/ I am not sure if that is right. But you can go here for further documentation. http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options Hope that helps -JC -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:20 PM To: Struts Users Mailing List Subject: RE: New Struts User - Pick list help Thanks Mark...Hopefully people can read this. Can anyone help me with what I am doing wrong? The following is part of a form where I am trying to get a dynamic picklist generated: % java.util.ArrayList list = new java.util.ArrayList(); list.add("First"); list.add("Second"); list.add("Third"); list.add("Fourth"); list.add("Fifth"); pageContext.setAttribute("list", list, PageContext.PAGE_SCOPE); % form:select property="place" form:options property="list"/ /form:select Any help would be greatly appreciated... The error message I get is: javax.servlet.jsp.JspException: Must specify type attribute if name is specified void org.apache.struts.taglib.html.FormTag.lookup() int org.apache.struts.taglib.html.FormTag.doStartTag() void _body._provider__statement._providerStatementAdd._jspService(javax.servlet.h ttp.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/body/provider_statement/providerStatementAdd.jsp] void com.orionserver[Oracle9iAS (2.0.0.0) Containers for J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void oracle.jsp.runtimev2.JspPageTable.compileAndServe(oracle.jsp.runtimev2. JspPageInfo, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequ est, javax.servlet.http.HttpServletResponse, java.lang.String) void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServl etRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletReques t, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletReque st, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.include(javax.servlet.ServletRequ est, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.EvermindPageContext.include(java.lang.String) int s1.struts.taglib.component.InsertTag$InsertHandler.doEndTag() int s1.struts.taglib.component.InsertTag.doEndTag() void _template._mainLayout._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/template/mainLayout.jsp] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:14 PM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help You are posting in MS PGothic 10-point font and it is difficult to read (and anyone having HTML turned on will reply in the same font). Change to Arial, Helvetica, or other standard web font. Mark -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 4:02 PM I am not sure I understand what you mean by "change your font". -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 11:11 AM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help Yeah, change your font. Mark -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:59 PM Can anyone help me with what I am doing wrong? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: New Struts User - Pick list help
Thanks JC. I tried it but it doesn't seem to work. I am assuming I am using options because it is a dynamic list that needs to be pushed into the picklist. I have tried to use a combination of property and name, only property and only name but nothing seems to work. Maybe I am missing something? Could anyone point it out please? Thanks. -Original Message- From: Jakkampudi, ChandraseKhar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:25 PM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help Try form:options name="list"/ I am not sure if that is right. But you can go here for further documentation. http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options Hope that helps -JC -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:20 PM To: Struts Users Mailing List Subject: RE: New Struts User - Pick list help Thanks Mark...Hopefully people can read this. Can anyone help me with what I am doing wrong? The following is part of a form where I am trying to get a dynamic picklist generated: % java.util.ArrayList list = new java.util.ArrayList(); list.add("First"); list.add("Second"); list.add("Third"); list.add("Fourth"); list.add("Fifth"); pageContext.setAttribute("list", list, PageContext.PAGE_SCOPE); % form:select property="place" form:options property="list"/ /form:select Any help would be greatly appreciated... The error message I get is: javax.servlet.jsp.JspException: Must specify type attribute if name is specified void org.apache.struts.taglib.html.FormTag.lookup() int org.apache.struts.taglib.html.FormTag.doStartTag() void _body._provider__statement._providerStatementAdd._jspService(javax.servlet.h ttp.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/body/provider_statement/providerStatementAdd.jsp] void com.orionserver[Oracle9iAS (2.0.0.0) Containers for J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void oracle.jsp.runtimev2.JspPageTable.compileAndServe(oracle.jsp.runtimev2. JspPageInfo, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequ est, javax.servlet.http.HttpServletResponse, java.lang.String) void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServl etRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletReques t, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletReque st, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.include(javax.servlet.ServletRequ est, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.EvermindPageContext.include(java.lang.String) int s1.struts.taglib.component.InsertTag$InsertHandler.doEndTag() int s1.struts.taglib.component.InsertTag.doEndTag() void _template._mainLayout._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/template/mainLayout.jsp] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:14 PM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help You are posting in MS PGothic 10-point font and it is difficult to read (and anyone having HTML turned on will reply in the same font). Change to Arial, Helvetica, or other standard web font. Mark -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 4:02 PM I am not sure I understand what you mean by "change your font". -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 11:11 AM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help Yeah, change your font. Mark -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:59 PM Can anyone help me with what I am doing wrong? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: New Struts User - Pick list help
You need to specify the collection name. I've been fighting with this one all afternoon myself. Try this: form:options collection=list/ I'm assuming in your taglib import you are using 'form' as the prefix for the struts-html.tld tag library. -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 4:39 PM To: Struts Users Mailing List Subject: RE: New Struts User - Pick list help Thanks JC. I tried it but it doesn't seem to work. I am assuming I am using options because it is a dynamic list that needs to be pushed into the picklist. I have tried to use a combination of property and name, only property and only name but nothing seems to work. Maybe I am missing something? Could anyone point it out please? Thanks. -Original Message- From: Jakkampudi, ChandraseKhar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:25 PM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help Try form:options name=list/ I am not sure if that is right. But you can go here for further documentation. http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options Hope that helps -JC -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:20 PM To: Struts Users Mailing List Subject: RE: New Struts User - Pick list help Thanks Mark...Hopefully people can read this. Can anyone help me with what I am doing wrong? The following is part of a form where I am trying to get a dynamic picklist generated: % java.util.ArrayList list = new java.util.ArrayList(); list.add(First); list.add(Second); list.add(Third); list.add(Fourth); list.add(Fifth); pageContext.setAttribute(list, list, PageContext.PAGE_SCOPE); % form:select property=place form:options property=list/ /form:select Any help would be greatly appreciated... The error message I get is: javax.servlet.jsp.JspException: Must specify type attribute if name is specified void org.apache.struts.taglib.html.FormTag.lookup() int org.apache.struts.taglib.html.FormTag.doStartTag() void _body._provider__statement._providerStatementAdd._jspService(javax.servlet.h ttp.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/body/provider_statement/providerStatementAdd.jsp] void com.orionserver[Oracle9iAS (2.0.0.0) Containers for J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void oracle.jsp.runtimev2.JspPageTable.compileAndServe(oracle.jsp.runtimev2. JspPageInfo, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequ est, javax.servlet.http.HttpServletResponse, java.lang.String) void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServl etRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletReques t, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletReque st, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.include(javax.servlet.ServletRequ est, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.EvermindPageContext.include(java.lang.String) int s1.struts.taglib.component.InsertTag$InsertHandler.doEndTag() int s1.struts.taglib.component.InsertTag.doEndTag() void _template._mainLayout._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/template/mainLayout.jsp] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:14 PM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help You are posting in MS PGothic 10-point font and it is difficult to read (and anyone having HTML turned on will reply in the same font). Change to Arial, Helvetica, or other standard web font. Mark -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 4:02 PM I am not sure I understand what you mean by change your font. -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 11:11 AM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help Yeah, change your font. Mark -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:59 PM Can anyone help me with what I am doing wrong? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To
RE: New Struts User - Pick list help
This is code that I use and it works. See if it fits your requirements. Lookup is a Java bean that has a method getBranchList() which returns a collection of branches. jsp:useBean id="Lookup" class="com.xyz.LookUp" scope="application"/ bean:define id="branches" name="Lookup" property="branchList" type="java.util.Collection"/ html:select property="branches" html:options collection="branches" property="value" labelProperty="description"/ /html:select -JC -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:39 PM To: Struts Users Mailing List Subject: RE: New Struts User - Pick list help Thanks JC. I tried it but it doesn't seem to work. I am assuming I am using options because it is a dynamic list that needs to be pushed into the picklist. I have tried to use a combination of property and name, only property and only name but nothing seems to work. Maybe I am missing something? Could anyone point it out please? Thanks. -Original Message- From: Jakkampudi, ChandraseKhar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:25 PM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help Try form:options name="list"/ I am not sure if that is right. But you can go here for further documentation. http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options Hope that helps -JC -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:20 PM To: Struts Users Mailing List Subject: RE: New Struts User - Pick list help Thanks Mark...Hopefully people can read this. Can anyone help me with what I am doing wrong? The following is part of a form where I am trying to get a dynamic picklist generated: % java.util.ArrayList list = new java.util.ArrayList(); list.add("First"); list.add("Second"); list.add("Third"); list.add("Fourth"); list.add("Fifth"); pageContext.setAttribute("list", list, PageContext.PAGE_SCOPE); % form:select property="place" form:options property="list"/ /form:select Any help would be greatly appreciated... The error message I get is: javax.servlet.jsp.JspException: Must specify type attribute if name is specified void org.apache.struts.taglib.html.FormTag.lookup() int org.apache.struts.taglib.html.FormTag.doStartTag() void _body._provider__statement._providerStatementAdd._jspService(javax.servlet.h ttp.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/body/provider_statement/providerStatementAdd.jsp] void com.orionserver[Oracle9iAS (2.0.0.0) Containers for J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void oracle.jsp.runtimev2.JspPageTable.compileAndServe(oracle.jsp.runtimev2. JspPageInfo, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequ est, javax.servlet.http.HttpServletResponse, java.lang.String) void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServl etRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletReques t, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletReque st, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.include(javax.servlet.ServletRequ est, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.EvermindPageContext.include(java.lang.String) int s1.struts.taglib.component.InsertTag$InsertHandler.doEndTag() int s1.struts.taglib.component.InsertTag.doEndTag() void _template._mainLayout._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/template/mainLayout.jsp] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:14 PM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help You are posting in MS PGothic 10-point font and it is difficult to read (and anyone having HTML turned on will reply in the same font). Change to Arial, Helvetica, or other standard web font. Mark -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 4:02 PM I am not sure I understand what you mean by "change your font". -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 11:11 AM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help Yeah, change your font. Mark -Original Message- From: Honman
Cant set custom tag attr with bean tags
I am trying to set a custom tag parameter in one of my JSPs based on a value from an attribute set in my actionForm. I am able to create a bean using bean:define no problem. However, using bean:write from within the custom tag does not work. I have also attempted to use bean:parameter to define the value based upon the actionForm but cant get that to work. Am I going about this the right way, or is there another solution to this problem? I have included some code below //Retrieves the form properly bean:define id=hardwareForm name=hardwareForm type=form.HardwareForm / //custom tag ... fails abc:DropDown name=productCode defaultValue=bean:write name=hardwareForm name=producdCode / collection=%= p % / Thanks, Pete Serafin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Cant set custom tag attr with bean tags
I think you have to use scriptlets for this. Alternatively, look at the code for the nested tags (available in the nightly build I believe) to achieve what you want. Or checkout this site http://www.keyboardmonkey.com/struts Hope that helps -JC -Original Message- From: Pete Serafin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:59 PM To: '[EMAIL PROTECTED]' Subject: Cant set custom tag attr with bean tags I am trying to set a custom tag parameter in one of my JSPs based on a value from an attribute set in my actionForm. I am able to create a bean using bean:define no problem. However, using bean:write from within the custom tag does not work. I have also attempted to use bean:parameter to define the value based upon the actionForm but cant get that to work. Am I going about this the right way, or is there another solution to this problem? I have included some code below //Retrieves the form properly bean:define id=hardwareForm name=hardwareForm type=form.HardwareForm / //custom tag ... fails abc:DropDown name=productCode defaultValue=bean:write name=hardwareForm name=producdCode / collection=%= p % / Thanks, Pete Serafin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: changing from *.do to /do/* screws up everything?
Can url-patterns be when more complicated than *.jsp when restricting access to pages. I have used *.jsp and *.do, but can you add more complex expressions? What syntax do you use when adding these? In example, what might be the syntax to restrict all pages but a login page? or maybe the index page? maybe something like ((*.jsp) !(index.jsp))? Thanks, dave -Original Message- From: Robert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:51 PM To: 'Struts Users Mailing List' Subject: RE: changing from *.do to /do/* screws up everything? Figures. Then I suppose you could have an index.jsp and deny all other .jsps... Or maybe have the index page do a redirect to the index.do. Maybe not as clean or elegant, but would work. -Original Message- From: João Guilherme Del Valle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:44 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? I don´t know about the spec, but at least Tomcat *does not* accept this solution. I haven´t tried with a servlet, but an action doesn´t work. Maybe because the name of the tag in web.xml is welcome-file-list, it´s must be either a tag that accepts only files or a semantic problem in the spec. Joao Guilherme Del Valle [EMAIL PROTECTED] Visionnaire Informática SA http://www.visionnaire.com.br Tel/Fax: +55 41 373-7400 r: 221 Curitiba / PR / Brasil - Original Message - From: Robert [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 5:36 PM Subject: RE: changing from *.do to /do/* screws up everything? You could set up index.do as a 'welcome page'; but then it would depend on if the server would try to load this as a 'page' or via a URL which Struts would then pickup and handle. Not sure if that would work, but that's a though. Robert -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:26 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Yes, but will that not demand that your index page be a HTML file rather than JSP? If you have an index page that has dynamic pieces as well as static ones - or uses, say, templates (struts templates that is), you've just shot yourself in the foot, haven't you? Additional Thoughts, Eddie - Original Message - From: Keith Chew [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 2:21 PM Subject: RE: changing from *.do to /do/* screws up everything? An alternative to putting it in the WEB-INF is to use Apache to filter the request, eg: Location /*.jsp Deny from all /Location This has the advantage of: - if you decide not to disallow JSPs, you can - when you are developing, it's often handy to view the JSPs without going through the actions first (eg want to see if your table looks ok) Some thoughts Keith -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 7:44 a.m. To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+- --- | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: changing from *.do to /do/* screws up everything? | | | | |
RE: changing from *.do to /do/* screws up everything?
Yes, I have the question. For example, I want to block all JSPs includeing subfolders, eg /index.jsp /subfolder/1.jsp can I go something like **/*.jsp (similar to Ant)? Keith -Original Message- From: Dave J Dandeneau [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 10:59 a.m. To: Struts Users Mailing List Subject: RE: changing from *.do to /do/* screws up everything? Can url-patterns be when more complicated than *.jsp when restricting access to pages. I have used *.jsp and *.do, but can you add more complex expressions? What syntax do you use when adding these? In example, what might be the syntax to restrict all pages but a login page? or maybe the index page? maybe something like ((*.jsp) !(index.jsp))? Thanks, dave -Original Message- From: Robert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:51 PM To: 'Struts Users Mailing List' Subject: RE: changing from *.do to /do/* screws up everything? Figures. Then I suppose you could have an index.jsp and deny all other .jsps... Or maybe have the index page do a redirect to the index.do. Maybe not as clean or elegant, but would work. -Original Message- From: João Guilherme Del Valle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:44 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? I don´t know about the spec, but at least Tomcat *does not* accept this solution. I haven´t tried with a servlet, but an action doesn´t work. Maybe because the name of the tag in web.xml is welcome-file-list, it´s must be either a tag that accepts only files or a semantic problem in the spec. Joao Guilherme Del Valle [EMAIL PROTECTED] Visionnaire Informática SA http://www.visionnaire.com.br Tel/Fax: +55 41 373-7400 r: 221 Curitiba / PR / Brasil - Original Message - From: Robert [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 5:36 PM Subject: RE: changing from *.do to /do/* screws up everything? You could set up index.do as a 'welcome page'; but then it would depend on if the server would try to load this as a 'page' or via a URL which Struts would then pickup and handle. Not sure if that would work, but that's a though. Robert -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:26 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Yes, but will that not demand that your index page be a HTML file rather than JSP? If you have an index page that has dynamic pieces as well as static ones - or uses, say, templates (struts templates that is), you've just shot yourself in the foot, haven't you? Additional Thoughts, Eddie - Original Message - From: Keith Chew [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 2:21 PM Subject: RE: changing from *.do to /do/* screws up everything? An alternative to putting it in the WEB-INF is to use Apache to filter the request, eg: Location /*.jsp Deny from all /Location This has the advantage of: - if you decide not to disallow JSPs, you can - when you are developing, it's often handy to view the JSPs without going through the actions first (eg want to see if your table looks ok) Some thoughts Keith -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 7:44 a.m. To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob |+- || Bryan | || Field-Elliot | || bryan_lists@ne| || tmeme.org | || | || 27/02/2002 | || 17:49 | || Please respond | || to Struts | || Users Mailing | || List | || | |+-
RE: How to include struts.jar the proper way
I'm a newbie, but I ran into something like this before. Make sure you have a good Struts.jar (look at the contents and see if that class is in there). Look around and see if you've got another struts.jar (or download it again from the web site). I think I was accidentally using one from a 3rd party package...which was missing some thinkgs... Just an idea to try if it's really in your classpath or lib. -Original Message- From: Ida Dørum [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 9:06 AM To: [EMAIL PROTECTED] Subject: How to include struts.jar the proper way I get the following error when i run my struts-application, and it tries to instantiate my ActionForm class: java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm As I see from the archives this is a pretty common problem, however none of the solutions i've found here seem to work, and many of them condradict eachother () This is my setup: - struts.jar is included in my WEB-INF/lib directory - struts.jar is not included in my server (WL6.1) lib directory or in its classpath - my application is deployed as an .ear (and must be) I've tried: - exluding WEB-INF/lib/struts.jar when building my .ear (using ant), both with and without struts.jar in the WL classpath and lib Any good suggestions on what's wrong? Thanks in advance - Ida ...mogul technology as... mogul technology ida dørum - software engineer mailto:[EMAIL PROTECTED] www.mogul.no ... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Cant set custom tag attr with bean tags
My problem with using scriplets is that when the form Im submitting fails actionForm validation, the values for all of my form are reset except the custom tag built form elements ( which happen to be drop downs ). I guess I could use bean:parameter, but how do I add a value to the requestParameter? Pete Serafin Jakkampudi, ChandraseKhar wrote: I think you have to use scriptlets for this. Alternatively, look at the code for the nested tags (available in the nightly build I believe) to achieve what you want. Or checkout this site http://www.keyboardmonkey.com/struts Hope that helps -JC -Original Message- From: Pete Serafin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:59 PM To: '[EMAIL PROTECTED]' Subject: Cant set custom tag attr with bean tags I am trying to set a custom tag parameter in one of my JSPs based on a value from an attribute set in my actionForm. I am able to create a bean using bean:define no problem. However, using bean:write from within the custom tag does not work. I have also attempted to use bean:parameter to define the value based upon the actionForm but cant get that to work. Am I going about this the right way, or is there another solution to this problem? I have included some code below //Retrieves the form properly bean:define id=hardwareForm name=hardwareForm type=form.HardwareForm / //custom tag ... fails abc:DropDown name=productCode defaultValue=bean:write name=hardwareForm name=producdCode / collection=%= p % / Thanks, Pete Serafin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: changing from *.do to /do/* screws up everything?
The *easiest way to do this is to use a DefaultAction that can be used to forward to JSPs, and actions-mappings for everything else. Then protect /do/* request your JSPs with /do/name.jsp and it'll go through DefaultAction (search this list for more info), and having your welcome as /index.jsp (notice no /do/) Is this what you're looking for? Matt --- Keith Chew [EMAIL PROTECTED] wrote: Yes, I have the question. For example, I want to block all JSPs includeing subfolders, eg /index.jsp /subfolder/1.jsp can I go something like **/*.jsp (similar to Ant)? Keith -Original Message- From: Dave J Dandeneau [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 10:59 a.m. To: Struts Users Mailing List Subject: RE: changing from *.do to /do/* screws up everything? Can url-patterns be when more complicated than *.jsp when restricting access to pages. I have used *.jsp and *.do, but can you add more complex expressions? What syntax do you use when adding these? In example, what might be the syntax to restrict all pages but a login page? or maybe the index page? maybe something like ((*.jsp) !(index.jsp))? Thanks, dave -Original Message- From: Robert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:51 PM To: 'Struts Users Mailing List' Subject: RE: changing from *.do to /do/* screws up everything? Figures. Then I suppose you could have an index.jsp and deny all other .jsps... Or maybe have the index page do a redirect to the index.do. Maybe not as clean or elegant, but would work. -Original Message- From: João Guilherme Del Valle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:44 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? I don´t know about the spec, but at least Tomcat *does not* accept this solution. I haven´t tried with a servlet, but an action doesn´t work. Maybe because the name of the tag in web.xml is welcome-file-list, it´s must be either a tag that accepts only files or a semantic problem in the spec. Joao Guilherme Del Valle [EMAIL PROTECTED] Visionnaire Informática SA http://www.visionnaire.com.br Tel/Fax: +55 41 373-7400 r: 221 Curitiba / PR / Brasil - Original Message - From: Robert [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 5:36 PM Subject: RE: changing from *.do to /do/* screws up everything? You could set up index.do as a 'welcome page'; but then it would depend on if the server would try to load this as a 'page' or via a URL which Struts would then pickup and handle. Not sure if that would work, but that's a though. Robert -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:26 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Yes, but will that not demand that your index page be a HTML file rather than JSP? If you have an index page that has dynamic pieces as well as static ones - or uses, say, templates (struts templates that is), you've just shot yourself in the foot, haven't you? Additional Thoughts, Eddie - Original Message - From: Keith Chew [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 2:21 PM Subject: RE: changing from *.do to /do/* screws up everything? An alternative to putting it in the WEB-INF is to use Apache to filter the request, eg: Location /*.jsp Deny from all /Location This has the advantage of: - if you decide not to disallow JSPs, you can - when you are developing, it's often handy to view the JSPs without going through the actions first (eg want to see if your table looks ok) Some thoughts Keith -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 7:44 a.m. To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Ok, silly question time. Why would you want to put your pages under WEB-INF? Honestly, I don't see why you would, but ... I'm hardly a 'guru'. Thanks, Eddie - Original Message - From: Rob Breeds [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 11:58 AM Subject: Re: changing from *.do to /do/* screws up everything? Thanks for suggestion but I can't use html:base because all my JSPs are under WEB-INF\pages Putting html:base/ in will cause images (and any relative urls) to have URLs of img src=WEB-INF/pages/images/find_obj.gif which is even worse (doesn't work at all) and defeats the point of putting pages under WEB-INF! Rob
RE: changing from *.do to /do/* screws up everything?
No, that was not what I was looking for. In Apache, you can use the Location tag to filter out http requests, eg: Location /*.jsp Deny from all /Location I want to filter out all JSPs including subfolders. Any thoughts? I just read the documentation and it says you use LocationMatch and pass it a regular expression, eg LocationMatch /(extra|special)/data would match URLs that contained the substring /extra/data or /special/data. I want something like: LocationMatch /**/*.jsp Is this the correct format of a regular expression? I will give this a go... Keith -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 11:16 a.m. To: Struts Users Mailing List Subject: RE: changing from *.do to /do/* screws up everything? The *easiest way to do this is to use a DefaultAction that can be used to forward to JSPs, and actions-mappings for everything else. Then protect /do/* request your JSPs with /do/name.jsp and it'll go through DefaultAction (search this list for more info), and having your welcome as /index.jsp (notice no /do/) Is this what you're looking for? Matt --- Keith Chew [EMAIL PROTECTED] wrote: Yes, I have the question. For example, I want to block all JSPs includeing subfolders, eg /index.jsp /subfolder/1.jsp can I go something like **/*.jsp (similar to Ant)? Keith -Original Message- From: Dave J Dandeneau [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 10:59 a.m. To: Struts Users Mailing List Subject: RE: changing from *.do to /do/* screws up everything? Can url-patterns be when more complicated than *.jsp when restricting access to pages. I have used *.jsp and *.do, but can you add more complex expressions? What syntax do you use when adding these? In example, what might be the syntax to restrict all pages but a login page? or maybe the index page? maybe something like ((*.jsp) !(index.jsp))? Thanks, dave -Original Message- From: Robert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:51 PM To: 'Struts Users Mailing List' Subject: RE: changing from *.do to /do/* screws up everything? Figures. Then I suppose you could have an index.jsp and deny all other .jsps... Or maybe have the index page do a redirect to the index.do. Maybe not as clean or elegant, but would work. -Original Message- From: Joco Guilherme Del Valle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:44 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? I don4t know about the spec, but at least Tomcat *does not* accept this solution. I haven4t tried with a servlet, but an action doesn4t work. Maybe because the name of the tag in web.xml is welcome-file-list, it4s must be either a tag that accepts only files or a semantic problem in the spec. Joao Guilherme Del Valle [EMAIL PROTECTED] Visionnaire Informatica SA http://www.visionnaire.com.br Tel/Fax: +55 41 373-7400 r: 221 Curitiba / PR / Brasil - Original Message - From: Robert [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 5:36 PM Subject: RE: changing from *.do to /do/* screws up everything? You could set up index.do as a 'welcome page'; but then it would depend on if the server would try to load this as a 'page' or via a URL which Struts would then pickup and handle. Not sure if that would work, but that's a though. Robert -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:26 PM To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Yes, but will that not demand that your index page be a HTML file rather than JSP? If you have an index page that has dynamic pieces as well as static ones - or uses, say, templates (struts templates that is), you've just shot yourself in the foot, haven't you? Additional Thoughts, Eddie - Original Message - From: Keith Chew [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 2:21 PM Subject: RE: changing from *.do to /do/* screws up everything? An alternative to putting it in the WEB-INF is to use Apache to filter the request, eg: Location /*.jsp Deny from all /Location This has the advantage of: - if you decide not to disallow JSPs, you can - when you are developing, it's often handy to view the JSPs without going through the actions first (eg want to see if your table looks ok) Some thoughts Keith -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 7:44 a.m. To: Struts Users Mailing List Subject: Re: changing from *.do to /do/* screws up everything? Ok, silly question time. Why
RE: bean:message as content of template:put tag
Phil, I ran into the same problem. I don't know if my solution was the best approach...but it worked: replace 4. with: template:put name='title' content='index.title'/ then in your template use: tiles:useAttribute id=title name=title classname=java.lang.String / titlebean:message key=%=title % //title HTH. -Chris -Original Message- From: Phil Miller [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 4:07 PM To: [EMAIL PROTECTED] Subject: bean:message as content of template:put tag Hi, I am developing an internationalized program using struts, and am using bean:message tags to display copy in different languages. On my site index page, I'd like to use the template:put tag on line 4 below to insert my locale specific page title. It seems that struts does not support this. Is there a workaround to this problem? index.jsp. 1. %@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' % 2. %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % 3. template:insert template='/template/template.jsp' 4. template:put name='title' content='bean:message key=index.title/'/ 5. template:put name='advert' content='advert here' direct='true'/ 6. template:put name='nav' content='/inc/nav.jsp'/ 7. template:put name='body' content='body here' direct='true'/ 8. /template:insert Any help would be greatly appreciated, Phil, Chamonix, France -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Session Control
In my project we want to control the session. The purpose of this is : 1. Preventing user to click browser back button to submit the form again. If After submitting a page user clicks on back button and tries to submit the same page). I think we can achieve it by using struts Action class's Generate and isvalid token method. Could any body helped on this how to implement it? Thanks Subhendu -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: New Struts User - Pick list help
Thanks for the help. I tried these but I still couldn't come up with the right stuff. Would you happen to have an example of the bean? My original example was just going to pull it from an array that was on the same page. Sorry if my questions seem elementary. I am relatively new to both Java and struts. Thanks. -Original Message- From: Jakkampudi, ChandraseKhar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:45 PM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help This is code that I use and it works. See if it fits your requirements. Lookup is a Java bean that has a method getBranchList() which returns a collection of branches. jsp:useBean id="Lookup" class="com.xyz.LookUp" scope="application"/ bean:define id="branches" name="Lookup" property="branchList" type="java.util.Collection"/ html:select property="branches" html:options collection="branches" property="value" labelProperty="description"/ /html:select -JC -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:39 PM To: Struts Users Mailing List Subject: RE: New Struts User - Pick list help Thanks JC. I tried it but it doesn't seem to work. I am assuming I am using options because it is a dynamic list that needs to be pushed into the picklist. I have tried to use a combination of property and name, only property and only name but nothing seems to work. Maybe I am missing something? Could anyone point it out please? Thanks. -Original Message- From: Jakkampudi, ChandraseKhar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:25 PM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help Try form:options name="list"/ I am not sure if that is right. But you can go here for further documentation. http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options Hope that helps -JC -Original Message- From: Honman Lee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:20 PM To: Struts Users Mailing List Subject: RE: New Struts User - Pick list help Thanks Mark...Hopefully people can read this. Can anyone help me with what I am doing wrong? The following is part of a form where I am trying to get a dynamic picklist generated: % java.util.ArrayList list = new java.util.ArrayList(); list.add("First"); list.add("Second"); list.add("Third"); list.add("Fourth"); list.add("Fifth"); pageContext.setAttribute("list", list, PageContext.PAGE_SCOPE); % form:select property="place" form:options property="list"/ /form:select Any help would be greatly appreciated... The error message I get is: javax.servlet.jsp.JspException: Must specify type attribute if name is specified void org.apache.struts.taglib.html.FormTag.lookup() int org.apache.struts.taglib.html.FormTag.doStartTag() void _body._provider__statement._providerStatementAdd._jspService(javax.servlet.h ttp.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/body/provider_statement/providerStatementAdd.jsp] void com.orionserver[Oracle9iAS (2.0.0.0) Containers for J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void oracle.jsp.runtimev2.JspPageTable.compileAndServe(oracle.jsp.runtimev2. JspPageInfo, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequ est, javax.servlet.http.HttpServletResponse, java.lang.String) void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServl etRequest, javax.servlet.http.HttpServletResponse) void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletReques t, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletReque st, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.include(javax.servlet.ServletRequ est, javax.servlet.ServletResponse) void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.EvermindPageContext.include(java.lang.String) int s1.struts.taglib.component.InsertTag$InsertHandler.doEndTag() int s1.struts.taglib.component.InsertTag.doEndTag() void _template._mainLayout._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/template/mainLayout.jsp] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:14 PM To: 'Struts Users Mailing List' Subject: RE: New Struts User - Pick list help You are posting in MS PGothic 10-point font and it is difficult to read (and anyone having HTML turned on will reply in
sslext with snapshot...
Hi Has anyone gotten the ssl extension to work with the latest snapshot of Struts. I am having some difficulties getting it to work. Keith -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
ActionMapping...
Hi In the latest snapshot, if declared in the web.xml: init-param param-namemapping/param-name param-valueorg.apache.struts.action.SecureActionMapping/param-value /init-param How do I get this Mapping in code? I tried: SecureActionMapping mapping = (SecureActionMapping)getApplicationConfig(request).getProcessor().processMap ping(request, response, path); but it returns ActionMapping which causes a ClassCastException. Can anyone assist? Keith -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
hiding fields...interchangeably
We have a jsp that is displaying a list of products. 11 fields associated with the products are mapped through STRUTS. We'll always display 4 of these fields, but may or may not want to display 6 others...depending on the value of the last field. We've tried looping through our list to display the first four, then depending on the last field, place the 6 dependent fields in either html:text tags or html:hidden tags... STRUTS doesn't seem to like us interchanging the element type of these fields. We have a work around by placing them all in text input elements (html:text) and using the style attribute of a table row to change the visibility of the table row as either visible or hidden...as well as modifying the height to be 0px. There's gotta be a better way to handle this through STRUTS...any ideas?
Struts with (Oracle's) UIX (presentation layer taglib)
Has anyone tried to use Struts with Oracle's UIX presentation layer tag libs? The UIX stuff seems fairly extensive, and even includes some controller-related functionality, but I haven't been able to figure it out yet. The UIX Controller also has somewhat limited functionality, supposedly, compared to Oracle's new fandangled MVC-concept Project Cleveland - I have *no* idea what Cleveland is attempting to do, but it looks aggressive. I'd feel much more comfortable with using Struts as a controller... __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: New Struts User - Pick list help
and the answer is... (1) you're using the wrong taglib. form has been deprecated. use html instead. (2) assuming you have a list called list that contains Java Bean objects with attributes name and id, you'd display it as a list of options as follows: html:options collection=list property=id labelProperty=name/ (3) as someone already mentioned, you can find this at: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options still can't get it? take a quick look at the source. it's pretty simple. ab _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: sslext with snapshot...
Ignore this. I have fixed it. The init-param param-namemapping/param-name param-valueorg.apache.struts.action.SecureActionMapping/param-value /init-param Has been deprecated. Use the "className" attibute of each action element. BTW, what's the controller element? I couldn't find an example... Keith -Original Message- From: Keith Chew [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 12:58 p.m. To: Struts Users Mailing List Subject: sslext with snapshot... Hi Has anyone gotten the ssl extension to work with the latest snapshot of Struts. I am having some difficulties getting it to work. Keith -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[ANNOUNCE] stxx - 0.9.0 Struts for transforming XML and XSL
stxx 0.9.0 - http://www.openroad.ca/opencode/ What's new - Examples, examples, examples. The stxx-examples.war file no longer sucks (well, it sucks less at least). There are now four examples included that actually show how to use the features of stxx. - You can chain XML documents that are generated by multiple Actions together into one big XML document - for the rest, see the CHANGES.TXT file for details Struts for transforming XML with XSL (stxx) is an extension of the struts framework to support XML and XSL without changing the functionality of struts . stxx sit's on top of struts, extending it's existing functionality to allow Action classes to return XML that will be transformed by an XSL file. The idea of stxx is to remove the need to be use JSP and TagLibs for the presentation layer of this framework. However, stxx does not force you to go the XML/XSL route, both technologies will work side by side. Adding XML/XSL support to struts is ALMOST as simple as adding the following tags to your struts-config.xml file: actionscope=request type=com.oroad.stxx.example.ExampleWelcomeAction path=/welcome forward name=success !-- the transform tags take the XML returned by the Action and transform them. The transform tag used is determined by matching the user agent against the name attribute (or default if nothing matches) -- transform path=/login.xsl name=default/ transform path=/login_netscape.xsl name=Mozilla / transform path=/login_msie.xsl name=MSIE render=client / /forward /action stxx features: - Enhances the forward tag in the struts-config.xml file to allow one-many transform tags. These transform tags represent the XSL file to be used depending on the user-agent of the browser accessing struts - stxx automatically appends the ApplicationResources file as XML to the Document object used by the enchanced ActionServlet class - stxx also automatically appends the request parameters and attributes, as well as ActionErrors as XML in the enchanced ActionServlet class - stxx will allow you to push the job of transforming the XML to the browser -- Jeff Pennal Senior Software Developer Openroad Communications Vancouver, BC -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Design Issue: XML/XSL/JSP
I wrote an extenstion to struts, called stxx (http://www.openroad.ca/opencode/), which allows you to forward an XML document, generated in an Action, to an XSL file, as opposed to a JSP. This may be an option for you. In this case, you would have an action that generates the XML (from a database, some other source, etc). The stxx code allows you to define an XSL file(s) in your struts-config.xml file that would be used to transform the XML into some HTML output. Let me know if this is of any help to you, Jeff Rajagopal V wrote: Im redesigning my JSP which does all SQL + presentation. I have a main report which has 4 sub reports which have to be created in HTML and PDF. So what i do now is create a XML out of the SQL and then use appropriate stylesheets. All this gets done in the JSP(Now!!). Now, if i have to use Struts, Im thinking of having Action subclasses for each of the 4 reports, create XML in each of them and add the Document object to some collection that can be retrieved in the JSP. In the JSP, I can fetch the collection and use taglibs to associate this with a stylesheet and print out the results. Is this an acceptable design? I had a look at some of the postings here about creating XMLServlet before control goes back to the JSP but I have some text that has to be displayed other than the results. Is there any flaw in this design. TIA Raj __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Jeff Pennal p:604-694-0554(x107) Senior Software Developer f:604-694-0558 Openroad Communications e:[EMAIL PROTECTED] Vancouver, BC -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]