Re: [HELP] Error "...is null or not an object" when using Struts+iBatis+DAO ?

2005-03-28 Thread Pham Anh Tuan
Hi, sorry all, this is my mistake :")
I have just predefined 1 javascript below header tag and I put it into 
onLoad in body tag and I ... forgot that script :") ...

Sorry all
Thank u for ur reading :")
- Original Message - 
From: "Pham Anh Tuan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, March 29, 2005 12:18 PM
Subject: [HELP] Error "...is null or not an object" when using 
Struts+iBatis+DAO ?

Hi all, I need your help :(
Like my subject, I use Struts + iBatis + DAO.
I get error message "document.all.cateInfoFrame is null of not an object" 
but ... my action is done ???

my code line is:
Main.jsp: contains 2 IFrames: 1 called iframe1 (IFrame1.jsp) and 2 called 
cateInfoFrame (IFrame2.jsp)

IFrame1.jsp: name="iframe1" contains code line below:
show category information

IFrame2.jsp: name="cateInfoFrame" is used to show result of  action which 
has path = "category/viewinfo"

When I open main.jsp, I will see two iframes, when I click on the link "show 
category information" in iframe name "iframe1", struts-config will catch the 
action which has the path attribute "category/viewinfo", and this will call 
method name (which I specify via parameter attribute) of bean (which i 
specify via name attribute), after that, the info of category will show in 
"cateInfoFrame".





path="/category/viewinfo"
name="categoryBean"
parameter="categoryInfoByID"
validate="false"
type="com.ibatis.struts.BeanAction">



everything occurs like I want, but IE give me one error message after I had 
clicked the link "show category information", that is 
"document.all.cateInfoFrame is null of not an object", I don't know what 
happens, because, as you see, if there's an error, my action will not 
completed, it means category information will not showed in "cateInfoFrame".

When I change other actions (which don't contains name attribute and 
parameter attribute), like above:


path="/admin/viewaccountinfo"
name=""
scope="request"
type="com.ibatis.struts.BeanAction">



there's no error message ???
So, I think that there's something wrong with my CategoryBean, but in it, my 
public method categoryInfoByID just do one thing is return "success", IE 
continues to give me the same error like above "document.all.cateInfoFrame 
is null or not an object"

plz help me solve my problem :(

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


Re: Best practice for "dynamic reloading" of a part of the JSP ?

2005-03-28 Thread Stéphane Zuckerman
Hello,
Frank W. Zammetti a Ãcrit :
> I'm sure what you've found on the net is sufficient, but in case it
> isn't, here's a quick example I just threw together:
>
> http://www.omnytex.com/XMLHTTPRequestExample.htm
It seems that you have already removed this example from the web site 
... That's a shame, since I hadn't had access to the net until 
yesterday... Could you please republish it ?

Thanks a lot !
--
StÃphane Zuckerman
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[HELP] Error "...is null or not an object" when using Struts+iBatis+DAO ?

2005-03-28 Thread Pham Anh Tuan
Hi all, I need your help :(

Like my subject, I use Struts + iBatis + DAO.

I get error message "document.all.cateInfoFrame is null of not an object" but 
... my action is done ???

my code line is:
Main.jsp: contains 2 IFrames: 1 called iframe1 (IFrame1.jsp) and 2 called 
cateInfoFrame (IFrame2.jsp)

IFrame1.jsp: name="iframe1" contains code line below:

show category information

IFrame2.jsp: name="cateInfoFrame" is used to show result of  action which has 
path = "category/viewinfo"

When I open main.jsp, I will see two iframes, when I click on the link "show 
category information" in iframe name "iframe1", struts-config will catch the 
action which has the path attribute "category/viewinfo", and this will call 
method name (which I specify via parameter attribute) of bean (which i specify 
via name attribute), after that, the info of category will show in 
"cateInfoFrame".
















everything occurs like I want, but IE give me one error message after I had 
clicked the link "show category information", that is 
"document.all.cateInfoFrame is null of not an object", I don't know what 
happens, because, as you see, if there's an error, my action will not 
completed, it means category information will not showed in "cateInfoFrame".

When I change other actions (which don't contains name attribute and parameter 
attribute), like above:









there's no error message ???

So, I think that there's something wrong with my CategoryBean, but in it, my 
public method categoryInfoByID just do one thing is return "success", IE 
continues to give me the same error like above "document.all.cateInfoFrame is 
null or not an object"

plz help me solve my problem :(


RE: Multiple Sessions from the same workstation

2005-03-28 Thread Bill Milbratz
 
>2. If URL rewriting is the only alternative, is there a way to configure 
>Tomcat to use URL rewriting regardless of whether >the browser allows cookies 
>or not?

Use apache as a http front-end and use mod_rewrite to handle the urls.  This 
works w/o requiring cookies. 


-Original Message- 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Mon 3/28/2005 11:18 PM 
To: user@struts.apache.org 
Cc: 
Subject: Multiple Sessions from the same workstation



We would like to allow our users to have multiple sessions going from 
the same workstation. My first thought was to use URL rewriting to keep the 
sessions straight, but I can not find any way to force URL rewriting at the 
server/container level. It appears that the browser must disable cookies in 
order for URL rewriting kick in. We would prefer not to force our users to 
disable cookies.

So my question is really two parts.

1. Is there a way to enable mulitple sessions from the same workstation 
that does not require using URL rewriting?

2. If URL rewriting is the only alternative, is there a way to 
configure Tomcat to use URL rewriting regardless of whether the browser allows 
cookies or not?

Thank you.

--
Kurt Williams
[EMAIL PROTECTED]

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





Multiple Sessions from the same workstation

2005-03-28 Thread kurt . e . williams
We would like to allow our users to have multiple sessions going from the same 
workstation. My first thought was to use URL rewriting to keep the sessions 
straight, but I can not find any way to force URL rewriting at the 
server/container level. It appears that the browser must disable cookies in 
order for URL rewriting kick in. We would prefer not to force our users to 
disable cookies.

So my question is really two parts.

1. Is there a way to enable mulitple sessions from the same workstation that 
does not require using URL rewriting?

2. If URL rewriting is the only alternative, is there a way to configure Tomcat 
to use URL rewriting regardless of whether the browser allows cookies or not?

Thank you.

--
Kurt Williams
[EMAIL PROTECTED]

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



Re: can struts handle a variable number of form fields?

2005-03-28 Thread ori
To clarify my previous post:

I have a series of identical fields; the quantity varies per user.

For example, if I was keeping track of a user's friends and allowed the user
to edit their friends' names from a list, I would have a series of text
boxes:

friend1,
friend2,
...
friendN

Each text box requires exactly the same validation (required, maxLength,
mask, etc.). Is there any way to dynamically validate only the applicable
fields?

One request might have 5 friend fields while another request might have 10
and so on.

Thanks.




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



Re: MessageResources in ActionForm

2005-03-28 Thread Corey Probst
> That said, I don't know how you differentiate between
> messages and errors if you do that...

This two links on the Wiki explain a lot about ActionErrors and
ActionMessages usage...

http://wiki.apache.org/struts/ActionErrorsAndActionMessages?highlight=%28actionerrors%29

http://wiki.apache.org/struts/StrutsDeprecatedActionErrors?highlight=%28actionerrors%29

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



RE: MessageResources in ActionForm

2005-03-28 Thread Nidel, Mike
To the best of my knowledge, ActionErrors is deprecated
in 1.2. Note that ActionError is NOT deprecated, nor are
ActionMessages or ActionMessage. The API documentation
says to use ActionMessages.GLOBAL_MESSAGES instead.

That said, I don't know how you differentiate between
messages and errors if you do that...

> -Original Message-
> From: Scott Purcell [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 5:08 PM
> To: Struts Users Mailing List; Hubert Rabago
> Subject: RE: MessageResources in ActionForm
> 
> 
> A follow up to this thread.
> 
> I built my app using 1.1 and the O'Reilly book. Upon my 
> upgrade, and prior threads, I am getting some depreciated 
> warnings when I compile. This seems to be the problem:
> 
>   ActionError newError =
> new ActionError("global.error.login.requiredfield", 
> userNameLabel );
>   errors.add(ActionErrors.GLOBAL_ERROR, newError);
> 
> 
> It looks like I should starting using messages? I am not 
> quite understanding the change. Could someone give me some 
> advice, so I could get these types of calls changed to the 
> new 1.2.4 calls?
> 
> Thanks,
> Scott
> 
> 
> 
> 
> 
> 
> 
> 
> -Original Message-
> From: Hubert Rabago [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 2:10 PM
> To: Struts Users Mailing List
> Subject: Re: MessageResources in ActionForm
> 
> 
> The API change occurred with the 1.1 release.  With that release,
> Action.MESSAGES_KEY was deprecated, as well as other constants there. 
> Those deprecated items were removed in the 1.2 releases.
> 
> Hubert
> 
> > -Original Message-
> > From: Scott Purcell [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 28, 2005 1:51 PM
> > To: Struts Users Mailing List; Hubert Rabago
> > Subject: RE: MessageResources in ActionForm
> > 
> > 
> > Is this an api change from 1.1? Does anyone know?
> > 
> > 
> > 
> > -Original Message-
> > From: Hubert Rabago [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 28, 2005 1:45 PM
> > To: Struts Users Mailing List
> > Subject: Re: MessageResources in ActionForm
> > 
> > 
> > Use Globals.MESSAGES_KEY .
> > 
> > 
> > On Mon, 28 Mar 2005 13:39:17 -0600, Scott Purcell
> > <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > > I am trying to obtain a MessageResources object in a 
> > ActionForm and I cannot figure out how.
> > > 
> > > Prior to the new 1.2.4 struts I used this:
> > > 
> > > MessageResources resources =
> > >   (MessageResources)req.getAttribute( Action.MESSAGES_KEY );
> > > 
> > > But it appears depreciated, or non existant in the action 
> class now.
> > > 
> > > Thanks,
> > > 
> > > Scott K Purcell | Developer | VERTIS |
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



Obtaining MessageResources from ExceptionHandler

2005-03-28 Thread Erik Weber
How can I obtain a reference to a non-default MessageResources instance 
from within the execute method of an ExceptionHandler?

The signature is:
public ActionForward execute(Exception e, ExceptionConfig config, 
ActionMapping mapping, ActionForm form, HttpServletRequest request, 
HttpServletResponse response);

How do I look up the messages resources declared as "FOO_MESSAGES" in 
struts-config.xml?

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


can struts handle a variable number of form fields?

2005-03-28 Thread ori
i have a form with fields like this:

field1,
field2,
field3,
...
fieldN

where N varies with each request. a jsp dynamically emitts the 
tags as necessary.

can i use the struts validator on such a form so that a field is validated
iff it is present?




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



RE: locale attribute in

2005-03-28 Thread Joe Hertz
That was too simple to have even asked about :-/

Didn't use the request object. What I did was:

<% String l1 = new Locale("lang1").getDisplayLanguage(new Locale("lang1"));
   String l2 = ...  %>

And used the identifier when I needed it. 

Tx again



> -Original Message-
> From: Smith, Thad [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 3:19 PM
> To: Struts Users Mailing List
> Subject: RE: locale attribute in 
> 
> You can use the getDisplayLanguage in java.util.Locale to do this:
> 
> <%= request.getLocale().getDisplayLanguage(request.getLocale) %>
> 
> This displays the language of the locale in the locale you specify. If
> you don't specify a locale it will use the default locale of the system.
> 
> Regards,
> 
> Thad Smith
> 
> -Original Message-
> From: Joe Hertz [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 11:57 AM
> To: 'Struts Users Mailing List'
> Subject: locale attribute in 
> 
> An utter shot in the dark here..
> 
> I'm trying to force the printing of language names into their native
> languages. That is to say English is "English" and French would be
> "francais".
> 
> I realize that if I know what language I want to put display it in, I
> don't
> _really_ need a bean:message tag, but it's far more readable than
> putting
> Unicode into the web pages themselves since I do this every where else.
> 
> (No, the locale= attribute doesn't take a language parameter. It wants a
> session scoped bean with a Locale object).
> 
> So is there a way to force a specific language to be used in a
>  tag?
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 




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



RE: locale attribute in

2005-03-28 Thread Joe Hertz
That was too simple to have even asked about :-/

Didn't use the request object. What I did was:

<% String l1 = new Locale("lang1").getDisplayLanguage(new Locale("lang1"));
   String l2 = ...  %>

And used the identifier when I needed it. 

Tx again



> -Original Message-
> From: Smith, Thad [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 3:19 PM
> To: Struts Users Mailing List
> Subject: RE: locale attribute in 
> 
> You can use the getDisplayLanguage in java.util.Locale to do this:
> 
> <%= request.getLocale().getDisplayLanguage(request.getLocale) %>
> 
> This displays the language of the locale in the locale you specify. If
> you don't specify a locale it will use the default locale of the system.
> 
> Regards,
> 
> Thad Smith
> 
> -Original Message-
> From: Joe Hertz [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 11:57 AM
> To: 'Struts Users Mailing List'
> Subject: locale attribute in 
> 
> An utter shot in the dark here..
> 
> I'm trying to force the printing of language names into their native
> languages. That is to say English is "English" and French would be
> "francais".
> 
> I realize that if I know what language I want to put display it in, I
> don't
> _really_ need a bean:message tag, but it's far more readable than
> putting
> Unicode into the web pages themselves since I do this every where else.
> 
> (No, the locale= attribute doesn't take a language parameter. It wants a
> session scoped bean with a Locale object).
> 
> So is there a way to force a specific language to be used in a
>  tag?
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 




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



RE: MessageResources in ActionForm

2005-03-28 Thread Scott Purcell
A follow up to this thread.

I built my app using 1.1 and the O'Reilly book. Upon my upgrade, and prior 
threads, I am getting some depreciated warnings when I compile. This seems to 
be the problem:

  ActionError newError =
new ActionError("global.error.login.requiredfield", userNameLabel );
  errors.add(ActionErrors.GLOBAL_ERROR, newError);


It looks like I should starting using messages? I am not quite understanding 
the change. Could someone give me some advice, so I could get these types of 
calls changed to the new 1.2.4 calls?

Thanks,
Scott








-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: Monday, March 28, 2005 2:10 PM
To: Struts Users Mailing List
Subject: Re: MessageResources in ActionForm


The API change occurred with the 1.1 release.  With that release,
Action.MESSAGES_KEY was deprecated, as well as other constants there. 
Those deprecated items were removed in the 1.2 releases.

Hubert

> -Original Message-
> From: Scott Purcell [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 1:51 PM
> To: Struts Users Mailing List; Hubert Rabago
> Subject: RE: MessageResources in ActionForm
> 
> 
> Is this an api change from 1.1? Does anyone know?
> 
> 
> 
> -Original Message-
> From: Hubert Rabago [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 1:45 PM
> To: Struts Users Mailing List
> Subject: Re: MessageResources in ActionForm
> 
> 
> Use Globals.MESSAGES_KEY .
> 
> 
> On Mon, 28 Mar 2005 13:39:17 -0600, Scott Purcell
> <[EMAIL PROTECTED]> wrote:
> > Hello,
> > I am trying to obtain a MessageResources object in a 
> ActionForm and I cannot figure out how.
> > 
> > Prior to the new 1.2.4 struts I used this:
> > 
> > MessageResources resources =
> >   (MessageResources)req.getAttribute( Action.MESSAGES_KEY );
> > 
> > But it appears depreciated, or non existant in the action class now.
> > 
> > Thanks,
> > 
> > Scott K Purcell | Developer | VERTIS |

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


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



RE: locale attribute in

2005-03-28 Thread Smith, Thad
You can use the getDisplayLanguage in java.util.Locale to do this:

<%= request.getLocale().getDisplayLanguage(request.getLocale) %>

This displays the language of the locale in the locale you specify. If
you don't specify a locale it will use the default locale of the system.

Regards,

Thad Smith

-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 11:57 AM
To: 'Struts Users Mailing List'
Subject: locale attribute in 

An utter shot in the dark here..

I'm trying to force the printing of language names into their native
languages. That is to say English is "English" and French would be
"francais".

I realize that if I know what language I want to put display it in, I
don't
_really_ need a bean:message tag, but it's far more readable than
putting
Unicode into the web pages themselves since I do this every where else.

(No, the locale= attribute doesn't take a language parameter. It wants a
session scoped bean with a Locale object).

So is there a way to force a specific language to be used in a
 tag?




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




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



Re: MessageResources in ActionForm

2005-03-28 Thread Hubert Rabago
The API change occurred with the 1.1 release.  With that release,
Action.MESSAGES_KEY was deprecated, as well as other constants there. 
Those deprecated items were removed in the 1.2 releases.

Hubert

> -Original Message-
> From: Scott Purcell [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 1:51 PM
> To: Struts Users Mailing List; Hubert Rabago
> Subject: RE: MessageResources in ActionForm
> 
> 
> Is this an api change from 1.1? Does anyone know?
> 
> 
> 
> -Original Message-
> From: Hubert Rabago [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 1:45 PM
> To: Struts Users Mailing List
> Subject: Re: MessageResources in ActionForm
> 
> 
> Use Globals.MESSAGES_KEY .
> 
> 
> On Mon, 28 Mar 2005 13:39:17 -0600, Scott Purcell
> <[EMAIL PROTECTED]> wrote:
> > Hello,
> > I am trying to obtain a MessageResources object in a 
> ActionForm and I cannot figure out how.
> > 
> > Prior to the new 1.2.4 struts I used this:
> > 
> > MessageResources resources =
> >   (MessageResources)req.getAttribute( Action.MESSAGES_KEY );
> > 
> > But it appears depreciated, or non existant in the action class now.
> > 
> > Thanks,
> > 
> > Scott K Purcell | Developer | VERTIS |

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



RE: Links to external files not in web application

2005-03-28 Thread Smith, Thad
You can still have an http server on the same machine as your
application server and create a virtual directory that points to the
directory you are creating the reports in.

In other words, let's assume your application is creating the reports in
a file system directory /pdfReports. You can create a virtual directory
in an http servers configuration that points the virtual directory /pdfs
to /pdfReports. So when your application generates a Report_20050328.pdf
file in /pdfReports it can be linked with:

March 28, 2005

This way each time the report is opened (which is done by the browser
and not by your struts app) it is served by the http server and not by
your application server. This will give you much better performance.

If you are trying to detect if this file has been created or not check
out java.io.File.

Regards,

Thad Smith

-Original Message-
From: Brad Balmer [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 1:38 PM
To: 'Struts Users Mailing List'
Subject: RE: Links to external files not in web application

But my application is also going to create them.  My app needs to
generate
the PDF and save it off so that it won't need to be generated again
(they
are fairly large, db intensive reports).

Many different people/groups need to access these so I thought that the
first person in would generate it and save it to a common location.
Then,
the next user in would see a link to the PDF instead of re-generating
it.  I
didn't want to put it in a directory under the .war file because if/when
we
upgrade I didn't want to have the possibility of deleting old pdf's.

-Original Message-
From: Smith, Thad [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 1:25 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Links to external files not in web application

Are you expecting the application server that runs your Struts
application to serve up these pdf files? If so, this is a no no!
Application servers (and servlet containers) are geared to run with
lower numbers of more processing intensive threads than a simple http
server will.

I would recommend putting your pdf files in a virtual directory that can
be served directly by an http server (which can be on a different
machine than your application server) even if you don't have your
application server sitting behind an http server. Than just use a
standard html anchor tag to link to the pdf documents (no need to use
the struts tags to do this as they are not relevant to your struts
application): 

http://myserver.mydomain.com/pdfs/mypdf.pdf";>Read Me!

Regards,

Thad Smith

P.S. This is the recommended way of serving up the images of your
application as well.

-Original Message-
From: Brad Balmer [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 8:59 AM
To: 'Struts Users Mailing List'
Subject: Links to external files not in web application

Please feel free to scold me if I'm missing something obvious but I
can't
think of a way to link to files (specifically pdf's) that have already
been
generated and are sitting in a folder external to any web application.

I've tried to create a symbolic link to the directory inside my web
application and then link to them as if they were inside the application
but
my application doesn't see them.

Am I missing something or is this not as easy as it seems.

Thanks.


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





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




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



Re: Links to external files not in web application

2005-03-28 Thread Nic Werner
Brad Balmer wrote:
Many different people/groups need to access these so I thought that the
first person in would generate it and save it to a common location.  Then, the 
next user in would see a link to the PDF instead of re-generating it.
I obviously don't know your users, but beware of your expectations for 
this second user. I'll bet they just go ahead and run the report without 
checking first! With my experience, assuming people will do something 
like think ahead is going to cause trouble. Is there any way your app 
could just store a checksum/timestamp and if the second user requests 
it, pull it from a cached folder?

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


RE: MessageResources in ActionForm

2005-03-28 Thread Scott Purcell
Is this an api change from 1.1? Does anyone know?



-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: Monday, March 28, 2005 1:45 PM
To: Struts Users Mailing List
Subject: Re: MessageResources in ActionForm


Use Globals.MESSAGES_KEY .


On Mon, 28 Mar 2005 13:39:17 -0600, Scott Purcell
<[EMAIL PROTECTED]> wrote:
> Hello,
> I am trying to obtain a MessageResources object in a ActionForm and I cannot 
> figure out how.
> 
> Prior to the new 1.2.4 struts I used this:
> 
> MessageResources resources =
>   (MessageResources)req.getAttribute( Action.MESSAGES_KEY );
> 
> But it appears depreciated, or non existant in the action class now.
> 
> Thanks,
> 
> Scott K Purcell | Developer | VERTIS |
> 555 Washington Ave. 4th Floor | St. Louis, MO 63101 |
> 314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
> 
> 
> Vertis is the premier provider of targeted advertising, media, and
> marketing services that drive consumers to marketers more effectively.
> 
>

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


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



Re: MessageResources in ActionForm

2005-03-28 Thread Hubert Rabago
Use Globals.MESSAGES_KEY .


On Mon, 28 Mar 2005 13:39:17 -0600, Scott Purcell
<[EMAIL PROTECTED]> wrote:
> Hello,
> I am trying to obtain a MessageResources object in a ActionForm and I cannot 
> figure out how.
> 
> Prior to the new 1.2.4 struts I used this:
> 
> MessageResources resources =
>   (MessageResources)req.getAttribute( Action.MESSAGES_KEY );
> 
> But it appears depreciated, or non existant in the action class now.
> 
> Thanks,
> 
> Scott K Purcell | Developer | VERTIS |
> 555 Washington Ave. 4th Floor | St. Louis, MO 63101 |
> 314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
> 
> 
> Vertis is the premier provider of targeted advertising, media, and
> marketing services that drive consumers to marketers more effectively.
> 
>

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



Re: MessageResources in ActionForm

2005-03-28 Thread Hubert Rabago
It's easy to confuse them, and I check their javadocs each time I use them.

Globals.MESSAGES_KEY gives you access to MessageResources specific to a module.
Globals.MESSAGE_KEY contains the ActionMessages for that request.
Globals.ERROR_KEY contains the ActionErrors for that request.

Hubert

On Mon, 28 Mar 2005 14:44:38 -0500, Nidel, Mike <[EMAIL PROTECTED]> wrote:
> You might want to check Globals.MESSAGES_KEY
> 
> although this isn't how I understood the MessageResources to
> work, I thought the ActionMessages was stored in the request
> under the Global.MESSAGES_KEY and not the MessageResources...
> 
> anybody else?
> 
> 
> > -Original Message-
> > From: Scott Purcell [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 28, 2005 2:39 PM
> > To: user@struts.apache.org
> > Subject: MessageResources in ActionForm
> >
> >
> > Hello,
> > I am trying to obtain a MessageResources object in a
> > ActionForm and I cannot figure out how.
> >
> > Prior to the new 1.2.4 struts I used this:
> >
> > MessageResources resources =
> >   (MessageResources)req.getAttribute( Action.MESSAGES_KEY );
> >
> > But it appears depreciated, or non existant in the action class now.
> >
> > Thanks,
> >
> >
> > Scott K Purcell | Developer | VERTIS |
> > 555 Washington Ave. 4th Floor | St. Louis, MO 63101 |
> > 314.588.0720 Ext:1320 | [EMAIL PROTECTED] |
> > http://www.vertisinc.com 
> >
> > Vertis is the premier provider of targeted advertising, media, and
> > marketing services that drive consumers to marketers more
> > effectively.
> >
> >
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



RE: MessageResources in ActionForm

2005-03-28 Thread Nidel, Mike
You might want to check Globals.MESSAGES_KEY

although this isn't how I understood the MessageResources to
work, I thought the ActionMessages was stored in the request
under the Global.MESSAGES_KEY and not the MessageResources...

anybody else?


> -Original Message-
> From: Scott Purcell [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 2:39 PM
> To: user@struts.apache.org
> Subject: MessageResources in ActionForm
> 
> 
> Hello,
> I am trying to obtain a MessageResources object in a 
> ActionForm and I cannot figure out how.
>  
> Prior to the new 1.2.4 struts I used this:
>  
> MessageResources resources =
>   (MessageResources)req.getAttribute( Action.MESSAGES_KEY );
>  
> But it appears depreciated, or non existant in the action class now.
>  
> Thanks,
>  
> 
> Scott K Purcell | Developer | VERTIS | 
> 555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
> 314.588.0720 Ext:1320 | [EMAIL PROTECTED] | 
> http://www.vertisinc.com   
> 
> Vertis is the premier provider of targeted advertising, media, and 
> marketing services that drive consumers to marketers more 
> effectively. 
>  
> 
>  
> 

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



MessageResources in ActionForm

2005-03-28 Thread Scott Purcell
Hello,
I am trying to obtain a MessageResources object in a ActionForm and I cannot 
figure out how.
 
Prior to the new 1.2.4 struts I used this:
 
MessageResources resources =
  (MessageResources)req.getAttribute( Action.MESSAGES_KEY );
 
But it appears depreciated, or non existant in the action class now.
 
Thanks,
 

Scott K Purcell | Developer | VERTIS | 
555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
  

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

 


RE: Links to external files not in web application

2005-03-28 Thread Brad Balmer
But my application is also going to create them.  My app needs to generate
the PDF and save it off so that it won't need to be generated again (they
are fairly large, db intensive reports).

Many different people/groups need to access these so I thought that the
first person in would generate it and save it to a common location.  Then,
the next user in would see a link to the PDF instead of re-generating it.  I
didn't want to put it in a directory under the .war file because if/when we
upgrade I didn't want to have the possibility of deleting old pdf's.

-Original Message-
From: Smith, Thad [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 1:25 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Links to external files not in web application

Are you expecting the application server that runs your Struts
application to serve up these pdf files? If so, this is a no no!
Application servers (and servlet containers) are geared to run with
lower numbers of more processing intensive threads than a simple http
server will.

I would recommend putting your pdf files in a virtual directory that can
be served directly by an http server (which can be on a different
machine than your application server) even if you don't have your
application server sitting behind an http server. Than just use a
standard html anchor tag to link to the pdf documents (no need to use
the struts tags to do this as they are not relevant to your struts
application): 

http://myserver.mydomain.com/pdfs/mypdf.pdf";>Read Me!

Regards,

Thad Smith

P.S. This is the recommended way of serving up the images of your
application as well.

-Original Message-
From: Brad Balmer [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 8:59 AM
To: 'Struts Users Mailing List'
Subject: Links to external files not in web application

Please feel free to scold me if I'm missing something obvious but I
can't
think of a way to link to files (specifically pdf's) that have already
been
generated and are sitting in a folder external to any web application.

I've tried to create a symbolic link to the directory inside my web
application and then link to them as if they were inside the application
but
my application doesn't see them.

Am I missing something or is this not as easy as it seems.

Thanks.


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





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



RE: Links to external files not in web application

2005-03-28 Thread Smith, Thad
Are you expecting the application server that runs your Struts
application to serve up these pdf files? If so, this is a no no!
Application servers (and servlet containers) are geared to run with
lower numbers of more processing intensive threads than a simple http
server will.

I would recommend putting your pdf files in a virtual directory that can
be served directly by an http server (which can be on a different
machine than your application server) even if you don't have your
application server sitting behind an http server. Than just use a
standard html anchor tag to link to the pdf documents (no need to use
the struts tags to do this as they are not relevant to your struts
application): 

http://myserver.mydomain.com/pdfs/mypdf.pdf";>Read Me!

Regards,

Thad Smith

P.S. This is the recommended way of serving up the images of your
application as well.

-Original Message-
From: Brad Balmer [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 8:59 AM
To: 'Struts Users Mailing List'
Subject: Links to external files not in web application

Please feel free to scold me if I'm missing something obvious but I
can't
think of a way to link to files (specifically pdf's) that have already
been
generated and are sitting in a folder external to any web application.

I've tried to create a symbolic link to the directory inside my web
application and then link to them as if they were inside the application
but
my application doesn't see them.

Am I missing something or is this not as easy as it seems.

Thanks.


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




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



Re: DispatchAction defaults

2005-03-28 Thread Nic Werner
Rick Reumann wrote:
Nic Werner wrote the following on 3/28/2005 1:06 PM:
I view the unspecified() method as the equivalent to 'index.jsp'. I 
deliberately put an index.jsp (or html) in the directory to provide 
the correct output, as opposed to leaving it unhandled - I see Struts 
and unspecified() as a mirror of this.

I don't really get the index.jsp comparison to unspecified?
You are purposely creating an default handler (index.jsp)  for the root 
of that folder, just as you are purposely creating a method to handle 
Actions without the method parameter (unspecified)

Regardless, the reason I don't like using unspecified is two-fold:
1) The unspecified method is simply vague. Granted, this is by design, 
but in reality 'unspecified' will do 'something' so why not make it 
clear what you are going to do so it's easier for developers to 
quickly pick up on what the method implementation provides
This is what I'm trying to show with the index.jsp example - but you've 
learned a long time ago that if you call upon the root of a folder with 
no filename, index.* will be returned. Granted, this unspecified method 
is nowhere nearly as ingrained as default index.* calls.

. All unspecified does is save you from having to provide a dispatch 
parameter on your front end, which to me doesn't save that much coding 
and instead makes things unclear.
I like this because I have Actions that call other Actions and then need 
to return to the calling Action. Not having to deal with postpending 
'&method=display' and saving only the Action name is cleaner for me.

2) It could potentially lead to some unexpected behavior. What if on a 
page, you happened to forget to provide a dispatch parameter that you 
really intended to have? Your action would still get called and the 
unspecified method would be invoked. This could lead to the 
application working, but not as expected. I'd rather it break right 
away since it couldn't find the appropriate method name.
You are intentionally writing the unspecified method which is pretty 
close to intentionally writing a dispatch method. I could argue that 
what if you called the wrong Dispatch method by mistake? This could also 
lead to the application working, but not as expected.

Granted, other people like the unspecified method, so it's not that 
big of a deal and I like that Struts provides the option for those 
that want to take advantage of it. For me, it's just a matter of 
coding preference.

You're right, it really is a coding preference. For the majority of 
these types of issues, I feel that as long as you are consistent across 
your application, it isn't necessarily wrong or bad.

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


Re: DispatchAction defaults

2005-03-28 Thread Rick Reumann
Nic Werner wrote the following on 3/28/2005 1:06 PM:
I view the unspecified() method as the equivalent to 'index.jsp'. I 
deliberately put an index.jsp (or html) in the directory to provide the 
correct output, as opposed to leaving it unhandled - I see Struts and 
unspecified() as a mirror of this.
I don't really get the index.jsp comparison to unspecified?
Regardless, the reason I don't like using unspecified is two-fold:
1) The unspecified method is simply vague. Granted, this is by design, 
but in reality 'unspecified' will do 'something' so why not make it 
clear what you are going to do so it's easier for developers to quickly 
pick up on what the method implementation provides. All unspecified does 
is save you from having to provide a dispatch parameter on your front 
end, which to me doesn't save that much coding and instead makes things 
unclear.

2) It could potentially lead to some unexpected behavior. What if on a 
page, you happened to forget to provide a dispatch parameter that you 
really intended to have? Your action would still get called and the 
unspecified method would be invoked. This could lead to the application 
working, but not as expected. I'd rather it break right away since it 
couldn't find the appropriate method name.

Granted, other people like the unspecified method, so it's not that big 
of a deal and I like that Struts provides the option for those that want 
to take advantage of it. For me, it's just a matter of coding preference.

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


Re: DispatchAction defaults

2005-03-28 Thread Nic Werner
I view the unspecified() method as the equivalent to 'index.jsp'. I 
deliberately put an index.jsp (or html) in the directory to provide the 
correct output, as opposed to leaving it unhandled - I see Struts and 
unspecified() as a mirror of this.

- Nic.
Rick Reumann wrote:
nitin dubey wrote the following on 3/28/2005 4:43 AM:
The problem I am facing is my unspecified() is always
giving me a null ActionForm object.

As others have mentioned, I'm not fan of providing an unspecified() 
dispatch method. I like to always make sure I provide the exact 
dispatch parameter as part of the front end, even if in a hidden form 
field.

Concerning the null ActionForm object, you might have to provide more 
details. So first off, where are you seeing it as null? Are you seeing 
it as null in the Action dispatch method itself?


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


Re: URGENT: unspecified() method is having null form

2005-03-28 Thread Rick Reumann
You didn't provide your unspecified method code below. Provide that please.
nitin dubey wrote the following on 3/28/2005 9:35 AM:
Thanks Saulo for your reply,  here is the code for
config and html:form
struts-config.xml
~





  
 name="commonForm"
 parameter="dispatch"	
 scope="session"
 input="/admin/Main.jsp" 

type="com.imc.startec.web.processor.MainAction" >
 
/>
  


Main.jsp


type="com.imc.startec.web.form.CommonForm"> 
	  


Regards,
Nitin Dubey
--- Eugênio Saulo <[EMAIL PROTECTED]> wrote:
Check your  definition and
the definition of
the  it uses.
Maybe if you paste it here we could help you.
Regards,
Eugênio Saulo
On Mon, 28 Mar 2005 01:39:21 -0800 (PST), nitin
dubey
<[EMAIL PROTECTED]> wrote:
Hello,
I am using DispatchAction for my application. 
When I
use the URL
"http://localhost:8080/myapp/admin/main.do"; it
directly hits the unspecified() method first where
I
am trying to populate the action form.  The
ActionForm
object I am getting in the unspecified() method is
null always.
Anyone who can tell me why is this happening ? 
And
can I use the action form itself to store some
different values that are NOT the controls in HTML
and
access them in the JSP to display the contents ? 
OR
do I have to go for something like domain objects
that
I have to put in the session scope and access them
in
JSP ?
Please suggest..
Regards,
Nitin Dubey
__
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage
less.
http://info.mail.yahoo.com/mail_250


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


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


		
__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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

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


Re: DispatchAction defaults

2005-03-28 Thread Rick Reumann
nitin dubey wrote the following on 3/28/2005 4:43 AM:
The problem I am facing is my unspecified() is always
giving me a null ActionForm object.
As others have mentioned, I'm not fan of providing an unspecified() 
dispatch method. I like to always make sure I provide the exact dispatch 
parameter as part of the front end, even if in a hidden form field.

Concerning the null ActionForm object, you might have to provide more 
details. So first off, where are you seeing it as null? Are you seeing 
it as null in the Action dispatch method itself?

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


locale attribute in

2005-03-28 Thread Joe Hertz
An utter shot in the dark here..

I'm trying to force the printing of language names into their native
languages. That is to say English is "English" and French would be
"francais".

I realize that if I know what language I want to put display it in, I don't
_really_ need a bean:message tag, but it's far more readable than putting
Unicode into the web pages themselves since I do this every where else.

(No, the locale= attribute doesn't take a language parameter. It wants a
session scoped bean with a Locale object).

So is there a way to force a specific language to be used in a
 tag?




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



locale attribute in

2005-03-28 Thread Joe Hertz
An utter shot in the dark here..

I'm trying to force the printing of language names into their native
languages. That is to say English is "English" and French would be
"francais".

I realize that if I know what language I want to put display it in, I don't
_really_ need a bean:message tag, but it's far more readable than putting
Unicode into the web pages themselves since I do this every where else.

(No, the locale= attribute doesn't take a language parameter. It wants a
session scoped bean with a Locale object).

So is there a way to force a specific language to be used in a
 tag?




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



RE: Help Validator Not Validating on Tomcat?

2005-03-28 Thread Fogleson, Allen
Dave,

Very true for the most part. The one case where I have seen the struts
libraries in a common (be it tomcat, jboss, weblogic, etc) directory is
when you want to enforce a certain version across all applications on
the server. Mainly this is in "productized" applications and allows
product support divisions to easier support the application.

Al

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 10:31 AM
To: Struts Users Mailing List
Subject: Re: Help Validator Not Validating on Tomcat?

Scott Purcell wrote:

>Well, not sure why this is happening, and I would like to know, I took
the jar files from the "struts-examples" lib and put them into my
tomcat, their sizes were different, but it worked.
>  
>
My impression has been that the struts libraries should go in to your 
web app's lib directory, not Tomcat's:

http://struts.apache.org/faqs/kickstart.html#jar

Is this different now?

Or did I just misunderstand where you put them?

Dave



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


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



Re: Help Validator Not Validating on Tomcat?

2005-03-28 Thread Dave Newton
Scott Purcell wrote:
Well, not sure why this is happening, and I would like to know, I took the jar files from the "struts-examples" lib and put them into my tomcat, their sizes were different, but it worked.
 

My impression has been that the struts libraries should go in to your 
web app's lib directory, not Tomcat's:

http://struts.apache.org/faqs/kickstart.html#jar
Is this different now?
Or did I just misunderstand where you put them?
Dave

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


RE: Help Validator Not Validating on Tomcat?

2005-03-28 Thread Scott Purcell
Ok,

Well, not sure why this is happening, and I would like to know, I took the jar 
files from the "struts-examples" lib and put them into my tomcat, their sizes 
were different, but it worked.

Now what I downloaded for this was the Struts 1.1 here my my download 
"jakarta-struts-1.1" which I thought was the latest. And I do not know what 
version is in the "struts-examples".

For my own knowledge, does anyone know if the 1.1 is up-to-date or if I should 
be developing with a newer version?

Thanks,
Scott








-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED]
Sent: Monday, March 28, 2005 9:40 AM
To: user@struts.apache.org
Subject: Help Validator Not Validating on Tomcat?


Hello,
I began creating my application on IPLanet 6.1, and I got validation (dynamic) 
working, etc. Now because of speed concerns, we have moved locally to our local 
box, and we will work from there.
 
I am running Tomcat 5-5.7 on a PC and the validation is no longer working. I am 
using a war created from IPLanet and moved to Tomcat and I am getting this 
error, that I can't seem to get my hands around.
 
 
 
at java.lang.Thread.run(Unknown Source)
2005-03-28 09:37:31,574 ERROR org.apache.commons.validator.Validator - reflectio
n: org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, or
g.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest)
java.lang.NoSuchMethodException: org.apache.struts.validator.FieldChecks.validat
eRequired(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.ap
ache.commons.validator.Field, org.apache.struts.action.ActionMessages, javax.ser
vlet.http.HttpServletRequest)
at java.lang.Class.getMethod(Unknown Source)
at org.apache.commons.validator.Validator.validateFieldForRule(Validator
.java:401)
at org.apache.commons.validator.Validator.validateField(Validator.java:5
44)
at org.apache.commons.validator.Validator.validate(Validator.java:582)
at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java
:152)
at org.apache.struts.action.RequestProcessor.processValidate(RequestProc
essor.java:942)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:255)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
2)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)

Scott K Purcell | Developer | VERTIS | 
555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
  

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

 

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



Help Validator Not Validating on Tomcat?

2005-03-28 Thread Scott Purcell
Hello,
I began creating my application on IPLanet 6.1, and I got validation (dynamic) 
working, etc. Now because of speed concerns, we have moved locally to our local 
box, and we will work from there.
 
I am running Tomcat 5-5.7 on a PC and the validation is no longer working. I am 
using a war created from IPLanet and moved to Tomcat and I am getting this 
error, that I can't seem to get my hands around.
 
 
 
at java.lang.Thread.run(Unknown Source)
2005-03-28 09:37:31,574 ERROR org.apache.commons.validator.Validator - reflectio
n: org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, or
g.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest)
java.lang.NoSuchMethodException: org.apache.struts.validator.FieldChecks.validat
eRequired(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.ap
ache.commons.validator.Field, org.apache.struts.action.ActionMessages, javax.ser
vlet.http.HttpServletRequest)
at java.lang.Class.getMethod(Unknown Source)
at org.apache.commons.validator.Validator.validateFieldForRule(Validator
.java:401)
at org.apache.commons.validator.Validator.validateField(Validator.java:5
44)
at org.apache.commons.validator.Validator.validate(Validator.java:582)
at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java
:152)
at org.apache.struts.action.RequestProcessor.processValidate(RequestProc
essor.java:942)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:255)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
2)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)

Scott K Purcell | Developer | VERTIS | 
555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
  

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

 


Re: waiting page

2005-03-28 Thread Leon Rosenberg
J2ee solution? 

How i do it:

executeAction is called first, it puts executing flag into session, starts
the execution process,  and redirects to a wait action

Wait action checks whether the execution is complete and presents a wait
screen, with rotating image, if not. It also contains 
 
so, the browser sends requests to the wait action again.

If the process is finished, waitAction redirects to a successAction or an
errorAction, depending on the results of the process.

Regards
Leon



> -Ursprüngliche Nachricht-
> Von: Carl Smith [mailto:[EMAIL PROTECTED] 
> Gesendet: Montag, 28. März 2005 17:07
> An: Struts Users Mailing List
> Betreff: waiting page
> 
> 
> I am trying to develop a waiting page when the submit button 
> is clicked on. The waiting page will be simply some dynamic 
> images rotating indicating the process on going. When the 
> process behind the scene is done, the waiting page is done too.
> 
> Do you folks have a J2EE solution? Thanks.
> 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection 
> around http://mail.yahoo.com 
> 



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



Re: waiting page

2005-03-28 Thread Leon Rosenberg
J2ee solution? 

How i do it:

executeAction is called first, it puts executing flag into session, starts
the execution process,  and redirects to a wait action

Wait action checks whether the execution is complete and presents a wait
screen, with rotating image, if not. It also contains 
 
so, the browser sends requests to the wait action again.

If the process is finished, waitAction redirects to a successAction or an
errorAction, depending on the results of the process.

Regards
Leon



> -Ursprüngliche Nachricht-
> Von: Carl Smith [mailto:[EMAIL PROTECTED] 
> Gesendet: Montag, 28. März 2005 17:07
> An: Struts Users Mailing List
> Betreff: waiting page
> 
> 
> I am trying to develop a waiting page when the submit button 
> is clicked on. The waiting page will be simply some dynamic 
> images rotating indicating the process on going. When the 
> process behind the scene is done, the waiting page is done too.
> 
> Do you folks have a J2EE solution? Thanks.
> 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection 
> around http://mail.yahoo.com 
> 



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



waiting page

2005-03-28 Thread Carl Smith

I am trying to develop a waiting page when the submit button is clicked on. The 
waiting page will be simply some dynamic images rotating indicating the process 
on going. When the process behind the scene is done, the waiting page is done 
too.

Do you folks have a J2EE solution? Thanks.



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Links to external files not in web application

2005-03-28 Thread Brad Balmer
Please feel free to scold me if I'm missing something obvious but I can't
think of a way to link to files (specifically pdf's) that have already been
generated and are sitting in a folder external to any web application.

I've tried to create a symbolic link to the directory inside my web
application and then link to them as if they were inside the application but
my application doesn't see them.

Am I missing something or is this not as easy as it seems.

Thanks.


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



Re: URGENT: unspecified() method is having null form

2005-03-28 Thread nitin dubey
Thanks Saulo for your reply,  here is the code for
config and html:form

struts-config.xml
~






  
 
  



Main.jsp

 
  



Regards,


Nitin Dubey

--- Eugênio Saulo <[EMAIL PROTECTED]> wrote:
> Check your  definition and
> the definition of
> the  it uses.
> Maybe if you paste it here we could help you.
> 
> Regards,
> Eugênio Saulo
> 
> 
> On Mon, 28 Mar 2005 01:39:21 -0800 (PST), nitin
> dubey
> <[EMAIL PROTECTED]> wrote:
> > Hello,
> > 
> > I am using DispatchAction for my application. 
> When I
> > use the URL
> > "http://localhost:8080/myapp/admin/main.do"; it
> > directly hits the unspecified() method first where
> I
> > am trying to populate the action form.  The
> ActionForm
> > object I am getting in the unspecified() method is
> > null always.
> > 
> > Anyone who can tell me why is this happening ? 
> And
> > can I use the action form itself to store some
> > different values that are NOT the controls in HTML
> and
> > access them in the JSP to display the contents ? 
> OR
> > do I have to go for something like domain objects
> that
> > I have to put in the session scope and access them
> in
> > JSP ?
> > 
> > Please suggest..
> > 
> > Regards,
> > 
> > Nitin Dubey
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! Mail - 250MB free storage. Do more. Manage
> less.
> > http://info.mail.yahoo.com/mail_250
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> >
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: URGENT: unspecified() method is having null form

2005-03-28 Thread Eugênio Saulo
Check your  definition and the definition of
the  it uses.
Maybe if you paste it here we could help you.

Regards,
Eugênio Saulo


On Mon, 28 Mar 2005 01:39:21 -0800 (PST), nitin dubey
<[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I am using DispatchAction for my application.  When I
> use the URL
> "http://localhost:8080/myapp/admin/main.do"; it
> directly hits the unspecified() method first where I
> am trying to populate the action form.  The ActionForm
> object I am getting in the unspecified() method is
> null always.
> 
> Anyone who can tell me why is this happening ?  And
> can I use the action form itself to store some
> different values that are NOT the controls in HTML and
> access them in the JSP to display the contents ?  OR
> do I have to go for something like domain objects that
> I have to put in the session scope and access them in
> JSP ?
> 
> Please suggest..
> 
> Regards,
> 
> Nitin Dubey
> 
> __
> Do you Yahoo!?
> Yahoo! Mail - 250MB free storage. Do more. Manage less.
> http://info.mail.yahoo.com/mail_250
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



RE: download finished

2005-03-28 Thread Günther Wieser
how do you send the file to the user? is it going through a servlet, or is
it just "normal file download" through e.g. apache? in the later case, it
will get complicated
easy solution is to serve the file through a servlet, and if your servlet
doesn't get any ioexception during sending the file, and exits normally from
eg. doGet() or doPost(), than the file should've been received by the user's
browser. but there is still a small chance that the user didn't get it if
there is a proxy inbetween, which gets the whole file even if the user
cancels the download. but normaly that shouldn't happen as most proxies do
not cache files, expecially if you set the cache http headers correctly.

kr,
guenther


--
Günther Wieser

creative-it
Guglgasse 6/1/11/1
A-1110 Wien
Austria
http://www.creative-it.com


-Original Message-
From: Kelly C. Goedert [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 1:13 PM
To: user@struts.apache.org
Subject: download finished

Hi

I have an application that allows users to download some files. Is it
possible to know if the download finished correctly (if the file was really
received by the user)?

Kelly.

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




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



Re: DispatchAction defaults

2005-03-28 Thread Dave Newton
I think that's the one she was referring to, and apparently it was 
exactly what he needed ;)

Dakota Jack wrote:
Not sure what you mean here, but there is an "unspecified" method for
methods that are unspecified.
Jack
On Sun, 27 Mar 2005 08:57:39 -0800, Nic Werner <[EMAIL PROTECTED]> wrote:
 

That was exactly what I needed, thanks Wendy.
Wendy Smoak wrote:
   

From: "Nic Werner" <[EMAIL PROTECTED]>
 

I call this with: addDevice.do?method=edit
and: addDevice.do?method=update
The param for the first page seems a bit extraneous, is there a way
that DispatchAction can just call a default method if the param isn't
specified? I would like to just call: addDevice.do and have it bring
up the form. I haven't seen mention of this practice or ability in
any docs.
   

Take a look at DispatchAction.unspecified(...)
http://struts.apache.org/api/org/apache/struts/actions/DispatchAction.html
(And just looking ahead:  are you using any JavaScript?  I remember
having trouble with either "method" or "action" as a form element
name.  If you're trying to set the value of one of those as a form
property, it seems that there is confusion between the action and
method attributes of the  tag vs. actual form elements with
those names.)
 

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


 




download finished

2005-03-28 Thread Kelly C. Goedert
Hi
I have an application that allows users to download some files. Is it 
possible to know if the download finished correctly (if the file was 
really received by the user)?

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


Re: DispatchAction defaults

2005-03-28 Thread nitin dubey
That's what I am trying to do in my application.  I
know this works.  You can have the code to load the
form in the same Action as unspecified method.  When
you use the .do directly in URL it will hit the
unspecified method.  Then in the unspecified method
you can pre-populate the action form and then the JSP
can come pre-populated with these fields.

The problem I am facing is my unspecified() is always
giving me a null ActionForm object.

Any solutions ?


Regards,


Nitin Dubey


--- Dakota Jack <[EMAIL PROTECTED]> wrote:
> Not sure what you mean here, but there is an
> "unspecified" method for
> methods that are unspecified.
> 
> Jack
> 
> 
> On Sun, 27 Mar 2005 08:57:39 -0800, Nic Werner
> <[EMAIL PROTECTED]> wrote:
> > That was exactly what I needed, thanks Wendy.
> > 
> > Wendy Smoak wrote:
> > 
> > > From: "Nic Werner" <[EMAIL PROTECTED]>
> > >
> > >> I call this with: addDevice.do?method=edit
> > >> and: addDevice.do?method=update
> > >>
> > >> The param for the first page seems a bit
> extraneous, is there a way
> > >> that DispatchAction can just call a default
> method if the param isn't
> > >> specified? I would like to just call:
> addDevice.do and have it bring
> > >> up the form. I haven't seen mention of this
> practice or ability in
> > >> any docs.
> > >
> > >
> > > Take a look at DispatchAction.unspecified(...)
> > >
>
http://struts.apache.org/api/org/apache/struts/actions/DispatchAction.html
> > >
> > >
> > > (And just looking ahead:  are you using any
> JavaScript?  I remember
> > > having trouble with either "method" or "action"
> as a form element
> > > name.  If you're trying to set the value of one
> of those as a form
> > > property, it seems that there is confusion
> between the action and
> > > method attributes of the  tag vs. actual
> form elements with
> > > those names.)
> > >
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -- 
> "You can lead a horse to water but you cannot make
> it float on its back."
> ~Dakota Jack~
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



URGENT: unspecified() method is having null form

2005-03-28 Thread nitin dubey
Hello,

I am using DispatchAction for my application.  When I
use the URL
"http://localhost:8080/myapp/admin/main.do"; it
directly hits the unspecified() method first where I
am trying to populate the action form.  The ActionForm
object I am getting in the unspecified() method is
null always.

Anyone who can tell me why is this happening ?  And
can I use the action form itself to store some
different values that are NOT the controls in HTML and
access them in the JSP to display the contents ?  OR
do I have to go for something like domain objects that
I have to put in the session scope and access them in
JSP ?

Please suggest..

Regards,


Nitin Dubey





__ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

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