File Upload problem and Size Validation

2003-03-11 Thread Hemanth Setty
Hi all,
I am havig a problem on FileUploads in RC1...This problem occurs when I 
use the FormFile feature of struts. If the size of the file is lesser 
than the limit specified by the controller, everything seems to work 
fine...but when the size exceeds the limit then it fails on the 
validate() method of the form. But it does not redirect back to the same 
page. It returns to any empty page. The log level of debug shows correct 
redirects and even debug statements on the jsp prints out.. I dont know 
what the error could be.
I even tried the same thing with the struts-upload webapp that comes 
with RC1 and it was doing the same thing.
Any suggestions.??
Thanks
Hemanth



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: XML to PDF

2003-01-21 Thread Hemanth Setty
You should check out the FOP project on apache.It is a pretty good 
transformation tool and works pretty well.
http://xml.apache.org/fop/

-hemanth

Yan, Charlene wrote:

Hello all,

I just got assigned to convert XML to pdf to do reports.  Is any of you working on it?  Any insights where I should get started my research?  I am looking at xmlmil and aparche xml home right now.

Thanks in advance for your help!

Charlene

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Too much log info in b3

2003-01-10 Thread Hemanth Setty
Struts uses log4j for logging..put these statements in your 
log4j.properties..to increase the logging

log4j.category.org.apache.commons=WARN, dest1, dest2
log4j.category.org.apache.struts=WARN, dest1, dest2

-h

Brian Lee wrote:

I just upgraded my app to the latest 1.1b3 release of struts. Now I am 
getting insane logging regardless of what I set ActionServlet's debug 
init param to in the web.xml. I've tried 0 yet I still get tons of 
debugging.

One possibility is that my app does set up a root hierarchy in log4j 
with a DEBUG priority, but I wouldn't think this would affect struts 
logging.

Any ideas?

Thanks,
BAL





_
The new MSN 8 is here: Try it free* for 2 months 
http://join.msn.com/?page=dept/dialup


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DynaActionForm change with 1.1-beta3 download

2003-01-02 Thread Hemanth Setty
Hello,

Well I just downloaded  1.1 beta 3 today and updated my application with 
the new libraries. There seems to be a difference in the way 
DynaActionForm gets initialized. Before beta 3...and as late as around 
dec 10th nightly build..DynaActionForm properties would get initialized 
to ...now in beta3 all the String form properties get initialized 
to empty string. Is this a bug or is this the way it is supposed to be?

More specifically...

pre 1.1b3
[DEBUG] org.apache.struts.util.RequestUtils -  --> 
DynaActionForm[dynaClass=surveyMaintForm,category=,currentNodeId=,cmd=,ranking=,nodeName=] 


1.1b3
[DEBUG] org.apache.struts.util.RequestUtils -  --> 
DynaActionForm[dynaClass=surveyMaintForm,category=,currentNodeId=,cmd=,ranking=,nodeName=] 


category and  ranking still remain  as they are defined as 
java.util.Map instead of Strings like the rest of the parameters..

-h



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: DynaActionForm change with 1.1-beta3 download

2002-12-31 Thread Hemanth Setty
More specifically...

pre 1.1b3
[DEBUG] org.apache.struts.util.RequestUtils -  --> 
DynaActionForm[dynaClass=surveyMaintForm,category=,currentNodeId=,cmd=,ranking=,nodeName=]

1.1b3
[DEBUG] org.apache.struts.util.RequestUtils -  --> 
DynaActionForm[dynaClass=surveyMaintForm,category=,currentNodeId=,cmd=,ranking=,nodeName=]

category and  ranking still remain  as they are defined as 
java.util.Map instead of Strings like the rest of the parameters..

-h

Hemanth Setty wrote:

Hello All,
Before I head out and chill out for the new years..I have a 
question/problem for those who are not on their 5th bottle of 
guiness..hic..hic!!:)
Well I just downloaded  1.1 beta 3 today and updated my application 
with the new libraries. There seems to be a difference in the way 
DynaActionForm gets initialized. Before beta 3...and as late as around 
dec 10th nightly build..DynaActionForm properties would get 
initialized to ...now in beta3 all the String form properties 
get initialized to empty string. Is this a bug or is this the way it 
is supposed to be?

Thanks in advance and Have a HAPPY NEW YEAR!
-hemanth


--
To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




DynaActionForm change with 1.1-beta3 download

2002-12-31 Thread Hemanth Setty
Hello All,
Before I head out and chill out for the new years..I have a 
question/problem for those who are not on their 5th bottle of 
guiness..hic..hic!!:)
Well I just downloaded  1.1 beta 3 today and updated my application with 
the new libraries. There seems to be a difference in the way 
DynaActionForm gets initialized. Before beta 3...and as late as around 
dec 10th nightly build..DynaActionForm properties would get initialized 
to ...now in beta3 all the String form properties get initialized 
to empty string. Is this a bug or is this the way it is supposed to be?

Thanks in advance and Have a HAPPY NEW YEAR!
-hemanth


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: Dynamic number of form fields

2002-09-11 Thread Hemanth Setty

Correct me if I wrong, I think in the bean it should be:
void setCategoryName(Map categoryName) and
Map getCategoryName()
-hemanth



-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 3:54 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Dynamic number of form fields


I'm having some trouble getting this to work.  I get the error message
"javax.servlet.jsp.JspException: No getter method for property
categoryName(2) of bean org.apache.struts.taglib.html.BEAN"

I have a HashMap in my form called categoryNames and a getter/setter like
this:
public void setCategoryName(String key, Object name) {
 this.categoryNames.put(key, name);
}

public Object getCategoryName(String key) {
 return this.categoryNames.get(key);
}

I put a bunch of AccountCategory objects in the session and then the jsp
loops through to display the input boxes like this:


)"/>



Any ideas?  Do I need struts 1.1 for this (I'm using 1.0.2)?

Thanks,
Dave

>From: "Donald Ball" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED], [EMAIL PROTECTED]
>Subject: Re: Dynamic number of form fields
>Date: Wed, 11 Sep 2002 13:34:18 -0400
>
>On 9/11/2002 at 11:00 AM David Graham wrote:
>
> >I want to have a form with a variable number of input boxes.  For
> >example, a
> >simple edit person form that has a first name and last name input box for
> >each person in your db.  So the first set would be named firstName_12
> >lastName_12, the second set might be firstName_45623 and lastName_45623.
> >The number after the underscore is the personID from the db table.  When
> >the
> >form is submitted you loop over these fields and update the appropriate
> >row
> >in the database from the _ID info.
> >
> >I've read through the docs on DynaBeans and that seems like the way to go
> >but I'm still not sure how to go about this. When populating the
> >DynaFormBean, does struts just go through the request params and assign
> >them
> >to new form properties?  How would you validate this type of form?
>
>The Dyna beans don't exactly give you what you're looking for. The
>properties of a Dyna bean must be known at deployment time, do they're not
>directly suited for dynamic forms (the Dyna prefix is a bit misleading).
>What you probably want are map-backed ActionForm beans (which can be
>vanilla or Dyna, actually, with some caveats). There is no documentation in
>the user guide for them, but I've written a patch that adds some. Comments
>on it are greatly welcomed.
>
>- donald
><< patch >>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>




_
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Security and Struts

2002-09-10 Thread Hemanth Setty

You could try using Filters. I am not sure if it will fit your needs but,
using a servlet filter will
eliminate the need to extend dispatch action just for audit trails.
-hemanth

-Original Message-
From: alex hun [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 10:53 AM
To: Struts Users Mailing List
Subject: Re: Security and Struts


Any recommendation to implementing audit trial under the struts frame work?
I was hoping to pushed the audit trail as backend as possible, if possible
invisible at the Action layer.  Did look into do it under either the a class
extending from Dispatch action and have the other class extending it.
However
another colleague of my was proposing to try out the forwardactionmap.
Any good practices/design that i can adopt?


Michael Lee wrote:

> They have a good login example in the example war in the struts/webapps
dir.
> That's the way I've done it in the past. The way I'm currently doing it is
> to use container managed security. This means NOT using struts for
> authorization/authentication (for J2EE security). Since your using JSP
your
> probably gonna do form base authentication so just post your form to
> action="j_security_check" and make sure your form username and password
> fields are j_username and j_password appropriately. Check your container
> documentation for how to hook this into its security model.
> I'm currently actually having a problem with this in that I need for the
> user information to be stored in the session at login. I may just put a
tag
> at the top of every page but that seems to get rid of the 'niceties' of
> using J2EE security. I want to set the locale based upon the loaded user
> object. Problem is, it goes right to the requested jsp page after login
> without loading the user and his preferences. Not sure how I'm going to
> handle this but in the mean time, that is how I handle security.
> Mike
>
> - Original Message -
> From: "Darren Hill" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, September 10, 2002 10:24 AM
> Subject: Security and Struts
>
> > Hey all,
> >
> > I'm looking for a job document and example about best practices in
> > implementing security in struts.
> > I've got the general idea about placing all my JSP's under WEB-INF, but
a
> > doc/example might really solidify it for me.  Thanks in advance.
> >
> > Darren.
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




multiple html:select boxes on the page

2002-08-31 Thread Hemanth Setty

Hello,
I am trying to figure about a good way to use multiple select boxes with the
same data on the same page. The page contains
and bunch of questions and select box with the type of question(EASY,
MEDIUM, HARD). The question are variable and I get them from the database
along with the type for the question. The problem I am having is this, I
cannot define multiple select boxes with the same name using a DynaForm. I
could use the DynaForm.get(i) method to get a particular index of value.
But is the order of parameters coming from the page guranteed to be in the
same order as the values that were set on the selectbox?
Ex

Q1 Blah Blah?  ...

Q2 Foo bar ? ...

Before the page get displayed i will get the form and set("type", 1,
"EASY"); and set("type", 2, "MEDIUM");

When the page shows up, I assume the order will be in the right order..

Now when I click on submit on the page..will I get the Q1's type in
get("type", 1) and q2's type in get("type", 2)??

Another alternative, not very elegant though, is to have a hidden fields
associated with each select box and the value of the hidden field will have
the name of the select box. Then use the http request object to get the
value from the select box. But this way I cannot use form beans to manage
the select boxes..because the names on the selectboxes will be dynamic.

A good way that would be nice is to have the dynaformbean take something
like this

 and ..to 
will automatically work with get("type1")... get("type5")...etc...
Maybe im going a little overboard here...I think the DynaBean will not
support that.

So anybody enlighten me a little bit here?
Thanks in advance and have a good weekend..for those of you celebrating
Labor Day

-hemanth




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [VOTE] Should this list discontinue it's long, treasured heritage of "relaxed fridays"?

2002-08-30 Thread Hemanth Setty


Do you feel this list should discontinue it's long heritage of "relaxed
fridays"?

(   )  Yes
(X )  No


Long Live the BEER!!:)
-h


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Validations gone on using nightly build

2002-08-09 Thread Hemanth Setty

Figued it out..This doesn't work anymore
  


  
I have to use it this way
  

  


-Original Message-
From: Hemanth Setty [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 09, 2002 3:15 PM
To: Struts Users Mailing List
Subject: Validations gone on using nightly build


Hello,
I was running the 1.1b1 till today. Today I got the latest nightly build and
all my validations that used to work on 1.1b1 stopped working. I was using
the validation-rules.xml to validate my forms. Was anything changed in terms
of how the validations are setup?

-hemanth


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Validations gone on using nightly build

2002-08-09 Thread Hemanth Setty

Hello,
I was running the 1.1b1 till today. Today I got the latest nightly build and
all my validations that used to work on 1.1b1 stopped working. I was using
the validation-rules.xml to validate my forms. Was anything changed in terms
of how the validations are setup?

-hemanth


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




wont this work???

2002-07-26 Thread Hemanth Setty

Hi,
I am trying to forward and action, but it seems I can't specify a path in
the forward names..

struts-config.xml

  
  
  

in the jsp



I am getting this exception

javax.servlet.jsp.JspException: Exception forwarding for name
/buyer/buyerMain:
javax.servlet.jsp.JspException: Cannot create rewrite URL:
java.net.MalformedURLException:
Cannot retrive ActionForward named buyerMain
at org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:180)
at _home__jsp._jspService(C:\Buildview_SalesAssistant\webapp\Home.jsp:18)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:485)
at
com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
at com.caucho.server.http.Invocation.service(Invocation.java:311)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at
com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:21
3)
at
com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:10
0)
at
com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:77
)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:97
2)
at
org.apache.struts.action.RequestProcessor.processActionForward(RequestProces
sor.java:408)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:9
6)
at com.caucho.server.http.Invocation.service(Invocation.java:311)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at
com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:342)
at
com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:272
)
at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:484)



Any suggestion on how to get this working?
-h


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Pre populating a form

2002-07-25 Thread Hemanth Setty

Hello,
I am looking for some example or reference on how you would pre populate a
form displayed using struts. I am using a DynaValidationForm and I could not
find any reference to it.
Thanks
Hemanth


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Difference between DynaValidatorActionForm and DynaValidatorForm

2002-07-18 Thread Hemanth Setty

Is there any difference between the two classes in terms of functionality?
Why does DynaValidatorActionForm extend DynaValidatorForm? Am I missing
something here??
-h


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Is there a good way to achive a html:submit?

2002-07-03 Thread Hemanth Setty

Is there a good way to achive a html:submit using a href rather than a
button? I checked out the attributes for html:link..but could not find any?

-h


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Cannot use an extended logger with the ValidationForm

2002-07-03 Thread Hemanth Setty

Hello,

I have extened the Logger class to provide a custom logging mechanism.
(com.xxx.yyy.MyLogger) When I try to use this logger with a class extended
from ValidationForm (com.xxx.yyy.MyValidationForm), it wont work. As the
ValidationForm creates a logger and assignes the default logger
(org.apache.log4j.Logger) to com.xxx.yyy.MyValidationForm . So when I try to
get a my custom logger com.xxx.yyy.MyValidationForm, I always get
org.apache.log4j.Logger instead of com.xxx.yyy.MyLogger. Is this a bug or is
there a way to go about it..??

Thanks
Hemanth


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Problem with Struts 1.1b1 and Log4J 1.2.4

2002-07-02 Thread Hemanth Setty

Thanks..worked perfectly :)

Also, Is there a way to not show the apache DEBUG messages(without the
obvious log4j.properties Thresholod change..?)Nothing major, but it would be
good not to see the apache DEBUG messages for my application?? I guess it
will be removed when it goes out of beta.
-hemanth


-Original Message-
From: hemant [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 11:02 AM
To: Struts Users Mailing List
Subject: Re: Problem with Struts 1.1b1 and Log4J 1.2.4


One other thing, Make sure your Startup Servlet does not extend
ActionServlet. I made it extend HttpServlet and the problem went away.



Thanks
hemant
- Original Message -
From: "hemant" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 02, 2002 11:54 AM
Subject: Re: Problem with Struts 1.1b1 and Log4J 1.2.4


> Fabrice and Hemant
>
> I had this problem too but I overcame it the hard way. Many a times, its
the
> IDE that causes this kinda confusion.
>
> Here is what I did, I wrote a startup servlet that starts up logging ,
> creates the connection pools via poolman, and loads a few other things.
>
> step1: I loaded this startup servlet "prior" to loading the Action
> Servlet.Please see my web.xml below: ( number )
> step2: Remove log4j property files from your webapp. Let it pick it up
from
> your IDE environment. (I mean C:/program files/ibm/visual age /yada/yada)
> step3: Make sure your WEB-INF/lib has the latest struts libraries.
>
> But yes, it was almost insulting that the LOG4J error would  baffle us
like
> that.
>
> LOL
>
> later...
> hemant
>
>
>
> //-
> 
>   
> action
> org.apache.struts.action.ActionServlet
> 
>   debug
>   2
> 
> 
>   config
>   /WEB-INF/struts-config.xml
> 
> 
>   application
>   blah.blah...ApplicationResources
> 
> 
>   detail
>   2
> 
> 
>   validate
>   true
> 
> 2
>   
>
>
>
>
>  
>
> 
>   mpi_startup_manager
>   blah.blahStartupManager
>   
> LOG4J_CONFIG
> /blah/.blah.../log4j.properties
>   
>   1
> 
> //-
>
>
> - Original Message -
> From: "Hemanth Setty" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, July 01, 2002 8:53 PM
> Subject: Problem with Struts 1.1b1 and Log4J 1.2.4
>
>
> > Hello,
> >
> > I have included both the Struts and Log4J packages in a webapp. Things
> > worked fine when I was using Struts 1.0.2. After I got the latest beta
> > realease of struts(1.1b1)..I get this error
> >
> > log4j:WARN No appenders could be found for logger
> > (org.apache.commons.digester.Digester).
> > log4j:WARN Please initialize the log4j system properly.
> >
> > Does anybody know why this occurs? After digging in a little bit I
> realized
> > its because of the common-digester.jar file that comes with the
struts1.1?
> > But why does this error show up? Should I just stick with 1.0.2 of
struts
> > until a full release of 1.1?
> >
> > -hemanth
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Problem with Struts 1.1b1 and Log4J 1.2.4

2002-07-01 Thread Hemanth Setty

Hello,

I have included both the Struts and Log4J packages in a webapp. Things
worked fine when I was using Struts 1.0.2. After I got the latest beta
realease of struts(1.1b1)..I get this error

log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.

Does anybody know why this occurs? After digging in a little bit I realized
its because of the common-digester.jar file that comes with the struts1.1?
But why does this error show up? Should I just stick with 1.0.2 of struts
until a full release of 1.1?

-hemanth


--
To unsubscribe, e-mail:   
For additional commands, e-mail: