Handling the exceptions in struts

2005-01-11 Thread Manisha Sathe
I am trying to have a common routine for Exceptions. Inside Action Class I am calling this common method, passing ActionMapping as parameter, doing some stuff like logging and then forwarding to error page. But the problem is what if i get exception in my normal Common Java files (which does

Re: Edit Form - populate values from database

2005-01-11 Thread Manisha Sathe
Thanks to all, Now i could manage to get the things working properly. regards Manisha - Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more.

Re: How to view the actual HTTP generated by a struts action.

2005-01-11 Thread Ulrich Elsner
Yet another tool that might be worth checking out is Fiddler ( ttp://www.fiddlertool.com/fiddler/ ) a free tool (Windows only :-( ) that I found quite helpful when analyzing HTTP traffic. Regards, Ulrich Elsner On Mon, 10 Jan 2005 17:47:21 -0500, Bryce Fischer [EMAIL PROTECTED] wrote: Jim

R: Handling the exceptions in struts

2005-01-11 Thread Amleto Di Salle
Hi, You can use the tag exception inside the tag action for local exception, or global-exceptions for global ones. For example: action type=com.foo.FooAction path=/fooPath exception key=foo.error path=error.in.form scope=request type=java.lang.NullPointerException/

RE: Handling the exceptions in struts

2005-01-11 Thread McDonnell, Colm (MLIM)
Have you considered using declarative exception handling? http://struts.apache.org/userGuide/building_controller.html#exception_ha ndler -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: 11 January 2005 09:26 To: user@struts.apache.org Subject: Handling the

Re: How to detect Cancel button i pressed ?

2005-01-11 Thread Nicolas De Loof
Manisha Sathe a écrit : Hi Nicolas, Thanks for the response, 1)I tried this, but giving me error. Pls would u mind giving some code example ? use html:cancel/ in your JSP (do not set property !) use isCanceled(request) in action. Is cancel was used to post the form, it will return true.

Re: error with logic:iterate on dynabeans

2005-01-11 Thread Olasoji Ajayi
After going thru some source codes in the struts package, i discovered that the problem hat to do with formating, the last two colums of my table are DATE formats which translated to java.sql.date type in java. the bean taglib was looking for a resource ot determine how to format the data on

Validating DynaBean nested beans with a custom validator.

2005-01-11 Thread Daffin, Miles (Company IT)
Dear All, I have a DynaValidatorActionForm like this: form-beans form-bean name=theFormBean type=org.apache.struts.validator.DynaValidatorActionForm form-property name=simpleProperty type=java.lang.String / form-property name=personList type=java.util.ArrayList size=0 /

RE: Handling the exceptions in struts

2005-01-11 Thread Daffin, Miles (Company IT)
The html:errors tag will display a generic message but how can I display the details of what went wrong (e.g. the Exception's stacktrace) in the designated error jsp? What are the options? Can someone point me at some docs that go into this in more detail? Thanks, -Miles -Original

Log4j - HTMLLayout CSS

2005-01-11 Thread Ritchie Warsito
This isn't really struts related, but I was wondering if maybe someone here knew something about this. Is it possible to change/replace/remove the css style that log4j generates for html output, if so, where to do that? It is interfering with my own stylesheet, thus giving a screwed up layout

Unable to see c:forEach out put

2005-01-11 Thread Vamsee Kanakala
Hi List, I have a code fragment like this: td align=left c:forEach items=${statusList} var=current c:out value=${current.name}/ /c:forEach /td Where statusList is a list of class instances, which has a setters and getters for properties id

Re: Log4j - HTMLLayout CSS

2005-01-11 Thread Kris Schneider
From a quick look at the source, it would appear to be pretty much hard-coded. No separate stylesheet reference. There may be other third-party formatters available that allow that sort of custimization, but I'm not aware of any off the top of my head. Of course, it doesn't seem like it would be

[almost OT] Struts in Practice

2005-01-11 Thread t t
If you are a sports lover, or Struts lover, please take a look at this website: www.sportslovers.net . It's based on Struts. Have a good day! Sorry if this email bothers you. - Do you Yahoo!? Meet the all-new My Yahoo! – Try it today!

Opinions needed - My plan for directing navigation afters session timeouts and update actions?

2005-01-11 Thread john . chesher
I have two situations I am trying to address with one generic solution: 1) For every update action, I had to maintain two separate result confirmation JSPs, one stating Update Successful and one Updated failed due to system error. Try again later. (must be a system error, as any data

RE: Handling the exceptions in struts

2005-01-11 Thread Jeff_Caswell
Miles, you can capture a stack trace from any throwable using a technique like: ByteArrayOutputStream baos = new ByteArrayOutputStream(); (new Throwable(s)).printStackTrace(new PrintStream(baos)); return baos.toString(); The result could

RE: Handling the exceptions in struts

2005-01-11 Thread Daffin, Miles (Company IT)
JC, Thanks. This I know. But... If I do this in struts-config: global-exceptions exception key=exception.general type=java.lang.Exception path=/error.jsp/ /global-exceptions Then error.jsp will be called when an Exception is thrown by an Action method. In error.jsp

RE: Handling the exceptions in struts

2005-01-11 Thread Jeff_Caswell
You might investigate these links: Section 4.5 here: http://struts.apache.org/userGuide/building_controller.html and the corresponding javadoc here: http://struts.apache.org/api/org/apache/struts/action/ExceptionHandler.html Since I really don't know off the top-of-my-head... Good luck!

Re: Handling the exceptions in struts

2005-01-11 Thread Jeff Beal
From Section 2.4 of the JSP 1.2 specification: If the errorPage attribute of a page directive names a URL that refers to another JSP, and that JSP indicates that it is an error page (by setting the page directives isErrorPage attribute to true) then the 'exception' implicit scripting language

Dispatch action and java script?

2005-01-11 Thread Nadia Kunkov
Hi, I implemented DispatchAction and I have a page with three submit buttons, each executes a method in my dispatch action. html:submit property=method value=doSomething This works fine but I would like to make sure that one of the radio buttons that I have on the page is clicked. My

Re: Dispatch action and java script?

2005-01-11 Thread Larry Meadors
I usually just use a button instead of a html:submit, and have it do the form.submit(). Simple, and flexible - plus you can prevent the double-click submitters. :-) Larry On Tue, 11 Jan 2005 11:58:37 -0500, Nadia Kunkov [EMAIL PROTECTED] wrote: Hi, I implemented DispatchAction and I have a

RE: Dispatch action and java script?

2005-01-11 Thread Treviño De la Garza, Isidoro
Try the lookupDispatchAction There's an example in the javadocs Regards ITG -Original Message- From: Nadia Kunkov [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 11, 2005 10:59 AM To: Struts help (E-mail) Subject: Dispatch action and java script? Hi, I implemented DispatchAction and

RE: Dispatch action and java script?

2005-01-11 Thread Nadia Kunkov
Thanks. Will the button work with dispatch action? NK -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 11, 2005 12:16 PM To: Struts Users Mailing List Subject: Re: Dispatch action and java script? I usually just use a button instead of a

Re: html:option tag and Hashtable..is it possible

2005-01-11 Thread Ashish Kulkarni
Hi Thanx for the reply Brandon, i was able to get it working after converting the Hashtable to ArrayList having LabelValueBean like this Hashtable ht = mapsContextData.getAS400List(oCtx); Enumeration enu = ht.keys(); ArrayList data = new ArrayList(); while(enu.hasMoreElements()) {

RE: Handling the exceptions in struts

2005-01-11 Thread Daffin, Miles (Company IT)
Sufficient respect and thanks to all, but this is the answer I was lookin' for. Thanks Kishore. (Where is this written?) MD -Original Message- From: Kishore Senji [mailto:[EMAIL PROTECTED] Sent: 11 January 2005 17:24 To: Struts Users Mailing List Subject: Re: Handling the

Re: Thank you, Struts!

2005-01-11 Thread Vincent
For me it's still a little early to pop the champagne but I just passed through a major milestone on our Struts app here at work. Struts performed perfectly in the demo. All that is left to do is to have some of graphics and layouts updated by the design team. I wanted to give a thanks as well to

RE: How to view the actual HTTP generated by a struts action.

2005-01-11 Thread Sullivan, Sean C - MWT
https://tcpmon.dev.java.net/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

html:link = html:submit

2005-01-11 Thread Flávio Maldonado
Hello... How can I do to make a html:link works like a html:submit ?? For example... I have this button: html:submit property=method bean:message key=user.newUser.displayname/ /html:submit and I'd like to make a Link to do the same thing. thanks for help! Flávio Vilasboas

Re: html:link = html:submit

2005-01-11 Thread Jeff Beal
You need to have the link fire off a JavaScript function that will submit the form. I don't think you'll want to use the html:link/ tag in this case, since you won't need to do anything fancy with a request URI. Here's a really quick example that will run in Internet Explorer. I haven't done

Re: Dispatch action and java script?

2005-01-11 Thread Dakota Jack
In a way, Nadia, your problem is not a problem. If you want to make sure one of the radio buttons [you] have on the page is clicked, then all you really want is to make sure the value of that button is available in the processing of the request. You can do that without the radio button even

Re: Validating DynaBean nested beans with a custom validator.

2005-01-11 Thread Kishore Senji
This shoud do it. Isn't it? private static PersonFormBean getPersonFormBean(Object bean, String property) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException{ return (PersonFormBean) BeanUtils.getProperty(bean, property); }

RE: Dispatch action and java script?

2005-01-11 Thread Durham David R Jr Contr 805 CSPTS/SCE
html:submit ... onclick=validate(); The problem could be that you aren't returning anything. Try doing something like this: onclick=return validate(); Then: function validate() { if (...) // fails return false; } // else return true; } So, you

Re: html:option tag and Hashtable..is it possible

2005-01-11 Thread Rick Reumann
Ashish Kulkarni wrote the following on 1/11/2005 12:24 PM: But really hoped to be able to use Hashtable rather then adding this code I assume this will work with Hashtable (not sure why you need to use a Hashtable over a HashMap). c:forEach items=${yourMap} var=mapItem html:option

JSF and Struts (off topic)

2005-01-11 Thread Leandro Melo
Hi all, I need to start up very quick with JSF for a project! Actually, I'm just gonna check it out to see if it's worth a change! Does anyone know somekinda guide From Struts to JSF?? It could be just a beginner one. Thanks. ltcmelo __ Do you

Re: [almost OT] Struts in Practice

2005-01-11 Thread t t
Thanks. I would like to get a web designer to help me. But I don't have money to do that. :( Vincent [EMAIL PROTECTED] wrote:Congrats. So this your demo site? If it is in production, you may want think about getting a web designer to help you with the layout. It kind of reminds me of a 1998

RE: How to view the actual HTTP generated by a struts action.

2005-01-11 Thread Karr, David
This could be done with Ethereal, which allows you to listen in on traffic without having to manually insert an observer in the chain. If you use Follow TCP Stream after generating the packet data, you can see all the back and forth HTTP traffic in a single buffer. -Original Message-

questions about ActionForm, ValidatorForm, etc.

2005-01-11 Thread Daniel Watrous
It would seem that every form in my web application requires a form class (JavaBean). I think I understand that a Form is a loose term, not necessarily referring to one form/form tag set on a given page, but rather a form may span many pages and requests. Is this correct so far? I think that

Re: How to view the actual HTTP generated by a struts action.

2005-01-11 Thread Jason Lea
For Mozilla + Firefox you can use this extension to view the POSTed headers http://livehttpheaders.mozdev.org/ Doesn't help if you want to see what IE is sending, some of the other suggestions would work in that case. kjc wrote: Is there a way to log the HTTP post string that is sent by the

Re: questions about ActionForm, ValidatorForm, etc.

2005-01-11 Thread Hubert Rabago
The ActionForm (there is no ActionFormBean) is the basic form bean. You can use this or any subclass for Struts form beans. You use them to hold the values passed from the browser. These values can come from a form, from multiple forms through multiple pages, or even from parameters at the end

Re: questions about ActionForm, ValidatorForm, etc.

2005-01-11 Thread Hubert Rabago
On Tue, 11 Jan 2005 17:50:58 -0600, Hubert Rabago [EMAIL PROTECTED] wrote: The ActionForm (there is no ActionFormBean) is the basic form bean. snip/ Note that ActionFormBean is a configuration object, DynaActionFormClass is a DynaClass implementation; neither of these are ActionForm

Re: JSF and Struts (off topic)

2005-01-11 Thread Ted Husted
Check out Mastering JavaServer Faces by Bill Dudley et al. [http://www.amazon.com/exec/obidos/ASIN/0471462071/apachesoftwar-20] (Buying a book through this link benefits the ASF.) It does thing like compare writing the same application with JSF and Struts. -Ted. On Tue, 11 Jan 2005 18:58:06

[OT]Hashtable Vs Hashmap, Vector Vs ArrayList

2005-01-11 Thread Ashish Kulkarni
Hi what is difference between Hashtable and Hashmap , also Vector and ArrayList. What are key points to consider when selecting one over the other Ashish __ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less.

Re: [OT] WinCVS problem (free beer!)

2005-01-11 Thread Lucas González Pearson
The latest version of winCVS has a repository browser feature... i´ve just done that to see wich module to download... JIdea 4.0 and upper also has it, and the same goes for eclipse... hope it helped - Original Message - From: Frank W. Zammetti [EMAIL PROTECTED] To: Daniel Perry [EMAIL

Re: [OT]Hashtable Vs Hashmap, Vector Vs ArrayList

2005-01-11 Thread kjc
Ashish Kulkarni wrote: Hi what is difference between Hashtable and Hashmap , also Vector and ArrayList. What are key points to consider when selecting one over the other Ashish __ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less.

Re: [OT]Hashtable Vs Hashmap, Vector Vs ArrayList

2005-01-11 Thread Caroline Jen
A Map is a class that stores key-value pairs and provides a way to locate a value based on the key. The Hashtable class is a synchronized implementation of the Map interface. The HashMap is better in terms performance because the hashing algorithm it uses. The Hashtable is synchronized so

RE: Handling the exceptions in struts

2005-01-11 Thread Manisha Sathe
I would like to thanks all of u for your replies. Definitely this will help me to improve my coding practice. regards and have a nice day, Manisha - Do you Yahoo!? The all-new My Yahoo! – Get yours free!

Database connection question - seeking expert opinion

2005-01-11 Thread Manisha Sathe
I am still new to struts and even servlets. Last time when i developed servlets, i created one common class method to get the connection (with regular JDBC call). All database related parameters i stored in a constant variable file. Now in struts i found out that we can specify the datasource

RE: Database connection question - seeking expert opinion

2005-01-11 Thread Amit Gupta
Hi Manisha, Struts database method uses DBCP. It offer database connection pooling. So I think struts db method is better Amit Gupta Mobile: 91-9891062552 Yahoo IM: amitguptainn MSN IM : amitguptainn -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Wednesday,

JAAS implement RBAC in struts

2005-01-11 Thread Cliff
Hi, could anyone get me some idea to implement a RBAC (role base access control) using JAAS in struts ?? I have no idea to implement it and try to find a lot of information about security of J2EE, JAAS login module . to read. Anyone can help me ?? Best wishes, Cliff Lam Reinfo Technology