please unsubscribe me
please unsubscribe me
what's about org.apache.struts.taglib.html.MessagesTag ?
Hi, what's about the MessagesTag -class (org.apache.struts.taglib.html.MessagesTag) , which is documented in the javadocs, but is not placed in the framework ? Is it deprecated and 'deleted' or have the developer forgotten to put it to the place where it should be ? cheers mete
setter no called
Hello all, I have my own tag that generates a link to save a field in the database. But when I click the link the setter methods from the fields were not called. How can I do this? This is the generated link: Can someone help? Best regards. STEFAN -- hmi-Informatik GmbH Zettachring 6 - D-70567 Stuttgart E-Mail: [EMAIL PROTECTED] http://www.hmi-informatik.de
Re: New To Struts
Comments below. - Original Message - From: "Nitu Singh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, August 08, 2001 6:37 PM Subject: Re: New To Struts > Thanks a lot, > And I did visit the home page for struts(and that's where the problem > started). > Let me explain u the doubts which I had going thru the page: > 1) All the downloads had 2-3 versions (for example, ANT, it had binary > release, source realease and some RPM), > which one I have to download, do I have to download all the 3? > btw, if u can explain me the difference between source release and binary > release, as I see them in almost all the downloads. The only download you need is the Struts binary distribution. If you read something that stated that you needed more than this, please let us know where you saw that, so that we can fix it. You don't need to download Ant at all unless you want to rebuild Struts, or the example apps that come with it. The binary distribution contains everything you need, already compiled and provided as one or more jar files, ready for you to include in your own application.See http://jakarta.apache.org/struts/installation.html#Installing for more information on using a binary distribution. The source distribution includes, ah, the source code and everything you would need to rebuild your own version of Struts. See http://jakarta.apache.org/struts/installation.html#Building if you want to do that. > 2) Do I really have to download the Servlet API ?If yes, why? as weblogic > supports servlets and why again to have one more servlet API? You need to have some Servlet API implementation available if you're going to compile your own code that relies on those interfaces. If WebLogic includes that (as I would assume that it does, but I'm not familiar with it), then you don't need to download another one. > 3) In many installations it says, I need to put some *distribution files* or > some *jar files* in WEB-INF directory. I don't find any such directory > in weblogic5.1. So what to do? I suggest you follow the instructions for WebLogic 5.1. See http://jakarta.apache.org/struts/installation-wls.html for more information. > These are only few of the things. The more I read, the more I get confused? > If you could clear my above queries, I can go ahead and then may be I will > come up more questions? The best suggestion I can come up with is to follow the links that are available to you, and search the mailing list archives. You are by no means the first person to travel the path you are on. -- Martin Cooper > > Thanks a lot, > Nitu. > - Original Message - > From: "Martin Cooper" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, August 09, 2001 3:29 PM > Subject: Re: New To Struts > > > > You must not have visited the Struts home page, which should have been > your > > *first* resort. :-) > > > > http://jakarta.apache.org/struts/ > > > > There you will find: > > > > * A link to the Struts User Guide > > > > * A 'Resources' link, which will take you to a page listing several > > tutorials and articles on Struts. > > > > * An 'Installation' link, which will take you to a page detailing specific > > installation instructions for over a dozen different containers, including > > WebLogic 5.1. > > > > -- > > Martin Cooper > > > > > > - Original Message - > > From: "Nitu Singh" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, August 08, 2001 5:18 PM > > Subject: New To Struts > > > > > > > Hi, > > > I am new to struts and for past one week I am trying to find tutorials > and > > > materials regarding struts. > > > The only thing I got is some tutorial in jspinsider.com. > > > I understood the model of struts, but when putting it in to code, I am > > > facing problem at very basic step. > > > All I see in tutorials is they have explained how to use struts in > tomcat > > > server. But I am using weblogic5.1 server. > > > I have did all the settings as per directed for tomcat. > > > I understand there must some different way of deploying struts in > weblogic > > > server. > > > Can anyone please guide me through as what I should do to run my basic > > > application? > > > What all installations do I need and where should be they placed? > > > > > > I am really vexed up looking for these things on net. This mailing list > is > > > my LAST REOSRT. > > > > > > Thanks and Regards, > > > Nitu. > > > > > > > > > > > > > > >
Re: New To Struts
I think the directory WEB-INF is in every context (directory) in the directory applications, and there is always a default context (maybe \application\defaultwebapp_serverName\WEB-INF in weblogic) Quan - Original Message - From: Nitu Singh <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, August 09, 2001 8:37 AM Subject: Re: New To Struts > Thanks a lot, > And I did visit the home page for struts(and that's where the problem > started). > Let me explain u the doubts which I had going thru the page: > 1) All the downloads had 2-3 versions (for example, ANT, it had binary > release, source realease and some RPM), > which one I have to download, do I have to download all the 3? > btw, if u can explain me the difference between source release and binary > release, as I see them in almost all the downloads. > 2) Do I really have to download the Servlet API ?If yes, why? as weblogic > supports servlets and why again to have one more servlet API? > 3) In many installations it says, I need to put some *distribution files* or > some *jar files* in WEB-INF directory. I don't find any such directory > in weblogic5.1. So what to do? > These are only few of the things. The more I read, the more I get confused? > If you could clear my above queries, I can go ahead and then may be I will > come up more questions? > > Thanks a lot, > Nitu. > - Original Message - > From: "Martin Cooper" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, August 09, 2001 3:29 PM > Subject: Re: New To Struts > > > > You must not have visited the Struts home page, which should have been > your > > *first* resort. :-) > > > > http://jakarta.apache.org/struts/ > > > > There you will find: > > > > * A link to the Struts User Guide > > > > * A 'Resources' link, which will take you to a page listing several > > tutorials and articles on Struts. > > > > * An 'Installation' link, which will take you to a page detailing specific > > installation instructions for over a dozen different containers, including > > WebLogic 5.1. > > > > -- > > Martin Cooper > > > > > > - Original Message - > > From: "Nitu Singh" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, August 08, 2001 5:18 PM > > Subject: New To Struts > > > > > > > Hi, > > > I am new to struts and for past one week I am trying to find tutorials > and > > > materials regarding struts. > > > The only thing I got is some tutorial in jspinsider.com. > > > I understood the model of struts, but when putting it in to code, I am > > > facing problem at very basic step. > > > All I see in tutorials is they have explained how to use struts in > tomcat > > > server. But I am using weblogic5.1 server. > > > I have did all the settings as per directed for tomcat. > > > I understand there must some different way of deploying struts in > weblogic > > > server. > > > Can anyone please guide me through as what I should do to run my basic > > > application? > > > What all installations do I need and where should be they placed? > > > > > > I am really vexed up looking for these things on net. This mailing list > is > > > my LAST REOSRT. > > > > > > Thanks and Regards, > > > Nitu. > > > > > > > > > > > > > > >
Struts & Tomcat 4.0
Hello, I have been "playing" with struts for the past couple of months and I have had fun playing with it. Time has come now to stop playing and get serious. I have been asked to develop a web app with Struts & Tomcat. I have been using Weblogic for the past couple of years, but this is my first experience with Tomcat, so I need some help to take some decisions. (I realize that this email should really be sent to the Tomcat mailing list, but I believe there's enough expertise in this mailing list to get these questions answered!) After reading thru the Struts mailing list I have concluded the following. Can someone please tell me if I am on the right track? 1) From one of Craig's emails it sounds like I should be using Tomcat 4.0, not 3.2. Is that right? But Tomcat 4.0 is a beta release. Is it reliable? 2) Doesn't look like Tomcat 4.0 supports EJB. Does it? 3) If EJB is not available I can use JDBC - no problem - but doesn't look like I can create database connection pool in Tomcat. 4) From one of Ted's emails I think I should use Poolman to create database connection pool in Tomcat 4.0. Right? 5) What's equivalent of Weblogic Time APIs? Tomcat workers, right? 6) Can I set up Tomcat to send emails using Java Mail APIs? In Weblogic one has to make sure that mail.jar & activation.jar is in Weblogic Classpath. Is there any special requirement such as this in Tomcat? 7) Does Tomcat support JMS? 8) Which one is better - Log4J or LogKit (which is part of Avalon project from Jakarta)? 9) What's the difference between 'Struts' & 'Turbine' (which is another Jakarta project)? Pros & Cons? I apologize for the length of this email. Thanks in advance for your time. - Ajay
Weblogic + Struts + VAGE 3.5
I am trying to run Struts from weblogic in VAGE 3.5 Enterprise edition but I fail to run first example. Is there anyone who could use Struts in VAGE by using Weblogic. I got first applicatin is running at weblogic but when I try to reach index.jsp, I get a SAX parser exception.. Here is the detail; am using Struts version 1.0 and trying to run from source. I imported all needed pacakages into Visual Age (Xerses, Weblogic projects, Struts version 1.0 source) I am trying to run the first Struts application which is struts-exampleI am using VAGE 3.5 Enterprise Edition. I have downloaded weblogic kit for Visual age 3.5 Enterprise and installed alse I setup the service pack 9 for Weblogic kit. It gives me an error when I attemp to start the application. I write this error to you. Also when I try to reach 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd' address, I fail. I get an error message which is "The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. Cannot have a DTD declaration outside of a DTD. Line 26, Position 12 ---^ " If you help me, I will be very glad.. Thank you in advance for your help... Pzt Agu 06 14:26:31 GMT+03:00 2001: Pre-Loading servlet action Pzt Agu 06 14:26:32 GMT+03:00 2001: action: init Pzt Agu 06 14:26:32 GMT+03:00 2001: action: null Pzt Agu 06 14:26:32 GMT+03:00 2001: action: null resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd') Not registered, use system identifier javax.servlet.UnavailableException java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) javax.servlet.ServletException(java.lang.String) javax.servlet.UnavailableException(java.lang.String) void org.apache.struts.action.ActionServlet.init() void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig) javax.servlet.Servlet weblogic.servlet.internal.ServletStubImpl.createServlet() void weblogic.servlet.internal.ServletStubImpl.createInstances() void weblogic.servlet.internal.ServletStubImpl.prepareServlet(weblogic.servle t.internal.ServletRequestImpl, weblogic.servlet.internal.ServletResponseImpl) void weblogic.servlet.internal.ServletStubImpl.prepareServlet() void weblogic.servlet.internal.ServletContextImpl.preloadServlet(java.lang.St ring) void weblogic.servlet.internal.ServletContextImpl.preloadServlets() void weblogic.t3.srvr.HttpServer.initServletContexts() void weblogic.t3.srvr.HttpServer.start() void weblogic.t3.srvr.T3Srvr.start() void weblogic.t3.srvr.T3Srvr.main(java.lang.String [], java.lang.String, java.lang.String) void weblogic.Server.startServerStatically(java.lang.String [], java.lang.String, java.lang.String) void weblogic.Server.main(java.lang.String [], java.lang.String, java.lang.String) void weblogic.Server.main(java.lang.String []) void weblogic.integration.visualage.server.Server.main(java.lang.String []) Pzt Agu 06 14:27:19 GMT+03:00 2001: Log rotation is size based Pzt Agu 06 14:27:19 GMT+03:00 2001: ZAC ACLs initialized Pzt Agu 06 14:27:19 GMT+03:00 2001: ZAC packages stored in local directory exports Pzt Agu 06 14:27:19 GMT+03:00 2001: Listening on port: 7001 Pzt Agu 06 14:27:20 GMT+03:00 2001: WebLogic Server started Regards. Baris Guzelordu [EMAIL PROTECTED] *** This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient you are hereby notified that any dissemination, forwarding, copying or use of any of the information is prohibited. The opinions expressed in this message belong to sender alone. There is no implied endorsement by TURKCELL. This e-mail has been scanned for all known computer viruses. ***
Re: New To Struts
Thanks a lot, And I did visit the home page for struts(and that's where the problem started). Let me explain u the doubts which I had going thru the page: 1) All the downloads had 2-3 versions (for example, ANT, it had binary release, source realease and some RPM), which one I have to download, do I have to download all the 3? btw, if u can explain me the difference between source release and binary release, as I see them in almost all the downloads. 2) Do I really have to download the Servlet API ?If yes, why? as weblogic supports servlets and why again to have one more servlet API? 3) In many installations it says, I need to put some *distribution files* or some *jar files* in WEB-INF directory. I don't find any such directory in weblogic5.1. So what to do? These are only few of the things. The more I read, the more I get confused? If you could clear my above queries, I can go ahead and then may be I will come up more questions? Thanks a lot, Nitu. - Original Message - From: "Martin Cooper" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 09, 2001 3:29 PM Subject: Re: New To Struts > You must not have visited the Struts home page, which should have been your > *first* resort. :-) > > http://jakarta.apache.org/struts/ > > There you will find: > > * A link to the Struts User Guide > > * A 'Resources' link, which will take you to a page listing several > tutorials and articles on Struts. > > * An 'Installation' link, which will take you to a page detailing specific > installation instructions for over a dozen different containers, including > WebLogic 5.1. > > -- > Martin Cooper > > > - Original Message - > From: "Nitu Singh" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, August 08, 2001 5:18 PM > Subject: New To Struts > > > > Hi, > > I am new to struts and for past one week I am trying to find tutorials and > > materials regarding struts. > > The only thing I got is some tutorial in jspinsider.com. > > I understood the model of struts, but when putting it in to code, I am > > facing problem at very basic step. > > All I see in tutorials is they have explained how to use struts in tomcat > > server. But I am using weblogic5.1 server. > > I have did all the settings as per directed for tomcat. > > I understand there must some different way of deploying struts in weblogic > > server. > > Can anyone please guide me through as what I should do to run my basic > > application? > > What all installations do I need and where should be they placed? > > > > I am really vexed up looking for these things on net. This mailing list is > > my LAST REOSRT. > > > > Thanks and Regards, > > Nitu. > > > > > > > >
Re: New To Struts
The following might help you. ramakrishna. * Ted Husted has links tutorials, example webapps, and code (custom tags, etc.). http://www.husted.com/about/struts/ "A Walking Tour of Struts" (at the bottom) walks you through the Struts example webapp. http://www.husted.com/about/struts/scaffolding.htm If you want to stay pure MVC, then you can have your home page go through the controller servlet. Struts has a connection pool that you can use for database connections. You configure it in the struts-config.xml file. David --- [EMAIL PROTECTED] wrote: > Hi all, > > I just signed up and looking for some tutorials on > struts. > I installed it on Linux with Apache-Tomcat config. > > There is a sample application in there, however it > would be maybe easier to > go through some tutorials first. > Any suggestions ? > > Also, I'm in the process of doing a little web site > for myself. > It's basically only presentation of data for now. I > have a little confusion > there. As far as I understood the specifications, > servlets ( controllers ) > are responsible for data extraction from the > database and JSPs for > presentation. So what should I set up as the "index > page" , a JSP that > forwards the request to servlet and servlet responds > to JSP again or to use > a servlet that sends data to JSP ? > > Also. is it a good technique to have the JSP ( beans > ) extract data from > database ? In this case, how do I get to the > connection parameters if I > don't want to hardcode it and maybe use web.xml file > to hold the connection > parameters ? > > All responses are welcomed. > > Thank you. > > Jf > __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ - Original Message - From: "Nitu Singh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 08, 2001 5:18 PM Subject: New To Struts > Hi, > I am new to struts and for past one week I am trying to find tutorials and > materials regarding struts. > The only thing I got is some tutorial in jspinsider.com. > I understood the model of struts, but when putting it in to code, I am > facing problem at very basic step. > All I see in tutorials is they have explained how to use struts in tomcat > server. But I am using weblogic5.1 server. > I have did all the settings as per directed for tomcat. > I understand there must some different way of deploying struts in weblogic > server. > Can anyone please guide me through as what I should do to run my basic > application? > What all installations do I need and where should be they placed? > > I am really vexed up looking for these things on net. This mailing list is > my LAST REOSRT. > > Thanks and Regards, > Nitu. > > >
Re: New To Struts
You must not have visited the Struts home page, which should have been your *first* resort. :-) http://jakarta.apache.org/struts/ There you will find: * A link to the Struts User Guide * A 'Resources' link, which will take you to a page listing several tutorials and articles on Struts. * An 'Installation' link, which will take you to a page detailing specific installation instructions for over a dozen different containers, including WebLogic 5.1. -- Martin Cooper - Original Message - From: "Nitu Singh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 08, 2001 5:18 PM Subject: New To Struts > Hi, > I am new to struts and for past one week I am trying to find tutorials and > materials regarding struts. > The only thing I got is some tutorial in jspinsider.com. > I understood the model of struts, but when putting it in to code, I am > facing problem at very basic step. > All I see in tutorials is they have explained how to use struts in tomcat > server. But I am using weblogic5.1 server. > I have did all the settings as per directed for tomcat. > I understand there must some different way of deploying struts in weblogic > server. > Can anyone please guide me through as what I should do to run my basic > application? > What all installations do I need and where should be they placed? > > I am really vexed up looking for these things on net. This mailing list is > my LAST REOSRT. > > Thanks and Regards, > Nitu. > > >
New To Struts
Hi, I am new to struts and for past one week I am trying to find tutorials and materials regarding struts. The only thing I got is some tutorial in jspinsider.com. I understood the model of struts, but when putting it in to code, I am facing problem at very basic step. All I see in tutorials is they have explained how to use struts in tomcat server. But I am using weblogic5.1 server. I have did all the settings as per directed for tomcat. I understand there must some different way of deploying struts in weblogic server. Can anyone please guide me through as what I should do to run my basic application? What all installations do I need and where should be they placed? I am really vexed up looking for these things on net. This mailing list is my LAST REOSRT. Thanks and Regards, Nitu.
Re: Newbee: design question
You don't have to create a form bean if you don't want or need to. In your example, the form bean would only have one property, and that property came directly from a link (minimizing the risk of invalid values, and hence the need for validation in the form bean), so you could just use request.getParameter() instead if you wanted to. Regarding "unifying" access to form fields and parameters, I'm not sure what you're getting at. If a form bean is used, Struts will populate it from the request parameters regardless of how the request was submitted. So long as the form bean has a property corresponding to each parameter name, the form will contain all of the request parameter values when your action class is called. -- Martin Cooper - Original Message - From: "Andreas Leitner" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 25, 2001 1:13 AM Subject: Newbee: design question > > Hi, > > I am pretty new to tomcat/struts but nevertheless trying to create a > simple application using the two (; I have troubles getting my design > right, maybe some people on this list could give me some hints, they > would be greatly appreciated. > > The idea is that I have a DB backend that stores a bunch of documents > identified by an integer. Now the user can click on a link and view the > document (that's the first step). Now the link looks like this: >
Re: Using multiple data sources
On Thu, 9 Aug 2001, Jeffrey Bird wrote: > I am new to struts and am having a bit of trouble getting multiple > datasources working. I have two datasources defined in my > struts-config.xml. The documentation is unclear on how to define an > identifier for each datasource. > > The other problem is how to reference the datasource in my action class. > What do I have to supply as the parameter to the > servlet.findDataSource() method? I am currently using null, which > returns the first datasource that I have defined. I want to be able to > reference the other. > > Further to this, does anybody have a concrete example of using the > DBTags taglib with a struts defined datasource. Again, the documentation > is very sparse on this subject. > The basic principle is that every data source you define is made available to your application's Actions as a servlet context attribute. The first data source receives a default name (so you can just call servlet.getDataSource() with no argument from an Action). Beyond that, you have to assign specific names to the data sources, like this: and then you can reference that particular data source from an Action: DataSource ds = servlet.getDataSource("myname"); or from a JSP page as an application-scope bean named "myname". The latter is how you would access it from DBTags. > Thanks > Jeff Bird > Craig
Re: Staging Pages/Action form question.
The Struts answer to both of these questions is "use an Action". The Action classes are where the various pieces come together. In the first case, your action will invoke methods on business-logic objects and populate the form with the results. Then it will forward to the appropriate JSP page to display those results. In the second case, the search criteria will be presented to an action as a form bean. The action will then pass this data to business-logic objects, which will perform the search and return the results. After performing any transformations necessary to make the results more easily digested by a JSP page, the action once again forwards to an appropriate JSP to display them. Take a good look at the example application that comes with Struts, and Ted Husted's "Strut by Strut" article at: http://www.husted.com/about/struts/strutByStrut.htm for more details on how it all works. -- Martin Cooper - Original Message - From: "Prior, Simon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 06, 2001 2:02 AM Subject: Staging Pages/Action form question. > Hi Guys, > > I have the following scenarios and to design for and wanted to know how you > approached the following problems: > > 1. I have a page that will have dynamically generated menus populated with > entries from a database. My first question is how do you stage the pages? - > can you use the action form to retrieve the information to populate the > menus from the database ? I was thinking of using the action forms > constructor to call an ejb to ultimately retrieve the information but didn't > know whether this was the best way of approaching the problem. > > Do you guys have any suggestions? > > 2. I also have a search page where the user enters the search criteria and > then submits the query, at this point I was going to put the search criteria > on the session and have the results page pick up the search criteria, carry > out the search and then display the results. How do you guys do this? If I > was to use an action form for this in a manner similar to the above scenario > the constructor would retrieve the search criteria from the session and > execute the query thus 'staging' the page. Can the action form access the > session? If not, how do you guys do it? > > Any help would be most appreciated. > > Thanks in advance, > > Simon. > For optimum solutions that save you time, visit www.ds-s.com. >
Re: How to detect an ActionError in the JSP (logic:present)?
If you are just trying to determine whether or not there are outstanding errors to be displayed, you should look for the ActionErrors object, which is stored under the key Action.ERROR_KEY. -- Martin Cooper - Original Message - From: "Hartmut Bernecker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 26, 2001 5:55 AM Subject: How to detect an ActionError in the JSP (logic:present)? > Hello, > > In the validate method of the form class I return ActionErrors filled > with some ActionError objects. In the JSP I have: > > error ocurred[ ... ] > > Why is there no reaction (displaying of "error ocurred" ...)?? > > Hartmut Bernecker >
Re: beans:write bug?
This is a consequence of the JavaBeans introspection mechanism. The getter and setter must be getting and setting the same type for them to be recognized as property accessors. See the Introspection chapter of the JavaBeans spec for more details. -- Martin Cooper - Original Message - From: "Bud Gibson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 18, 2001 6:13 PM Subject: beans:write bug? > We have a bean with properties where the setter takes a float, and the > getter returns a string. Using expressions and scriptlets, this all > works fine. > > For instance, I can write the following for a bean contained inside another: > > <%= HagBean.getProduct().getPrice() %> > > and a formatted string with the price will appear. However, when we try > the equivalent bean:write, > > > > struts tells us that we are mismatching types with a float and String. > > Is this a bean:write bug? As I understand beans, setter methods are not > even required. I find it odd that bean:write seems to be assuming the > type of the setter method and then becoming unhappy when it gets the > type returned by the getter method. > > Thanks, > Bud > -- > ___ > Bud Gibson > e-Lab Czar > Assistant Professor > University of Michigan Business School > 701 Tappan Street, C2424 > Ann Arbor, MI 48109-1234 > ph: 734\647-9200 > fax: 734\764-3240 > [EMAIL PROTECTED] > >
newbie question
Hi all - I am facing a weird problem, which I could not solve in the last couple of hours. I checked up the mail-archive but could not locate any solution to this. The application has a login screen (login.jsp), which validates a user. There is an ActionForm (LoginForm) with appropriate get and set methods. The struts-config.xml looks like : When I execute the application (invoke login.jsp), I get a 404 error on the page "login.do". I gave debugging statements and I find that the get methods of the ActionForm gets executed, but nothing else happens. It does not even enter the LoginAction class. But from the Tomcat startup messages, I find that the mappings have been identified and loaded by Tomcat. I have struts.jar in WEB-INF/lib. I am really banging my head over this problem. The other applications like struts-example etc. are running fine .. Pls. help. Regards. - Debasish __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: New Release
On Wed, 8 Aug 2001, MacKellar, Kimberly wrote: > When is the new release of struts coming out (I really would like to use the > logic:notEmpty tag)? If you're planning on waiting for a 1.1 release, we haven't really talked about it yet. I know there's quite a bit of stuff yet to integrate - in the mean time, you could either use a 1.1 nightly build, or back-port and What happened to PropertyUtils in the nightly builds? > This class (and the digester stuff) now uses the packages from jakarta-commons for this. They have the same functionality but different package names. (The classes are in the commons-*.jar files). > Kimberly MacKellar > Thomson Financial Publishing > [EMAIL PROTECTED] > Craig
Re: splitting of struts config was RE: ActionServlet.addMapping()persistence
My "..." in the second line needs to be replaced by the usual public and system identifiers -- I pushed SEND before I went back and looked them up in the docs :-( Craig On Wed, 8 Aug 2001, Daniel Toms wrote: > Craig, or anyone, > > Has anyone actually gotten the below xml inclusion mechanism to > work using struts and tomcat 3.2.1? I searched other > messages about this in the archives and none of the authors > were successful. I always get a parse error like: > > che/struts/resources/web-app_2_3.dtd' > Parse Fatal Error at line 5 column -1: Relative URI "forms.xml"; can not be > reso > lved without a document URI. > org.xml.sax.SAXParseException: Relative URI "forms.xml"; can not be resolved > wit > hout a document URI. > > Our application is getting large and I would dearly like to use > this idea to split up the config file > > thanks, > > dan > > > -Original Message- > > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, August 08, 2001 12:41 PM > > To: [EMAIL PROTECTED] > > Subject: Re: ActionServlet.addMapping() persistence > > > > > > > > > >> There's an XML trick that lets you do this without needing to modify > > Struts. Consider that you've got a struts-config.xml file divided into > > three parts ("form-beans.xml", "global-forwards.xml", and > > "action-mappings.xml") stored in the /WEB-INF directory. They can be > > combined automatically by doing something like this in > > "struts-config.xml": > > > > > >> > > > > > > ]> > > > > > > > > > > &part1; > > > > > > > > &part2; > > > > > > > > &part3; > > > > > > > > > > Obviously, you can extend this concept to any reasonable separation of > > struts-config.xml into subordinate files. > > > > > I suppose I could update struts-config.xml and then tell the > > ActionServlet > > > to reread it in the Action I talked about in the first > > paragraph...I'd like > > > to be able to seperate this out, if possible, to make the seperate > > > components of my webapplication seperate. The problem with > > putting this all > > > into individual webapps is that I want the session to be passed > > from one > > > part of the webapp to the next. > > > > > > > The other approach would be to keep the individual pieces of > > struts-config.xml in separate files in your source repository, and use the > > Unix "cat" tool (or the DOS "copy" tool using plus signs) to concatenate > > the pieces together as you deploy the web app. > > > > > Any thoughts? > > > Thanks, > > > Becky > > > > > > > Craig > > > >
Re: Formbean Reset() called on every pass?
On Wed, 8 Aug 2001, Marcel Maré wrote: > Why is the Formbean Reset() method called on every pass, regardless of scope > (request vs session). > This makes prepopulating a form a bit awkward. > Because it is the only practical way I have found to deal with the funkiness of HTTP with regards to checkboxes. You shouldn't really be using reset() for prepopulation, anyway -- a better strategy is to go through a setup action for that which precreates the form bean exactly as you want it, and forwards to the JSP page for display. The example app illustrates this technique (see the /editRegistration and /editSubscription actions). > TIA > > Marcel Maré > WebToTheMax > > Craig
Using multiple data sources
I am new to struts and am having a bit of trouble getting multiple datasources working. I have two datasources defined in my struts-config.xml. The documentation is unclear on how to define an identifier for each datasource. The other problem is how to reference the datasource in my action class. What do I have to supply as the parameter to the servlet.findDataSource() method? I am currently using null, which returns the first datasource that I have defined. I want to be able to reference the other. Further to this, does anybody have a concrete example of using the DBTags taglib with a struts defined datasource. Again, the documentation is very sparse on this subject. Thanks Jeff Bird -- Jeffrey Bird Email: [EMAIL PROTECTED] Phone: +61 7 47814649 Computer Systems Officer Fax: +61 7 47815230 Information Technology & Resources James Cook University
Re: Construct context-relative URL in Javascript?
Did you try ? "Randall Parker" To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Subject: Construct context-relative URL in Javascript? 08/08/2001 05:23 PM Please respond to struts-user I've seen Craig posted how something like will get translated to But I need to create a context-sensitive URL in Javascript. The reason for this is that there are multiple buttons on my form/page and in the action handler function for each button I need to set the form's action to the appropriate action for that button click before submitting the form. So I think I want a way to do get at info in Javascript that is the equivalent of what is returned by javax.servlet.http.HttpServletRequest req.getContextPath() So that something like this can be done in Javascript this.form.action = contextPath + "/graphs/fullgraph.jsp" (or .do instead of .jsp or whatever) So is there some way with a Struts tag to put the context path on the generated page using perhaps an invisible control that would be set to have the context path as its value? Then one could assign the invisible control's value for the the context path to a Javascript variable and use it in something like the code snippet above. I also need to do some other stuff in the Javacsript (eg set the target attribute of the form tag using a generated value as well). So I think I really need to use Javascript to do this. Or am I approaching the problem in a way that is totally wrong?
Construct context-relative URL in Javascript?
I've seen Craig posted how something like will get translated to But I need to create a context-sensitive URL in Javascript. The reason for this is that there are multiple buttons on my form/page and in the action handler function for each button I need to set the form's action to the appropriate action for that button click before submitting the form. So I think I want a way to do get at info in Javascript that is the equivalent of what is returned by javax.servlet.http.HttpServletRequest req.getContextPath() So that something like this can be done in Javascript this.form.action = contextPath + "/graphs/fullgraph.jsp" (or .do instead of .jsp or whatever) So is there some way with a Struts tag to put the context path on the generated page using perhaps an invisible control that would be set to have the context path as its value? Then one could assign the invisible control's value for the the context path to a Javascript variable and use it in something like the code snippet above. I also need to do some other stuff in the Javacsript (eg set the target attribute of the form tag using a generated value as well). So I think I really need to use Javascript to do this. Or am I approaching the problem in a way that is totally wrong?
New Release
When is the new release of struts coming out (I really would like to use the logic:notEmpty tag)? What happened to PropertyUtils in the nightly builds? Kimberly MacKellar Thomson Financial Publishing [EMAIL PROTECTED]
Re: Can't get setter method(s) for indexed property right. Pleeze help
Marcel, I walked through code example submitted by Warwick Boote to get past issues/concepts with setters for indexed properties. The only change I made was to add a second field to the form. So, if your list is named properties, you would have second field on the form called "property" also. My property set method added an item to the properties vector (if it did not already exist on the vector)... I don't know if this is the best way to do it, but it worked. Brian Here's the message Warwick posted: Here is a hacked version of the code posted by David Hay previously. The code here will compile and run - a Vector is populated then displayed. After a post, the vector is retrieved from the form and then System.out is used to show its size. This should help others that are having problems with indexed tags. You'll need to point your browser to somthing that looks like http://localhost/struts/ShowParameters.do once you've copied all the files into the correct locations. There were two issues with the way i was trying to do it, firstly it seems that unless the scope of the form is set to session (or not specified) it doesn't work and secondly because i was using a different id for the name in the logic:iterate / html:text tags (when i set them to "parameter" it worked). Waz. =) -Original Message- From: Warwick Boote [mailto:[EMAIL PROTECTED]] Sent: 24 July 2001 14:09 To: [EMAIL PROTECTED] Subject: what setters do i implement in an indexed tag ? I've created a page using indexed tags (neat stuff!). Here is what is currently working for me: o If i populate the form's vector, values from that vector are displayed in the jsp Here is what it not working: o when the form is posted back, the vector is null (in the struts perform() method) I suspect i haven't implemented some sort of setter within the form but i can't find an example as to what method should be implemented. I've tried ArrayList and using parameterList instead with no different result. Thanks, Waz. =) Here are some code snippits for help: ---jsp--- ---Form--- public class FieldsMapForm extends ActionForm { private String fileColCount; private java.util.Vector fieldMappings = new java.util.Vector(); private String action; public String getFileColCount() { return fileColCount; } public void setFileColCount(String newFileColCount) { fileColCount = newFileColCount; } public void setFieldMappings(java.util.Vector newFieldMappings) { fieldMappings = newFieldMappings; } public java.util.Vector getFieldMappings() { return fieldMappings; } public FieldMapping getParameter(int index) { return (FieldMapping)fieldMappings.elementAt(index); } public void setAction(String newAction) { action = newAction; } public String getAction() { return action; } public void reset(ActionMapping mapping, HttpServletRequest request) { fileColCount = null; fieldMappings = new java.util.Vector(); action = null; } } ---The vector contains these:--- public class FieldMapping implements Serializable { private Integer fieldNumber; private String attributeCode; public void setFieldNumber(Integer newFieldNumber) { fieldNumber = newFieldNumber; } public Integer getFieldNumber() { return fieldNumber; } public void setAttributeCode(String newAttributeCode) { attributeCode = newAttributeCode; } public String getAttributeCode() { return attributeCode; } } <> (See attached file: indexed_eg_rwb.zip) Marcel Maré emax.com>cc: Subject: Can't get setter method(s) for indexed property right. 08/08/2001 Pleeze help 04:46 PM Please respond to struts-user I'm having trouble getting the setter methods of an indexed property of my formbean to work (despite some postings on this list). It's driving me nuts. So what I'm trying to do is use a String property of my formbean (actually a List of S
Oops, sorry for the double posts
Something fishy going on here (duplicator worm? ;-) Marcel Maré WebToTheMax
Can't get setter method(s) for indexed property right. Pleeze help
I'm having trouble getting the setter methods of an indexed property of my formbean to work (despite some postings on this list). It's driving me nuts. So what I'm trying to do is use a String property of my formbean (actually a List of Strings) as an indexed property. === JSP === : : : : - Note that the last field references the formbean (at least it should since "name=" is omittted). Note also that the iteration is not over the formbean (property). = Struts-config = - AddToCartAction adds the product and prepopulates the formbean. == Form bean editCartForm == public class EditCartForm extends ActionForm { : : private ArrayList testList = new ArrayList(); public EditCartForm() {} : : : public String getTest(int index) { return (String) testList.get(index); } public void setTest(int index, String test) { testList.set(index, test); } public ArrayList getTestList() { return testList; } public void setTestList( ArrayList testList ) { this.testList = testList; } } - I got the idea for set/getTestList from this mailinglist. The result: Error: 500 Location: /WEB-INF/jsp/editCart.jsp Internal Servlet Error: javax.servlet.ServletException: No getter method for property test of bean editCartForm at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at WEB_0002dINF.jsp._0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart_ jsp_7._jspService(_0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart _jsp_7.java:690) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) : : Root cause: javax.servlet.jsp.JspException: No getter method for property test of bean editCartForm at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:519) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:190) at WEB_0002dINF.jsp._0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart_ jsp_7._jspService(_0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart _jsp_7.java:534) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) What am I doing wrong? Any help appreciated Marcel Maré WebToTheMax [EMAIL PROTECTED]
Formbean Reset() called on every pass?
Why is the Formbean Reset() method called on every pass, regardless of scope (request vs session). This makes prepopulating a form a bit awkward. TIA Marcel Maré WebToTheMax
splitting of struts config was RE: ActionServlet.addMapping() persistence
Craig, or anyone, Has anyone actually gotten the below xml inclusion mechanism to work using struts and tomcat 3.2.1? I searched other messages about this in the archives and none of the authors were successful. I always get a parse error like: che/struts/resources/web-app_2_3.dtd' Parse Fatal Error at line 5 column -1: Relative URI "forms.xml"; can not be reso lved without a document URI. org.xml.sax.SAXParseException: Relative URI "forms.xml"; can not be resolved wit hout a document URI. Our application is getting large and I would dearly like to use this idea to split up the config file thanks, dan > -Original Message- > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 08, 2001 12:41 PM > To: [EMAIL PROTECTED] > Subject: Re: ActionServlet.addMapping() persistence > > > > >> There's an XML trick that lets you do this without needing to modify > Struts. Consider that you've got a struts-config.xml file divided into > three parts ("form-beans.xml", "global-forwards.xml", and > "action-mappings.xml") stored in the /WEB-INF directory. They can be > combined automatically by doing something like this in > "struts-config.xml": > > > > > > ]> > > > > > &part1; > > > > &part2; > > > > &part3; > > > > > Obviously, you can extend this concept to any reasonable separation of > struts-config.xml into subordinate files. > > > I suppose I could update struts-config.xml and then tell the > ActionServlet > > to reread it in the Action I talked about in the first > paragraph...I'd like > > to be able to seperate this out, if possible, to make the seperate > > components of my webapplication seperate. The problem with > putting this all > > into individual webapps is that I want the session to be passed > from one > > part of the webapp to the next. > > > > The other approach would be to keep the individual pieces of > struts-config.xml in separate files in your source repository, and use the > Unix "cat" tool (or the DOS "copy" tool using plus signs) to concatenate > the pieces together as you deploy the web app. > > > Any thoughts? > > Thanks, > > Becky > > > > Craig >
Formbean Reset() called on every pass?
Why is the Formbean Reset() method called on every pass, regardless of scope (request vs session). This makes prepopulating a form a bit awkward. TIA Marcel Maré WebToTheMax
Can't get setter method(s) for indexed property right. Pleeze help
I'm having trouble getting the setter methods of an indexed property of my formbean to work (despite some postings on this list). It's driving me nuts. So what I'm trying to do is use a String property of my formbean (actually a List of Strings) as an indexed property. === JSP === : : : : - Note that the last field references the formbean (at least it should since "name=" is omittted). Note also that the iteration is not over the formbean (property). = Struts-config = - AddToCartAction adds the product and prepopulates the formbean. == Form bean editCartForm == public class EditCartForm extends ActionForm { : : private ArrayList testList = new ArrayList(); public EditCartForm() {} : : : public String getTest(int index) { return (String) testList.get(index); } public void setTest(int index, String test) { testList.set(index, test); } public ArrayList getTestList() { return testList; } public void setTestList( ArrayList testList ) { this.testList = testList; } } - I got the idea for set/getTestList from this mailinglist. The result: Error: 500 Location: /WEB-INF/jsp/editCart.jsp Internal Servlet Error: javax.servlet.ServletException: No getter method for property test of bean editCartForm at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at WEB_0002dINF.jsp._0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart_ jsp_7._jspService(_0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart _jsp_7.java:690) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) : : Root cause: javax.servlet.jsp.JspException: No getter method for property test of bean editCartForm at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:519) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:190) at WEB_0002dINF.jsp._0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart_ jsp_7._jspService(_0002fWEB_0002dINF_0002fjsp_0002feditCart_0002ejspeditCart _jsp_7.java:534) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) What am I doing wrong? Any help appreciated Marcel Maré WebToTheMax [EMAIL PROTECTED]
RE: Weblogic related question- javax.servlet.jsp.JspException: No get ter method for property...
You're Bean class does not extend ActionForm.. [EMAIL PROTECTED] elheim.comTo: [EMAIL PROTECTED] cc: 08/08/2001 03:56 PM Subject: RE: Weblogic related question- Please respond to javax.servlet.jsp.JspException: No get ter method for property... struts-user The Bean class does have a matching get method for the specified property. This is why I don't understand why I am receiving this error... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 4:45 PM To: [EMAIL PROTECTED] Subject: Re: Weblogic related question- javax.servlet.jsp.JspException: No get ter method for property... RequestUtils is using introspection on your form bean class to match the name you placed in your Your form bean should have: String getRequestDate() andvoid setRequestDate(String) Brian [EMAIL PROTECTED] elheim.comTo: [EMAIL PROTECTED] cc: 08/08/2001 03:22 PM Subject: Weblogic related question- javax.servlet.jsp.JspException: Please respond to No get ter method for property... struts-user I am moving a Struts-based application from WebLogic 5.1 to 6.1 and I am encountering some strange errors. Has anyone else seen this behavior before, or know what might be causing it? I have a Collection of beans I am trying to iterate through using the Struts iterate tag (works fine with WL5.1) but now I am getting an error that there is no getter method. I have verified with the debugger that at runtime the Collection exists and it is populated with the expected objects. I am not really sure what is going on... The only thing I can think of is that this method does not exactly conform to the JavaBean spec- it does not set/get the same type of object. When doing a set, you pass it a TimeStamp but for the get it returns a formatted String (see below). However, the naming conventions are followed correctly. Is this a problem? WL Exception # note: the bean called "theFermentation" is a FermSummaryBean (see below) javax.servlet.jsp.JspException: No getter method for property requestDate of bean theFermentation at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:517) at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:179) at jsp_servlet._mainmenu._jspService(_mainmenu.java:385) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :263) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :302) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp l.java:190) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :263) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp l.java:190) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpSe
RE: Weblogic related question- javax.servlet.jsp.JspException: No get ter method for property...
The Bean class does have a matching get method for the specified property. This is why I don't understand why I am receiving this error... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 4:45 PM To: [EMAIL PROTECTED] Subject: Re: Weblogic related question- javax.servlet.jsp.JspException: No get ter method for property... RequestUtils is using introspection on your form bean class to match the name you placed in your Your form bean should have: String getRequestDate() andvoid setRequestDate(String) Brian [EMAIL PROTECTED] elheim.comTo: [EMAIL PROTECTED] cc: 08/08/2001 03:22 PM Subject: Weblogic related question- javax.servlet.jsp.JspException: Please respond to No get ter method for property... struts-user I am moving a Struts-based application from WebLogic 5.1 to 6.1 and I am encountering some strange errors. Has anyone else seen this behavior before, or know what might be causing it? I have a Collection of beans I am trying to iterate through using the Struts iterate tag (works fine with WL5.1) but now I am getting an error that there is no getter method. I have verified with the debugger that at runtime the Collection exists and it is populated with the expected objects. I am not really sure what is going on... The only thing I can think of is that this method does not exactly conform to the JavaBean spec- it does not set/get the same type of object. When doing a set, you pass it a TimeStamp but for the get it returns a formatted String (see below). However, the naming conventions are followed correctly. Is this a problem? WL Exception # note: the bean called "theFermentation" is a FermSummaryBean (see below) javax.servlet.jsp.JspException: No getter method for property requestDate of bean theFermentation at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:517) at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:179) at jsp_servlet._mainmenu._jspService(_mainmenu.java:385) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :263) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :302) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp l.java:190) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :263) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp l.java:190) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :263) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo ntext.java:2390) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java :1959) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) # Snipet from the JSP . . . "> View... "> Edit... # Contents of Bean class # package com.bipi.plims.entity; import java.sql.Timestamp; import java.text.SimpleDateFormat; /** * Value object that contains basic summary information about a fermentation request. * @author Robert
Struts on Websphere on AIX box
Hi, We have being using struts for a while now. We got it running on VAJ 3.5.3 . Also, on Websphere 3.5.3 on NT box. But now when time for actual deployment came ( which is on AIX Box ) , struts is giving a hard time . We are getting following error : [01.08.03 16:12:21:326 EDT] 6a64e3f8 WebGroup A SRVE0091I: [Servlet LOG]: "action: Initializing configuration from resource path /WEB-INF/struts-config.xml" register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'classloader:/disk1/test/test/struts-example/servlets/org/apache/struts/reso urces/struts-config_1_0.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'classloader:/disk1/test/test/struts-example/servlets/org/apache/struts/reso urces/web-app_2_2.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'classloader:/disk1/test/test/struts-example/servlets/org/apache/struts/reso urces/web-app_2_3.dtd' resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd') Resolving to alternate DTD 'classloader:/disk1/test/test/struts-example/servlets/org/apache/struts/reso urces/struts-config_1_0.dtd' Parse Fatal Error at line 5 column -1: External entity not found: "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";. java.net.MalformedURLException: null: java.lang.NullPointerException at com.sun.xml.parser.Parser.fatal(Parser.java:2817) at com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2506) at com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1137) at com.sun.xml.parser.Parser.parseInternal(Parser.java:481) at com.sun.xml.parser.Parser.parse(Parser.java:284) at javax.xml.parsers.SAXParser.parse(SAXParser.java:155) at javax.xml.parsers.SAXParser.parse(SAXParser.java:77) at org.apache.struts.digester.Digester.parse(Digester.java:755) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1331) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:465) at javax.servlet.GenericServlet.init(GenericServlet.java:258) We completely followed the steps of running the struts example on the Struts apache web site. Also, tried "In the DOCTYPE declaration, change the word PUBLIC to SYSTEM and completely remove the line that reads "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" from web.xml and remove "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" from struts-config.xml. " step as mentioned there but then it says DTD not registered. We have tried lots of work around but nothing worked till now. Have anyone tried the same & got it working. Please let us know. Struts version used is 1.0 ( final release). Its urgent ! Thanks, in advance Shipra Jain
Re: session question
There is no way to approach this problem as you currently are. You should be able to achieve the same effect however, but you will need to restructure your approach. Not knowing the details of you situation I would advise you to think in terms of having an action initialize your action form and set it as a request (or session...) attribute. Good Luck, Troy On Tuesday 07 August 2001 07:16 am, you wrote: > Thanks for the response but I was talking about the ActionForm not the > Action - perhaps I wasn't clear in my earlier post. The reason I am asking > is that I would like to prepare some data for a jsp within an ActionForms > constructor and have the jsp display this data via reflection of the > ActionForms elements. I would like to be able to grab a value from the > session within the ActionForms constructor but can't figure out how to > access it as there doesn't seem to be any means of doing so. > > Anyone have any thoughts? > > Simon. > > -Original Message- > From: Jon Crater [mailto:[EMAIL PROTECTED]] > Sent: 07 August 2001 13:47 > To: [EMAIL PROTECTED] > Subject: Re: session question > > > the action form's perform method receives a HttpServletRequest object, > which > > has a getSession() method. call it to get access to the current session. > note that getAttribute(String key) returns Object, so a typecast would > probably be required. > > public ActionForward perform(ActionMapping mapping, ActionForm form, > HttpServletRequest request, HttpServletResponse response) > { >HttpSession session = request.getSession(); >YourObject o = (YourObject)session.getAttribute("yourSessionKey"); >//do something with the object > } > > > Original Message Follows > From: "Prior, Simon" <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > Subject: session question > Date: Tue, 7 Aug 2001 13:33:31 +0100 > > Hi all, > > Does anybody know whether it is possible to access elements on the session > from the action form? - outside of the methods reset and validae? > > Thanks, > > Simon. > For optimum solutions that save you time, visit www.ds-s.com. > > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > For optimum solutions that save you time, visit www.ds-s.com.
Re: Weblogic related question- javax.servlet.jsp.JspException: No get ter method for property...
RequestUtils is using introspection on your form bean class to match the name you placed in your Your form bean should have: String getRequestDate() andvoid setRequestDate(String) Brian [EMAIL PROTECTED] elheim.comTo: [EMAIL PROTECTED] cc: 08/08/2001 03:22 PM Subject: Weblogic related question- javax.servlet.jsp.JspException: Please respond to No get ter method for property... struts-user I am moving a Struts-based application from WebLogic 5.1 to 6.1 and I am encountering some strange errors. Has anyone else seen this behavior before, or know what might be causing it? I have a Collection of beans I am trying to iterate through using the Struts iterate tag (works fine with WL5.1) but now I am getting an error that there is no getter method. I have verified with the debugger that at runtime the Collection exists and it is populated with the expected objects. I am not really sure what is going on... The only thing I can think of is that this method does not exactly conform to the JavaBean spec- it does not set/get the same type of object. When doing a set, you pass it a TimeStamp but for the get it returns a formatted String (see below). However, the naming conventions are followed correctly. Is this a problem? WL Exception # note: the bean called "theFermentation" is a FermSummaryBean (see below) javax.servlet.jsp.JspException: No getter method for property requestDate of bean theFermentation at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:517) at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:179) at jsp_servlet._mainmenu._jspService(_mainmenu.java:385) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :263) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :302) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp l.java:190) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :263) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp l.java:190) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :263) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo ntext.java:2390) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java :1959) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) # Snipet from the JSP . . . "> View... "> Edit... ##
Weblogic related question- javax.servlet.jsp.JspException: No getter method for property...
I am moving a Struts-based application from WebLogic 5.1 to 6.1 and I am encountering some strange errors. Has anyone else seen this behavior before, or know what might be causing it? I have a Collection of beans I am trying to iterate through using the Struts iterate tag (works fine with WL5.1) but now I am getting an error that there is no getter method. I have verified with the debugger that at runtime the Collection exists and it is populated with the expected objects. I am not really sure what is going on... The only thing I can think of is that this method does not exactly conform to the JavaBean spec- it does not set/get the same type of object. When doing a set, you pass it a TimeStamp but for the get it returns a formatted String (see below). However, the naming conventions are followed correctly. Is this a problem? WL Exception # note: the bean called "theFermentation" is a FermSummaryBean (see below) javax.servlet.jsp.JspException: No getter method for property requestDate of bean theFermentation at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:517) at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:179) at jsp_servlet._mainmenu._jspService(_mainmenu.java:385) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :263) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :302) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp l.java:190) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :263) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp l.java:190) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :263) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo ntext.java:2390) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java :1959) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) # Snipet from the JSP . . . "> View... "> Edit... # Contents of Bean class # package com.bipi.plims.entity; import java.sql.Timestamp; import java.text.SimpleDateFormat; /** * Value object that contains basic summary information about a fermentation request. * @author Robert Hayden * @version 1.0 */ public class FermSummaryBean implements java.io.Serializable { public String getRequestName() { return requestName; } public void setRequestName( String requestName ) { this.requestName = requestName; } public String getRequestDate() { SimpleDateFormat df = new SimpleDateFormat( "MMM d " ); return df.format( requestDate ); } public void setRequestDate( Timestamp requestDate ) { this.requestDate = requestDate; } public String getRequestBy() { return requestBy; } public void setRequestBy( String requestBy ) { this.requestBy = requestBy; } public Long getRequestId() { return requestId; } public void setRequestId( Long requestId ) { this.requestId = requestId; } public String getStatus() { return status; } public void setStatus( String status ) { this.status = status; } public String getRequestType() { return requestType; } public void setRequestType( String requestType ) { this.requestType = requestType; } public boolean isEditable() { return editable; } public void
Re: ActionServlet.addMapping() persistence
On Wed, 8 Aug 2001, Becky Moyer wrote: > Hi all... > I want to write an Action that will add mappings to the ActionServlet on the > fly. It's kind of fun to do stuff like this :-), but there's a standard action already available for you -- check out the org.apache.struts.actions.AddMappingAction class. There are a few other interesting standard actions in the same package. > Am I correct in thinking that any ActionMappings and such that I add > in this way will not be persisted, and that I also have to modify > struts-config.xml if I want the mappings to be available for future restarts > of my servlet engine? > That is correct. Alas, there is no portable way to tell the servlet container you want to *write* to a resource inside the web application archive. > Also, is there a way to specify multiple config paths in the ActionServlet > so that i can have more then one struts-config.xml in one webapplication? > So, for example, I would have a webapp test, which has > test/WEB-INF/struts-config.xml. If I added something later to it, > test/subtest, with its own new Actions, could I make a file > test/subtest/WEB-INF/struts-config.xml and have that file ALSO be read by > the ActionServlet on startup? > There's an XML trick that lets you do this without needing to modify Struts. Consider that you've got a struts-config.xml file divided into three parts ("form-beans.xml", "global-forwards.xml", and "action-mappings.xml") stored in the /WEB-INF directory. They can be combined automatically by doing something like this in "struts-config.xml": ]> &part1; &part2; &part3; Obviously, you can extend this concept to any reasonable separation of struts-config.xml into subordinate files. > I suppose I could update struts-config.xml and then tell the ActionServlet > to reread it in the Action I talked about in the first paragraph...I'd like > to be able to seperate this out, if possible, to make the seperate > components of my webapplication seperate. The problem with putting this all > into individual webapps is that I want the session to be passed from one > part of the webapp to the next. > The other approach would be to keep the individual pieces of struts-config.xml in separate files in your source repository, and use the Unix "cat" tool (or the DOS "copy" tool using plus signs) to concatenate the pieces together as you deploy the web app. > Any thoughts? > Thanks, > Becky > Craig
Re: Why would jsessionid not appear?
The jsessionid path parameter will only be added if the servlet container does not know whether your client supports cookies. How Tomcat handles this (probably typical of others): * On the first response in a session, send the session id both ways (cookie and encoding). * If the subsequent request comes back with a cookie, turn of URL rewriting for the remainder of this session. * If the subsequent request comes back without a cookie, keep on rewriting. Craig On Wed, 8 Aug 2001 [EMAIL PROTECTED] wrote: > My link is: > > ="index.createStakeholder"/> > > it works, but the URL shows: > > http://localhost:8080/dne-struts/createStakeholder.do?action=create > > no jsessionid :( > > Any hints appreciated! > > Thanks, > Brian > > > > Here's my action-mapping for that page: > > type="com.transplace.struts.action.CreateStakeholderAction" >name="StakeholderForm" >scope="session" >validate="true"> >input="/CreateStakeholder.jsp"> > > > >
Re: Open a new window after an action
Windows are a "client side" thing, so you deal with them in Struts the same way you do with static HTML. * You can specify a "target" attribute on the form, which will cause the response to be displayed in a window identified by the target value. * To open a window with no decorations, you'll need JavaScript that does a "window.open()" call. You should be able to find info on any of the tutorial sites about JavaScript. Craig On Wed, 8 Aug 2001, Mustapha Essalihe wrote: > Hi every body, > After executing my perform method i want to open a new window to show the > result. I use the html:link tag with attribute target as : > paramName="nouvelle" paramId="id" paramProperty="id"> > > > this work correctly, when the action is exetcuted a new window is opened > and the content is displayed. The probelm is that i want to open the window > without toolbar, location, status like in javascript window.open() method. > How can i do that with struts ? > >
Re: how to submit a form with different parameter value
One way would be to have a hidden field in the form named "action", and then have some JavaScript event handler on the two image buttons that set the value to be transmitted for the "action" property to either "continue" or "goback" appropriately. Essentially, this is the same thing you would do with static HTML. Craig On Wed, 8 Aug 2001, Long Zhao wrote: > I have a form like this: > the second button do "doSomething.do?action=goback" > > thanks in advance > > Long >
Scalability
Hello All, I've been working with Struts for sometime now, but now I run into another question. Has anyone had any issues with Struts not being scaleable? Have you performed any stress tests on your applications? I really like Struts, but I'm getting feedback from other developers that don't feel that Struts is a very scaleable framework. Can struts concurrently handle 1000+ users and not have a crippling affect on your app server? These are some feedback questions I'm curious about and thought I would get some concrete answers from developers of Struts. Have a good one, Steven application/ms-tnef
Context error when load images
Hi, I have a a JSP page, on which I have loaded a couples of images, eventhough the images loaded all the images correctly, I till get the following error messages, Can you tell me why? thank you very much Binh 2001-08-08 11:18:48 - Ctx( /templates ): IOException in: R( /templates + /images/news-over.gif + null) Connection aborte d by peer: socket write error 2001-08-08 11:18:48 - Ctx( /templates ): IOException in: R( /templates + /images/bgtop.gif + null) Connection aborted by peer: socket write error 2001-08-08 11:18:48 - Ctx( /templates ): IOException in: R( /templates + /images/bgbottom.gif + null) Connection aborted by peer: socket write error __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: I'm new, need some tutorials and maybe some advice
Ted Husted has links tutorials, example webapps, and code (custom tags, etc.). http://www.husted.com/about/struts/ "A Walking Tour of Struts" (at the bottom) walks you through the Struts example webapp. http://www.husted.com/about/struts/scaffolding.htm If you want to stay pure MVC, then you can have your home page go through the controller servlet. Struts has a connection pool that you can use for database connections. You configure it in the struts-config.xml file. David --- [EMAIL PROTECTED] wrote: > Hi all, > > I just signed up and looking for some tutorials on > struts. > I installed it on Linux with Apache-Tomcat config. > > There is a sample application in there, however it > would be maybe easier to > go through some tutorials first. > Any suggestions ? > > Also, I'm in the process of doing a little web site > for myself. > It's basically only presentation of data for now. I > have a little confusion > there. As far as I understood the specifications, > servlets ( controllers ) > are responsible for data extraction from the > database and JSPs for > presentation. So what should I set up as the "index > page" , a JSP that > forwards the request to servlet and servlet responds > to JSP again or to use > a servlet that sends data to JSP ? > > Also. is it a good technique to have the JSP ( beans > ) extract data from > database ? In this case, how do I get to the > connection parameters if I > don't want to hardcode it and maybe use web.xml file > to hold the connection > parameters ? > > All responses are welcomed. > > Thank you. > > Jf > __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: Poolman under Tomcat 4
Ted, I just installed Tomcat4 and got poolman to work for me. As I said, my typical setup is to have poolman.jar in each WEB-INF/lib and poolman.xml in each WEB-INF/classes. After setting up tomcat4 for struts (copying jaxp.jar and crimson.jar from /tomcat4/jasper to /tomcat4/lib) and for poolman (jdbc2_0-stdext, jta, xerces into /tomcat4/lib), I simply copied one of my webapps to the webapp directory, and it ran fine. Will - Original Message - From: "Ted Husted" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 08, 2001 10:29 AM Subject: Poolman under Tomcat 4 Has anyone using Poolman configured it properly for Tomcat 4? Since it supports both JNDI and a static call for retreiving the datasource, it works well with layered applications. I have it running under Tomcat 3 well enough. But configuring it to play nice with Tomcat 4 is eluding me. I have the requisite poolman support JARs in the Tomcat lib (jdbc2_0-stdext, jta, xerces), except for poolman.jar, which is in its own folder. The poolman.xml is in the poolman folder, and both the JAR and the folder and the JAR on the classpath. I'm using findDatasource(), but the Tomcat log reports it can't find the class. If I move the poolman.jar to the Tomcat4 lib orthe WEB-INF\lib, a "Network Error: Peer reset connection" error is exposed by the browser, and Tomcat suddenly quits. My guess is that TC4 is not finding the poolman.xml (whereas TC3 does). If anyone sorts this out, I'd love to hear about it. Meanwhile, if anyone else is trying Poolman under TC3, I found that it really does want Xerces for the parser, so swap out the Tomcat default. It is also really-not-kidding about having the poolman.xml on the server's classpath. Having it a lib folder isn't enough. But after that, it works just great. You can import the poolman class into your Data Access Object (which is why I have it in its own folder), and have it snag the datasource using a static method (findDataSource(String name), just like our favorite son ;-). This way your Web layer doesn't need to know where the connection is coming from (as recommended by our other favorite Sun 8-). < http://www.codestudio.com/ > -Ted.
Re: Poolman under Tomcat 4
Ahh, the poolman.xml under classes! I was trying it in lib .. so this did help, William! And it works just as well under Tomcat 4, so I'm back to having no CLASSPATH again! -Ted. William Jaynes wrote: > > As another data point, I use resin and tomcat3. I typically configure poolman > locally for each web app. That is, I put poolman.jar into each WEB-INF/lib > directory and an application specific poolman.xml into each WEB-INF/classes > directory. Things also work if I configure poolman globally by putting > poolman.jar into the /resin/lib or /tomcat/lib directory, and putting > poolman.xml into /resin/classes or /tomcat/classes. (this poolman.xml has > configuration for all web apps). > > Things get complicated if one tries to mix local and global configs on the same > app server. > > Unfortunately I haven't used tomcat4 yet, so I can't actually help you out. > > - Original Message - > From: "Alan Inser" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, August 08, 2001 11:20 AM > Subject: RE: Poolman under Tomcat 4 > > Hi Ted, > > In my Tomcat 3 configuration, I put poolman.xml in the WEB-INF folder. Then > you have to add this folder's path in the classpath, see my classpath from > Tomcat.bat: > > set > CP=%CP%;D:\Projects\MyApp\Source\webapps\regbl\WEB-INF;D:\DevTools\JTA\jta.j > ar;D:\DevTools\JavaLibs\classes12.jar;D:\DevTools\JavaLibs\jdbc2_0-stdext.ja > r;D:\DevTools\poolman-2.0.4\lib\poolman.jar;D:\DevTools\poolman-2.0.4\lib\xe > rces.jar; > > I've seen no problem using xerces for Poolman and jaxp for Tomcat 3. > > Adriano Labate > > -Original Message- > From: Ted Husted [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 08, 2001 4:30 PM > To: [EMAIL PROTECTED] > Subject: Poolman under Tomcat 4 > > Has anyone using Poolman configured it properly for Tomcat 4? > > Since it supports both JNDI and a static call for retreiving the > datasource, it works well with layered applications. I have it running > under Tomcat 3 well enough. But configuring it to play nice with Tomcat > 4 is eluding me. > > I have the requisite poolman support JARs in the Tomcat lib > (jdbc2_0-stdext, jta, xerces), except for poolman.jar, which is in its > own folder. The poolman.xml is in the poolman folder, and both the JAR > and the folder and the JAR on the classpath. I'm using findDatasource(), > but the Tomcat log reports it can't find the class. > > If I move the poolman.jar to the Tomcat4 lib orthe WEB-INF\lib, a > "Network Error: Peer reset connection" error is exposed by the browser, > and Tomcat suddenly quits. My guess is that TC4 is not finding the > poolman.xml (whereas TC3 does). If anyone sorts this out, I'd love to > hear about it. > > Meanwhile, if anyone else is trying Poolman under TC3, I found that it > really does want Xerces for the parser, so swap out the Tomcat default. > It is also really-not-kidding about having the poolman.xml on the > server's classpath. Having it a lib folder isn't enough. > > But after that, it works just great. You can import the poolman class > into your Data Access Object (which is why I have it in its own folder), > and have it snag the datasource using a static method > (findDataSource(String name), just like our favorite son ;-). > > This way your Web layer doesn't need to know where the connection is > coming from (as recommended by our other favorite Sun 8-). > > < http://www.codestudio.com/ > > > -Ted.
ActionServlet.addMapping() persistence
Hi all... I want to write an Action that will add mappings to the ActionServlet on the fly. Am I correct in thinking that any ActionMappings and such that I add in this way will not be persisted, and that I also have to modify struts-config.xml if I want the mappings to be available for future restarts of my servlet engine? Also, is there a way to specify multiple config paths in the ActionServlet so that i can have more then one struts-config.xml in one webapplication? So, for example, I would have a webapp test, which has test/WEB-INF/struts-config.xml. If I added something later to it, test/subtest, with its own new Actions, could I make a file test/subtest/WEB-INF/struts-config.xml and have that file ALSO be read by the ActionServlet on startup? I suppose I could update struts-config.xml and then tell the ActionServlet to reread it in the Action I talked about in the first paragraph...I'd like to be able to seperate this out, if possible, to make the seperate components of my webapplication seperate. The problem with putting this all into individual webapps is that I want the session to be passed from one part of the webapp to the next. Any thoughts? Thanks, Becky _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Why would jsessionid not appear?
To follow up my last message: jsessionid is now being passed from index.jsp to my next form: CreateStakeholder.jsp. CreateStakeholder.jsp does not seem to recognize jsessionid when it is sent, and does not re-write the link tags. _ One important note: I am using a template to build createStakeholder.do (CreateStakeholder.jsp): The links in the template sub-forms are: _ Menu.jsp and Stakeholder_Links.jsp both do not add jsession id correctly into the Is it possible that the sub-pages on the template are not acquiring the jsessionid request parameter correctly? Is there something I need to do with the template to make sure the html:link tag builds correctly? Thanks, Brian p.s. CreateStakeholder.jsp looks like this: <%@ page language="java" %> <%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %> Brian.Duchouquette@tran splace.com To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> 08/08/2001 10:54 AMcc: Please respond to Subject: Why would jsessionid not appear? struts-user My link is: it works, but the URL shows: http://localhost:8080/dne-struts/createStakeholder.do?action=create no jsessionid :( Any hints appreciated! Thanks, Brian Here's my action-mapping for that page: input="/CreateStakeholder.jsp">
FW: ALERT From InfoWorld: New virus spreads using Acrobat files
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 11:13 AM To: [EMAIL PROTECTED] Subject: ALERT From InfoWorld: New virus spreads using Acrobat files INFOWORLD ALERT: SECURITY Wednesday, August 8, 2001 NEW VIRUS SPREADS USING ACROBAT FILES August 08, 2001 07:56 AM A VIRUS THAT infects PDF (Portable Document Format) files, used by Adobe Systems' Acrobat software, was identified Tuesday, according to two security organizations. For Full Story: http://www.infoworld.com/articles/hn/xml/01/08/08/010808hnacr.xml?0808alert - - - - - - - - - - - - - - - - - - - - - - - - - - - - UNSUBSCRIBE If you want to unsubscribe from InfoWorld's Newsletters or Alerts, go to http://www.iwsubscribe.com/newsletters/unsubscribe/ CHANGE E-MAIL If you want To change the e-mail address where you are receiving InfoWorld newsletters or Alerts, go to http://iwsubscribe.com/newsletters/adchange/ SUBSCRIBE To subscribe to any of InfoWorld's e-mail newsletters, or Alerts tell your friends and colleagues to go to: http://www.iwsubscribe.com/newsletters/ To subscribe to InfoWorld.com, or InfoWorld Print, or both, go to http://www.iwsubscribe.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - Copyright 2001 InfoWorld Media Group Inc. This message was sent to: [EMAIL PROTECTED]
RE: radio buttons
use the same property name example: 5 Minutes 10 Minutes 15 Minutes hope that helps thanks VA -Original Message- From: Rachel Warburton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 10:40 AM To: '[EMAIL PROTECTED]' Subject: radio buttons using the strut tag library does any one no of a way of making two radio buttons in the same group ie click one deselects the other one thanks ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **
html:image tag, property attribute?
results in which is not what I'd expect from looking at the source for ImageTag: public int doEndTag() throws JspException { // Generate an HTML element HttpServletResponse response = (HttpServletResponse) pageContext.getResponse(); String tmp = null; StringBuffer results = new StringBuffer(); results.append("
Re: Poolman under Tomcat 4
As another data point, I use resin and tomcat3. I typically configure poolman locally for each web app. That is, I put poolman.jar into each WEB-INF/lib directory and an application specific poolman.xml into each WEB-INF/classes directory. Things also work if I configure poolman globally by putting poolman.jar into the /resin/lib or /tomcat/lib directory, and putting poolman.xml into /resin/classes or /tomcat/classes. (this poolman.xml has configuration for all web apps). Things get complicated if one tries to mix local and global configs on the same app server. Unfortunately I haven't used tomcat4 yet, so I can't actually help you out. - Original Message - From: "Alan Inser" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 08, 2001 11:20 AM Subject: RE: Poolman under Tomcat 4 Hi Ted, In my Tomcat 3 configuration, I put poolman.xml in the WEB-INF folder. Then you have to add this folder's path in the classpath, see my classpath from Tomcat.bat: set CP=%CP%;D:\Projects\MyApp\Source\webapps\regbl\WEB-INF;D:\DevTools\JTA\jta.j ar;D:\DevTools\JavaLibs\classes12.jar;D:\DevTools\JavaLibs\jdbc2_0-stdext.ja r;D:\DevTools\poolman-2.0.4\lib\poolman.jar;D:\DevTools\poolman-2.0.4\lib\xe rces.jar; I've seen no problem using xerces for Poolman and jaxp for Tomcat 3. Adriano Labate -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 4:30 PM To: [EMAIL PROTECTED] Subject: Poolman under Tomcat 4 Has anyone using Poolman configured it properly for Tomcat 4? Since it supports both JNDI and a static call for retreiving the datasource, it works well with layered applications. I have it running under Tomcat 3 well enough. But configuring it to play nice with Tomcat 4 is eluding me. I have the requisite poolman support JARs in the Tomcat lib (jdbc2_0-stdext, jta, xerces), except for poolman.jar, which is in its own folder. The poolman.xml is in the poolman folder, and both the JAR and the folder and the JAR on the classpath. I'm using findDatasource(), but the Tomcat log reports it can't find the class. If I move the poolman.jar to the Tomcat4 lib orthe WEB-INF\lib, a "Network Error: Peer reset connection" error is exposed by the browser, and Tomcat suddenly quits. My guess is that TC4 is not finding the poolman.xml (whereas TC3 does). If anyone sorts this out, I'd love to hear about it. Meanwhile, if anyone else is trying Poolman under TC3, I found that it really does want Xerces for the parser, so swap out the Tomcat default. It is also really-not-kidding about having the poolman.xml on the server's classpath. Having it a lib folder isn't enough. But after that, it works just great. You can import the poolman class into your Data Access Object (which is why I have it in its own folder), and have it snag the datasource using a static method (findDataSource(String name), just like our favorite son ;-). This way your Web layer doesn't need to know where the connection is coming from (as recommended by our other favorite Sun 8-). < http://www.codestudio.com/ > -Ted.
Why would jsessionid not appear?
My link is: it works, but the URL shows: http://localhost:8080/dne-struts/createStakeholder.do?action=create no jsessionid :( Any hints appreciated! Thanks, Brian Here's my action-mapping for that page: input="/CreateStakeholder.jsp">
RE: Poolman under Tomcat 4
Hi Ted, In my Tomcat 3 configuration, I put poolman.xml in the WEB-INF folder. Then you have to add this folder's path in the classpath, see my classpath from Tomcat.bat: set CP=%CP%;D:\Projects\MyApp\Source\webapps\regbl\WEB-INF;D:\DevTools\JTA\jta.j ar;D:\DevTools\JavaLibs\classes12.jar;D:\DevTools\JavaLibs\jdbc2_0-stdext.ja r;D:\DevTools\poolman-2.0.4\lib\poolman.jar;D:\DevTools\poolman-2.0.4\lib\xe rces.jar; I've seen no problem using xerces for Poolman and jaxp for Tomcat 3. Adriano Labate -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 4:30 PM To: [EMAIL PROTECTED] Subject: Poolman under Tomcat 4 Has anyone using Poolman configured it properly for Tomcat 4? Since it supports both JNDI and a static call for retreiving the datasource, it works well with layered applications. I have it running under Tomcat 3 well enough. But configuring it to play nice with Tomcat 4 is eluding me. I have the requisite poolman support JARs in the Tomcat lib (jdbc2_0-stdext, jta, xerces), except for poolman.jar, which is in its own folder. The poolman.xml is in the poolman folder, and both the JAR and the folder and the JAR on the classpath. I'm using findDatasource(), but the Tomcat log reports it can't find the class. If I move the poolman.jar to the Tomcat4 lib orthe WEB-INF\lib, a "Network Error: Peer reset connection" error is exposed by the browser, and Tomcat suddenly quits. My guess is that TC4 is not finding the poolman.xml (whereas TC3 does). If anyone sorts this out, I'd love to hear about it. Meanwhile, if anyone else is trying Poolman under TC3, I found that it really does want Xerces for the parser, so swap out the Tomcat default. It is also really-not-kidding about having the poolman.xml on the server's classpath. Having it a lib folder isn't enough. But after that, it works just great. You can import the poolman class into your Data Access Object (which is why I have it in its own folder), and have it snag the datasource using a static method (findDataSource(String name), just like our favorite son ;-). This way your Web layer doesn't need to know where the connection is coming from (as recommended by our other favorite Sun 8-). < http://www.codestudio.com/ > -Ted.
how to submit a form with different parameter value
I have a form like this:
Database.xml or other avenues
Hi All, I have seen how database.xml works with Struts-example.war and that was good, but I would like to test the same sort of database on Access .mdb If I put dummy data into the .mdb, where do I put the .mdb? do I put this in the WEB-INF section with the other .xml files? I have created a folder in the subdirectories called DATA and I have configured my build.xml to copy this .mdb to the main section of my web application. I need to state an action mapping in the struts-config.xml file and also mention that in the web.xml? and if so where? Is there any information that could help me configure that database not only to retreive information but also to add information into this. Or is it better to create two .mdb one to send information to a database and the other retreive data for logging onto the web application and have the two .mdb communicate with each other in some way to exchange data or to update? That sounds easy but is there any tips on doing this or any examples that could assist me with this? Thanks for your time and have a great day. Kind Regards Rodney Smith -- Sent through GMX FreeMail - http://www.gmx.net
Re: radio buttons
give them the same name. --- Rachel Warburton <[EMAIL PROTECTED]> wrote: > using the strut tag library does any one no of a way of making two radio > buttons in the same group ie click one deselects the other one > > thanks > > > ** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > the system manager. > > This footnote also confirms that this email message has been swept by > MIMEsweeper for the presence of computer viruses. > > www.mimesweeper.com > ** __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Building Web Application
Hi All, I have sketched out the frame work for my web application. I have configured my Struts .xml files and put this in my Tomcate 3.2.2 and compiled this and this has worked. The question is what I am doing the correct way of building a web application and if not which is the professional way. I have created all my .html pages first and the links work, then I have converted most of my html pages to .jsp, I would like now to make a login process to my web application and that intails java files and java forms etc. Then intergrating the java files into my web application. Is this the incorrect way of approaching a web application? I would appreciate a bit of advise with that. Thanks Craig for your information on ActionServlets it has helped, I have read all the information on Struts-example.war and that was really good. But the example that I got mine out of was out of a book called Profession JSP 2nd Edition and that was called ch21. Thanks for your time and looking forward to your response. Kind Regards Rodney Smith -- Sent through GMX FreeMail - http://www.gmx.net
Advice on how to implement the following:
Hi, I need a bit of advice on how to implement the following. I am creating a page that holds a list of item names along with their description. So far I created a vector that holds an array of items and then passes it to a Struts page in the request scope. The page then iterates the array and then produces the page. So far no problem. Now I need to add a text field in which the user can input prices for these items. Then I need that form submitted to my actionservlet for processing. This is where I get lost. I thought of adding a price field to my item class and then as the vector is iterated on the page I create a textfield binding it to the price field in the bean. But when the page is submitted I don't think the vector will be passed to my action servlet for parsing. Any help is appreciated Alex
radio buttons
using the strut tag library does any one no of a way of making two radio buttons in the same group ie click one deselects the other one thanks ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **
Thanks Quan!: Re: how to create a submit button with my own image
eom --- Pham Thanh Quan <[EMAIL PROTECTED]> wrote: > You may use this > > > ... > > > > Quan > > - Original Message - > From: Long Zhao <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, August 07, 2001 5:21 AM > Subject: how to create a submit button with my own > image > > > > for a struts form, action="">, > > how to create a submit button with my own image? > > > > I have tried to use javascript to do > > > "onclick="javascript:window.document.form.submit()", > > but it did not work, because the struts form do > not > > have a name for the form. > > > > Thanks > > > > Long > > > > __ > > 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/
Poolman under Tomcat 4
Has anyone using Poolman configured it properly for Tomcat 4? Since it supports both JNDI and a static call for retreiving the datasource, it works well with layered applications. I have it running under Tomcat 3 well enough. But configuring it to play nice with Tomcat 4 is eluding me. I have the requisite poolman support JARs in the Tomcat lib (jdbc2_0-stdext, jta, xerces), except for poolman.jar, which is in its own folder. The poolman.xml is in the poolman folder, and both the JAR and the folder and the JAR on the classpath. I'm using findDatasource(), but the Tomcat log reports it can't find the class. If I move the poolman.jar to the Tomcat4 lib orthe WEB-INF\lib, a "Network Error: Peer reset connection" error is exposed by the browser, and Tomcat suddenly quits. My guess is that TC4 is not finding the poolman.xml (whereas TC3 does). If anyone sorts this out, I'd love to hear about it. Meanwhile, if anyone else is trying Poolman under TC3, I found that it really does want Xerces for the parser, so swap out the Tomcat default. It is also really-not-kidding about having the poolman.xml on the server's classpath. Having it a lib folder isn't enough. But after that, it works just great. You can import the poolman class into your Data Access Object (which is why I have it in its own folder), and have it snag the datasource using a static method (findDataSource(String name), just like our favorite son ;-). This way your Web layer doesn't need to know where the connection is coming from (as recommended by our other favorite Sun 8-). < http://www.codestudio.com/ > -Ted.
RE: Struts Design Question
Yes you can do the add/edit all on the same form. If have a database generated code or key you can put that in a hidden field. When in the action examine the form or request obj to see if that key is there, if it is you have a modify, if not add the record. Have you page that lists the songs pass a the code/key as a parameter to the SongForm.jsp. Then you can use the jsp:useBean as follows: Then to pre populate the form you can make a DataBase call in your form setSongKey() method and use the result to set the other values in the form. For a delete you can have a second form on the same page (with its own submit button) that has the songKey set into the SongDeleteForm and the submit is mapped to a DeleteAction that just uses the key to delete the record. I am new at the struts stuff myself, so these may not be the best ways to accomplish what you are trying to do, but I know it works. So anyone else please feel free to critique. Aaron -Original Message- From: Shriver, Ryan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 9:30 AM To: '[EMAIL PROTECTED]' Subject: Struts Design Question Hello all, I downloaded Struts last week and have enjoyed playing with it. I've come upon a design problem and I was hoping some folks on this list could help solve it. I've had no luck finding an answer in the mail archives. I want to maintain a list of songs. Through a web interface, I want to add a new song, edit information about an existing song (composer, artist, etc) and also delete a song. Under the covers this will do some sort of database insert, update and delete, respectively. The forms for adding a new song and editing an existing song are practically identical. They contain the same field names with the difference being edit pre-populates the fields with the existing values of a song whereas the fields are blank for add. Question #1: Can one ActionForm suffice for both add and edit form pages? My gut says yes, but I want to make sure. Actions. In the simplest scenario, I could create separate actions for all operations. I'd have AddSongAction, EditSongAction and DeleteSongAction classes each with their own logic in perform(). This would work, but there's something that bothers me about having three different classes performing operations on one entity. It seems like overkill. DispatchActions. I saw the post about using DispatchAction to have multiple methods in a single Action class. I really like this approach, as I could have insert, update and delete methods in my Action class. However, the input="" attribute in the action mapping definition (in struts-config.xml) is shared for all of them. So if I have separate addsong.jsp and editsong.jsp form pages sharing the same Action, and a validation error occurs, Struts can only return to one (whatever input="" is). So this won't work. Question #2: Is there a happy medium between these two approaches? One idea that I haven't worked through is using one songform.jsp page for add/edit/delete. Calling songform.jsp?method=add would produce a blank page for entering a new song. Songform.jsp?method=edit&id=1234 would populate the form with values from a song whose id = 1234. From here one could edit or delete the selected song. In Struts I'd use the DispatchAction to pass all add/edit/delete requests to one Action class. Because all were using the same form, the input="" attribute problem above would be avoided. Question #3: Will this approach work? Can anyone offer a better solution for this problem? Thanks for the feedback. -ryan
Struts Design Question
Hello all, I downloaded Struts last week and have enjoyed playing with it. I've come upon a design problem and I was hoping some folks on this list could help solve it. I've had no luck finding an answer in the mail archives. I want to maintain a list of songs. Through a web interface, I want to add a new song, edit information about an existing song (composer, artist, etc) and also delete a song. Under the covers this will do some sort of database insert, update and delete, respectively. The forms for adding a new song and editing an existing song are practically identical. They contain the same field names with the difference being edit pre-populates the fields with the existing values of a song whereas the fields are blank for add. Question #1: Can one ActionForm suffice for both add and edit form pages? My gut says yes, but I want to make sure. Actions. In the simplest scenario, I could create separate actions for all operations. I'd have AddSongAction, EditSongAction and DeleteSongAction classes each with their own logic in perform(). This would work, but there's something that bothers me about having three different classes performing operations on one entity. It seems like overkill. DispatchActions. I saw the post about using DispatchAction to have multiple methods in a single Action class. I really like this approach, as I could have insert, update and delete methods in my Action class. However, the input="" attribute in the action mapping definition (in struts-config.xml) is shared for all of them. So if I have separate addsong.jsp and editsong.jsp form pages sharing the same Action, and a validation error occurs, Struts can only return to one (whatever input="" is). So this won't work. Question #2: Is there a happy medium between these two approaches? One idea that I haven't worked through is using one songform.jsp page for add/edit/delete. Calling songform.jsp?method=add would produce a blank page for entering a new song. Songform.jsp?method=edit&id=1234 would populate the form with values from a song whose id = 1234. From here one could edit or delete the selected song. In Struts I'd use the DispatchAction to pass all add/edit/delete requests to one Action class. Because all were using the same form, the input="" attribute problem above would be avoided. Question #3: Will this approach work? Can anyone offer a better solution for this problem? Thanks for the feedback. -ryan
I'm new, need some tutorials and maybe some advice
Hi all, I just signed up and looking for some tutorials on struts. I installed it on Linux with Apache-Tomcat config. There is a sample application in there, however it would be maybe easier to go through some tutorials first. Any suggestions ? Also, I'm in the process of doing a little web site for myself. It's basically only presentation of data for now. I have a little confusion there. As far as I understood the specifications, servlets ( controllers ) are responsible for data extraction from the database and JSPs for presentation. So what should I set up as the "index page" , a JSP that forwards the request to servlet and servlet responds to JSP again or to use a servlet that sends data to JSP ? Also. is it a good technique to have the JSP ( beans ) extract data from database ? In this case, how do I get to the connection parameters if I don't want to hardcode it and maybe use web.xml file to hold the connection parameters ? All responses are welcomed. Thank you. Jf
Struts + Tomcat/Apache (Jserv or jk_mod)
Hi I have a problem whit Tomcat and Apache. When I run de Struts example using Tomcat alone, its works fine. But when I try to use Apache with Jserv and I do a logoff I can't make a login again. Can anyone tell me what's going on here / how to fix it? Thanks Martín
Re: I think I found a bug in Struts?
When the app starts I put all the lists which are vectors into the application session. I do this by getting the servletcontext object and putting the vector into there. Alex * Date: Tue, 7 Aug 2001 12:41:11 -0700 (PDT) To: Struts <[EMAIL PROTECTED]> From: "Craig R. McClanahan" <[EMAIL PROTECTED]> Subject: Re: I think I found a bug in Struts? Message-ID:On Tue, 7 Aug 2001, Alex Colic wrote: > Hi, > > It took a while but I think I found why the lists I put in application scope > were not being refreshed. > > When my app starts I put a couple of lists into the servletcontext so that > all my pages can access them. If the lists change I update the lists and > then I expect the next time the user access the page that the lists would > reflect the changes. I did a quick test and I found that my class was > updating the list and putting them into the session. Where are they really? In the session or in application scope? > > That portion briefly is: > protected ServletContext context; > context.setAttribute("COMMON_PROBLEM_LIST",tbeList ); > > On my page I have the following: > > > >scope="application" property="list" /> > > > > > I stepped through the logic:present tag and found that while it looks for > the bean it goes into the RequestUtils class. It enters the lookup method > and scan through the scope value. It is finding that scope does equal > application but the bean it is returning is the old one with the old data. I > would step through the pageContext class but because it is abstract I am > trying to find the concrete implementation of it. > > bean = pageContext.getAttribute(name, PageContext.APPLICATION_SCOPE); > > Any help in resolving this is highly appreciated. > The concrete implementation of PageContext (and every other interface and abstract class in the Servlet and JSP APIs) is inside your servlet container. > Alex > > Craig Alex Colic.vcf
RE: dynamically setting the html:select property
When you use a parameter of a tag, it should be a text or a regexp. if you write the tag interpretor will see the string "lookup#" and suppose that the parameter shouldn't be evaluated. To do this you should write this : " > arnaud -Message d'origine- De: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Date: mercredi 8 aout 2001 14:31 A: [EMAIL PROTECTED] Objet: dynamically setting the html:select property Hi there, inside an iterate tag I'm creating multiple textboxes and selects. to unqiuely identify each item I am appending the index from the iteration (idx) to the name; e.g. " maxlength="10" value=""> I also need to do this for drop down selections. However I'm having some problems with naming the selects dynamically. didn't work, the result was I also tried setting an attribute on my form the result was I've had to resort to scriptlets, please help.. thanks James
RE: Re. : RE: WEBSPHERE 3.5.4 and STRUTS 1.0: cant remove attributes from r equest scope
http://www.enfused.com/struts.jar :) Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 3:03 AM To: [EMAIL PROTECTED] Subject: Re. : RE: WEBSPHERE 3.5.4 and STRUTS 1.0: cant remove attributes from r equest scope Thanks Mark. Where can I find the struts.jar file with the modification "special WAS"? MIKAEL Mark Wilson <[EMAIL PROTECTED]> le 07/08/2001 17:48:13 Veuillez répondre à [EMAIL PROTECTED] Pour :"'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> cc : Objet : RE: WEBSPHERE 3.5.4 and STRUTS 1.0: cant remove attributes from r equest scope WAS 4.0 so far is no different, you will get the same error. The problem was fixed, by changing the code in org.apache.struts.taglib.html.FormTag per this solution posted a while ago: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10964.html There is another FormTag class, org.apache.struts.taglib.FormTag. Make sure you got the right one, and rebuilt correctly? This solution has worked successfully repeatedly. The problem lies with the IBM implementation of the org.apache.jasper package. It behaves differently than the tomcat reference implementation, in that it will always throw an exception when specifically removing attributes from request scope. Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 10:18 AM To: [EMAIL PROTECTED] Subject: WEBSPHERE 3.5.4 and STRUTS 1.0: cant remove attributes from request scope Hello, I write an application using struts. I have a first JSP page with a link to a second JSP page which contains a form. The link looks like: I get the first page with the link. But, when I click on it, I get the following message: "...cant remove Attributes from request scope..." I've seen a lot of mails in the struts-user list about the "doEndTag" method; so I tried to change the code of the "FormTag" class (in /taglib/html). It changes nothing. So, if anyone has a solution... A few questions: Where does the problem come from (Struts, Websphere)? Is there any improvement with Websphere 4.0? Thanks for your help. MIKAEL CONFIDENTIALITE : Ce message et les éventuelles pièces attachées sont confidentiels. Si vous n'êtes pas dans la liste des destinataires, veuillez informer l'expéditeur immédiatement et ne pas divulguer le contenu à une tierce personne, ne pas l'utiliser pour quelque raison que ce soit, ne pas stocker ou copier l'information qu'il contient sur un quelconque support. CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
Re. : RE: WEBSPHERE 3.5.4 and STRUTS 1.0: cant remove attributes from r equest scope
Thanks Mark. Where can I find the struts.jar file with the modification "special WAS"? MIKAEL Mark Wilson <[EMAIL PROTECTED]> le 07/08/2001 17:48:13 Veuillez répondre à [EMAIL PROTECTED] Pour :"'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> cc : Objet : RE: WEBSPHERE 3.5.4 and STRUTS 1.0: cant remove attributes from r equest scope WAS 4.0 so far is no different, you will get the same error. The problem was fixed, by changing the code in org.apache.struts.taglib.html.FormTag per this solution posted a while ago: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10964.html There is another FormTag class, org.apache.struts.taglib.FormTag. Make sure you got the right one, and rebuilt correctly? This solution has worked successfully repeatedly. The problem lies with the IBM implementation of the org.apache.jasper package. It behaves differently than the tomcat reference implementation, in that it will always throw an exception when specifically removing attributes from request scope. Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 10:18 AM To: [EMAIL PROTECTED] Subject: WEBSPHERE 3.5.4 and STRUTS 1.0: cant remove attributes from request scope Hello, I write an application using struts. I have a first JSP page with a link to a second JSP page which contains a form. The link looks like: I get the first page with the link. But, when I click on it, I get the following message: "...cant remove Attributes from request scope..." I've seen a lot of mails in the struts-user list about the "doEndTag" method; so I tried to change the code of the "FormTag" class (in /taglib/html). It changes nothing. So, if anyone has a solution... A few questions: Where does the problem come from (Struts, Websphere)? Is there any improvement with Websphere 4.0? Thanks for your help. MIKAEL CONFIDENTIALITE : Ce message et les éventuelles pièces attachées sont confidentiels. Si vous n'êtes pas dans la liste des destinataires, veuillez informer l'expéditeur immédiatement et ne pas divulguer le contenu à une tierce personne, ne pas l'utiliser pour quelque raison que ce soit, ne pas stocker ou copier l'information qu'il contient sur un quelconque support. CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
HTML Base Tag using SSL
We have a problem using the html:base tag when displaying a Struts JSP Page under SSL. SSL is configured on our web server (BEA WebLogic) to listen on the default port (443). When the JSP page is displayed in the browser the source HTML code shows the base tag with port 80 instead of port 443 (or blank). If we change the web server configuration so that SSL is listening on a different port (eg. 7002) then the base tag is correctly rendered with :7002. The problem may be arising because when we try to set the URL with :443 in the address the browser automatically removes the :443 and it looks like the html:base tag assumes SSL is on port 80 when it resolves it. Cheers, Chico -- The content of this e-mail is confidential, may contain privileged material and is intended solely for the recipient(s) named above. If you receive this in error, please notify Software AG immediately and delete this e-mail. Software AG (UK) Limited Registered in England & Wales 1310740 Registered Office: Hudson House, Hudson Way, Pride Park, Derby DE24 8HS
dynamically setting the html:select property
Hi there, inside an iterate tag I'm creating multiple textboxes and selects. to unqiuely identify each item I am appending the index from the iteration (idx) to the name; e.g. " maxlength="10" value=""> I also need to do this for drop down selections. However I'm having some problems with naming the selects dynamically. didn't work, the result was I also tried setting an attribute on my form the result was I've had to resort to scriptlets, please help.. thanks James
internal servlet error
I started using struts config I just imported all packages into my directory and started tomcat and tried to run an example jsp the following errors are seen in the browser I am unable to fix it out please help me Error: 500 Location: /sunanda/header.jsp Internal Servlet Error: javax.servlet.ServletException java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) javax.servlet.ServletException(java.lang.Throwable) void org.apache.jasper.runtime.PageContextImpl.handlePageException(java.lang.Exception) void _0002fheader_0002ejspheader_jsp_0._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response) void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response) void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object []) void org.apache.tomcat.service.TcpConnectionThread.run() void java.lang.Thread.run() Root cause: java.util.EmptyStackException java.lang.Throwable() java.lang.Exception() java.lang.RuntimeException() java.util.EmptyStackException() java.lang.Object java.util.Stack.peek() org.apache.struts.taglib.template.util.ContentMap org.apache.struts.taglib.template.util.ContentMapStack.peek(javax.servlet.jsp.PageContext) int org.apache.struts.taglib.template.GetTag.doStartTag() void _0002fheader_0002ejspheader_jsp_0._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response) void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response) void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object []) void org.apache.tomcat.service.TcpConnectionThread.run() void java.lang.Thread.run() ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.Kindlesystems.com **
RE: struts-config.xml
Now you should write something like that : Arnaud -Message d'origine- De: Pfingstl Gernot [SMTP:[EMAIL PROTECTED]] Date: mercredi 8 aout 2001 11:35 A: '[EMAIL PROTECTED]' Objet: struts-config.xml In struts-config_1_0.dtd there is a note in the data-source section that the use of "url", "autocommit" and so on as attributes is deprecated, you should use set-property instead. How can I use set-property in struts-config.xml? I have following datasource: How can I rewrite this description so that it uses "set-property" as it is stated in the DTD? Thank you, Gernot<< Fichier: ATT00010.htm>>
struts-config.xml
Title: struts-config.xml In struts-config_1_0.dtd there is a note in the data-source section that the use of "url", "autocommit" and so on as attributes is deprecated, you should use set-property instead. How can I use set-property in struts-config.xml? I have following datasource: autoCommit="false" description="My Data Source Configuration" driverClass="oracle.jdbc.driver.OracleDriver" maxCount="8" minCount="2" password="secrer" url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(HOST=myhost)(PROTOCOL=tcp)(PORT=1))(CONNECT_DATA=(SID=mysid)))" user="myuser"/> How can I rewrite this description so that it uses "set-property" as it is stated in the DTD? Thank you, Gernot
Re: Get request and the Action servlet
Excellent, thanks. The information I want to submit is minimal anyway. I'll have a look at the source. At 08/08/2001 10:21:08, "Gregor Rayman" <[EMAIL PROTECTED]> wrote: # <[EMAIL PROTECTED]> wrote: # # > I would like to use Struts with an action that is initiated by following a # link, # > rather the form-based approach that I can see in the documentation. I would # also # > like the ActionServlet to parse the URI and instantiate my bean with the # > information from the URI. Is this possible? # > # > Sorry if this is a FAQ - I've had a trawl thru the docs, honest. # > # > Cheers, # > # > Roger # # # A link is for the server the same thing as a form with GET method. # It works with struts without problems. (Of course, you cannot submit # as much data as with POST. But this is a limitation of HTTP) # # -- # gR # Roger
Re: Get request and the Action servlet
<[EMAIL PROTECTED]> wrote: > I would like to use Struts with an action that is initiated by following a link, > rather the form-based approach that I can see in the documentation. I would also > like the ActionServlet to parse the URI and instantiate my bean with the > information from the URI. Is this possible? > > Sorry if this is a FAQ - I've had a trawl thru the docs, honest. > > Cheers, > > Roger A link is for the server the same thing as a form with GET method. It works with struts without problems. (Of course, you cannot submit as much data as with POST. But this is a limitation of HTTP) -- gR
Get request and the Action servlet
I would like to use Struts with an action that is initiated by following a link, rather the form-based approach that I can see in the documentation. I would also like the ActionServlet to parse the URI and instantiate my bean with the information from the URI. Is this possible? Sorry if this is a FAQ - I've had a trawl thru the docs, honest. Cheers, Roger
FW: Indexed tags problem
The way I have solved this problem currently is to create a method in the form that forwards to the object within the form. e.g. public PersonField getPersonField (int index) { return (PersonField)person.getPersonField(index); } It is a work around rather than a fix. I intend to have a look and see if I can discover a better solution. cheers Andy -Original Message- From: Marcel Maré [mailto:[EMAIL PROTECTED]] Sent: 8. august 2001 09:10 To: '[EMAIL PROTECTED]' Subject: RE: Indexed tags problem Please post the solution, since I'm having similar problems... TIA Marcel > -Oorspronkelijk bericht- > Van: Andrew Paul Swift [mailto:[EMAIL PROTECTED]] > Verzonden: dinsdag 7 augustus 2001 16:04 > Aan: '[EMAIL PROTECTED]' > Onderwerp: RE: Indexed tags problem > > > I have finally solved the problem, and it was due to the > nested property. > So ignore my last posting or take note of the word "probably" ! > > Is there currently a way to access nested properties stored > in forms when > using indexed tags?? > > e.g. for automatic updates > form.getDetail(index).setProperty() > > cheers > > Andy > > > > -Original Message- > > From: Andrew Paul Swift [mailto:[EMAIL PROTECTED]] > > Sent: 7. august 2001 11:28 > > To: '[EMAIL PROTECTED]' > > Subject: RE: Indexed tags problem > > > > > > I moved the getPersonFields() method into the personForm > > object and I still > > get the problem! > > So it is probably not because of the nested property! > > > > i.e. > > >property="personFields">> > >any thoughts, (I have read > through otherpostings, regarding > session etc.. )> > > >cheers> > Andy > > >-Original Message-> > From: > Andrew Paul >Swift[mailto:[EMAIL PROTECTED]]> > > Sent: 6. august 2001 17:32> > To:> >'[EMAIL PROTECTED]'> > Subject: Indexed tags > problem> > > >> > I am >using the indexed tags (cheers, made > my life a lot > > easier!)but I am> > having a >problem.> > > > > When submitting a form the data inthe form is not updated. > > I >have got> > updates working elsewhere, but Ican't get > this working. > > > > Is it >because I use a nested property > inthe iterate tag i.e.> > >getPerson().getPersonFields();> > > > > > > Cheersin advance> > > > Andy> > > > >=== JSP> > > > > >name="personForm"property="personpersonFields">> > > > name="personField" > > property="value"indexed="true"/>> > e>> > > === HTML produced> >>type="text" >name="personField[0].value" value="1000831">> > > > >=== >struts-config.xml> > > name="personForm"type="forms.PersonForm"/>> > >> > >path="/person" >type="actions.PersonAction"> >name="personForm" > >scope="session" > > input="/customerSearch.jsp">> > > path="/personDetail.jsp"/>>> >> > > >path="/storePerson" > > > type="actions.StorePersonAction"name="personForm" > > > > scope="session" > >input="/personDetail.jsp">> > >> path="/customerSearch.jsp"/>> > >name="delete"> > > path="/customerSearch.jsp"/>> > > >path="/personDetail.jsp"/>> > > > Log> > > action: Processing a >POST for > /storePerson> action: Looking > for ActionF! > orm bean under attribute 'personForm'> action: > > Recycling existing ActionForm bean instance of class> > > 'forms.PersonForm'> action: Populating bean properties from > > this request> action: Validating input form properties> > > action: No errors detected, accepting input> action: > > Looking for Action instance for class > > > actions.StorePersonAction> action: Double checking for > > Action instance already there> action: Creating new Action > > instance> action: Saving customer > > > > > > -- > > ---> To send us encrypted mail, please refer to:> > > http://www.millionhandshakes.com/emailpolicy/pgp.html> > > > Million Handshakes> > > -- > > ---To send us encrypted mail, please refer > > to:http://www.millionhandshakes.com/emailpolicy/pgp.html > > > > Million Handshakes > > > > > - > To send us encrypted mail, please refer to: > http://www.millionhandshakes.com/emailpolicy/pgp.html > > Million Handshakes > - To send us encrypted mail, please refer to: http://www.millionhandshakes.com/emailpolicy/pgp.html Million Handshakes
Re: Validation a form
But what is the specific error ? - Original Message - From: DUPRAT Alexandre <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 07, 2001 11:31 PM Subject: RE: Validation a form I don't understand why it does not work. It crashes only when the validate method is called and must return an error. Is sqlQuery begins with "select" it works fine and i got to the result page. Do i need to write a jsp page in case of error? (i already have one where i forward to when an exception is called in my Action class) -Message d'origine- De: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Date: lundi 6 août 2001 18:35 À: '[EMAIL PROTECTED]' Objet: Re: Validation a form On Mon, 6 Aug 2001, DUPRAT Alexandre wrote: > hi, > > How can i validate a form? > I tried : > public ActionErrors validate(ActionMapping mapping, HttpServletRequest req) > { > ActionErrors errors= new ActionErrors(); > if(! getSqlQuery().startsWith("select")){ > ActionError error = new ActionError("error.requete"); > errors.add("sqlQuery", error); > } > return errors; > } > > it works when there is no error but not when i've one > Is there somebody with an idea? > The above code looks OK -- what about it doesn't work? Note that you *must* specify an input attribute on your , so that Struts knows where to send the user back to. > Alexandre Duprat > SOPRA. Direction France Sud. Bordeaux > [EMAIL PROTECTED] > Craig McClanahan ++ | Ce courrier ainsi que les fichiers joints sont confidentiels. | | Si vous avez recu ce courrier par erreur, veuillez en informer | | l'administrateur du systeme : [EMAIL PROTECTED] | | - | | Ce message confirme que le courrier a passe le controle| | antivirus du relais de messagerie Internet avec succes.| ++
RE: Validation a form
I don't understand why it does not work. It crashes only when the validate method is called and must return an error. Is sqlQuery begins with "select" it works fine and i got to the result page. Do i need to write a jsp page in case of error? (i already have one where i forward to when an exception is called in my Action class) -Message d'origine- De: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Date: lundi 6 août 2001 18:35 À: '[EMAIL PROTECTED]' Objet: Re: Validation a form On Mon, 6 Aug 2001, DUPRAT Alexandre wrote: > hi, > > How can i validate a form? > I tried : > public ActionErrors validate(ActionMapping mapping, HttpServletRequest req) > { > ActionErrors errors= new ActionErrors(); > if(! getSqlQuery().startsWith("select")){ > ActionError error = new ActionError("error.requete"); > errors.add("sqlQuery", error); > } > return errors; > } > > it works when there is no error but not when i've one > Is there somebody with an idea? > The above code looks OK -- what about it doesn't work? Note that you *must* specify an input attribute on your , so that Struts knows where to send the user back to. > Alexandre Duprat > SOPRA. Direction France Sud. Bordeaux > [EMAIL PROTECTED] > Craig McClanahan ++ | Ce courrier ainsi que les fichiers joints sont confidentiels. | | Si vous avez recu ce courrier par erreur, veuillez en informer | | l'administrateur du systeme : [EMAIL PROTECTED] | | - | | Ce message confirme que le courrier a passe le controle| | antivirus du relais de messagerie Internet avec succes.| ++