Book Announcement

2001-07-18 Thread Marc Schmidt
# Java Server Pages and J2EE Web-based Applications for Enterprises # Book Announcement, now available: Java Server Pages and J2EE Web-based

Displaying errors when validating forms (ActionErrors)

2001-07-18 Thread Hartmut Bernecker
Hallo, I have a problem to display ActionErrors. I use the validate-Method to validate forms, like that: -- public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if (iBenutzer == null ||

500 Servlet Exception

2001-07-18 Thread Stanley Tan
Hi, I get a 500 servlet exception when trying to access struts-example. I am using Resin 2.0.1. What could be wrong? On Resin 1.2.3, it does work but not on 2.0.1. What should I do? Thanks! java.lang.NoSuchMethodError at com.caucho.jsp.Taglib.fillTag(Taglib.java:406) at

Re: Displaying errors when validating forms (ActionErrors)

2001-07-18 Thread Guus Holshuijsen
Do you save your errors? // Report any errors we have discovered if ( !errors.empty() ) { saveErrors( request, errors ); } Regards, Guus - Original Message - From: Hartmut Bernecker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 11:55

RE: Displaying errors when validating forms (ActionErrors)

2001-07-18 Thread Firmin David
It might be worthwhile doublechecking the input attribute in your xml mapping for the request URI you're handling. If there is no input page specified, the ActionServlet will not know which page to return control to in order to display the errors it receives from the validate() method. HTH Dave

html:text filter=false

2001-07-18 Thread Schröder, Veit
Is there any way the to prevent the html:text Tag from filtering the value? Like the bean:write filter=false? Thanx Veit

Re: Displaying errors when validating forms (ActionErrors)

2001-07-18 Thread Hartmut Bernecker
No, I think I did not! My validate Method looks like that, it returns Errors back to the controller servlet. - Where is the place to save the errors in the request??? public ActionErrors validate(ActionMapping pMapping, HttpServletRequest pRequest) { System.out.println(VALIDIERE);

Hello Best Practises Question

2001-07-18 Thread Emaho, Ghoot
Hi, I have a question regarding what the community would consider to be Best Practises when using Struts. I am doing an internal review of our own usage of Struts within our products, and I have constructed an example application to highlight my question(s) and talk around. I would appreciate

Using Frames within STRUTS

2001-07-18 Thread Alexander, Glynn (LIT)
Hi, I would like to make use of frames within my STRUTS application but am unsure how the framework handles frames. For example, if I have a form within a JSP page (form.jsp) and that page is presented to the user within a frame (frame.jsp), how should I associate the ActionForm to the form.jsp

html:img questions

2001-07-18 Thread Jake Thompson
Hi all, I'm new to the list, so sorry if this has come up before. When I use the html:img src=xyz.jpg/ or html:img page=xyz.jpg/, it will encode the session id into this a cause the images not to load. Is there a fix or am I doing somthing wrong? Thanks in advance, Jake T.

Re: Displaying errors when validating forms (ActionErrors)

2001-07-18 Thread Guus Holshuijsen
Hartmut, I do it at the end of an action's perform() method using the construction given in my previous reply! What I describe is only valid if your controller checks for errors itself. In case you let Struts handle the validation automatically, I advice you to look at the Struts source code.

Re: Displaying errors when validating forms (ActionErrors)

2001-07-18 Thread Hartmut Bernecker
OK, thank you, I got it! I don't understand it, but the problems seems to be the place oft the html:errors/ tag within the JSP. I placed it at the end of the body element with bad result. When I moved it top to the body element it is ok. May be there is a problem with the html in the

RE: Using Frames within STRUTS

2001-07-18 Thread devon . bowen
I would like to make use of frames within my STRUTS application but am unsure how the framework handles frames. For example, if I have a form within a JSP page (form.jsp) and that page is presented to the user within a frame (frame.jsp), how should I associate the ActionForm to the

Re: Ant Q regarding deployment of jar's

2001-07-18 Thread Chuck Amadi
Hi, I am currently working thru ant's and from a few articles and example they lay claim to create deploying all jar's to C:\jar . Thus within the -target name="init"> the property name- value would be "C:\jars"/> Is this the correct procedure as i will be downloading the auxillary jars and i

getSession in xxxForm

2001-07-18 Thread Stefan Faist
Hello All, I have set an attribute into a session: session.setAttribute(id, xxxForm.getId()); Now I want to get this attribute in a xxxForm: session.getAttribute(id);. But I have no HttpRequest object. How can I get the session in the xxxForm? Can someone help me? Stefan

getting an action mapping into a servlet

2001-07-18 Thread Matt Raible
I have the following struts tag in my form: strutshtml:form action=/signIn focus=username That changes to the following when the jsp is compiled: form name=signInForm method=POST action=/NASApp/timetracker/signIn.do What I'd like to do is get the action string into a session variable, or some

Re: getting an action mapping into a servlet

2001-07-18 Thread Matt Raible
Here's the entry for this mapping in the struts-config.xml action path=/signIn type=us.co.douglas.application.timetracker.presentationlogic.SignInAction name=signInForm scope=request validate=true input=/signIn forward name=success

Re: Ant Q regarding deployment of jar's

2001-07-18 Thread Calvin Yu
I wouldn't do this. What kind of jars are you dealing with? If the jars are used by Ant to run tasks, then put them in ANT_HOME/lib. If they belong to your project and only required to build your project, I would recommend putting them in a 'lib' directory under your project directory. You

Re: getting an action mapping into a servlet

2001-07-18 Thread Peter Alfors
check out: org.apache.struts.taglib.html.FormTag.getActionMappingURL() HTH, Pete Matt Raible wrote: Here's the entry for this mapping in the struts-config.xml action path=/signIn type=us.co.douglas.application.timetracker.presentationlogic.SignInAction

Subclass ActionServlet to behave as central controller

2001-07-18 Thread Peter Severin
Hi ppl, Would it be possible to subclass the ActionServlet to add behaviour needed for it to behave as central controller so it could handle all the requests coming to the web application, not only the action execution requests ? In the subclassed ActionServlet I want to be able to add some

Re: Ant Q regarding deployment of jar's

2001-07-18 Thread Chuck Amadi
They belong to my project so i will create a lib dir under my project dir . Cheers again Calvin Yu wrote: I wouldn't do this. What kind of jars are you dealing with? If the jars are used by Ant to run tasks, then put them in ANT_HOME/lib. If they belong to your project and only required to build

Where do YOU put JDBC calls?

2001-07-18 Thread Ryan Cornia
I'm wondering what people are considering best practices for JDBC calls? I have been writing beans that wrap a database table, and include functions "select", "insert", "delete". These functions either load the bean, insert the bean values in the database, or delete the record from the

Re: html:form Bug?

2001-07-18 Thread suhas
suppose u have something like this in Jsp html:form action=/someAction.do In this case u need not to mention the name and type attribute for the html:form tag But there should be some action mapping in the struts-config.xml file which points to form to be used . I mean form-bean name=myForm

Re: Ant Q regarding deployment of jar's

2001-07-18 Thread Chuck Amadi
Hi, all from a created build file project i have the following error:- C:\development\test\build.xml:6: Document root element is missing. Any Takers Cheers Chuck Calvin Yu wrote: I wouldn't do this. What kind of jars are you dealing with? If the jars are used by Ant to run tasks, then put

Re: Subclass ActionServlet to behave as central controller

2001-07-18 Thread Oleg V Alexeev
Hello Peter, Wednesday, July 18, 2001, 5:53:01 PM, you wrote: PS Hi ppl, PS Would it be possible to subclass the ActionServlet to add behaviour PS needed for it to behave as central controller so it could handle all the PS requests coming to the web application, not only the action

Re: getSession in xxxForm

2001-07-18 Thread Rajan Gupta
You have access to ActionServlet as a protected attribute in ActionForm. do a getServletContext() on the instance you are on your way --- Stefan Faist [EMAIL PROTECTED] wrote: Hello All, I have set an attribute into a session: session.setAttribute(id, xxxForm.getId()); Now I want to get

URI is null error on ActionForward

2001-07-18 Thread Jon Brisbin
I have a really simple action forward just like many I've used in the past. I am getting this error on JRun 3.1 EE. I have included an excerpt from my struts-config.xml and my action class to see if you y'all see something I just do not...I just added the redirect=true and it does the same

Re: Where do YOU put JDBC calls?

2001-07-18 Thread Oleg V Alexeev
Hello Ryan, Wednesday, July 18, 2001, 5:55:46 PM, you wrote: RC I'm wondering what people are considering best practices for JDBC calls? RC I have been writing beans that wrap a database table, and include functions select, insert, delete. These functions either load the bean, insert the bean

RE: Where do YOU put JDBC calls?

2001-07-18 Thread Pathangi, Rao H.
Iam using the DAO(Data Access Object) design pattern for such Data access situations. DAO is a layer of abstraction that works in conjunction with the Business Object which is nothing but a container for business data. the Business Object calls the DAO's business methods. The DAO's Business

RE: Where do YOU put JDBC calls?

2001-07-18 Thread Pathangi, Rao H.
Please ignore my statement the Business Object calls the DAO's business methods. It need not always do that. You could implement a factoryObject that does it for you and by using a factoryObject you can maintain the anonymity between the Business Object and the DAO. thanks pathangi r

RE: Where do YOU put JDBC calls?

2001-07-18 Thread Geddes, Mark (ANTS)
ditto. I am always reading that the Connection reference should be passed into the method. After writing a few DAOs in this manner, I found the exception handling too tedious - I was checking for closed connections both within the DAO method and also in the calling method. So I usually pass in a

RE: Where do YOU put JDBC calls?

2001-07-18 Thread Pathangi, Rao H.
Mark To handle this situation, I wrote a base class which has the connection Object as a protected variable. Lets say you have a method readOrder(String orderId).. Write another abstract method getConnection() in your BaseDAO. Use connection manager or pooling or whatever, but get a connection

RE: Where do YOU put JDBC calls?

2001-07-18 Thread Geddes, Mark (ANTS)
This is a nice pattern, but I do not want my DAO to be responsible for getting the connection. I need to use them in the web-tier (no EJBs) and possibly also the middle tier. In each case the DataSource may be obtained in a different manner and it is not the DAO's responsibility to know how.

RE: Where do YOU put JDBC calls?

2001-07-18 Thread Ryan Cornia
From my understanding then - I would have my Business Object class that wraps the table, lets call it Address. I would have a DAO object that is specific to that Business object for the JDBC calls, lets call it AddressDAO. In Address, I would have loadAddress, DeleteAddress,

Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread Scott Ryan
I am trying to use the Validator extension for struts. I have the client side functioning correctly and it works great. I then go into Netscape and turn off java script and the server side checking is not firing. Am I missing some configuration parameter? I even tried calling super.validate

RE: Where do YOU put JDBC calls?

2001-07-18 Thread Pathangi, Rao H.
Well, I too thought about this... Then I thought, If I leave the getConnection() open and let the DAO take care of it, I thought the same DAO can be used for multiple datasources. The way you get a connection does not matter. Well, I am still 50/50 about this idea though. I am thinking of

Re: Server Side Validation not firing for Validator whenJava Script is off

2001-07-18 Thread Ryan Cornia
Are you extending ValidateForm instead of ActionForm? If you have a validate method in your form, be sure to call super.validate(). Ryan [EMAIL PROTECTED] 07/18/01 08:53AM I am trying to use the Validator extension for struts. I have theclient side functioning correctly and it works

Trapping an html:option value

2001-07-18 Thread Melissa Rabin
Hello. I am fiddling with an application that uses Struts html:select html:option tags, and I need to generate some DHTML depending on which option is selected. However, only the html:select tag accepts javascript events; therefore, any onClick event will be triggered when the user pulls down

Directory Problem

2001-07-18 Thread Soniya Satbhai
Hello, I am not clear about the following things:- While developing struts applications , in which directory should I place my jsp files , java files , struts-config.xml and struts-config_1_0.dtd? Also , if I place my java files in a package , under which directory should the

HTTP request lost using HTTPS

2001-07-18 Thread Joe.Clark
My environment is configured to run on Tomcat 3.2 and Struts 1.0. When I run my application in an internal http environment, all is well. My http request and form beans are created and forwarded to my Actions accordingly. However, when I make my application available as an external https

Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread Scott Ryan
Yes I am extending ValidatorForm instead of ActionForm. Did you mean ValidateForm or ValidatorForm. I originally commented out the validate method that I had but after nothing happened I tried creating a validate method that only called super.validate with the proper attributes but it

Indexed properties with multiple select options

2001-07-18 Thread Michael Terry
Hi - In my JSP I'm generating (a small unknown number) of multiselect SELECT drop-down lists with values taken from a Hashtable containing ArrayLists, such that each drop-down corresponds to the strings in an ArrayList in the Hashtable: % int n = 0; % logic:iterate id=attTab

Multiple Language Support with struts

2001-07-18 Thread Robert Mayhew
Title: Multiple Language Support with struts I am currently developing a multi-language web application that will require the support of different languages (locale) per user. The goal is to have a site that displays information in a users selected language. So different application resources

AW: Multiple Language Support with struts

2001-07-18 Thread Meißner, Heinz
Title: Multiple Language Support with struts hi if u set session u can do more than 1 language . c ya heinz -Ursprüngliche Nachricht-Von: Robert Mayhew [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 18. Juli 2001 17:27An: 'Struts Users'Betreff: Multiple Language

RE: Multiple Language Support with struts

2001-07-18 Thread Mahesh Bhagia
Also make sure to locale based on client, since locale for the server is based on single JVM Mahesh -Original Message- From: Meißner, Heinz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 11:32 AM To: '[EMAIL PROTECTED]' Subject: AW: Multiple Language Support with struts

html:select/options

2001-07-18 Thread DHarty
Is there a way to dictate which option in a collection is initially set as selected when the page is rendered? ex html:options collection=Roles property=name / For example, I have a collection of projects that are rendered by the html:options tag. I also have some java script

Re: Editing and Saving a Form

2001-07-18 Thread dsf65b y b3763476b3
Hi there! [Windows NT, VAJ 3.5.3 WTE] I'm trying to use the approach from the struts-example application to edit and save a form. The user is directed to editInfo.do which populates the form and forwards to editinfo.jsp which, on submit (starting a new

Wer is d/load 4 Actions.classes - need 2 reinstall !!

2001-07-18 Thread Chuck Amadi
Hi, all i previously had config/editing problems regarding Action Classes.ie ActionMappings,ActionForward, and ApplicationMappings . Thus Pls can someone direct me to what download file as i have checked my jakarta-struts-1.0-b2,struts-trail-map. Thus there are no examples and in relation to the

Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread David Winterfeldt
The JavaScript part shouldn't have anything to do with the server side other than it uses the same object in application scope. Does the name attribute of your action (which matches the key the ActionForm is stored under) in the struts-config.xml the same as the form element's name attribute?

RE: html:select/options

2001-07-18 Thread Joe Clark
Use the 'value' attribute to make the selection. For example assume you have a dropdown of countries and one entry is 'United States' the code below would select 'United States'. html:select property=country value=United States ...

RE: html:select/options

2001-07-18 Thread DHarty
Thank you! -Original Message- From: Joe Clark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 12:12 PM To: undisclosed-recipients: Subject: RE: html:select/options Use the 'value' attribute to make the selection. For example assume you have a dropdown of countries

html:errors tag?

2001-07-18 Thread Matthias Brahm
Hi, is it possible to do something like this with struts: I have a form with labels for the input fields. These labels have the font color blue. The Form is validated by the FormBean. When one or more fields of the form are invalid and the control is forwarded back to the input form, the

RE: html:errors tag?

2001-07-18 Thread Gogineni, Pratima
Hi - I just did this in my form. html:errors itself doesnt do this. My actionform holds the row and column index of my error field which are set at the of validation. what i do is check if the error object exists and if the row and column indices match one of the fields being displayed - the

RE: Where do YOU put JDBC calls?

2001-07-18 Thread Ritter, Steve
Ryan, you should really read the J2EE blueprints on DAO. It covers everything you need to know. Search aroun javasoft.com for the blueprints (they are documents, not software). --Steve -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001

Re: html:errors tag?

2001-07-18 Thread David Winterfeldt
You can check if there is an errors object in scope using the logic tags to change the color of a label. logic:present name=%= org.apache.struts.action.Action.ERROR_KEY % scope=request red label1 /logic:present logic:notPresent name=%=

RE: html:errors tag?

2001-07-18 Thread David Winterfeldt
Ignore what I said about the logic tags since that doesn't tell you whether a specific field has an error. You could use the errorsExists tag from my Validator package if you want to though. And you could make errorsNotExist version of the tag. validator:errorsExist property=name red label

Access to HttpServletRequest within ActionForm

2001-07-18 Thread Holger Wiechert
Hi, is there a way of getting access within an ActionForm to the request that caused the ActionServlet using this ActionForm? Something like: public class MyActionForm extends ActionForm { public MyActionForm { super(); HttpServletRequest

Re: Access to HttpServletRequest within ActionForm

2001-07-18 Thread Erik Hatcher
Look at the ActionForm's reset method. That gives you the request and is called when its instantiated by the ActionServlet prior to population from the request. One note - reset is not currently called when instantiated from the html:form tag unfortunately, but apparently this will be

AW: getSession in xxxForm

2001-07-18 Thread Holger Wiechert
HI, I'm having the same problem (and saw this posting right after I've put mine in). Yes, getting the ActionServlet let's me access the ServletContext, but then I'm even further away from getting the request that caused the ActionForm to be created, or do I see this wrong? Well, I guess, that I

Concurrency with ActionForms

2001-07-18 Thread Kevin McLain
Does anybody know how Struts handles concurrency when it uses Reflection to update ActionForm attributes? I am assuming that it doesn't but this can be problematic if, in the case of a web application, you have two browser windows - for the same session (this can de done in IE but opening a new

html:tags and templates

2001-07-18 Thread Aaron Ravenberg
Hi, My html:TAGS are not working with my template set up. When I include the html and bean taglib directive in my login.jsp it my server throws a javax.servlet.ServletException: runtime failure in custom tag 'get'. When I move it to the template.jsp or index.jsp, the tags print out in the

RE: Displaying errors when validating forms (ActionErrors)

2001-07-18 Thread Jain, Shipra
Hartmut, this is answer to your question regarding having separate file for error-keys. Few weeks ago, I asked the same question, I wanted separate file for image-keys. Here are links to the answer I got. I was able to do it.

Begginer: how do i know what button is clicked from a strut form

2001-07-18 Thread BinhMinh Nguyen
I am new to struts and got stuck. Please anyone tell me how do i know what button is clicked to detect the event from a strut:form. For example, my form have three buttons: OK, RESET, CANCEL, I would like to perform tasks that are associated with these button, but I dont know how to detect what

Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread Scott Ryan
I located the problem. It was a combination of two things. 1) The names in my form and the validation tag did not match. I had two of them matching but all three needed to match. 2) I was using the .5 build which has an imcomplete validation.xml file and the format has changed since that

Re: Begginer: how do i know what button is clicked from a strut form

2001-07-18 Thread William Jaynes
If your jsp has a submit tag like: shtml:submit property=OK value=Press Here if OK/ then your Action would contain something like String okButton = request.getParameter(OK); if (null != okButton) { ...code... } However, RESET and CANCEL are generally something different. A standard reset

Re: More to say about setTransactionIsolation and mysql?

2001-07-18 Thread Ted Husted
The Berkley versions of the mySQL tables are suppose to support transactions and rollback, but don't have several other features available in the trusty myISAM tables. So that might be what you are seeing. I have since heard that using the Early Release rowsets for anything but the simplest

Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread Scott Ryan
I have now converted to the latest version of the Validator and that caused the server side validation to start working but not the javascript client side doesn't work. It goes straight to the server validation. I double checked everything mentioned in the documentation and in the previous

Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread David Winterfeldt
Do you see any JavaScript being generated in the html? David --- Scott Ryan [EMAIL PROTECTED] wrote: I have now converted to the latest version of the Validator and that caused the server side validation to start working but not the javascript client side doesn't work. It goes straight to

Re: Problems with Struts on Weblogic 5.10 sp9

2001-07-18 Thread Jon Brisbin
it's my understanding that sp9 for weblogic has some problems (bugs ;-)...one user had to get a custom solution... it's supposed to be fixed in sp10, for what it's worth... :-) Jon Brisbin Lamar, MO - Original Message - From: Upadhye, Sujit (GEAE, Foreign National) [EMAIL PROTECTED]

Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread Scott Ryan
Yes the javascript is being generated. I think the problem is that I used the validation.xml that comes with the latest release or your validator and some of it appears to not be compatible with Netscape version I am testing with. Java script has the great benefit of failing but not indicating

Application Server Restart

2001-07-18 Thread Pathangi, Rao H.
Iam trying to deploy a struts application on Websphere Application Server 3.5 Patch 2. Could some one explain what happens from a Struts Point of view when we restart the application Server. I think that the webapp is being started and in the process the servlets will be added to the container.

beans:write bug?

2001-07-18 Thread Bud Gibson
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

Re: html:select/options

2001-07-18 Thread Pham Thanh Quan
But how to keep the choice that user chose in the last time he submitted - Original Message - From: Joe Clark [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 11:12 PM Subject: RE: html:select/options Use the 'value' attribute to make the selection. For example assume you have a

Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread David Winterfeldt
If you look at the jsType.jsp, you will see that it is referencing an external JavaScript file called staticJavascript.jsp. You could put other JavaScript methods in that and call them from onclick, etc. Although I'm not sure if that is what you mean. Otherwise you could do an xml include. I

How to turn off validation momentarily

2001-07-18 Thread Tom Miller
Hello Is there a way to turn off form validation momentarily, say for just one action.perform() invocation? I've tried placing a mapping.setValidation(false) in various places in my edit and save actions (a la struts-example). Basically, I do not want to validate a record that I'm presenting to

RE: Where do YOU put JDBC calls?

2001-07-18 Thread Vikramjit Singh
yups ryan even iam using the same method for JDBC calls and i think that this provides quite a lot program modularity. even i want to know whether is there a much better approach for JDBC calls. Vikramjit singh, eAngel Team, Global Tele-systems Ltd. Ph. 7612929-3140 -Original

Re: How to turn off validation momentarily

2001-07-18 Thread Erik Hatcher
In struts-config you can specify that validation won't occur on a per-action basis like this: action path=/someaction type=com.whatever.SomeAction scope=request name=SomeForm input=some.jsp validate=false forward name=receiptpath=another.jsp / /action Does that