Re: Problem with bean:message tag?
The documentation for the bean:message tag states the following: Retrieves an internationalized message for the specified locale, using the specified message key, and write it to the output stream. Up to five parametric replacements (such as {0}) may be specified. The message key may be specified directly, using the key attribute, or indirectly, using the name and property attributes to obtain it from a bean. So what I expect is that I can use the name and property attributes to retrieve a message key from the ci property in the %= Constants.STATS_KEY % bean! Regards, Guus - Original Message - From: Mark Schenk [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 20, 2001 19:38 Subject: RE: Problem with bean:message tag? When I try to use bean:message name=%= Constants.STATS_KEY % property=ci scope=request/ I get the message According to TLD attribute key is mandatory for tag message The message is incorrect, at least if I am to believe the documentation of the BEAN TLD! Does anyone has any experience using name property instead of key? Are you sure you're not confusing bean:message and bean:write ? What would you expect as output from your above tag? Mark/ -- -- Mark Schenk | Ceci n'est pas une signature Blackboard Project Manager | Delft University of Technology |E-mail: [EMAIL PROTECTED] Dept.: DTO |Phone: +31 152785448 (85448) Room: LB00.680 |Fax:+31 152786359 -- --
SSL-Connection
Hi everybody, i am new Struts-user. i would like to know, if Struts supports SSL? Regards Ebi
about usage of validation
Dear all, I am new with struts and want to use the validation features. I have just downloaded and compiled the validation codes from latest cvs. Can any body tell me any hints of the new validation.xml? I tried to hack it and understand some of the syntax but still a bit confusing with this file! In addition, when will be validation added to struts? Thx! Cheers, -- KC == ·s®ö§K¶O¹q¤l«H½c http://sinamail.sina.com.hk
Re: SV: pls Help .java File Wont compile/wrong name packages
Hi , cheers 4 the return within the IDE when i go to ApplicationMappings a mouseover prompt states invalid package declaration. Thus path is as u noted plus the name of my package is package action; Thus i intend to create another Action Class From the package com.ora.jsp.servlets. Thus can i just modify the package path Peter Alfors wrote: Part 1.1Type: Plain Text (text/plain) Encoding: 8bit -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: Any Pointers regarding Action Classes
Cheers i believe that is the best line of action. Excuse the pun. Calvin Yu wrote: If you don't figure out why ApplicationMappings.java and ActionForward.java isn't compiling, it isn't going to help you to compile an Action class. I imagine the problem that is causing the compilation of those two classes is going cause the compilation failures of many of your other classes. The best thing you can do is start from scratch. Move all your java files somewhere else and start adding them back one by one, compiling each file along the way. Calvin On 20 Jul 2001 15:34:40 +0100, Chuck Amadi wrote: Hi , i require to create another Action Class contoller as the ApplicationMappings ActionForward.java won't compile so i would like to create an Action.java and run ant to compile. Thus is there a n example of this class and is it a abstract class with no methods(uniplemented methods-empty bodies ) as my java is only at fundamental level. I have checked the struts-example no joy albiet there is at 4.2 Action Classes userGuide/building_controller thus appears Abstract enough. Cheers Chuck. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: SSL-Connection
SSL is provided by your container, and then passes through to Struts. See http://husted.com/about/struts/FAQ/controller-ssl.htm for more. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Tamanaei, ITS PersWi C500, DA wrote: Hi everybody, i am new Struts-user. i would like to know, if Struts supports SSL?
Re: Basic Question in Servlet/JSP ?
If you're referring to the PageContext that is available when you are rendering the view, the answer would be because it doesn't exist yet ;-) The Struts ActionController (a servlet) calls an Action (not a servlet), and may eventually forwards to a JSP (another servlet). The PageContext for the JSP isn't available until it is called. The mechanism for carrying information between HTTP forwards is the HttpServletRequest, or the session to carry it between requests. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ suhas wrote: Hi The PageContext instance gives us access to implicit objects in the page .This is used mainly in JSP . Why Can't we have something in the Servlet ? Why to directly use HttpServletRequest , HttpSession in the Servlet ? Better can't we get this from the container specific implementaion something like PageContext in the Servlet too? . Regards
Re: Struts Design patterns
Would you recommend using one subclassed Action servlet for both an EditAction and SaveAction? I based my design off the example application - and have two separate classes. Thanks, Matt --- Ted Husted [EMAIL PROTECTED] wrote: Any of the patterns described in the recent Core J2EE Patterns should work well with Struts. In fact, many of these have already been implemented for you by the framework ;-) The three patterns that Struts developers may use most would be Data Access Objects, Value Objects, and Helper Objects. The classical trinity is to have a Data Access Object return a Value Object, which is wrapped in a Helper Object and sent to the presentation layer. In my projects, I use standard method calls to my Data Access Objects, like public static final int scriptInsert( int script, byte image, String title, String article ) throws AccessException { return scriptCommand(script,image,title,article,Commands.SCRIPT_INSERT); } Where scriptCommand is a library function shared by Insert and Update. The implementation here uses standard JDBC things like PreparedStatements. Though, I could change all that without affecting anything else. (Hence, the custom AccessException instead of SQL Exception.) The retrieval commands return RowSets public static final RowSet scriptSelect(int key) throws SQLException { return RowSets.getRow(key,Commands.SCRIPT_SELECT); } which I use as Value objects. RowSets are handy even if you are using something else in the implementation. Since RowSets can be created from scratch or from a ResultSet, they make an excellent value object. You could also pass the RowSet directly to the presentation layer, and use the Struts logic:iterate and bean:write to access the column by number. bean:write name=ROW property=object[3]/ You can also use the Jakarta Tablib dbTags with disconnected rowsets. I just submitted the patch, and it may not be available in the nightly build yet, but you can get the updated JAR from More About Struts. http://husted.com/about/struts/resources.htm#new Here you just place the RowSet into Request context and tell the resultSet tag its name. db:resultSet id=ROW name=ROWS and then you can use the dbTag getColumn tag to refer to columns by name db:getColumn colName=title/ See the Jarkata dbTag docs for more about getColumn and friends. Some other Struts design stategies I would recommend are * Document all entry points with global forwards (no page= parameters) * Use more mappings to minimize the use of hidden fields and query strings * Use the parameter property to document each operation of an Action * Use one Action for related operations * Use one ActionForm for related forms * Subclass Action and ActionServlet as needed for better code reuse * Use directory matching for ActionServlet (/do/* instead of *.do) -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Jerzy Kawa wrote: Hello all, Any comments about struts design pattern ? __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: Basic Question in Servlet/JSP ?
I was not referring to Struts . We have something like PageContext in the JSP . which we use to set some information using setAttribute method in either Request scope or Session scope . Instead same could have done with the request.setAttribute( key val) or session.setAttribute(key , val ) . My question was why we have not provided with few implicit objects like session , out etc.. in the Servlet's ??? Why this concept came only in JSP ? . Suhas - Original Message - From: Ted Husted [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 4:43 PM Subject: Re: Basic Question in Servlet/JSP ? If you're referring to the PageContext that is available when you are rendering the view, the answer would be because it doesn't exist yet ;-) The Struts ActionController (a servlet) calls an Action (not a servlet), and may eventually forwards to a JSP (another servlet). The PageContext for the JSP isn't available until it is called. The mechanism for carrying information between HTTP forwards is the HttpServletRequest, or the session to carry it between requests. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ suhas wrote: Hi The PageContext instance gives us access to implicit objects in the page .This is used mainly in JSP . Why Can't we have something in the Servlet ? Why to directly use HttpServletRequest , HttpSession in the Servlet ? Better can't we get this from the container specific implementaion something like PageContext in the Servlet too? . Regards
please help me with iterate!
Hi, my code looks like the following logic:iterate id=current_ticket name=TicketListResponse property=ticket TR vAlign=top TDbean:write name=current_ticket property=ticketNumber//TD TDbean:write name=current_ticket property=creationDate//TD TDbean:write name=current_ticket property=initiatorId//TD TD align=middlebean:write name=current_ticket property=subject//TD TDbean:write name=current_ticket property=editorId//TD TD align=middlebean:write name=current_ticket property=state//TD TD align=middleFONT color=#ffB bean:write name=current_ticket property=priority/ /B/FONT/TD TD align=middlebean:write name=current_ticket property=lastChanged//TD /TR /logic:iterate where TicketListResponse contains among other information a Ticket[]. The error message I receive is: No getter method for proprierty ticket of bean TicketListResponse. A getTicket method retourning a Ticket Array is implemented in TicketListResponse. Thanks for your help Monica
RE: NewB: Is Struts completely reliant on sessions
True, but then you actually have a single-point again. Lose the server and your stickiness is useless. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: vrijdag 20 juli 2001 16:41 To: [EMAIL PROTECTED] Subject: RE: NewB: Is Struts completely reliant on sessions Renzo, Felix, If your front-end web server/load balancer (also known as Local Director or Resonate, etc) is implemented to use IP stickiness, then this is a non-issue since the Web user will be returned to the server which serviced the original request. Brian Renzo Toma renzo.toma@xTo: [EMAIL PROTECTED] s4all.nlcc: Subject: RE: NewB: Is Struts completely reliant on sessions 07/20/2001 05:40 AM Please respond to struts-user Hi As long as you carry over all properties to the next request using form elements (text, hidden, ...), you will only miss the LOCALE session variable. But you set that by subclassing ActionServlet. Actually when you stay away from wizard-like/multipage forms, you'll be fine. Renzo -Original Message- From: Felix Ulrich [mailto:[EMAIL PROTECTED]] Sent: vrijdag 20 juli 2001 11:29 To: [EMAIL PROTECTED] Subject: NewB: Is Struts completely reliant on sessions Hi We have to build deploy some web applications with JSP/Servlets on an LVS cluster. At the moment, though, I don't think we can guarantee session affinity (i.e. subsequent requests will end up on different machines), and it seems that Struts uses sessions quite heavily. Am I right in thinking that sessions are a pre-requisite of using the Struts framework? Is there any part of Struts I could still use without sessions (e.g. some of the taglibs maybe)? Thanks Felix. Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie
Re: Basic Question in Servlet/JSP ?
To access the request in a Struts Action, you would reference the request passed to the perform() method. public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request,// --- request HttpServletResponse response) To access the session, you would code HttpSession session = request.getSession(); -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ suhas wrote: I was not referring to Struts . We have something like PageContext in the JSP . which we use to set some information using setAttribute method in either Request scope or Session scope . Instead same could have done with the request.setAttribute( key val) or session.setAttribute(key , val ) . My question was why we have not provided with few implicit objects like session , out etc.. in the Servlet's ??? Why this concept came only in JSP ? . Suhas
Re: Basic Question in Servlet/JSP ?
On 23 Jul 2001 16:29:52 +0530, suhas wrote: Better can't we get this from the container specific implementaion something like PageContext in the Servlet too? . Why would we need to? Calvin
Re: SV: pls Help .java File Wont compile/wrong name packages
What exactly is the package declaration? What is the file structure? When you compile this class, what is the error? Calvin On 23 Jul 2001 11:07:49 +0100, Chuck Amadi wrote: Hi , cheers 4 the return within the IDE when i go to ApplicationMappings a mouseover prompt states invalid package declaration. Thus path is as u noted plus the name of my package is package action; Thus i intend to create another Action Class From the package com.ora.jsp.servlets. Thus can i just modify the package path Peter Alfors wrote: Part 1.1Type: Plain Text (text/plain) Encoding: 8bit -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: Struts Design patterns
I would, yes. I use one Action class for all four CRUD operations on a table (or logical view), along with any special retrievals. I may use separate helper classes for specialized operations, but I try to reduce the number of individual Action classes, since these are instantiated for the life of an application. The overall pattern is that the Action selects a Helper, and passes information about the request (e.g. the parameters). The Helper calls the appropriate Data Access object (plain Java class), which returns a RowSet for retrievals, or just a count for other operations. The Helper wraps the RowSet (aka Value Object), and is inserted into the request by the Action. The Action also transfers data between the RowSet and ActionForm as needed for inserts, selects, or updates. Only the Action is linked to any HTTP packagaes. The Helper and Data Access objects could be used in any environment. Matt Raible wrote: Would you recommend using one subclassed Action servlet for both an EditAction and SaveAction? I based my design off the example application - and have two separate classes. Thanks, Matt
Re: Struts Design patterns
Wondered if anyone would bite ... + Extension matching for servlets is not available in some hosting environments. + Some proxy servers choke on query strings. An enhancement to Struts could use extra path information instead, but extension matching would complicate matters. For more, see http://www.mail-archive.com/struts-user@jakarta.apache.org/msg11655.html Here's a working URL that uses an extra path rather than a query string: http://www.amazon.com/exec/obidos/ISBN=0130648841/hitchhikeguidetoA/ As a query string this might read http://www.amazon.com/exec/obidos?ISBN=0130648841hitchhikeguidetoA + *.do correlates with *.jsp, but Actions are not JSPs (or even servlets). Extension mapping encourages developers to think of Action URIs as a path rather than like a method signature. + /do/ looks ~way~ cooler on the address bar ;-) Of course, if a developer uses global forwards for all links (no page='s), then switching back and forth can be just a matter of editing the configuration file ;-) Martin Cooper wrote: I'd like to hear more about why you prefer this technique. I have to admit that I've rather blindly followed the *.do camp without giving too much consideration to the alternatives.
Re: Struts Design patterns
Is there an example in any of your resources? --- Ted Husted [EMAIL PROTECTED] wrote: I would, yes. I use one Action class for all four CRUD operations on a table (or logical view), along with any special retrievals. I may use separate helper classes for specialized operations, but I try to reduce the number of individual Action classes, since these are instantiated for the life of an application. The overall pattern is that the Action selects a Helper, and passes information about the request (e.g. the parameters). The Helper calls the appropriate Data Access object (plain Java class), which returns a RowSet for retrievals, or just a count for other operations. The Helper wraps the RowSet (aka Value Object), and is inserted into the request by the Action. The Action also transfers data between the RowSet and ActionForm as needed for inserts, selects, or updates. Only the Action is linked to any HTTP packagaes. The Helper and Data Access objects could be used in any environment. Matt Raible wrote: Would you recommend using one subclassed Action servlet for both an EditAction and SaveAction? I based my design off the example application - and have two separate classes. Thanks, Matt __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: Problem with bean:message tag?
This must be an error in the Tag Library Reference (in the source-code of the bean:message tag there are no name and property attributes)! Read the Tag Library Guides for the usage of the bean:message tag. In this documentation name and property are not mentioned. Matthias Guus Holshuijsen wrote: The documentation for the bean:message tag states the following: Retrieves an internationalized message for the specified locale, using the specified message key, and write it to the output stream. Up to five parametric replacements (such as {0}) may be specified. The message key may be specified directly, using the key attribute, or indirectly, using the name and property attributes to obtain it from a bean. So what I expect is that I can use the name and property attributes to retrieve a message key from the ci property in the %= Constants.STATS_KEY % bean! Regards, Guus - Original Message - From: Mark Schenk [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 20, 2001 19:38 Subject: RE: Problem with bean:message tag? When I try to use bean:message name=%= Constants.STATS_KEY % property=ci scope=request/ I get the message According to TLD attribute key is mandatory for tag message The message is incorrect, at least if I am to believe the documentation of the BEAN TLD! Does anyone has any experience using name property instead of key? Are you sure you're not confusing bean:message and bean:write ? What would you expect as output from your above tag? Mark/ -- -- Mark Schenk | Ceci n'est pas une signature Blackboard Project Manager | Delft University of Technology |E-mail: [EMAIL PROTECTED] Dept.: DTO |Phone: +31 152785448 (85448) Room: LB00.680 |Fax:+31 152786359 -- --
RE: NewB: Is Struts completely reliant on sessions
Clusterings Application Servers are designed to provide for just this case. Weblogic and Silverstream are two that come to mind that support sessions and clustering. If a clustering application server isn't an option, I believe you have only the two choices that were presented: 1. Make sure your application isn't dependant upon sessions (work around the LOCALE session issue) 2. Use ip-stickiness in your load balancer and live with the single point of failure. Good luck. -Original Message- From: Renzo Toma [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 7:34 AM To: [EMAIL PROTECTED] Subject: RE: NewB: Is Struts completely reliant on sessions True, but then you actually have a single-point again. Lose the server and your stickiness is useless. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: vrijdag 20 juli 2001 16:41 To: [EMAIL PROTECTED] Subject: RE: NewB: Is Struts completely reliant on sessions Renzo, Felix, If your front-end web server/load balancer (also known as Local Director or Resonate, etc) is implemented to use IP stickiness, then this is a non-issue since the Web user will be returned to the server which serviced the original request. Brian Renzo Toma renzo.toma@xTo: [EMAIL PROTECTED] s4all.nlcc: Subject: RE: NewB: Is Struts completely reliant on sessions 07/20/2001 05:40 AM Please respond to struts-user Hi As long as you carry over all properties to the next request using form elements (text, hidden, ...), you will only miss the LOCALE session variable. But you set that by subclassing ActionServlet. Actually when you stay away from wizard-like/multipage forms, you'll be fine. Renzo -Original Message- From: Felix Ulrich [mailto:[EMAIL PROTECTED]] Sent: vrijdag 20 juli 2001 11:29 To: [EMAIL PROTECTED] Subject: NewB: Is Struts completely reliant on sessions Hi We have to build deploy some web applications with JSP/Servlets on an cluster. At the moment, though, I don't think we can guarantee session affinity (i.e. subsequent requests will end up on different machines), and it seems that Struts uses sessions quite heavily. Am I right in thinking that sessions are a pre-requisite of using the Struts framework? Is there any part of Struts I could still use without sessions (e.g. some of the taglibs maybe)? Thanks Felix. Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.
Re: Basic Question in Servlet/JSP ?
Here are somethings I can think of: 1) The PageContext class not only encapsulates these objects, but container specific behavior as well (handlePageException, pushBody, etc.). I would imagine the availability of request and response objects here are mainly used to support these features, and not necessarily for general accessibility. 2) Also, PageContext provides some convience methods for commonly used tasks (include, forward, etc.) which helped minimize the size of scriplet block in JSPs. 3) PageContext allows a JSP engine to easily initialize a tag library with a page's state by initializing it with one object instead of many. Why isn't there a similar PageContext for Servlets? Because: 1) Behavior such as exception handling (handlePageException) and output control (pushBody, popBody) are handled by the developer of the servlet. 2) In servlets, any kind of delegation to other layers are handled by the servlet developer, whereas delegation in JSPs are handled by the container (JSP taglib). 3) The JSP Spec is a later spec than the Servlet spec, and benefits from lessons learn from the earlier Serlvet spec. Calvin On 23 Jul 2001 17:41:06 +0530, suhas wrote: Hi Cyu , I was going through JSPService method -when the jsp gets translated into Servlet where generally we see pageContext instance obtained from the JSPFactory which is actually container specific implementation . My question was - Instead of this container only need to pass HttpServletRequest and HttpServletResponse objects as parameters to the _JSPservice method . We can get the Session object from above HttpServletRequest that container sends as parameter . The out object could have been instantiated using JSPWriter.So why was there a need to have a PageContext Class when everything was possible without that ,in JSP . Suppose PageContext class comes in JSP , then why the same concept was not in Servlet ??? suhas - Original Message - From: Calvin Yu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 5:24 PM Subject: Re: Basic Question in Servlet/JSP ? On 23 Jul 2001 16:29:52 +0530, suhas wrote: Better can't we get this from the container specific implementaion something like PageContext in the Servlet too? . Why would we need to? Calvin
Problem Orion application server with STRUTS...
Struts doesn't work with Orion for me, any peoplehave a solution! Thank's in advance 01-07-22 22:24 strutsBlank: 1.0.2.2 Started01-07-22 22:24 strutsBlank: Servlet errorjavax.servlet.jsp.JspException: Missing message for key index.titleat org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242)at /index.jsp._jspService(/index.jsp.java:106) (JSP page line 8)at com.orionserver[Oracle9iAS (1.0.2.2) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54)at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5458)at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.JSPServlet.service(JSPServlet.java:31)at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:501)at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:170)at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:576)at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)01-07-22 22:25 defaultWebApp: 1.0.2.2 Stopped01-07-22 22:25 strutsBlank: org.apache.struts.action.ActionServlet: Finalizing this controller servlet01-07-22 22:25 strutsBlank: 1.0.2.2 Stopped
Properties file notation / Java won't compile /calvin yu
Hi , the path was the same as described (calvin yu ) , nevertheless i have started again thus redeploy as you mentioned. Only other query .properties files what is the correct notation as i am creating the property files in Ms WordPad and the result is a txt notations ie Form.properties.txt Thus i have tried the alternative file extensions no joy. I have been playing around with this 4 ages so i have experienced a few errors - thus i will commence from the begin thus go over the examples again.As i was myself who modified the works to eventually mess it all up Cheers Chuck -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: Properties file notation / Java won't compile /calvin yu
Hi Pls ignore that request from above it hit me to go to W/EXPLORER VIEW FOLDER OPTIONS VIEW UNCHECK HIDE FILE EXT FOR KNOWN FILE TYPES. Chuck Amadi wrote: Sorry folks. Hi , the path was the same as described (calvin yu ) , nevertheless i have started again thus redeploy as you mentioned. Only other query .properties files what is the correct notation as i am creating the property files in Ms WordPad and the result is a txt notations ie Form.properties.txt Thus i have tried the alternative file extensions no joy. I have been playing around with this 4 ages so i have experienced a few errors - thus i will commence from the begin thus go over the examples again.As i was myself who modified the works to eventually mess it all up Cheers Chuck -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Getting Exception errors from session beans
In my action classes, I am getting a populated JavaBean from my SessionBean, and I want to know how to get an exception into the errors using errors.add(). The difference between this and traditional errors is that there is no key in ApplicationResource.properties, but rather, I am grabbing a string from the EntityException. code snippet // Populate the EntityDO try { EntityDO aEntityDO = new EntityDO(request.getParameter(id); InitialContext ctx = new InitialContext(); EntityManagerHome home = (EntityManagerHome) ctx.lookup( EntityManagerHome.CLASS_CTX ); EntityManager entityMgr = home.create(); aEntityDO = entityMgr.getEntityDetails(aEntityDO); } catch (NamingException ne) { log(_className, NamingException occurred in getEntityDetails()); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(errors.namingException)); } catch (EntityException re) { log(_className, ResourceException occurred in getResourceDetails()); // Get EntityException from SessionBean // *** HELP NEEDED HERE *** // // How do I get the re String into an errors.add ?? } /code snippent __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
RE: Struts Design patterns - if you use TogetherCC...
I have implemented the Value Object pattern in Together Control Center. My implementation creates a vo based on an entity EJB (it would also work for any other class with public attributes) and also adds a setter/getter for the newly created vo to the bean class. The pattern can also be reapplied to update things if changes are made to the bean class. I was going to post to the community site, but there are still a few minor problems with the module. If anyone else is using Together+EJBs+Struts though, you might find this helpful. It sure has saved me a lot of time! If you are interested then let me know and I will email it to you or post it to the group. While on the topic of Struts and Together, I was thinking about implementing some Struts specific patterns in Together. However, I started thinking about this in more detail, and I am not sure how useful this would be since the majority of the Struts logic is contained in the config.xml file. It would be no problem to generate some skeleton templates for a ActionForm or ActionServlet, etc... but a useful pattern implementation would probably need to contain navigational logic and update the XML file accordingly. Has anyone else thought about this or tried to implement any Struts patterns in Together? -Bob -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 22, 2001 3:22 PM To: [EMAIL PROTECTED] Subject: Re: Struts Design patterns Any of the patterns described in the recent Core J2EE Patterns should work well with Struts. In fact, many of these have already been implemented for you by the framework ;-) The three patterns that Struts developers may use most would be Data Access Objects, Value Objects, and Helper Objects. The classical trinity is to have a Data Access Object return a Value Object, which is wrapped in a Helper Object and sent to the presentation layer. In my projects, I use standard method calls to my Data Access Objects, like public static final int scriptInsert( int script, byte image, String title, String article ) throws AccessException { return scriptCommand(script,image,title,article,Commands.SCRIPT_INSERT); } Where scriptCommand is a library function shared by Insert and Update. The implementation here uses standard JDBC things like PreparedStatements. Though, I could change all that without affecting anything else. (Hence, the custom AccessException instead of SQL Exception.) The retrieval commands return RowSets public static final RowSet scriptSelect(int key) throws SQLException { return RowSets.getRow(key,Commands.SCRIPT_SELECT); } which I use as Value objects. RowSets are handy even if you are using something else in the implementation. Since RowSets can be created from scratch or from a ResultSet, they make an excellent value object. You could also pass the RowSet directly to the presentation layer, and use the Struts logic:iterate and bean:write to access the column by number. bean:write name=ROW property=object[3]/ You can also use the Jakarta Tablib dbTags with disconnected rowsets. I just submitted the patch, and it may not be available in the nightly build yet, but you can get the updated JAR from More About Struts. http://husted.com/about/struts/resources.htm#new Here you just place the RowSet into Request context and tell the resultSet tag its name. db:resultSet id=ROW name=ROWS and then you can use the dbTag getColumn tag to refer to columns by name db:getColumn colName=title/ See the Jarkata dbTag docs for more about getColumn and friends. Some other Struts design stategies I would recommend are * Document all entry points with global forwards (no page= parameters) * Use more mappings to minimize the use of hidden fields and query strings * Use the parameter property to document each operation of an Action * Use one Action for related operations * Use one ActionForm for related forms * Subclass Action and ActionServlet as needed for better code reuse * Use directory matching for ActionServlet (/do/* instead of *.do) -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Jerzy Kawa wrote: Hello all, Any comments about struts design pattern ?
action in html:form tag is not set correclty (bug???)
Hello, I have struts 1.0 based application that has 2 mappings: !-- Excel Servlet Mapping -- servlet-mapping servlet-nameexcelServlet/servlet-name url-pattern/servlet/excelServlet/*/url-pattern /servlet-mapping !-- Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping The application works fine until Excel servlet is invoked. Logged in users can still use the application, however new users are forwarded to excel servlet and not to action one. Here is how the action is setup in Logon.jsp: html:form action=/logon.do focus=username Does anyone know why this is happening? Thanks, Mark. -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
Populated form
I want to edit a record in my database with a editForm.jsp?key=100 how do I get a reference to the Formbean so that I can populated the form. Erik Jan de WitSun Certified Java Programmer Finalist IT GroupBuilding Your E-business Infrastructure! ---Rotterdam, The Netherlands Office: +31 10 217 08 21Mobile: +3162705 4734 http://finalist.com Finalist Partners with SUN, IBM, BEA, Bluestone, X-Hive and bHold! ---
RE: Getting Exception errors from session beans
Matt, I'm not sure if this answers your question, but You can create a general exception in the ApplicationResources.properties file, that takes in an argument. Set the argument when you catch an Exception, such as the EntityException. --- ApplicationResourcesFile with argument {0} --- error.server.exception=Server Resources Exception:{0} Action Class catch (EntityException re) { // pass the exception argument in the ActionError object errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.server.exception, re.toString())); } Hope this helps, JD -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 9:55 AM To: [EMAIL PROTECTED] Subject: Getting Exception errors from session beans In my action classes, I am getting a populated JavaBean from my SessionBean, and I want to know how to get an exception into the errors using errors.add(). The difference between this and traditional errors is that there is no key in ApplicationResource.properties, but rather, I am grabbing a string from the EntityException. code snippet // Populate the EntityDO try { EntityDO aEntityDO = new EntityDO(request.getParameter(id); InitialContext ctx = new InitialContext(); EntityManagerHome home = (EntityManagerHome) ctx.lookup( EntityManagerHome.CLASS_CTX ); EntityManager entityMgr = home.create(); aEntityDO = entityMgr.getEntityDetails(aEntityDO); } catch (NamingException ne) { log(_className, NamingException occurred in getEntityDetails()); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(errors.namingException)); } catch (EntityException re) { log(_className, ResourceException occurred in getResourceDetails()); // Get EntityException from SessionBean // *** HELP NEEDED HERE *** // // How do I get the re String into an errors.add ?? } /code snippent __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Running the example application that comes along with struts
Hello, I have got a problem in running the example struts application. When I run my application , I get the first jsp page , i.e. index.jsp containing MailReader Demonstration Application Options, but when I click on any of the other links, I get this exception , org.xml.sax.SAXParseException: Relative URI "struts-config_1_1.dtd"; can not be resolved without a document URI. I don't know what this means. Please advise. Thanks, Soniya.
Baisc q 2 Cannot find message resources u/key -
Hi , can anyone work out this one i have followed the correct procedures albeit i am missing somthing. (bbnpa the name of my application) My path C:\jakarta-tomcat\webapps\bbnpa\helloworld\hello.jsp 1) declared directives. 2) created property file. 3) created web.xml file. 4)Copied all necessary .tld to /helloworld/WEB-INF/ 5)Copied all necessary .jar's to /WEB-INF/lib 6)Copied and deployed the struts-trailmap war's to /bbnpa/ my app's dir. Wats left error below Error: 500 Location: /bbnpa/helloworld/hello.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE Cheers Chuck. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: Baisc q 2 Cannot find message resources u/key -
In your web.xml, what do you have defined for the application init-param? where is your properties file located? You have a couple of options: You could place the properties file in your classes jar (in the appropriate directory structure) or you can place it in the WEB-INF/classes directory (within the appropriate directory structure specified in the application init-param). Pete Chuck Amadi wrote: Hi , can anyone work out this one i have followed the correct procedures albeit i am missing somthing. (bbnpa the name of my application) My path C:\jakarta-tomcat\webapps\bbnpa\helloworld\hello.jsp 1) declared directives. 2) created property file. 3) created web.xml file. 4)Copied all necessary .tld to /helloworld/WEB-INF/ 5)Copied all necessary .jar's to /WEB-INF/lib 6)Copied and deployed the struts-trailmap war's to /bbnpa/ my app's dir. Wats left error below Error: 500 Location: /bbnpa/helloworld/hello.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE Cheers Chuck. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Architecture Question - forward to another webapp
Hi all... Can someone tell me how to write an entry in my struts-config.xml file that will link me to another webapp/context. Do I have to put the entire URL? I really don't want to do that so I don't have to worry about changing server names all over the place. So for example, I have 2 webapps (I'm running in Tomcat), webapp1 and webapp2. I'd want to have links to both jsp files and ActionClasses in the struts-config.xml file. To get to the index of webapp2 from inside webapp1, I don't think this will work - it will go to http://servername/webapp1/webapp2/index.jsp, and I want it to go to http://servername/webapp2/index.jsp. forward name=forward1 path=/webapp2/index.jsp/ What do I do? Thanks Becky _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Oracle for J2EE(OC4J) with struts...
Am try to use Oracle for J2EE(OC4J) with struts and this error appear: javax.servlet.jsp.JspException: Missing message for key index.title at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242) at /index.jsp._jspService(/index.jsp.java:106) (JSP page line 8) at com.orionserver[Oracle9iAS (1.0.2.2) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5458) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.JSPServlet.service(JSPServlet.java:31) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:501) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:170) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:576) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62) THANK YOU IN ADVANCE
Re: Baisc q 2 Cannot find message resources u/key -
Hi , in my wem.xml i have the following defined for the apllication init-param. init-param param-nameapplication/param-name param-valuehelloworld.HelloWorldResources/param-value /init-param load-on-startup1/load-on-startup /servlet Tried the second option previously and again no joy. The first option can i drag drop into the classes .jar the property file as all my jar's are in my WEB-INF/lib dir. Cheers Chuck Peter Alfors wrote: In your web.xml, what do you have defined for the application init-param? where is your properties file located? You have a couple of options: You could place the properties file in your classes jar (in the appropriate directory structure) or you can place it in the WEB-INF/classes directory (within the appropriate directory structure specified in the application init-param). Pete Chuck Amadi wrote: Hi , can anyone work out this one i have followed the correct procedures albeit i am missing somthing. (bbnpa the name of my application) My path C:\jakarta-tomcat\webapps\bbnpa\helloworld\hello.jsp 1) declared directives. 2) created property file. 3) created web.xml file. 4)Copied all necessary .tld to /helloworld/WEB-INF/ 5)Copied all necessary .jar's to /WEB-INF/lib 6)Copied and deployed the struts-trailmap war's to /bbnpa/ my app's dir. Wats left error below Error: 500 Location: /bbnpa/helloworld/hello.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE Cheers Chuck. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
RE: an often seen one
have to pointed classpath to directory where ur example application is deployed? for example web-inf/classes ? try this one. However if u deploy the .war file I dont think it is needed -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 20, 2001 5:18 PM To: [EMAIL PROTECTED] Subject: an often seen one I looked at the archives and saw several mentions of do not put struts.jar in anything but the webapp\WEB-INF\lib area. I did not put it in tomcats lib directory and dont believe its in my classpath. Tomcat starts on up but I get errors when its setting up the struts example program. set JAVA_HOME=d:\jdk1.3 D:\jakarta-tomcat-3.2.1\binstartup.bat Including all jars in ..\lib in your CLASSPATH. Using CLASSPATH: ..\classes;..\lib\ant.jar;..\lib\crimson.jar;..\lib\jasper.jar; ..\lib\jaxp.jar;..\lib\jdbc2_0-stdext.jar;..\lib\parser.jar;..\lib\servl et.jar;. .\lib\webserver.jar;..\lib\xalan.jar;d:\jdk1.3\lib\tools.jar New org.apache.struts.webapp.example.User Begin event threw exception java.lang.ClassNotFoundException: org.apache.struts.webapp.example.User at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) more stuff cannot load servlet name: database some register messages and resolve of *.dtd's New org.apache.struts.action.ActionFormBean Begin event threw exception java.lang.ClassNotFoundException: org.apache.struts.action.ActionFormBean at java.net.URLClassLoader$1.run(URLClassLoader.java:200) The Basic steps I took to install where download and extract tomcat3.2 download jaxp1.1 extract download struts and extract copy jaxp's \*.jar into the tomcat3.2\lib directory copy struts \lib\jdbc2_0-stdext.jar on over to tomcat3.2\lib copy the struts\webapps\struts-example.war over to the tomcat3.2\webapps\ directory did I miss a step?
Re: Baisc q 2 Cannot find message resources u/key -
are you using tomcat 4? i get this message in tomcat 4 with struts applications as well... it's an issue with catalina working with struts, though i can't get anyone to help me figure out what it is... Jon Brisbin - Original Message - From: Chuck Amadi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 10:49 AM Subject: Re: Baisc q 2 Cannot find message resources u/key - Hi , in my wem.xml i have the following defined for the apllication init-param. init-param param-nameapplication/param-name param-valuehelloworld.HelloWorldResources/param-value /init-param load-on-startup1/load-on-startup /servlet Tried the second option previously and again no joy. The first option can i drag drop into the classes .jar the property file as all my jar's are in my WEB-INF/lib dir. Cheers Chuck Peter Alfors wrote: In your web.xml, what do you have defined for the application init-param? where is your properties file located? You have a couple of options: You could place the properties file in your classes jar (in the appropriate directory structure) or you can place it in the WEB-INF/classes directory (within the appropriate directory structure specified in the application init-param). Pete Chuck Amadi wrote: Hi , can anyone work out this one i have followed the correct procedures albeit i am missing somthing. (bbnpa the name of my application) My path C:\jakarta-tomcat\webapps\bbnpa\helloworld\hello.jsp 1) declared directives. 2) created property file. 3) created web.xml file. 4)Copied all necessary .tld to /helloworld/WEB-INF/ 5)Copied all necessary .jar's to /WEB-INF/lib 6)Copied and deployed the struts-trailmap war's to /bbnpa/ my app's dir. Wats left error below Error: 500 Location: /bbnpa/helloworld/hello.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE Cheers Chuck. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: Baisc q 2 Cannot find message resources u/key -
Is your property file then located here ? WEB-INF/classes/helloword/HelloWorldResources.properties Pete Chuck Amadi wrote: Hi , in my wem.xml i have the following defined for the apllication init-param. init-param param-nameapplication/param-name param-valuehelloworld.HelloWorldResources/param-value /init-param load-on-startup1/load-on-startup /servlet Tried the second option previously and again no joy. The first option can i drag drop into the classes .jar the property file as all my jar's are in my WEB-INF/lib dir. Cheers Chuck Peter Alfors wrote: In your web.xml, what do you have defined for the application init-param? where is your properties file located? You have a couple of options: You could place the properties file in your classes jar (in the appropriate directory structure) or you can place it in the WEB-INF/classes directory (within the appropriate directory structure specified in the application init-param). Pete Chuck Amadi wrote: Hi , can anyone work out this one i have followed the correct procedures albeit i am missing somthing. (bbnpa the name of my application) My path C:\jakarta-tomcat\webapps\bbnpa\helloworld\hello.jsp 1) declared directives. 2) created property file. 3) created web.xml file. 4)Copied all necessary .tld to /helloworld/WEB-INF/ 5)Copied all necessary .jar's to /WEB-INF/lib 6)Copied and deployed the struts-trailmap war's to /bbnpa/ my app's dir. Wats left error below Error: 500 Location: /bbnpa/helloworld/hello.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE Cheers Chuck. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
JDO
Is struts supports JDO? Please let me know if any body implemented. thanks Shashi ERAC -Original Message- From: Peter Alfors [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 11:03 AM To: [EMAIL PROTECTED] Subject: Re: Baisc q 2 Cannot find message resources u/key - Is your property file then located here ? WEB-INF/classes/helloword/HelloWorldResources.properties Pete Chuck Amadi wrote: Hi , in my wem.xml i have the following defined for the apllication init-param. init-param param-nameapplication/param-name param-valuehelloworld.HelloWorldResources/param-value /init-param load-on-startup1/load-on-startup /servlet Tried the second option previously and again no joy. The first option can i drag drop into the classes .jar the property file as all my jar's are in my WEB-INF/lib dir. Cheers Chuck Peter Alfors wrote: In your web.xml, what do you have defined for the application init-param? where is your properties file located? You have a couple of options: You could place the properties file in your classes jar (in the appropriate directory structure) or you can place it in the WEB-INF/classes directory (within the appropriate directory structure specified in the application init-param). Pete Chuck Amadi wrote: Hi , can anyone work out this one i have followed the correct procedures albeit i am missing somthing. (bbnpa the name of my application) My path C:\jakarta-tomcat\webapps\bbnpa\helloworld\hello.jsp 1) declared directives. 2) created property file. 3) created web.xml file. 4)Copied all necessary .tld to /helloworld/WEB-INF/ 5)Copied all necessary .jar's to /WEB-INF/lib 6)Copied and deployed the struts-trailmap war's to /bbnpa/ my app's dir. Wats left error below Error: 500 Location: /bbnpa/helloworld/hello.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE Cheers Chuck. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
action/context path inconsitencies
I have an appliaction called tmate that is being deployed in the webapps/tmate directory of tomcat so when I call localhost/tmate I go to the index of my application. I also have in my struts confix.xml file some action mappings that begin with /tmate for example: actionpath=/tmate/projectSelect... / This has worked until today. Now, instead of looking for the full action path (/tmate/projectSelect) it truncates the tmate due to context and looks for /projectSelect. Any idea why this has begun happening all of a sudden. I haven't made any changes to struts! D
RE: action/context path inconsitencies
P.S. The pages that call the /tmate/projectSelect action load fine (no missing action mapping are thrown). Its only when the action is actually hit (submit button) that the action can't be found. D -Original Message- From: DHarty [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 12:36 PM To: Struts User Subject: action/context path inconsitencies I have an appliaction called tmate that is being deployed in the webapps/tmate directory of tomcat so when I call localhost/tmate I go to the index of my application. I also have in my struts confix.xml file some action mappings that begin with /tmate for example: actionpath=/tmate/projectSelect... / This has worked until today. Now, instead of looking for the full action path (/tmate/projectSelect) it truncates the tmate due to context and looks for /projectSelect. Any idea why this has begun happening all of a sudden. I haven't made any changes to struts! D
Howto: Accessing values of a Form in the JSP directly?
Is there a way of accessing form data directly within a JSP page? I want to insert a text into my html code by asking the form for this value. Let's assume, I have a JSP myPage.jsp that uses MyForm with a field myValue. How can I say something like: bean:write name=TheMyForm_Object property=myValue/ Thanks in advance, Holger
RE: NewB: Is Struts completely reliant on sessions
Hi Renzo, When you implement a cluster you will typically implement (through the app server) a centralized or backup session store. This allows the clients on the failed server to be redirected to another server in the cluster that can pick up the Session and continue handling that client's requests. --Abraham -Original Message- From: Renzo Toma [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 4:34 AM To: [EMAIL PROTECTED] Subject: RE: NewB: Is Struts completely reliant on sessions True, but then you actually have a single-point again. Lose the server and your stickiness is useless. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: vrijdag 20 juli 2001 16:41 To: [EMAIL PROTECTED] Subject: RE: NewB: Is Struts completely reliant on sessions Renzo, Felix, If your front-end web server/load balancer (also known as Local Director or Resonate, etc) is implemented to use IP stickiness, then this is a non-issue since the Web user will be returned to the server which serviced the original request. Brian Renzo Toma renzo.toma@xTo: [EMAIL PROTECTED] s4all.nlcc: Subject: RE: NewB: Is Struts completely reliant on sessions 07/20/2001 05:40 AM Please respond to struts-user Hi As long as you carry over all properties to the next request using form elements (text, hidden, ...), you will only miss the LOCALE session variable. But you set that by subclassing ActionServlet. Actually when you stay away from wizard-like/multipage forms, you'll be fine. Renzo -Original Message- From: Felix Ulrich [mailto:[EMAIL PROTECTED]] Sent: vrijdag 20 juli 2001 11:29 To: [EMAIL PROTECTED] Subject: NewB: Is Struts completely reliant on sessions Hi We have to build deploy some web applications with JSP/Servlets on an LVS cluster. At the moment, though, I don't think we can guarantee session affinity (i.e. subsequent requests will end up on different machines), and it seems that Struts uses sessions quite heavily. Am I right in thinking that sessions are a pre-requisite of using the Struts framework? Is there any part of Struts I could still use without sessions (e.g. some of the taglibs maybe)? Thanks Felix. Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie
File upload problem in Struts 1.0
We have recently switched to Struts 1.0 from a previous beta version. After migrating we are having problems in uploading certain files. The files do get uploaded to the server but the contents get corrupted some times. We further investigate this problem and found out that files get damaged when they contains non-English content. E.g. if we upload a Microsoft Excel file that contains non-English characters it got corrupted, and we are unable to process that file with MS Excel afterwards. The problems disappears if we switch back to old struts.jar file. Any ideas how to fix this problem. Is it safe to replace the struts.jar file with old one as in interim solution?.
Re: Problem with bean:message tag?
Matthias Brahm [EMAIL PROTECTED] wrote: This must be an error in the Tag Library Reference (in the source-code of the bean:message tag there are no name and property attributes)! Read the Tag Library Guides for the usage of the bean:message tag. In this documentation name and property are not mentioned. Matthias They are: From: struts-bean.html to attribute key: The message key of the requested message, which must have a corresponding value in the message resources. If not specified, the key is obtained from the name and property attributes. -- gR
Re: Howto: Accessing values of a Form in the JSP directly?
bean:write name=MyForm property=myValue/ If MyForm is the name giuven in the Struts config file. Struts will instantiate the ActionForm for a mapping either when the Action is called or when the html:form tag is rendered. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Holger Wiechert wrote: Is there a way of accessing form data directly within a JSP page? I want to insert a text into my html code by asking the form for this value. Let's assume, I have a JSP myPage.jsp that uses MyForm with a field myValue. How can I say something like: bean:write name=TheMyForm_Object property=myValue/ Thanks in advance, Holger
iPlanet - Cannot find message resources u/key
All, Can someone please post their iPlanet 6x configuration files for the struts_example.war web application? I'm sure the answer to my problem is entering the descriptor xml to point to the location of the resources file, but since iPlanet does not support Webapps and WAR files, this is not a straightforward process. Any hints appreciated... Thanks, Brian
Re: iPlanet - Cannot find message resources u/key
iPlanet Web Server or App Server? The fix on the appserver is a classpath thing - probably the same on Web Server. --- [EMAIL PROTECTED] wrote: All, Can someone please post their iPlanet 6x configuration files for the struts_example.war web application? I'm sure the answer to my problem is entering the descriptor xml to point to the location of the resources file, but since iPlanet does not support Webapps and WAR files, this is not a straightforward process. Any hints appreciated... Thanks, Brian __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
problems mapping multiple ActionServlets
This might be more appropriate for the Tomcat user list, but I'll try anyway. I'm using Tomcat 3.2.2 and trying to map multiple ActionServlets in web.xml. I have a servlet-mapping for *.do which I execute for the form action search.do, and everything works fine when this is the only servlet-mapping in web.xml. But as soon as I add another servlet-mapping for *.authDo, when I try to execute search.do, search.authDo is called (it even appears in the URL), which I don't understand since I don't call search.authDo from anywhere in my page (or anywhere on the site). If I the change to added mapping to any name, like *.anything, search.anything is called . The pertinent code is below. Many advanced thanks. Dave From the jsp: form:form action=search.do name=caretoolSearchForm type=com.getcare.servlet.CaretoolSearchForm From web.xml: servlet servlet-nameAction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuecom.getcare.servlet.ErrorMessages/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet servlet servlet-nameauthAction/servlet-name servlet-classcom.getcare.servlet.CaretoolActionServlet/servlet-class init-param param-nameapplication/param-name param-valuecom.getcare.servlet.ErrorMessages/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-auth-config.xml/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameAction/servlet-name url-pattern*.do/url-pattern /servlet-mapping servlet-mapping servlet-nameauthAction/servlet-name url-pattern*.authDo/url-pattern /servlet-mapping
Re: iPlanet - Cannot find message resources u/key
Matt, Oops, I suppose I should have specified Webserver or Appserver. I'm using iPlanet Webserver 6.0. My classpath points to the directory containing ApplicationResources.properties which is: c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\classes\ApplicationResources.properties This does not seem to work even after updating the server startup classpath in jvm12.conf. Here is that entry in jvm12.conf: jvm.classpath=c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib\struts.jar;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\classes;c: \iPlanet\Servers\docs\WEB-INF\classes\beanutils.jar; c: \iPlanet\Servers\docs\WEB-INF\classes\collections.jar;c: \iPlanet\Servers\docs\WEB-INF\classes\digester.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar Thanks, Brian Matt Raible matt_raible@To: [EMAIL PROTECTED] yahoo.com cc: Subject: Re: iPlanet - Cannot find message resources u/key 07/23/2001 02:08 PM Please respond to struts-user iPlanet Web Server or App Server? The fix on the appserver is a classpath thing - probably the same on Web Server. --- [EMAIL PROTECTED] wrote: All, Can someone please post their iPlanet 6x configuration files for the struts_example.war web application? I'm sure the answer to my problem is entering the descriptor xml to point to the location of the resources file, but since iPlanet does not support Webapps and WAR files, this is not a straightforward process. Any hints appreciated... Thanks, Brian __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
RE: problems mapping multiple ActionServlets
I had the same question last week (and for some reason did not get any response from the mailing list?) ... anyway, it seems to me that Struts really does not handle multiple servlet mappings for the ActionServlet. When using extension mappings, Struts finds the action mapping to use by stripping off the .do, or any other extension, and using that as the path for determining the action mapping. I was trying to do a similar thing where *.do was the authorized stuff, and *.go was to be the anonymous stuff ... it ended up that the generated URLs always became *.go! I think it is simply using the last mapping specified. My plan is to only use one extension mapping for my ActionServlet and come up with a different mechanism for applying my security constraints. Possibly by a vitual path where I would have *.do - as my ActionServlet servlet mapping Then I would use ... /protected/*.do for restricted pages ... Then I could set up a security constraint for /protected/* My 2 cents ... -Original Message- From: Dave Allen [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 3:12 PM To: [EMAIL PROTECTED] Subject: problems mapping multiple ActionServlets This might be more appropriate for the Tomcat user list, but I'll try anyway. I'm using Tomcat 3.2.2 and trying to map multiple ActionServlets in web.xml. I have a servlet-mapping for *.do which I execute for the form action search.do, and everything works fine when this is the only servlet-mapping in web.xml. But as soon as I add another servlet-mapping for *.authDo, when I try to execute search.do, search.authDo is called (it even appears in the URL), which I don't understand since I don't call search.authDo from anywhere in my page (or anywhere on the site). If I the change to added mapping to any name, like *.anything, search.anything is called . The pertinent code is below. Many advanced thanks. Dave From the jsp: form:form action=search.do name=caretoolSearchForm type=com.getcare.servlet.CaretoolSearchForm From web.xml: servlet servlet-nameAction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuecom.getcare.servlet.ErrorMessages/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet servlet servlet-nameauthAction/servlet-name servlet-classcom.getcare.servlet.CaretoolActionServlet/servlet-class init-param param-nameapplication/param-name param-valuecom.getcare.servlet.ErrorMessages/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-auth-config.xml/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameAction/servlet-name url-pattern*.do/url-pattern /servlet-mapping servlet-mapping servlet-nameauthAction/servlet-name url-pattern*.authDo/url-pattern /servlet-mapping
RE: problems mapping multiple ActionServlets
Dave, I had the similar problem (see my posting today). I had 2 mappings in web.xml and 2 servlets which extended ActionServlet. Somehow, after I access second servlet my *.do mapping was changed with url-path of second servlet. Don't extend ActionServlet more than once - it will screw up your mapping. Mark. -Original Message- From: Dave Allen [SMTP:310 [EMAIL PROTECTED]] Sent: Monday, July 23, 2001 3:12 PM To: [EMAIL PROTECTED] Subject: problems mapping multiple ActionServlets This might be more appropriate for the Tomcat user list, but I'll try anyway. I'm using Tomcat 3.2.2 and trying to map multiple ActionServlets in web.xml. I have a servlet-mapping for *.do which I execute for the form action search.do, and everything works fine when this is the only servlet-mapping in web.xml. But as soon as I add another servlet-mapping for *.authDo, when I try to execute search.do, search.authDo is called (it even appears in the URL), which I don't understand since I don't call search.authDo from anywhere in my page (or anywhere on the site). If I the change to added mapping to any name, like *.anything, search.anything is called . The pertinent code is below. Many advanced thanks. Dave From the jsp: form:form action=search.do name=caretoolSearchForm type=com.getcare.servlet.CaretoolSearchForm From web.xml: servlet servlet-nameAction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuecom.getcare.servlet.ErrorMessages/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet servlet servlet-nameauthAction/servlet-name servlet-classcom.getcare.servlet.CaretoolActionServlet/servlet-class init-param param-nameapplication/param-name param-valuecom.getcare.servlet.ErrorMessages/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-auth-config.xml/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameAction/servlet-name url-pattern*.do/url-pattern /servlet-mapping servlet-mapping servlet-nameauthAction/servlet-name url-pattern*.authDo/url-pattern /servlet-mapping -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
Re: iPlanet - Cannot find message resources u/key
Make sure your web.xml has the following entry for the action class: servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param --- [EMAIL PROTECTED] wrote: Matt, Oops, I suppose I should have specified Webserver or Appserver. I'm using iPlanet Webserver 6.0. My classpath points to the directory containing ApplicationResources.properties which is: c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\classes\ApplicationResources.properties This does not seem to work even after updating the server startup classpath in jvm12.conf. Here is that entry in jvm12.conf: jvm.classpath=c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib\struts.jar;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\classes;c: \iPlanet\Servers\docs\WEB-INF\classes\beanutils.jar; c: \iPlanet\Servers\docs\WEB-INF\classes\collections.jar;c: \iPlanet\Servers\docs\WEB-INF\classes\digester.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar Thanks, Brian Matt Raible matt_raible@To: [EMAIL PROTECTED] yahoo.com cc: Subject: Re: iPlanet - Cannot find message resources u/key 07/23/2001 02:08 PM Please respond to struts-user iPlanet Web Server or App Server? The fix on the appserver is a classpath thing - probably the same on Web Server. --- [EMAIL PROTECTED] wrote: All, Can someone please post their iPlanet 6x configuration files for the struts_example.war web application? I'm sure the answer to my problem is entering the descriptor xml to point to the location of the resources file, but since iPlanet does not support Webapps and WAR files, this is not a straightforward process. Any hints appreciated... Thanks, Brian __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Validation Framework: Mask Msg for Range Validation
I have a range I want to validate, and I want to display a maskmsg when the value is not in that range. The reason is because I want to add HTML formatting around the error message. Is there a place in validation.xml or in my ApplicationResources.properties that I can do this? I tried that following, but it throws a NullPointerException: field property=holidayDO.displayMonth depends=required,integer,range,mask msg name=mask key=holidayManage.displayMonth.maskmsg / arg0 key=holidayManage.prompt.displayMonth/ arg1 name=range key=${var:min} resource=false/ arg2 name=range key=${var:max} resource=false/ var var-namemin/var-name var-value1/var-value /var var var-namemax/var-name var-value12/var-value /var /field If I removed depends=...mask and msg name, it works fine, but the error is not formatted? Thanks, Matt __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: Validation Framework: Mask Msg for Range Validation
Nevermind, I found it as errors.range in ApplicationResources.properties. Matt --- Matt Raible [EMAIL PROTECTED] wrote: I have a range I want to validate, and I want to display a maskmsg when the value is not in that range. The reason is because I want to add HTML formatting around the error message. Is there a place in validation.xml or in my ApplicationResources.properties that I can do this? I tried that following, but it throws a NullPointerException: field property=holidayDO.displayMonth depends=required,integer,range,mask msg name=mask key=holidayManage.displayMonth.maskmsg / arg0 key=holidayManage.prompt.displayMonth/ arg1 name=range key=${var:min} resource=false/ arg2 name=range key=${var:max} resource=false/ var var-namemin/var-name var-value1/var-value /var var var-namemax/var-name var-value12/var-value /var /field If I removed depends=...mask and msg name, it works fine, but the error is not formatted? Thanks, Matt __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: iPlanet - Cannot find message resources u/key
Does iPlanet Webserver 6.0 know how to use web.xml? Or is it like iPlanet Webserver 4.2 which uses rules.properties to handle essentially the same thing? (I have a call into iPlanet technical support for this question since I think I am getting too much into the container implementation of a particular vendor. However if someone has already solved this problem with iPlanet, then please feel free to let me know!). I did have the mapping in my Web.xml file from your last message, but I think that the iPlanet servlet container doesn't know how to use it. This is just a guess... Maybe there is some other configuration I need to do in the administration console for iPlanet Webserver 6.0 to map to a servlet directory to get this to work? Brian Matt Raible matt_raible@To: [EMAIL PROTECTED] yahoo.com cc: Subject: Re: iPlanet - Cannot find message resources u/key 07/23/2001 02:25 PM Please respond to struts-user Make sure your web.xml has the following entry for the action class: servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param --- [EMAIL PROTECTED] wrote: Matt, Oops, I suppose I should have specified Webserver or Appserver. I'm using iPlanet Webserver 6.0. My classpath points to the directory containing ApplicationResources.properties which is: c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\classes\ApplicationResources.properties This does not seem to work even after updating the server startup classpath in jvm12.conf. Here is that entry in jvm12.conf: jvm.classpath=c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib\struts.jar;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\classes;c: \iPlanet\Servers\docs\WEB-INF\classes\beanutils.jar; c: \iPlanet\Servers\docs\WEB-INF\classes\collections.jar;c: \iPlanet\Servers\docs\WEB-INF\classes\digester.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar Thanks, Brian Matt Raible matt_raible@To: [EMAIL PROTECTED] yahoo.com cc: Subject: Re: iPlanet - Cannot find message resources u/key 07/23/2001 02:08 PM Please respond to struts-user iPlanet Web Server or App Server? The fix on the appserver is a classpath thing - probably the same on Web Server. --- [EMAIL PROTECTED] wrote: All, Can someone please post their iPlanet 6x configuration files for the struts_example.war web application? I'm sure the answer to my problem is entering the descriptor xml to point to the location of the resources file, but since iPlanet does not support Webapps and WAR files, this is not a straightforward process. Any hints appreciated... Thanks, Brian __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Mulitpage form support.
When working with multipage forms it is desirable to have one bean in the users session that is populated as the user goes through the various pages of the form. I mistakenly thought that this was one of the services that struts provides. I have now discovered that this is not the case. When a form is submitted Struts seems to blindly replace the previous bean with a new one and then populates the new one with only the values that are on that particular form. (Is there something I am missing?) The only way I can get it to work is to put hidden fields in the form so that the data entered on one page is populate back into the bean again when it is submitted. The only other option I see is to have a single bean for each page, but this is not a desirable solution. Is there some other solution? Perhaps by storing the new bean in the request instead of the session, and then copying the values into the session bean? This seems like a big pain too! Adding hidden fields to each form means that one either has to put all of the fields of the bean into every form (which is a big headache if you want to add a field) or you have to put all the fields in that have been entered so far (which is a big headache if you want to change the flow of the pages.) It seems to me that the population of values into a bean should be proceeded by a check to see if there is a bean in the users session. If there is then that beans set methods should be called. This would make it so much easier to create multiage forms, and would not require the user to add all the hidden fields to a form. This is what I thought struts did when I started using it, and I am disappointed that this is not the case. -Nick
Repost: Where did it go?!
Hi everyone. Apologies for reposting, but I am really stuck on this one, and wondering if anyone has any ideas?! After calling the action below to download a data directory, everything goes fine, but somehow I lose the response output stream permanently! Thereafter, whatever I try and view on the site is processed, but nothing gets displayed! Do I somehow have to reset the stream? Is there any side effects from returning null? Any help would really be appreciated! Thanks, Dave -- DownloadDataDirAction.java: package beans; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.zip.ZipOutputStream; import java.util.zip.ZipException; import java.util.zip.ZipEntry; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * Implementation of strongAction/strong that downloads the filtered log to * the users disk. */ public final class DownloadDataDirAction extends Action { // - Public Methods /** * Process the specified HTTP request, and create the corresponding HTTP * response (or forward to another web component that will create it). * Return an codeActionForward/code instance describing where and how * control should be forwarded, or codenull/code if the response has * already been completed. * * @param mapping The ActionMapping used to select this instance * @param actionForm The optional ActionForm bean for this request (if any) * @param request The HTTP request we are processing * @param response The HTTP response we are creating * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet exception occurs */ public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { HttpSession session = request.getSession(); ServerBean sb = (ServerBean)session.getAttribute(ServerBean); if (sb == null) { try { sb = new ServerBean(); session.setAttribute(ServerBean, sb); } catch (ServerConnectionException sce) { throw new ServletException(Connection Error, sce); } } try { String dataDir = sb.getAbsolutePath(sb.getParameter(directories.dataDir)); System.out.println(dataDir: + dataDir); //create output stream to write entries to response.setContentType(zip); response.setHeader(Content-disposition, attachment; filename=\DataDir.zip\); response.addHeader(Content-description, my description); //create zip stream, and recursively add files/subdirectories to zip ZipOutputStream out = new ZipOutputStream(response.getOutputStream()); addToZip(dataDir, out); out.flush(); out.close(); } catch (ServerOperationException soe) { throw new ServletException(Operation Error - getting data directory name, soe); } catch (ServerConnectionException sce) { throw new ServletException(Connection Error, sce); } catch (Exception e) { //TODO: forward to error page System.out.println(Exception in ShowLogAction + e.toString()); e.printStackTrace(); //throw new LogFileFormatException(ShowLogFilterAction: Exception processing Log Filter + e.toString()); } //TODO: DELETE SESSION VARIABLES!! } /** * Helper method which recursively zips and adds files and sub-directories to a * zip output stream. * * @param filename String representing a file or directory to add * @param stream open zip output stream to add to */ private void addToZip(String filename, ZipOutputStream out) throws FileNotFoundException, java.io.IOException { File file = new File(filename); //if file is a file, add to zip if(file.exists() file.isFile()) { BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file)); ZipEntry ze = new ZipEntry(filename); out.putNextEntry(ze); //read/write file to zip byte[] data = new byte[1024]; int byteCount; while((byteCount = bis.read(data, 0,
Re: iPlanet - Cannot find message resources u/key
All, Has anyone with iPlanet Webserver 4.x, 6.x been able to get Struts to work? If so, have you run into the: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE error? If so, how were you able to fix it? Thanks, Brian Brian.Duchouquette@tran splace.com To: [EMAIL PROTECTED] cc: 07/23/2001 02:50 PMSubject: Re: iPlanet - Cannot find message resources u/key Please respond to struts-user Does iPlanet Webserver 6.0 know how to use web.xml? Or is it like iPlanet Webserver 4.2 which uses rules.properties to handle essentially the same thing? (I have a call into iPlanet technical support for this question since I think I am getting too much into the container implementation of a particular vendor. However if someone has already solved this problem with iPlanet, then please feel free to let me know!). I did have the mapping in my Web.xml file from your last message, but I think that the iPlanet servlet container doesn't know how to use it. This is just a guess... Maybe there is some other configuration I need to do in the administration console for iPlanet Webserver 6.0 to map to a servlet directory to get this to work? Brian Matt Raible matt_raible@To: [EMAIL PROTECTED] yahoo.com cc: Subject: Re: iPlanet - Cannot find message resources u/key 07/23/2001 02:25 PM Please respond to struts-user Make sure your web.xml has the following entry for the action class: servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param --- [EMAIL PROTECTED] wrote: Matt, Oops, I suppose I should have specified Webserver or Appserver. I'm using iPlanet Webserver 6.0. My classpath points to the directory containing ApplicationResources.properties which is: c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\classes\ApplicationResources.properties This does not seem to work even after updating the server startup classpath in jvm12.conf. Here is that entry in jvm12.conf: jvm.classpath=c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib\struts.jar;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\classes;c: \iPlanet\Servers\docs\WEB-INF\classes\beanutils.jar; c: \iPlanet\Servers\docs\WEB-INF\classes\collections.jar;c: \iPlanet\Servers\docs\WEB-INF\classes\digester.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar Thanks, Brian Matt Raible matt_raible@To: [EMAIL PROTECTED] yahoo.com cc: Subject: Re: iPlanet - Cannot find message resources u/key 07/23/2001 02:08 PM Please respond to struts-user iPlanet Web Server or App Server? The fix on the appserver is a classpath thing - probably the same on Web Server. --- [EMAIL PROTECTED] wrote: All, Can someone please post their iPlanet 6x configuration files for the struts_example.war web application? I'm sure the answer to my problem is entering the descriptor xml to point to the location of the resources file, but since iPlanet does not support Webapps and WAR files, this is not a straightforward process. Any hints appreciated... Thanks, Brian __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Validation: validate time entry
Does anyone know of a time validation that I can add to my validation.xml file. It would be similar to the entry below (I figure), but would validate the time is between 0:00 and 12:00, or 0:00 and 24:00 validator name=integer classname=com.wintecinc.struts.validation.StrutsValidator method=validateInteger depends=required msg=errors.integer javascript![CDATA[ function validateInteger(form) { var bValid = true; var focusField = null; var i = 0; var fields = new Array(); oInteger = new integer(); for (x in oInteger) { if ((form[oInteger[x][0].type == 'text' || form[oInteger[x][0].type == 'textarea' || form[oInteger[x][0].type == 'select' || form[oInteger[x][0].type == 'radio') form[oInteger[x][0].value.length 0) { var iValue = parseInt(form[oInteger[x][0].value); if (!iValue || !(iValue = -2147483648 iValue = 2147483647)) { if (i == 0) focusField = form[oInteger[x][0]; fields[i++] = oInteger[x][1]; bValid = false; } } } if (fields.length 0) { focusField.focus(); alert(fields.join('\n')); } return bValid; }]] /javascript /validator __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: Repost: Where did it go?!
Dave, It sounds like you may be having a problem with holding onto the session between your two frames. If this is a possibility, then set a session variable in the lower frame and try printing out your session information in the top frame to see what is going on. Brian dhay@lexmark. com To: [EMAIL PROTECTED] cc: 07/23/2001 Subject: Repost: Where did it go?! 03:13 PM Please respond to struts-user Hi everyone. Apologies for reposting, but I am really stuck on this one, and wondering if anyone has any ideas?! After calling the action below to download a data directory, everything goes fine, but somehow I lose the response output stream permanently! Thereafter, whatever I try and view on the site is processed, but nothing gets displayed! Do I somehow have to reset the stream? Is there any side effects from returning null? Any help would really be appreciated! Thanks, Dave -- DownloadDataDirAction.java: package beans; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.zip.ZipOutputStream; import java.util.zip.ZipException; import java.util.zip.ZipEntry; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * Implementation of strongAction/strong that downloads the filtered log to * the users disk. */ public final class DownloadDataDirAction extends Action { // - Public Methods /** * Process the specified HTTP request, and create the corresponding HTTP * response (or forward to another web component that will create it). * Return an codeActionForward/code instance describing where and how * control should be forwarded, or codenull/code if the response has * already been completed. * * @param mapping The ActionMapping used to select this instance * @param actionForm The optional ActionForm bean for this request (if any) * @param request The HTTP request we are processing * @param response The HTTP response we are creating * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet exception occurs */ public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { HttpSession session = request.getSession(); ServerBean sb = (ServerBean)session.getAttribute(ServerBean); if (sb == null) { try { sb = new ServerBean(); session.setAttribute(ServerBean, sb); } catch (ServerConnectionException sce) { throw new ServletException(Connection Error, sce); } } try { String dataDir = sb.getAbsolutePath(sb.getParameter(directories.dataDir)); System.out.println(dataDir: + dataDir); //create output stream to write entries to response.setContentType(zip); response.setHeader(Content-disposition, attachment; filename=\DataDir.zip\); response.addHeader(Content-description, my description); //create zip stream, and recursively add files/subdirectories to zip ZipOutputStream out = new
Re: Mulitpage form support.
Struts calls the reset() method on any bean before populating it from a request. This is to allow general reuse of beans, and to be sure some controls like checkboxes are handled properly. You may need to be sure that the reset() method for your session-bound ActionForm bean does not blindly clear the properties that other pages have already populated. Deft handling of multipage wizard-type forms (not be confused with multipart forms used for uploading files) has always been a problem in Struts. I don't use them myself, but if someone who does would like to contribute an article, it would make a nice addition to the Users Guide. Something that also used that page property in the ValidatorForm class would be excellent! -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Palmer, Nick wrote: When working with multipage forms it is desirable to have one bean in the users session that is populated as the user goes through the various pages of the form. I mistakenly thought that this was one of the services that struts provides. I have now discovered that this is not the case. When a form is submitted Struts seems to blindly replace the previous bean with a new one and then populates the new one with only the values that are on that particular form. (Is there something I am missing?) The only way I can get it to work is to put hidden fields in the form so that the data entered on one page is populate back into the bean again when it is submitted. The only other option I see is to have a single bean for each page, but this is not a desirable solution. Is there some other solution? Perhaps by storing the new bean in the request instead of the session, and then copying the values into the session bean? This seems like a big pain too! Adding hidden fields to each form means that one either has to put all of the fields of the bean into every form (which is a big headache if you want to add a field) or you have to put all the fields in that have been entered so far (which is a big headache if you want to change the flow of the pages.) It seems to me that the population of values into a bean should be proceeded by a check to see if there is a bean in the users session. If there is then that beans set methods should be called. This would make it so much easier to create multiage forms, and would not require the user to add all the hidden fields to a form. This is what I thought struts did when I started using it, and I am disappointed that this is not the case. -Nick
Re: Problem with bean:message tag?
I downloaded the source of the nightly build and you are right, there are the two attributes. But in the 1.0 final release of struts (which i use) there are no property and name attributes for the bean:message tag. Matthias Matthias Brahm [EMAIL PROTECTED] wrote: This must be an error in the Tag Library Reference (in the source-code of the bean:message tag there are no name and property attributes)! Read the Tag Library Guides for the usage of the bean:message tag. In this documentation name and property are not mentioned. Matthias They are: From: struts-bean.html to attribute key: The message key of the requested message, which must have a corresponding value in the message resources. If not specified, the key is obtained from the name and property attributes. -- gR
RE: Mulitpage form support.
I understand the purpose of reset, but do not understand how and why struts chooses to reuse a particular bean by resetting it. Does it take then bean from the users session, or does it pull it from a pool of beans of that type. If it takes it from the session and then calls reset I would be comfortable overriding reset and making it do nothing, however if it does the latter than there is a problem in that it may pull some other users bean from the pool. This could lead to really undesirable behavior, like one user resetting the password for some other user etc... Does anybody know which way struts works in this respect? I will try to look at the source and figure this part out. I think the small change I suggested would make mulitpage forms a breeze in struts. -Nick -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 1:32 PM To: [EMAIL PROTECTED] Subject: Re: Mulitpage form support. Struts calls the reset() method on any bean before populating it from a request. This is to allow general reuse of beans, and to be sure some controls like checkboxes are handled properly. You may need to be sure that the reset() method for your session-bound ActionForm bean does not blindly clear the properties that other pages have already populated. Deft handling of multipage wizard-type forms (not be confused with multipart forms used for uploading files) has always been a problem in Struts. I don't use them myself, but if someone who does would like to contribute an article, it would make a nice addition to the Users Guide. Something that also used that page property in the ValidatorForm class would be excellent! -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Palmer, Nick wrote: When working with multipage forms it is desirable to have one bean in the users session that is populated as the user goes through the various pages of the form. I mistakenly thought that this was one of the services that struts provides. I have now discovered that this is not the case. When a form is submitted Struts seems to blindly replace the previous bean with a new one and then populates the new one with only the values that are on that particular form. (Is there something I am missing?) The only way I can get it to work is to put hidden fields in the form so that the data entered on one page is populate back into the bean again when it is submitted. The only other option I see is to have a single bean for each page, but this is not a desirable solution. Is there some other solution? Perhaps by storing the new bean in the request instead of the session, and then copying the values into the session bean? This seems like a big pain too! Adding hidden fields to each form means that one either has to put all of the fields of the bean into every form (which is a big headache if you want to add a field) or you have to put all the fields in that have been entered so far (which is a big headache if you want to change the flow of the pages.) It seems to me that the population of values into a bean should be proceeded by a check to see if there is a bean in the users session. If there is then that beans set methods should be called. This would make it so much easier to create multiage forms, and would not require the user to add all the hidden fields to a form. This is what I thought struts did when I started using it, and I am disappointed that this is not the case. -Nick
Validation Framework: Order of required Fields appearing on screen
I am requiring name and description on a form. When I don't enter either of these, the errors are displayed that description, then name is required. I'd like the errors to show the order that they're required in my validation.xml file, or in the form itself. Any ideas? Matt __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: Repost: Where did it go?!
Hi Brian, Thanks for the suggestion, but don't think that is the case, as in another download situation, I'm not using 2 frames, and still getting same problem. I have stuck a println statement in, too, which shows I have access to the same session. Any other ideas? This is really strange! Has anyone got a download working with struts? Cheers, Dave [EMAIL PROTECTED] on 07/23/2001 04:36:45 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Re: Repost: Where did it go?! Dave, It sounds like you may be having a problem with holding onto the session between your two frames. If this is a possibility, then set a session variable in the lower frame and try printing out your session information in the top frame to see what is going on. Brian dhay@lexmark. com To: [EMAIL PROTECTED] cc: 07/23/2001 Subject: Repost: Where did it go?! 03:13 PM Please respond to struts-user Hi everyone. Apologies for reposting, but I am really stuck on this one, and wondering if anyone has any ideas?! After calling the action below to download a data directory, everything goes fine, but somehow I lose the response output stream permanently! Thereafter, whatever I try and view on the site is processed, but nothing gets displayed! Do I somehow have to reset the stream? Is there any side effects from returning null? Any help would really be appreciated! Thanks, Dave -- DownloadDataDirAction.java: package beans; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.zip.ZipOutputStream; import java.util.zip.ZipException; import java.util.zip.ZipEntry; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * Implementation of strongAction/strong that downloads the filtered log to * the users disk. */ public final class DownloadDataDirAction extends Action { // - Public Methods /** * Process the specified HTTP request, and create the corresponding HTTP * response (or forward to another web component that will create it). * Return an codeActionForward/code instance describing where and how * control should be forwarded, or codenull/code if the response has * already been completed. * * @param mapping The ActionMapping used to select this instance * @param actionForm The optional ActionForm bean for this request (if any) * @param request The HTTP request we are processing * @param response The HTTP response we are creating * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet exception occurs */ public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { HttpSession session = request.getSession(); ServerBean sb = (ServerBean)session.getAttribute(ServerBean); if (sb == null) { try { sb = new ServerBean(); session.setAttribute(ServerBean, sb); } catch (ServerConnectionException sce) { throw new ServletException(Connection Error, sce); } } try { String dataDir = sb.getAbsolutePath(sb.getParameter(directories.dataDir)); System.out.println(dataDir: + dataDir); //create output stream to write entries to response.setContentType(zip); response.setHeader(Content-disposition, attachment; filename=\DataDir.zip\); response.addHeader(Content-description, my description); //create zip stream, and recursively add files/subdirectories to zip ZipOutputStream out = new ZipOutputStream(response.getOutputStream ()); addToZip(dataDir, out); out.flush(); out.close(); } catch (ServerOperationException soe) { throw new ServletException(Operation Error - getting data directory name, soe); } catch (ServerConnectionException sce) { throw new ServletException(Connection
Re: Mulitpage form support.
Struts doesn't maintain a pool of beans (or any other object). It just looks for an existing bean in the target scope before creating a new one of the same class. The ActionForm beans all have the same name (given in Struts-config), and so if it didn't, the new one would just overwrite the old one anyway. This saves an object create. In the case of a session bean, it also allows you to retain the properties, if reset() doesn't get in the way. The default reset() does nothing. I imagine that the class in question is blindly setting the properties to null, as all the examples suggest. In this case, it should be more careful For the Struts source, see processActionForm(), processPopulate(), and process() in ActionServlet.java. Palmer, Nick wrote: I understand the purpose of reset, but do not understand how and why struts chooses to reuse a particular bean by resetting it. Does it take then bean from the users session, or does it pull it from a pool of beans of that type. If it takes it from the session and then calls reset I would be comfortable overriding reset and making it do nothing, however if it does the latter than there is a problem in that it may pull some other users bean from the pool. This could lead to really undesirable behavior, like one user resetting the password for some other user etc... Does anybody know which way struts works in this respect? I will try to look at the source and figure this part out. I think the small change I suggested would make mulitpage forms a breeze in struts. -Nick
RE: Validation Framework: Order of required Fields appearing on screen
You can force the order by associating the error with a particular property when you add it to you ActionErrors. Like this: ActionErrors errors = new ActionErrors(); errors.add(name,new ActionError(name.required)); errors.add(description, new ActionError(description.required)); Then in your jsp page you do the following: html:errors property=description/ html:errors property=name/ The only problem with this approach is that you can not user the 'errors.header' and 'errors.footer' messages to surround your errors, since each html:errors tag will display these messages around the one error being printed. Hope this helps. -Nick -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 1:55 PM To: [EMAIL PROTECTED] Subject: Validation Framework: Order of required Fields appearing on screen I am requiring name and description on a form. When I don't enter either of these, the errors are displayed that description, then name is required. I'd like the errors to show the order that they're required in my validation.xml file, or in the form itself. Any ideas? Matt __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
RE: Mulitpage form support.
You are correct. I looked at the code a little and see that in fact it does pull the bean from the users scope just as I desire. I had implemented the reset methods in my form classes when I first started the application thinking that they were required for the pooling to work properly. When I remove the reset method, I see the behavior that I am looking for. This makes it pretty easy to do mulitpage forms. Thanks for your help. Perhaps some day soon I will write up a user doc that will help others to setup mulitpage forms in a snap. Struts is cool! -Nick -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 2:10 PM To: [EMAIL PROTECTED] Subject: Re: Mulitpage form support. Struts doesn't maintain a pool of beans (or any other object). It just looks for an existing bean in the target scope before creating a new one of the same class. The ActionForm beans all have the same name (given in Struts-config), and so if it didn't, the new one would just overwrite the old one anyway. This saves an object create. In the case of a session bean, it also allows you to retain the properties, if reset() doesn't get in the way. The default reset() does nothing. I imagine that the class in question is blindly setting the properties to null, as all the examples suggest. In this case, it should be more careful For the Struts source, see processActionForm(), processPopulate(), and process() in ActionServlet.java. Palmer, Nick wrote: I understand the purpose of reset, but do not understand how and why struts chooses to reuse a particular bean by resetting it. Does it take then bean from the users session, or does it pull it from a pool of beans of that type. If it takes it from the session and then calls reset I would be comfortable overriding reset and making it do nothing, however if it does the latter than there is a problem in that it may pull some other users bean from the pool. This could lead to really undesirable behavior, like one user resetting the password for some other user etc... Does anybody know which way struts works in this respect? I will try to look at the source and figure this part out. I think the small change I suggested would make mulitpage forms a breeze in struts. -Nick
Tomcat - example - Missing message
I think I've followed the instructions but I'm getting a: Missing message for key index.title for the struts-example app. The properties file is there, but it doesn't seem to be able to find it??
Re: Repost: Where did it go?!
Done some more testing on this, and I only lose all output if I SAVE the file - if I chose to OPEN the file at the download prompt, the zip file opens and when I close it, everything is still fine. However, if I save it, when it is done none of the other pages appear, even though the action is executed just fine. Wierd! Does anyone know what difference opening/saving the file I am downloading would have on the response object, output stream, or anything that would affect this? Cheers, Dave -- Forwarded by David Hay/Lex/Lexmark on 07/23/2001 05:56 PM --- David Hay 07/23/2001 04:54 PM To: [EMAIL PROTECTED] cc: Subject: Re: Repost: Where did it go?! (Document link: David Hay) Hi Brian, Thanks for the suggestion, but don't think that is the case, as in another download situation, I'm not using 2 frames, and still getting same problem. I have stuck a println statement in, too, which shows I have access to the same session. Any other ideas? This is really strange! Has anyone got a download working with struts? Cheers, Dave [EMAIL PROTECTED] on 07/23/2001 04:36:45 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Re: Repost: Where did it go?! Dave, It sounds like you may be having a problem with holding onto the session between your two frames. If this is a possibility, then set a session variable in the lower frame and try printing out your session information in the top frame to see what is going on. Brian dhay@lexmark. com To: [EMAIL PROTECTED] cc: 07/23/2001 Subject: Repost: Where did it go?! 03:13 PM Please respond to struts-user Hi everyone. Apologies for reposting, but I am really stuck on this one, and wondering if anyone has any ideas?! After calling the action below to download a data directory, everything goes fine, but somehow I lose the response output stream permanently! Thereafter, whatever I try and view on the site is processed, but nothing gets displayed! Do I somehow have to reset the stream? Is there any side effects from returning null? Any help would really be appreciated! Thanks, Dave -- DownloadDataDirAction.java: package beans; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.zip.ZipOutputStream; import java.util.zip.ZipException; import java.util.zip.ZipEntry; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * Implementation of strongAction/strong that downloads the filtered log to * the users disk. */ public final class DownloadDataDirAction extends Action { // - Public Methods /** * Process the specified HTTP request, and create the corresponding HTTP * response (or forward to another web component that will create it). * Return an codeActionForward/code instance describing where and how * control should be forwarded, or codenull/code if the response has * already been completed. * * @param mapping The ActionMapping used to select this instance * @param actionForm The optional ActionForm bean for this request (if any) * @param request The HTTP request we are processing * @param response The HTTP response we are creating * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet exception occurs */ public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { HttpSession session = request.getSession(); ServerBean sb = (ServerBean)session.getAttribute(ServerBean); if (sb == null) { try { sb = new ServerBean(); session.setAttribute(ServerBean, sb); } catch (ServerConnectionException sce) { throw new ServletException(Connection Error, sce); } } try { String dataDir = sb.getAbsolutePath(sb.getParameter(directories.dataDir)); System.out.println(dataDir: + dataDir);
Re: Validation Framework: Order of required Fields appearing on screen
In the more recent nightly builds (around a week) of Struts the ActionErrors class now maintains the order error messages are added in. So if you can switch to a newer build it should maintain the order. David --- Matt Raible [EMAIL PROTECTED] wrote: I am requiring name and description on a form. When I don't enter either of these, the errors are displayed that description, then name is required. I'd like the errors to show the order that they're required in my validation.xml file, or in the form itself. Any ideas? Matt __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: about usage of validation
Documentation and the javadocs are posted at http://home.earthlink.net/~dwinterfeldt/ and are included with the source. The overview goes over the validation.xml to some extent. I would read over the documentation and look at the example web app if you haven't done so already. David --- [EMAIL PROTECTED] wrote: Dear all, I am new with struts and want to use the validation features. I have just downloaded and compiled the validation codes from latest cvs. Can any body tell me any hints of the new validation.xml? I tried to hack it and understand some of the syntax but still a bit confusing with this file! In addition, when will be validation added to struts? Thx! Cheers, -- KC == ·s®ö§K¶O¹q¤l«H½c http://sinamail.sina.com.hk __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
html:hidden bug?
I need to create a hidden field in a form that is initialized to a value that I am iterating over. (I am creating a form that allows a parent user to manage their child usernames.) I tried something like this: table logic:iterate id=aUser name=myForm scope=session property=users trtdbean:write name=aUser//tdtd html:form name=myForm action=deleteUsername.do type=my.LogonForm scope=session bean:write name=aUser/ html:hidden property=userbean:write name=aUser//html:hidden html:submit bean:message key=button.delete/ /html:submit /html:form /td/tr /logic:iterate /table The username displays correctly, so I know the bean:write tag is working correctly. However when I look at the source that is generated I see a hidden field where the value is set to . It seems like this should work, and it doesn't cause any errors at runtime. The only way I have found to do it is by replacing the html:hidden tag with: input type=hidden name=user value=bean:write name=aUser/ This seems really clunky to me. Am I doing something wrong? Is this a bug in the tag? Thanks for your help, -Nick
Re: exception handling in struts actions
The Action handles flow-control, and selects page displays, including error pages. Actions should be prepared to cope with whatever exceptions are thrown, either directly or with an ancestor method. See also http://www.mail-archive.com/struts-user@jakarta.apache.org/msg09256.html and http://www.mail-archive.com/struts-user@jakarta.apache.org/msg08930.html -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Seth Riney wrote: Had a question regarding the best practice of handling non-Servlet or IOExceptions in Actions. Better to a) subclass Action, b) catch each exception and throw it as a generic Exception c) create an ActionErrors object and pass around stack traces that way. Any thoughts would be greatly appreciated.
Re: requirements for path triggering actions
I think you may have misunderstood the problem. .do IS triggered, but the Struts mapping object registered under the path may not be found. In other words consider: /charts/display.do /news/display.do /events/outdoors/display.do I want ANY occurence of display.do in the path to trigger a particular mapping - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Jonathan [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 1:29 AM Subject: Re: requirements for path triggering actions On Mon, 9 Jul 2001, Jonathan wrote: Can someone tell me if there is a way to configure an action to match a path regardless of how deep it is in a directory? That is, I want /display.do to be triggered in each case below: /charts/display.do /news/display.do /events/outdoors/display.do How can I accomplish this? The Servlet 2.2 (or 2.3) spec defines all the legal forms of servlet-mapping patterns, and can be downloaded at: http://java.sun.com/products/servlet/download.html For your purposes, you will find that the *.do pattern does indeed match all of the above. The corresponding action paths should be /charts/display, /news/display, and /events/outdoors/display. Craig McClanahan
Re: requirements for path triggering actions
To answer the original question: Can someone tell me if there is a way to configure an action to match a path regardless of how deep it is in a directory? No. There is not a way to do this, without changing the way Struts is programmed to behave. You could request a feature change in Bugzilla, and bring it up on the DEV list for discussion. Jonathan Asbell wrote: I think you may have misunderstood the problem. .do IS triggered, but the Struts mapping object registered under the path may not be found. In other words consider: /charts/display.do /news/display.do /events/outdoors/display.do I want ANY occurence of display.do in the path to trigger a particular mapping - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Jonathan [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 1:29 AM Subject: Re: requirements for path triggering actions On Mon, 9 Jul 2001, Jonathan wrote: Can someone tell me if there is a way to configure an action to match a path regardless of how deep it is in a directory? That is, I want /display.do to be triggered in each case below: /charts/display.do /news/display.do /events/outdoors/display.do How can I accomplish this? The Servlet 2.2 (or 2.3) spec defines all the legal forms of servlet-mapping patterns, and can be downloaded at: http://java.sun.com/products/servlet/download.html For your purposes, you will find that the *.do pattern does indeed match all of the above. The corresponding action paths should be /charts/display, /news/display, and /events/outdoors/display. Craig McClanahan -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/
How to integrate flash request into struts ...
Hello! I have a problem. A strange problem. I'm new to struts tougth i have a strong programming background. I wish to use flash with struts. What I want is to use the "loadVariables" function of flash. What this function do is to open a http connection to the server and read and process the stdout.(println in jsp). To do that i connect to a "jsp" file and pass variables in the http header (just as any HTML form) to the "jsp". My problem is the jsp file redirect the swf to the jsp and load the jsp in place of the swf. Can you help? Are there a way to connect and read to the jsp script without reloading the page just as I can do with ASP??? This trick work fine with ASP,CGI andother. What I would do in CGI is to write a script reading the query string and print out on the stdout. Without the swf to be reloading. Thank for any help or for pointing me somewhere I can find a solution!! Pi Guy
Workflow impasse? New ideas.
Hello all. I just got back and was reading the e-mails about workflows. By the tone and lack of dialog I think that we are not sure how we really want todesign workflows still. So lets have more discussion on the subject. When its clearer we will better know what we want to do. Here are some ideas I thoughtcould break down the problem a little more. I was thinking that a workflow can be described in the following ways: 1) It has a specific order 2) It DOES'NT having a specific order 3) It has a combination of tasks, some of which need to be executed in order,and others that do not 4) All of its tasks must be finished at the end 5) It May be made up of other worklflows Therefore, you would get a workflow with the characteristics you want. At the end you would make sure all tasks have been done in order it to be considered a completed workflow. For items that need order we can use the struts config file to put an entry in for workflows flow name="createAccount" class="com.brooksbrothers.workflows.Account_WF" step ordered="yes" number="1" class="com.brooksbrothers.workflows.AccountPersonal_ITEM" step ordered="yes" number="2" class="com.brooksbrothers.workflows.AccountCreditCheck_ITEM" step ordered="no" class="com.brooksbrothers.workflows.AccountDisplayTotal_ITEM" /flow /workflows anyone want to add
RE: questions about template
Hi vietk! I haven't seen anyone reply to this message yet, so on the chance that you haven't gotten the answer, here's some help. The template you set up should have an additional call to the actual page that you've written. This can be done by defiinig a call to a content section of the template. For example, your template definition page could look like this: table tr valign='top' tdtemplate:get name='sidebar'//td td table trtdtemplate:get name='header'//td/tr trtdtemplate:get name='main'//td/tr trtdtemplate:get name='footer'//td/tr /table /td /tr /table Here, the call to the 'content' would be the actual jsp page that you've written. The problem that you might be having is that you may not realize that this requires you to write 2 jsp pages, not one. The first page (let's call it 'content.jsp') would look like: %@ page language=java % template:put name='header' content='header.jsp' template:put name='main' content='contentPage.jsp' -- This is where the 'good stuff' goes template:put name='footer' content='footer.jsp' All your view, code, and other fancy shenanigans, go in the contentPage.jsp, where it will be nicely sandwiched between a header and a footer (if you choose). If you need more background (or even if you don't :) visit the Struts template api at: http://jakarta.apache.org/struts/api/org/apache/struts/taglib/template/packa ge-summary.html#package_description Hope this helps, Melissa -Original Message- From: Viet Kevin [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 22, 2001 8:27 AM To: [EMAIL PROTECTED] Subject: questions about template Hello all, I have little questions about template tags, i'm wondering about how to use it properly. In fact i know that i have to create a template file (with get tags nested in template tag). Once I have created this file I don't know how to use it well. For the moment I'm thinking that after the action has done it's job, I forward to a jsp that use the template file. The thing i don't understand is that I don't know where to put my real view code (the one that is not like table header or a table footer): the jsp-code that make the view of the MVC pattern Thanx for help
RE: Tomcat - example - Missing message
Is your properties file in the WEB_INF classes dir? This is where it needs to be in order for runtime objects to access it. However, I have seen other Tomcat users with the same issue, even when it's in the right place - I believe those ppl were running Tomcat 4. If this is the case, I apologize, for I can't help you as I haven't yet worked with Tomcat. Perhaps someone else can help if Tomcat is the issue. Melissa -Original Message- From: Casazza, Robert [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 5:34 PM To: '[EMAIL PROTECTED]' Subject: Tomcat - example - Missing message I think I've followed the instructions but I'm getting a: Missing message for key index.title for the struts-example app. The properties file is there, but it doesn't seem to be able to find it??
Re: Workflow impasse? New ideas.
A nice way of looking at workflows is EVTX diagrams/methods Where E - Entry Criteria to start process activity V - Validation Methods (inspection methods) T - Tasks in the process activity X - Exit Criteria to say task is complete You can define your process by Listing the process activites (Each with an EVTX datum), then linking the process tasks together This has worked well for Modeling Software Process and Manufacturing Processes, Any thoughts on this? Jonathan Asbell wrote: Hello all. I just got back and was reading the e-mails about workflows. By the tone and lack of dialog I think that we are not sure how we really want to design workflows still. So lets have more discussion on the subject. When its clearer we will better know what we want to do.Here are some ideas I thought could break down the problem a little more. I was thinking that a workflow can be described in the following ways:1) It has a specific order2) It DOES'NT having a specific order3) It has a combination of tasks, some of which need to be executed in order, and others that do not4) All of its tasks must be finished at the end5) It May be made up of other worklflowsTherefore, you would get a workflow with the characteristics you want. At the end you would make sure all tasks have been done in order it to be considered a completed workflow. For items that need order we can use the struts config file to put an entry in forworkflows> flow name="createAccount" class="com.brooksbrothers.workflows.Account_WF"> step ordered="yes" number="1" class="com.brooksbrothers.workflows.AccountPersonal_ITEM"> step ordered="yes" number="2" class="com.brooksbrothers.workflows.AccountCreditCheck_ITEM"> step ordered="no" class="com.brooksbrothers.workflows.AccountDisplayTotal_ITEM"> /flow>/workflows>anyone want to add
RE: Tomcat - example - Missing message
Just remove the struts.jar from the root lib folder... ie, keep the struts.jar file only inside individual webapp folders, not outside. -Original Message- From: Casazza, Robert [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 3:04 AM To: '[EMAIL PROTECTED]' Subject: Tomcat - example - Missing message I think I've followed the instructions but I'm getting a: Missing message for key index.title for the struts-example app. The properties file is there, but it doesn't seem to be able to find it??
Re: Workflow impasse? New ideas.
In Java Pet Store Application there is some mention about workflow .Why can't we just follow it ? Here is what they do ? from requestMapping.xml ( similar to our struts-config.xml input mapping) request-mappings screen definitions .../ url-mapping url="/verifysignin" screen="SIGN_IN_SUCCESS" useRequestHandler="true" useFlowHandler="true" request-handler-classcom.sun.j2ee.blueprints.petstore.control.web.handlers.SigninHandler/request-handler-class flow-handler class="com.sun.j2ee.blueprints.petstore.control.web.handlers.SigninFlowHandler" handler-result result="2" screen="SIGN_IN_ERROR"/ handler-result result="1" screen="SIGN_IN_SUCCESS"/ /flow-handler /url-mapping /request-mapping. Then use the DOM parser to parse it . I have not seen how in struts the work-flow is handled ? Or is it similar to above :-) Suhas - Original Message - From: Jonathan Asbell To: [EMAIL PROTECTED] Sent: Tuesday, July 24, 2001 5:54 AM Subject: Workflow impasse? New ideas. Hello all. I just got back and was reading the e-mails about workflows. By the tone and lack of dialog I think that we are not sure how we really want todesign workflows still. So lets have more discussion on the subject. When its clearer we will better know what we want to do. Here are some ideas I thoughtcould break down the problem a little more. I was thinking that a workflow can be described in the following ways: 1) It has a specific order 2) It DOES'NT having a specific order 3) It has a combination of tasks, some of which need to be executed in order,and others that do not 4) All of its tasks must be finished at the end 5) It May be made up of other worklflows Therefore, you would get a workflow with the characteristics you want. At the end you would make sure all tasks have been done in order it to be considered a completed workflow. For items that need order we can use the struts config file to put an entry in for workflows flow name="createAccount" class="com.brooksbrothers.workflows.Account_WF" step ordered="yes" number="1" class="com.brooksbrothers.workflows.AccountPersonal_ITEM" step ordered="yes" number="2" class="com.brooksbrothers.workflows.AccountCreditCheck_ITEM" step ordered="no" class="com.brooksbrothers.workflows.AccountDisplayTotal_ITEM" /flow /workflows anyone want to add
Struts configuration problems
I am having two different problems with my struts configuration: 1) Actions don't seem to be handled correctly. Anytime a submit button is clicked (this happens on my application as well as any example applications I have deployed) it comes back with a 404. I assume this is the setup with Apache / Tomcat. I have Include G:/jakarta-tomcat-3.2.2/conf/struts-tomcat-apache.conf at the bottom of the httpd.conf file for apache, and in the struts-tomcat-apache.conf file, I have the following lines: AddType text/jsp .jsp AddHandler jserv-servlet .jsp AddHandler jserv-servlet .do Is there something else I am missing? 2) Only my simple login form jsp's compile. My more complex forms do not compile at all, but return with an error such as javax.servlet.ServletException: No getter method for property sFirstName of bean org.apache.struts.taglib.html.BEAN . I do have all of the getters and setters in the FormBean. I have checked the configuration between the different jsps and the action mappings and they seem consistent. The relevant code: custJoin.jsp: %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % head titleCustomer Join/title html:base/ /head html:errors/ html:form action=/custjoin.do tr th align=right First Name: /th td align=left html:text property=sFirstName size=16 maxlength=50/ /td /tr ... /table /html:form /body /html:html struts-config.xml: form-beans !-- Customer join form bean -- form-bean name=customerJoinForm type=com.bmp.action.CustomerJoinForm/ /form-beans global-forwards forward name=custjoin path=/custJoin.jsp/ /global-forwards action-mappings !-- Process a customer join -- actionpath=/custjoin type=com.bmp.action.CustomerJoinAction name=customerJoinForm scope=request input=/custJoin.jsp validate=true forward name=success path=/custAccount.jsp / forward name=failure path=/error.jsp / /action /action-mappings Thanks, Alex
Struts + Tomcat/Apache (again)
Hi all, There were some discussion about this matter but I can't find a workable answer. I still can't manage to make Strut work on Tomcat with Apache: the server can't understand .do extension (using Tomcat alone work fine). I've followed the doc carefully, and also followed the advise on the mailing list: add the line JkMount *.do ajp12 to the config file, and the problem is still the same: HTTP 404 - File not found Could anyone please help me. By the way, I used: Apache 1.3.17 Tomcat 3.2.2 Strut 1.0 Thanks, - Chuong = HUYNH, N. CHUONG TMA Software Solutions, Vietnam Tel: (84-8) 990 3848 - Ext: 5272 Email: [EMAIL PROTECTED] =
still no luck with struts in tomcat 4 (was: Re: iPlanet - Cannot find message resources u/key)
i get this same error on the plain binary download of tomcat 4 and try to fire the struts example... jb - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 3:26 PM Subject: Re: iPlanet - Cannot find message resources u/key All, Has anyone with iPlanet Webserver 4.x, 6.x been able to get Struts to work? If so, have you run into the: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE error? If so, how were you able to fix it? Thanks, Brian Brian.Duchouquette@tran splace.com To: [EMAIL PROTECTED] cc: 07/23/2001 02:50 PMSubject: Re: iPlanet - Cannot find message resources u/key Please respond to struts-user Does iPlanet Webserver 6.0 know how to use web.xml? Or is it like iPlanet Webserver 4.2 which uses rules.properties to handle essentially the same thing? (I have a call into iPlanet technical support for this question since I think I am getting too much into the container implementation of a particular vendor. However if someone has already solved this problem with iPlanet, then please feel free to let me know!). I did have the mapping in my Web.xml file from your last message, but I think that the iPlanet servlet container doesn't know how to use it. This is just a guess... Maybe there is some other configuration I need to do in the administration console for iPlanet Webserver 6.0 to map to a servlet directory to get this to work? Brian Matt Raible matt_raible@To: [EMAIL PROTECTED] yahoo.com cc: Subject: Re: iPlanet - Cannot find message resources u/key 07/23/2001 02:25 PM Please respond to struts-user Make sure your web.xml has the following entry for the action class: servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param --- [EMAIL PROTECTED] wrote: Matt, Oops, I suppose I should have specified Webserver or Appserver. I'm using iPlanet Webserver 6.0. My classpath points to the directory containing ApplicationResources.properties which is: c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\classes\ApplicationResources.pr operties This does not seem to work even after updating the server startup classpath in jvm12.conf. Here is that entry in jvm12.conf: jvm.classpath=c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib\struts.jar;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\lib;c: \iPlanet\Servers\docs\webapps\struts\WEB-INF\classes;c: \iPlanet\Servers\docs\WEB-INF\classes\beanutils.jar; c: \iPlanet\Servers\docs\WEB-INF\classes\collections.jar;c: \iPlanet\Servers\docs\WEB-INF\classes\digester.jar;C:/iPlanet/Servers/plugin s/servlets/examples/legacy/beans.10/SDKBeans10.jar Thanks, Brian Matt Raible matt_raible@To: [EMAIL PROTECTED] yahoo.com cc: Subject: Re: iPlanet - Cannot find message resources u/key 07/23/2001 02:08 PM Please respond to struts-user iPlanet Web Server or App Server? The fix on the appserver is a classpath thing - probably the same on Web Server. --- [EMAIL PROTECTED] wrote: All, Can someone please post their iPlanet 6x configuration files for the struts_example.war web application? I'm sure the answer to my problem is entering the descriptor xml to point to the location of the resources file, but since iPlanet does not support Webapps and WAR files, this is not a straightforward process. Any hints appreciated... Thanks, Brian __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
FIXED: can't find message resources error
the problem i found with tomcat 4 can probably be fixed this way in iPlanet: delete crimson and parser jars from the catalina/jasper directory and put xerces.jar into the catalina/lib directory...this fixed it for me... Jon Brisbin