RE: [OT] Web Services, what have I done?

2003-08-21 Thread Ajay Patil
Dear Greg,

As I understand, web services have similar goal as what you have done
i.e to allow remote systems to invoke an area of an app's functionality.

Your invocation.dtd and response.dtd seem similar to SOAP envelopes.

Consider a service to enter customer Orders at the url
http://www.xyz.com/OrderEntry

To invoke the above service, the client needs to know the method
names and the arguments that it takes.

The web service standard allows the client to query the server to
find the method names and arguments.

For example: http://www.xyz.com/OrderEntry?WSDL
This return an XML file that describes the methods and arguments.
It is in WSDL format (Web Services Description Language)

This means that to build a new client, you only need to know the URL
of web service. You can query and find the supported methods, arguments
and then build apps that invoke those methods. Otherwise, you need
some documentation of the server-side methods.

WSDL (the standard) allows objects, arrays, multi-dimensional arrays,
etc to be passed as arguments.

I hope this is useful to you. Perhaps, you have a better insight as
you have already implemented an RPC-protocol on your own.

Regards,
Ajay

-Original Message-
From: Greg Hess [mailto:[EMAIL PROTECTED]
Sent: Thursday, 21 August 2003 03:11
To: Struts
Subject: [OT] Web Services, what have I done?


Hi All,

This post might seem odd but I am looking for some insight into a 
solution
that I have implemented. I am trying to get a better understanding of 
how my
implementation fits into the grand scheme of a Web Service and how I 
might
document this implementation. I have been reading about WSDL and about 
SOAP
and am still not sure what I have done J, and how my implementation is
compatible or not compatible with what the industry is calling a Web 
Service
mainly for documentation purposes even though I would love to build this
functionality based on industry standards.

I have built a web app using STRUTS of course that allows for external
remote systems to invoke RPC's (Remote Procedure Call) on an area of the
apps functionality. I allow remote systems to communicate using XML over
HTTP POST. Communication involves the invocation request and response. I
have created a invocation.dtd that defines the invocation data 
structure and
all the supported methods and arguments and the response.dtd that 
defines
the result data structure returned by any invocation.
As far as I can understand so far this is very similar to a SOAP 
envelope.

The client of this implementation builds the invocation XML data 
structure
as defined by invocation.dtd, opens a connection to defined URL and 
writes
the XML invocation directly to the connections OutputStream and reads 
the
XML response directly from the connections InputStream.

Having built this implementation and ducking the learning curve of Web
Services, SOAP implementation because I found it difficult to implement 
with
my shaky understanding of Web Services I am hoping that I might now be 
able
to get a better understanding of Web Services and how they relate to 
what I
have done in the hopes that I might get inline with the industry and 
write
great software and document what I have done J.

Any insight is greatly appreciated.

Kind Regards,

Greg Hess
Software Engineer
Wrapped Apps Corporation
275 Michael Cowpland Dr.
Suite 201
Ottawa, Ontario
K2M 2G2
Tel: (613) 591 -7552
Fax: (613) 591-0523
1 (877) 388-6742



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



How to set charset UTF-8

2003-08-21 Thread Billy Ng
Hi folks,

I added the following to test what encoding my Struts app is using

<%  
   response.setContentType("text/html; charset=UTF-8");
   System.out.println(response.getCharacterEncoding());
%>

But it still print out the "ISO-8859-1", why?  How can I set the contentType to 
"text/html; charset=UTF-8"

Thanks!

Billy Ng


This mailbox protected from junk email by Matador
from MailFrontier, Inc. http://info.mailfrontier.com


Re: setUserPrincipal or something like that if u have a selfregistrationbutton.

2003-08-21 Thread Marius Oancea
Hi,
   Should not be a big task to put the
SecurityRequestWrapper request on the request as a attribute into securityfilter code.

Max Cooper wrote:

Marius,

I know this is something that would be very useful to have, but I haven't
given it too much thought about how to implement it yet.
I do have a few tips:

1) Don't cast the current request to SecurityRequestWrapper.

// don't do this
SecurityRequestWrapper srw = (SecurityRequestWrapper) request;
This won't work if the app server decides to wrap the request (JRun does
this, and I assume other containers might do it, too). It will also break if
you add another filter to the system that wraps the request. Casting like
this is a bad idea, and it makes your code fragile.
However, it would be nice to offer the request processors (other filters,
servlets, etc.) access to an "extended" request API, that perhaps includes a
method to programmatically log the current user in. I have thought about
this a bit, and my current thinking is that a reference to the
SecurityRequestWrapper should be placed in the request scope so that any
code "down the pipeline" can access it, even if the request gets wrapped
again. Here's an example of how that might work:
// NOTE: This code will NOT work with the current release of SecurityFilter!
// It is intended only as an example of how it might work in the future.
// get a reference to the SecurityRequestWrapper
SecurityRequestWrapper srw = (SecurityRequestWrapper)
  request.getAttribute(SecurityRequestWrapper.REQUEST_KEY);
// log the current user in
srw.login("username", "password");
2) If you do decide to call setUserPrincipal() directly, you will want to
set the Principal by getting it from the current SecurityRealm, just like
SecurityFilter does.
I hope we have a solution for this problem in the future. I welcome your
feedback.
-Max

- Original Message - 
From: "Marius Oancea" <[EMAIL PROTECTED]>
To: "Marius Oancea" <[EMAIL PROTECTED]>
Sent: Tuesday, August 19, 2003 11:13 PM
Subject: setUserPrincipal or something like that if u have a
selfregistration button.

 

Hi,
I have a webapp made with struts and securityfilter using BasicAuth.
All worked like a charm but:
How can i log in (or authenticate) the user after createUser process
is complete?
In other words:
- I have a button (free registration). The user will enter his data
and after that I want to automatically login that user. Is that
possible? I looked for a setUserPrincipal but i'm not able to access
that form an action.
Thanx

Marius Oancea

--
"Why program by hand in five days what you can spend five years of your
life automating." - Terence Parr
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   

 



--
"Why program by hand in five days what you can spend five years of your life 
automating." - Terence Parr


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


Re: login request

2003-08-21 Thread Andy Richards
Thank you ...

I would liked to have used a filter as this was my first idea, however my 
clients app must be deployed onto their raq550 server which supports only 
tomcat 3. I believe only tomcat 4 supports filters(or the servlet spec it 
uses)? I believe i will follow davids example and extend the base action 
class as this seems to be my only option. This dosnt seem as elegent as a 
filter but does seems to be the most elegent alternative thanks david : ), 
unless anyone else has any better ideas?

Most helpful allthanks again

Andy

On Wednesday 20 Aug 2003 2:41 pm, David G. Friedman wrote:
> Dear Andy,
>
> I'm doing the same thing you suggest.  My approach is
> to extend the base Action (or any type of Action) class
> by adding a functon 'checkLogin'.  It takes the 'request'
> as the argument, checks the session for a User bean, and
> throws an exception if the bean is missing or if the ID
> number on the bean is zero/unset.  In my execute() method
> I make my first line 'checkLogin(request)' and it handles
> my authentication.
>
> If you try this approach, keep in mind I'm using Struts
> v1.1 final so I can use exceptions.
>
> Tonight I'm going to try switching it to an interface so
> I can use it to extend any action type by using 3 lines
> (and without sub-classing):
>
> 1. import com.mycompany.auth.LoginCheck;
> 2. public class MyAction extends Action implements LoginCheck
> 3. checkLogin(request) <--- 1st line from within the execute
> or DispatchAction, or LookupDispatchAction method, etc.
>
> Regards,
> David
>
> ---Original Message---
> From: Andy Richards <[EMAIL PROTECTED]>
> Sent: 08/20/03 09:46 AM
> To: [EMAIL PROTECTED]
> Subject: login request
>
> > Hi, i have created a form and a action which checks to see if a user
>
> exists
> in
> my database and if so a value object is placed into the session. What i am
>
>
> unsure of is how to a action called everytime a request is made? Can i
> configure struts-config.xml to send all requests via an action to see if
> this
> session object exists, and if not redirect the user to the login page?
>
> many thanks
>
> Andy

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



Re: Problem on displaying table keys, please help

2003-08-21 Thread Mark Lowe
Not sure about how you've named you methods for one..

for

getIndustryId()



This has always been the case with JSP tags even if you use



if you dislike the lowercaseization(such a credit to the english 
language :o) ) of the first letter you could revert to

<%= Detail.getIndustryId() %>

or something like this in jstl (not sure how the casing works).



I'm not sure whether there's a standard for naming the objects you 
scope. But as I don't know I wont say. In terms of conventions "Detail" 
would be "detail" but I dont know if this is merely style rather than 
standard.

Cheers Mark

On Thursday, August 21, 2003, at 06:25 AM, Andy Cheng wrote:

When I try to display a value from the action form, I use 
tag, it is fine for Strings, dates etc, but it is not for tables keys,
such as:

which will give me 1,2,3,4 etc. I have some HashMap in the
servletContext already, they contain the content of these small tables.
Would someone please suggest me an easy way of doing this?  Thanks
Andy


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


Re: login request + ActionServlet RequestProcessor Action

2003-08-21 Thread Andy Richards
Hi

After deciding which approach to take and reading a few of my struts books 
about the controller object ; ) I am now confused as which is the most 
appropriate class to extend to perform my login functionality. David suggests 
extending the base action class, however i have read that the 
RequestProcessor class was added to struts1.1 to extend the ActionServlet. 
From what i can see this class handles all requests and one of its methods 
calls the appropriate action. Therefore which would be the better class to 
extend  ActionServlet, RequestProcessor or Action. Any ideas.?

thanks

Andy

On Wednesday 20 Aug 2003 2:41 pm, David G. Friedman wrote:
> Dear Andy,
>
> I'm doing the same thing you suggest.  My approach is
> to extend the base Action (or any type of Action) class
> by adding a functon 'checkLogin'.  It takes the 'request'
> as the argument, checks the session for a User bean, and
> throws an exception if the bean is missing or if the ID
> number on the bean is zero/unset.  In my execute() method
> I make my first line 'checkLogin(request)' and it handles
> my authentication.
>
> If you try this approach, keep in mind I'm using Struts
> v1.1 final so I can use exceptions.
>
> Tonight I'm going to try switching it to an interface so
> I can use it to extend any action type by using 3 lines
> (and without sub-classing):
>
> 1. import com.mycompany.auth.LoginCheck;
> 2. public class MyAction extends Action implements LoginCheck
> 3. checkLogin(request) <--- 1st line from within the execute
> or DispatchAction, or LookupDispatchAction method, etc.
>
> Regards,
> David
>
> ---Original Message---
> From: Andy Richards <[EMAIL PROTECTED]>
> Sent: 08/20/03 09:46 AM
> To: [EMAIL PROTECTED]
> Subject: login request
>
> > Hi, i have created a form and a action which checks to see if a user
>
> exists
> in
> my database and if so a value object is placed into the session. What i am
>
>
> unsure of is how to a action called everytime a request is made? Can i
> configure struts-config.xml to send all requests via an action to see if
> this
> session object exists, and if not redirect the user to the login page?
>
> many thanks
>
> Andy

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



RE: [OT ]Re: jstl:fmt i18n weirdness

2003-08-21 Thread Paul McCulloch
Thanks Yann

-Original Message-
From: Yann Cébron [mailto:[EMAIL PROTECTED]
Sent: 20 August 2003 19:19
To: [EMAIL PROTECTED]
Subject: [OT ]Re: jstl:fmt i18n weirdness


> I'm experiencing werdness with localised fmt:message calls. It appears
that

This tag has nothing do to with Struts, so please ask on the taglibs-user
mailing-list. I remember seeing a couple of messages regarding this problem,
so you might find an answer in the archives.

Yann




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


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.


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



RE: RE : Remote and local EJB

2003-08-21 Thread Viral_Thakkar
If we know that EJBs and struts classes will reside in same JVM then why we should 
also invoke the stateless session bean remotely? We can invoke that session bean using 
the local interface... rite .?

Although I agree that in furure, we may deploy web and app classes on different 
machines, so that's why I am looking for a solution where we can take advantage of 
both local and remote interface of EJB.

I would say we should prefer the local EJB call instead of remote EJB call as far as 
possible. 

Viral







-Original Message-
From: Shashank Dixit [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 10:29 AM
To: Struts Users Mailing List; Viral_Thakkar; [EMAIL PROTECTED]
Subject: RE: RE : Remote and local EJB

Hi Viral

Ideally there should be one stateless session bean within action class and
business component EJBs so that you have only one remote call and all other
EJB calls are local. You should always program considering different tiers
on different machines, although you are using the web and app tier on same
machine now. Let me know what do you think on this.

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 9:40 AM
To: Struts Users Mailing List; Piper, James D CECOM SEC EPS
Subject: RE : Remote and local EJB


Thanks Jim.

I am using the oracle 9iAS. I also developed the EJB which supports both
remote and local access. I am also able to invoke this EJB from my action
class. I accessed this EJB using the remote and also using local interface
separately.

The reason why I want this EJB to be deployed both as local and remote is
that at present EJB will be accessed by the struts action class, both are in
same JVM so I can access the EJB using the local interface.

In future when we do clustering then at that time, EJB bean may be at
different server, in different JVM, at that time struts action class should
dynamically find the remote EJB.

One way I think, we can handle such situation in the catch block of the
NamingException() while accessing the local bean, we need to lookup the
remote EJB. But it seems that this is not the good programming practice.

So I am looking for some design pattern or framework, which supports the
solution to this problem.

Thanks,
Viral


-Original Message-
From: Piper, James D CECOM SEC EPS
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 7:49 PM
To: Viral_Thakkar
Subject: RE: RE : Remote and local EJB

So let me see if I understand what it is you are wanting to accomplish.  It
sounds like you have a bunch of EJBs, a Struts application and several
servers.  You would like http requests coming in to be 'evaluated' by your
application and then based on some information within that request (i.e.
users name, users ip address, users browsers type, users preference
selection, or possibly even the current servers load) invoke either a local
or a remote EJB.  For example maybe you have an EJB that does some realy
heavy calculatations like a ray-tracer and for some important users you want
the results to come back faster than for other less important users.  So you
make your ray tracing EJB and deploy it on both the local server (i.e. the
same one running your Struts app) and on some other EJB server far far away.
Then register them both in your ejb-jar.xml with different names ie.
RayTraceLocal and RayTraceRemote.  So now to access either the remote or the
local EJB depending on the request you write your Struts action class to
first evaluate the HTTP request to figure out if this request is coming from
the important user or not and then as appropriate either do your jndi lookup
for the RayTraceLocal or the RayTraceRemote.

As far as I know there is not any built in mechanics within Struts for doing
this kind of thing, its up to you to write an Action class that invokes the
backend EJB you want.  I think some EJB servers give you some flexability
and increase performance when using EJBs that are within the same container
- WebLogic I know lets you specify both a remote and a local name for each
EJB then provides better performance when using the local one - Possible
even the high end WebLogic stuff will do automatic load balancing between
EJB server so that your calls to jndi lookup return references to EJBs on
whatever server is being currently used less.  But these kind of load
balancing issues you would need to talk with your EJB server provider and
then build your Struts actions to invkoke those EJBs in the way the EJB
server provider specified to get the benefits of load balancing.

Good Luck,
Jim Piper






-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 8:27 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE : Remote and local EJB


Thanks for the reply.

I agree with 

Re: login request + ActionServlet RequestProcessor Action

2003-08-21 Thread Kok Wei, Koh
Hi Andy,

I guess the decision boils down to how your application is going to be 
written. For a project I worked on couple of weeks back, I ran into a 
problem where one of my Actions needs to extend a class to inherit some 
functionality, but I was stucked because I need to extend my 
"AuthenticationAction" which handles all my user login stuff.

I can't extend from 2 classes, right? I then went on to research the 
RequestProcessor. I used tiles of Struts 1.1 in my project so what I did 
was I ported the "AuthenticationAction" code to say 
"AuthenticationRequestProcessor" and it extends "TilesRequestProcessor" 
which extends the Struts "RequestProcessor".

So it all depends on if you're gonna run into problems like this?

My 2 cents. Hope this helps.

Andy Richards wrote:
Hi

After deciding which approach to take and reading a few of my struts books 
about the controller object ; ) I am now confused as which is the most 
appropriate class to extend to perform my login functionality. David suggests 
extending the base action class, however i have read that the 
RequestProcessor class was added to struts1.1 to extend the ActionServlet. 
From what i can see this class handles all requests and one of its methods 
calls the appropriate action. Therefore which would be the better class to 
extend  ActionServlet, RequestProcessor or Action. Any ideas.?

thanks

Andy

On Wednesday 20 Aug 2003 2:41 pm, David G. Friedman wrote:

Dear Andy,

I'm doing the same thing you suggest.  My approach is
to extend the base Action (or any type of Action) class
by adding a functon 'checkLogin'.  It takes the 'request'
as the argument, checks the session for a User bean, and
throws an exception if the bean is missing or if the ID
number on the bean is zero/unset.  In my execute() method
I make my first line 'checkLogin(request)' and it handles
my authentication.
If you try this approach, keep in mind I'm using Struts
v1.1 final so I can use exceptions.
Tonight I'm going to try switching it to an interface so
I can use it to extend any action type by using 3 lines
(and without sub-classing):
1. import com.mycompany.auth.LoginCheck;
2. public class MyAction extends Action implements LoginCheck
3. checkLogin(request) <--- 1st line from within the execute
or DispatchAction, or LookupDispatchAction method, etc.
Regards,
David
---Original Message---
From: Andy Richards <[EMAIL PROTECTED]>
Sent: 08/20/03 09:46 AM
To: [EMAIL PROTECTED]
Subject: login request

Hi, i have created a form and a action which checks to see if a user
exists
in
my database and if so a value object is placed into the session. What i am
unsure of is how to a action called everytime a request is made? Can i
configure struts-config.xml to send all requests via an action to see if
this
session object exists, and if not redirect the user to the login page?
many thanks

Andy


-
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: RE : Remote and local EJB

2003-08-21 Thread Shashank Dixit
You can have properties file where you can define which interface should you
consider for calling EJBs. SO that you dont have to change your code to
serve your purpose.
Let me know what do you think

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 11:30 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: RE : Remote and local EJB


If we know that EJBs and struts classes will reside in same JVM then why we
should also invoke the stateless session bean remotely? We can invoke that
session bean using the local interface... rite .?

Although I agree that in furure, we may deploy web and app classes on
different machines, so that's why I am looking for a solution where we can
take advantage of both local and remote interface of EJB.

I would say we should prefer the local EJB call instead of remote EJB call
as far as possible.

Viral







-Original Message-
From: Shashank Dixit [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 10:29 AM
To: Struts Users Mailing List; Viral_Thakkar;
[EMAIL PROTECTED]
Subject: RE: RE : Remote and local EJB

Hi Viral

Ideally there should be one stateless session bean within action class and
business component EJBs so that you have only one remote call and all other
EJB calls are local. You should always program considering different tiers
on different machines, although you are using the web and app tier on same
machine now. Let me know what do you think on this.

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 9:40 AM
To: Struts Users Mailing List; Piper, James D CECOM SEC EPS
Subject: RE : Remote and local EJB


Thanks Jim.

I am using the oracle 9iAS. I also developed the EJB which supports both
remote and local access. I am also able to invoke this EJB from my action
class. I accessed this EJB using the remote and also using local interface
separately.

The reason why I want this EJB to be deployed both as local and remote is
that at present EJB will be accessed by the struts action class, both are in
same JVM so I can access the EJB using the local interface.

In future when we do clustering then at that time, EJB bean may be at
different server, in different JVM, at that time struts action class should
dynamically find the remote EJB.

One way I think, we can handle such situation in the catch block of the
NamingException() while accessing the local bean, we need to lookup the
remote EJB. But it seems that this is not the good programming practice.

So I am looking for some design pattern or framework, which supports the
solution to this problem.

Thanks,
Viral


-Original Message-
From: Piper, James D CECOM SEC EPS
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 7:49 PM
To: Viral_Thakkar
Subject: RE: RE : Remote and local EJB

So let me see if I understand what it is you are wanting to accomplish.  It
sounds like you have a bunch of EJBs, a Struts application and several
servers.  You would like http requests coming in to be 'evaluated' by your
application and then based on some information within that request (i.e.
users name, users ip address, users browsers type, users preference
selection, or possibly even the current servers load) invoke either a local
or a remote EJB.  For example maybe you have an EJB that does some realy
heavy calculatations like a ray-tracer and for some important users you want
the results to come back faster than for other less important users.  So you
make your ray tracing EJB and deploy it on both the local server (i.e. the
same one running your Struts app) and on some other EJB server far far away.
Then register them both in your ejb-jar.xml with different names ie.
RayTraceLocal and RayTraceRemote.  So now to access either the remote or the
local EJB depending on the request you write your Struts action class to
first evaluate the HTTP request to figure out if this request is coming from
the important user or not and then as appropriate either do your jndi lookup
for the RayTraceLocal or the RayTraceRemote.

As far as I know there is not any built in mechanics within Struts for doing
this kind of thing, its up to you to write an Action class that invokes the
backend EJB you want.  I think some EJB servers give you some flexability
and increase performance when using EJBs that are within the same container
- WebLogic I know lets you specify both a remote and a local name for each
EJB then provides better performance when using the local one - Possible
even the high end WebLogic stuff will do automatic load balancing between
EJB server so that your calls to jndi lookup return references to EJBs on
whatev

RE : Remote and local EJB

2003-08-21 Thread Viral_Thakkar
This seems to be good idea. 

I think EJB configuration files may also help us to achieve the same.



-Original Message-
From: Shashank Dixit [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 2:29 PM
To: Viral_Thakkar; Struts Users Mailing List
Subject: RE: RE : Remote and local EJB

You can have properties file where you can define which interface should you
consider for calling EJBs. SO that you dont have to change your code to
serve your purpose.
Let me know what do you think

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 11:30 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: RE : Remote and local EJB


If we know that EJBs and struts classes will reside in same JVM then why we
should also invoke the stateless session bean remotely? We can invoke that
session bean using the local interface... rite .?

Although I agree that in furure, we may deploy web and app classes on
different machines, so that's why I am looking for a solution where we can
take advantage of both local and remote interface of EJB.

I would say we should prefer the local EJB call instead of remote EJB call
as far as possible.

Viral







-Original Message-
From: Shashank Dixit [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 10:29 AM
To: Struts Users Mailing List; Viral_Thakkar;
[EMAIL PROTECTED]
Subject: RE: RE : Remote and local EJB

Hi Viral

Ideally there should be one stateless session bean within action class and
business component EJBs so that you have only one remote call and all other
EJB calls are local. You should always program considering different tiers
on different machines, although you are using the web and app tier on same
machine now. Let me know what do you think on this.

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 9:40 AM
To: Struts Users Mailing List; Piper, James D CECOM SEC EPS
Subject: RE : Remote and local EJB


Thanks Jim.

I am using the oracle 9iAS. I also developed the EJB which supports both
remote and local access. I am also able to invoke this EJB from my action
class. I accessed this EJB using the remote and also using local interface
separately.

The reason why I want this EJB to be deployed both as local and remote is
that at present EJB will be accessed by the struts action class, both are in
same JVM so I can access the EJB using the local interface.

In future when we do clustering then at that time, EJB bean may be at
different server, in different JVM, at that time struts action class should
dynamically find the remote EJB.

One way I think, we can handle such situation in the catch block of the
NamingException() while accessing the local bean, we need to lookup the
remote EJB. But it seems that this is not the good programming practice.

So I am looking for some design pattern or framework, which supports the
solution to this problem.

Thanks,
Viral


-Original Message-
From: Piper, James D CECOM SEC EPS
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 7:49 PM
To: Viral_Thakkar
Subject: RE: RE : Remote and local EJB

So let me see if I understand what it is you are wanting to accomplish.  It
sounds like you have a bunch of EJBs, a Struts application and several
servers.  You would like http requests coming in to be 'evaluated' by your
application and then based on some information within that request (i.e.
users name, users ip address, users browsers type, users preference
selection, or possibly even the current servers load) invoke either a local
or a remote EJB.  For example maybe you have an EJB that does some realy
heavy calculatations like a ray-tracer and for some important users you want
the results to come back faster than for other less important users.  So you
make your ray tracing EJB and deploy it on both the local server (i.e. the
same one running your Struts app) and on some other EJB server far far away.
Then register them both in your ejb-jar.xml with different names ie.
RayTraceLocal and RayTraceRemote.  So now to access either the remote or the
local EJB depending on the request you write your Struts action class to
first evaluate the HTTP request to figure out if this request is coming from
the important user or not and then as appropriate either do your jndi lookup
for the RayTraceLocal or the RayTraceRemote.

As far as I know there is not any built in mechanics within Struts for doing
this kind of thing, its up to you to write an Action class that invokes the
backend EJB you want.  I think some EJB servers give you some flexability
and increase performance when using EJBs that are within the same container

Re: login request + ActionServlet RequestProcessor Action

2003-08-21 Thread Andy Richards
Hi Kok

Good point, never thought about that! One point towards extending the 
requestProcessor then, as if i am right i configure this in my 
struts-config.xml and dont need to extend it from every action class.

Thanks

Andy

On Thursday 21 Aug 2003 10:26 am, Kok Wei, Koh wrote:
> Hi Andy,
>
> I guess the decision boils down to how your application is going to be
> written. For a project I worked on couple of weeks back, I ran into a
> problem where one of my Actions needs to extend a class to inherit some
> functionality, but I was stucked because I need to extend my
> "AuthenticationAction" which handles all my user login stuff.
>
> I can't extend from 2 classes, right? I then went on to research the
> RequestProcessor. I used tiles of Struts 1.1 in my project so what I did
> was I ported the "AuthenticationAction" code to say
> "AuthenticationRequestProcessor" and it extends "TilesRequestProcessor"
> which extends the Struts "RequestProcessor".
>
> So it all depends on if you're gonna run into problems like this?
>
> My 2 cents. Hope this helps.
>
> Andy Richards wrote:
> > Hi
> >
> > After deciding which approach to take and reading a few of my struts
> > books about the controller object ; ) I am now confused as which is the
> > most appropriate class to extend to perform my login functionality. David
> > suggests extending the base action class, however i have read that the
> > RequestProcessor class was added to struts1.1 to extend the
> > ActionServlet. From what i can see this class handles all requests and
> > one of its methods calls the appropriate action. Therefore which would be
> > the better class to extend  ActionServlet, RequestProcessor or Action.
> > Any ideas.?
> >
> > thanks
> >
> > Andy
> >
> > On Wednesday 20 Aug 2003 2:41 pm, David G. Friedman wrote:
> >>Dear Andy,
> >>
> >>I'm doing the same thing you suggest.  My approach is
> >>to extend the base Action (or any type of Action) class
> >>by adding a functon 'checkLogin'.  It takes the 'request'
> >>as the argument, checks the session for a User bean, and
> >>throws an exception if the bean is missing or if the ID
> >>number on the bean is zero/unset.  In my execute() method
> >>I make my first line 'checkLogin(request)' and it handles
> >>my authentication.
> >>
> >>If you try this approach, keep in mind I'm using Struts
> >>v1.1 final so I can use exceptions.
> >>
> >>Tonight I'm going to try switching it to an interface so
> >>I can use it to extend any action type by using 3 lines
> >>(and without sub-classing):
> >>
> >>1. import com.mycompany.auth.LoginCheck;
> >>2. public class MyAction extends Action implements LoginCheck
> >>3. checkLogin(request) <--- 1st line from within the execute
> >>or DispatchAction, or LookupDispatchAction method, etc.
> >>
> >>Regards,
> >>David
> >>
> >>---Original Message---
> >>From: Andy Richards <[EMAIL PROTECTED]>
> >>Sent: 08/20/03 09:46 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: login request
> >>
> >>>Hi, i have created a form and a action which checks to see if a user
> >>
> >>exists
> >>in
> >>my database and if so a value object is placed into the session. What i
> >> am
> >>
> >>
> >>unsure of is how to a action called everytime a request is made? Can i
> >>configure struts-config.xml to send all requests via an action to see if
> >>this
> >>session object exists, and if not redirect the user to the login page?
> >>
> >>many thanks
> >>
> >>Andy
> >
> > -
> > 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: login request + ActionServlet RequestProcessor Action

2003-08-21 Thread Navjot Singh
Although I am extending Action class as of now but
extending Requestprocessor should be a better choice. After all
ActionServlet, after all the initializations, delegates control to
RequestProcessor.

Let's keep ActionServlet only for one time inits.

hth
Navjot Singh


|-Original Message-
|From: Andy Richards [mailto:[EMAIL PROTECTED]
|Sent: Thursday, August 21, 2003 2:19 PM
|To: Struts Users Mailing List
|Subject: Re: login request + ActionServlet RequestProcessor Action
|
|
|Hi
|
|After deciding which approach to take and reading a few of my struts books
|about the controller object ; ) I am now confused as which is the most
|appropriate class to extend to perform my login functionality.
|David suggests
|extending the base action class, however i have read that the
|RequestProcessor class was added to struts1.1 to extend the ActionServlet.
|From what i can see this class handles all requests and one of its methods
|calls the appropriate action. Therefore which would be the better class to
|extend  ActionServlet, RequestProcessor or Action. Any ideas.?
|
|thanks
|
|Andy
|
|On Wednesday 20 Aug 2003 2:41 pm, David G. Friedman wrote:
|> Dear Andy,
|>
|> I'm doing the same thing you suggest.  My approach is
|> to extend the base Action (or any type of Action) class
|> by adding a functon 'checkLogin'.  It takes the 'request'
|> as the argument, checks the session for a User bean, and
|> throws an exception if the bean is missing or if the ID
|> number on the bean is zero/unset.  In my execute() method
|> I make my first line 'checkLogin(request)' and it handles
|> my authentication.
|>
|> If you try this approach, keep in mind I'm using Struts
|> v1.1 final so I can use exceptions.
|>
|> Tonight I'm going to try switching it to an interface so
|> I can use it to extend any action type by using 3 lines
|> (and without sub-classing):
|>
|> 1. import com.mycompany.auth.LoginCheck;
|> 2. public class MyAction extends Action implements LoginCheck
|> 3. checkLogin(request) <--- 1st line from within the execute
|> or DispatchAction, or LookupDispatchAction method, etc.
|>
|> Regards,
|> David
|>
|> ---Original Message---
|> From: Andy Richards <[EMAIL PROTECTED]>
|> Sent: 08/20/03 09:46 AM
|> To: [EMAIL PROTECTED]
|> Subject: login request
|>
|> > Hi, i have created a form and a action which checks to see if a user
|>
|> exists
|> in
|> my database and if so a value object is placed into the session.
|What i am
|>
|>
|> unsure of is how to a action called everytime a request is made? Can i
|> configure struts-config.xml to send all requests via an action to see if
|> this
|> session object exists, and if not redirect the user to the login page?
|>
|> many thanks
|>
|> Andy
|
|-
|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: login request + ActionServlet RequestProcessor Action

2003-08-21 Thread Kok Wei, Koh
Yeah you should only need to define your custom 
AuthenticationRequestProcessor class which extends RequestProcessor in 
controller element of your struts-config.xml.

Andy Richards wrote:
Hi Kok

Good point, never thought about that! One point towards extending the 
requestProcessor then, as if i am right i configure this in my 
struts-config.xml and dont need to extend it from every action class.

Thanks

Andy

On Thursday 21 Aug 2003 10:26 am, Kok Wei, Koh wrote:

Hi Andy,

I guess the decision boils down to how your application is going to be
written. For a project I worked on couple of weeks back, I ran into a
problem where one of my Actions needs to extend a class to inherit some
functionality, but I was stucked because I need to extend my
"AuthenticationAction" which handles all my user login stuff.
I can't extend from 2 classes, right? I then went on to research the
RequestProcessor. I used tiles of Struts 1.1 in my project so what I did
was I ported the "AuthenticationAction" code to say
"AuthenticationRequestProcessor" and it extends "TilesRequestProcessor"
which extends the Struts "RequestProcessor".
So it all depends on if you're gonna run into problems like this?

My 2 cents. Hope this helps.

Andy Richards wrote:

Hi

After deciding which approach to take and reading a few of my struts
books about the controller object ; ) I am now confused as which is the
most appropriate class to extend to perform my login functionality. David
suggests extending the base action class, however i have read that the
RequestProcessor class was added to struts1.1 to extend the
ActionServlet. From what i can see this class handles all requests and
one of its methods calls the appropriate action. Therefore which would be
the better class to extend  ActionServlet, RequestProcessor or Action.
Any ideas.?
thanks

Andy

On Wednesday 20 Aug 2003 2:41 pm, David G. Friedman wrote:

Dear Andy,

I'm doing the same thing you suggest.  My approach is
to extend the base Action (or any type of Action) class
by adding a functon 'checkLogin'.  It takes the 'request'
as the argument, checks the session for a User bean, and
throws an exception if the bean is missing or if the ID
number on the bean is zero/unset.  In my execute() method
I make my first line 'checkLogin(request)' and it handles
my authentication.
If you try this approach, keep in mind I'm using Struts
v1.1 final so I can use exceptions.
Tonight I'm going to try switching it to an interface so
I can use it to extend any action type by using 3 lines
(and without sub-classing):
1. import com.mycompany.auth.LoginCheck;
2. public class MyAction extends Action implements LoginCheck
3. checkLogin(request) <--- 1st line from within the execute
or DispatchAction, or LookupDispatchAction method, etc.
Regards,
David
---Original Message---
From: Andy Richards <[EMAIL PROTECTED]>
Sent: 08/20/03 09:46 AM
To: [EMAIL PROTECTED]
Subject: login request

Hi, i have created a form and a action which checks to see if a user
exists
in
my database and if so a value object is placed into the session. What i
am
unsure of is how to a action called everytime a request is made? Can i
configure struts-config.xml to send all requests via an action to see if
this
session object exists, and if not redirect the user to the login page?
many thanks

Andy
-
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]



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


changes in application.properties does not vent itself ...

2003-08-21 Thread Jiri Chaloupka
Hallo,
i want to try to change some value in application.properties file :
welcome.title=myTest Application
but browser shows still the old value.
I was tied to restart application (unzipped war), application server 
(JBoss) and all computer too, but there is stil old value.

Where can be mistake?
my konfiguration:
Struts 1.1, JBoss 3.2.1 with Tomcat container, JDK SUN 1.4.2, OS Linux 
and Win too

Thanks, Jiri

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


Setting a Welcome File + Tiles + PreCompiled JSP's

2003-08-21 Thread Pat Quinn
I'm using tiles and i know i can't set the  attribute in 
web.xml to a tile definition or a struts action url. I'm also precompiling 
all my JSP's so i can't assign it to a JSP... i was thinking about assign it 
to a html file and then onLoad i could redirect to my logon action url... to 
do this i'd have to hard code the ipaddress and port number into my url so i 
don't really want to do that. Any ideas how i might do this?

_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

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


struts with SSLExt behind proxy

2003-08-21 Thread s m
Hello,

We are using apache as a proxy server in front of weblogic. Struts 
is used in the application with SSLExt. When request is forwarded 
within the application, control directly goes to weblogic skipping 
the proxy server.
i.e.
1) url: https://AppacheProxyServer/myapp/first.jsp
2) When any link or button clicked which involves struts, control 
goes to http://myWeblogicServer/myapp/second.jsp

I think it happens because struts does url rewriting while 
mapping. There may be other reason. How it can be managed to keep 
traffic through proxy server?

Please help.

Thank you.

Sandeep
___
Meet your old school or college friends from
1 Million + database...
Click here to reunite www.batchmates.com/rediff.asp


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


RE: Whats the security trick for not permiting the browser back button on SignOut?

2003-08-21 Thread Cezar Nasui
Hi Henry,

The problem I noticed is if you go Back to the first page after login and
make a refresh on that page  you will be able to navigate again in your app
as a  new session is created 'cause refresh re-post the login data.
Your app does that? Do you know any solution for this one?
I think with some JavaScript you can erase the history of the Back button. I
don;t recall exaclty the code but I'll look for it. What I want to know is
if it's a good method as we know we shouldn't rely on user's settings (ex.
Javascript not enabled).

Cezar

-Original Message-
From: Henry Voyer [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 7:30 PM
To: [EMAIL PROTECTED]
Subject: Whats the security trick for not permiting the browser back
button on SignOut?


Hi fellow Strutser

I have implemented securityFilter (http://securityFilter.org) in my struts
app.
But once i log off i can press the browsers back button and go back to the
users content page.
He cant do any action since the securityFilter dont let him but he can still
see the pages he already accessed.  i would like to know how to implement
the redirection to signIn page for the browser back button once he SignOut.

I have seen the examples of the Apache Admin site and the security app
examples but i cant find how they do this.

So guys whats the trick?

Regards and thanks for all those who worked on the securityFilter and struts
examples.

_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003


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



Re: Whats the security trick for not permiting the browser back buttonon SignOut?

2003-08-21 Thread Brad Balmer
I ran into a similar problem with my login application.  What I did was 
simply replace the page name that is put in the history with a page that 
I wanted.





Cezar Nasui wrote:

Hi Henry,

The problem I noticed is if you go Back to the first page after login and
make a refresh on that page  you will be able to navigate again in your app
as a  new session is created 'cause refresh re-post the login data.
Your app does that? Do you know any solution for this one?
I think with some JavaScript you can erase the history of the Back button. I
don;t recall exaclty the code but I'll look for it. What I want to know is
if it's a good method as we know we shouldn't rely on user's settings (ex.
Javascript not enabled).
Cezar

-Original Message-
From: Henry Voyer [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 7:30 PM
To: [EMAIL PROTECTED]
Subject: Whats the security trick for not permiting the browser back
button on SignOut?
Hi fellow Strutser

I have implemented securityFilter (http://securityFilter.org) in my struts
app.
But once i log off i can press the browsers back button and go back to the
users content page.
He cant do any action since the securityFilter dont let him but he can still
see the pages he already accessed.  i would like to know how to implement
the redirection to signIn page for the browser back button once he SignOut.
I have seen the examples of the Apache Admin site and the security app
examples but i cant find how they do this.
So guys whats the trick?

Regards and thanks for all those who worked on the securityFilter and struts
examples.
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003
-
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: [ANNOUNCE] Introduction to Hibernate by Norman Klein: 6:30pm on September 3rd in Mountain View

2003-08-21 Thread Mark Galbreath
it would be nice if this was a webinar

-Original Message-
From: Van Riper, Mike [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 20, 2003 9:51 PM
To: '[EMAIL PROTECTED]'
Subject: [ANNOUNCE] Introduction to Hibernate by Norman Klein: 6:30pm on
September 3rd in Mountain View


The next meeting of the Silicon Valley Struts User BOF is scheduled to take
place at VeriSign in Mountain View on Wednesday, September 3rd. You must
arrive between 6:30 and 7:00pm to register with VeriSign security as a
guest. Norman Klein, an independent software consultant, will present an
introduction to Hibernate. Hibernate is an open source data persistence
framework. Please refer to the online announcement for the details and
directions to the meeting site:

  http://www.baychi.org/bof/struts/20030903/

It is important that I get an accurate headcount in advance for meeting
facility planning purposes. So, please RSVP for the meeting by sending an
email to me with "Struts User September Meeting" as the subject.

Thanks, Van

Mike Van Riper
mailto:[EMAIL PROTECTED] http://www.baychi.org/bof/struts

-
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: Setting a Welcome File + Tiles + PreCompiled JSP's

2003-08-21 Thread Hue Holleran
Use the HTML  tag?








Or, alternatively if you want to use window.onLoad - checkout the source on
IE's error page that does this pretty effectively by extracting the server
information from document.location.href - full source attached below (you'll
need to identify the appropriate bits):






a:link  {font:8pt/11pt verdana; color:red}
a:visited   {font:8pt/11pt verdana; color:#4e4e4e}


HTTP 404 Not Found



function Homepage(){
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm

//For testing use DocURL =
"res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm";
DocURL = document.location.href;

//this is where the http or https will be, as found by searching for ://
but skipping the res://
protocolIndex=DocURL.indexOf("://",4);

//this finds the ending slash for the domain server
serverIndex=DocURL.indexOf("/",protocolIndex + 3);

//for the href, we need a valid URL to the domain. We search for the #
symbol to find the begining
//of the true URL, and add 1 to skip it - this is the BeginURL value. We
use serverIndex as the end marker.
//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
BeginURL=DocURL.indexOf("#",1) + 1;
if (protocolIndex - BeginURL > 7)
urlresult=""

urlresult=DocURL.substring(BeginURL,serverIndex);

//for display, we need to skip after http://, and go to the next slash
displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);

// Security precaution: must filter out "urlResult" and "displayresult"
forbiddenChars = new RegExp("[<>\'\"]", "g");   // Global search/replace
urlresult = urlresult.replace(forbiddenChars, "");
displayresult = displayresult.replace(forbiddenChars, "");

document.write('' + displayresult +
"");

}








  

The
page cannot be found

  
  
The page you are looking
for might have been
removed, had its name changed, or is temporarily
unavailable.
  
  

Please try the following:
  If you typed the page address in the Address bar, make
sure that it is
spelled correctly.
  
  Open the  Homepage();  home page, and
then look for links to the information
you want. 
  Click the  Back button to try another link.

  Click  Search to look for
information on the Internet. 



HTTP 404 -
File not found
Internet Explorer 



  




> -Original Message-
> From: Pat Quinn [mailto:[EMAIL PROTECTED]
> Sent: 21 August 2003 12:17
> To: [EMAIL PROTECTED]
> Subject: Setting a Welcome File + Tiles + PreCompiled JSP's
>
>
> I'm using tiles and i know i can't set the  attribute in
> web.xml to a tile definition or a struts action url. I'm also
> precompiling
> all my JSP's so i can't assign it to a JSP... i was thinking
> about assign it
> to a html file and then onLoad i could redirect to my logon
> action url... to
> do this i'd have to hard code the ipaddress and port number into
> my url so i
> don't really want to do that. Any ideas how i might do this?
>
> _
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003


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



multiple input form editing problem

2003-08-21 Thread Florent LOTHON
LO,

I have a form with multiple input as this







...

i made a usersForm as this :

private String[] name = null;
private String[] surname = null;
...

I would like to show the content of a the "usersForm " object


I tried as this :
<%
int i=0;
%>


<%
String surname = "surname["+i+"]";
String name = "name["+i+"]";
i++;
%>





This show magically the correct values on screen but as this in HTML code :







So when i submit this form
The usersForm can't retrieve new values because of the bad name of property
(surname[0], name[0], surname[1], name[1],...)

I think it must exist a simpliest solution using "indexed" attribute or
others but i don't know what.
And the documentations on struts are so poor for this kind of problem.

sincerly

Florent




--
Ce message est protege par les regles relatives au secret des correspondances ; il 
peut en outre contenir des informations a caractere confidentiel ou protegees par 
differentes regles et notamment le secret des affaires ; il est etabli a destination 
exclusive de son destinataire. Toute divulgation, utilisation, diffusion ou 
reproduction (totale ou partielle) de ce message, ou des informations qu'il contient, 
doit etre prealablement autorisee. 
Tout message electronique est susceptible d'alteration et son integrite ne peut etre 
assuree. Les AGF declinent toute responsabilite au titre de ce message s'il a ete 
modifie ou falsifie. 
Si vous n'etes pas destinataire de ce message, merci de le detruire immediatement et 
d'avertir l'expediteur de l'erreur de distribution et de la destruction du message.
This message is protected by the secrecy of correspondence rules ; furthermore it may 
contain privileged or confidential information that is protected by law, notably by 
the secrecy of business relations rule ; it is intended solely for the attention of   
the addressee . Any disclosure, use, dissemination or reproduction (either whole or  
partial) of this message or the information contained herein is strictly prohibited 
without prior consent.
Any electronic message  is susceptible to alteration  and  its integrity can not be 
assured.  AGF declines any  responsibility for  this message in the event of  
alteration  or falsification..
If you are not the intended  recipient, please destroy it immediately and  notify the 
sender of the wrong delivery and the mail deletion. 
--



HttpServletResponse in ActionForm.reset()

2003-08-21 Thread Jung, Eric (Contractor)
Hi everyone,
I posted this question a couple days ago, but no one took a bite. Any suggestions?
I'm trying to get the HttpServletResponse from within the ActionForm.reset() method. 
Any ideas?

Thank you in advance for any help...

Sincerely,

Eric H. Jung
Software Engineer
Russell/Mellon Analytical Services
Everett, MA, USA 

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



Re: Setting a Welcome File + Tiles + PreCompiled JSP's

2003-08-21 Thread Jason Lea
I use a filter to catch requests that map to "/" and request my 
Homepage.do action instead.  So I don't have any index.html or index.jsp 
page at all.

I think the 2.3 spec wants some sort of file to map to.

I did hear of one person who set the  to 'index.do' and 
put a dummy index.do file in there (with a note that it was a dummy and 
not to delete).  The web container was happy because there was a file 
there called 'index.do'.

Since Struts is mapped to process *.do, the person defined an action 
called 'index'  and struts could do its normal processing, forwarding 
off to the .jsp in /WEB-INF/.

I don't know if that is portable amongst containers though.

Pat Quinn wrote:

I'm using tiles and i know i can't set the  attribute in 
web.xml to a tile definition or a struts action url. I'm also 
precompiling all my JSP's so i can't assign it to a JSP... i was 
thinking about assign it to a html file and then onLoad i could redirect 
to my logon action url... to do this i'd have to hard code the ipaddress 
and port number into my url so i don't really want to do that. Any ideas 
how i might do this?

_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

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



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


RE: changes in application.properties does not vent itself ...

2003-08-21 Thread Cezar Nasui
Hi

Usualy restarting Tomcat or reloading the app from Tomcat Maanger should do
the trick,
Maybe try clearing the cache of the browser,
HTH,
Cezar

Hallo,
i want to try to change some value in application.properties file :
welcome.title=myTest Application

but browser shows still the old value.
I was tied to restart application (unzipped war), application server
(JBoss) and all computer too, but there is stil old value.

Where can be mistake?
my konfiguration:
Struts 1.1, JBoss 3.2.1 with Tomcat container, JDK SUN 1.4.2, OS Linux
and Win too

Thanks, Jiri


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003


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



Re: Why write javascript in validation.xml file

2003-08-21 Thread sreekant_gottimukkala

Is the generated javascript compatible for both IE and NS ??

Regards
Sreekant G
@ 98404-65630


   

"Nagendra  

Kumar O V S" To: <[EMAIL PROTECTED]>   
   
<[EMAIL PROTECTED]   cc:   

o.com>   Subject: Re: Why write javascript in 
validation.xml file  
   

08/21/2003 

11:27 AM   

Please respond 

to "Struts 

Users Mailing  

List"  

   

   




   

 hi madhu, 

 validator framework is used for both client as well as server side validations. 
javascript
 for client side and java method class for the server side.

   

 -- nagi   

   

 ---Original Message---

   

 From: Struts Users Mailing List   

 Date: Thursday, August 21, 2003 11:09:45 AM   

 To: Struts Users Mailing List 

 Subject: Why write javascript in validation.xml file  

   

 Hi,   

   

 I am slightly confused on the use of the validation.xml file. If you can  

 specify the java class to do the validation, why is there an option of

 entering javascript also to do the validation?

   

 Regards,  

 Madhu 

   

   

 - 

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

   

 . 

   

   

   

   


RE: RE : Remote and local EJB

2003-08-21 Thread Shashank Dixit
you mean you can mention these in ejb-jar.xml?
How?

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 3:35 PM
To: [EMAIL PROTECTED]; Struts Users Mailing List
Subject: RE : Remote and local EJB


This seems to be good idea.

I think EJB configuration files may also help us to achieve the same.



-Original Message-
From: Shashank Dixit [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 2:29 PM
To: Viral_Thakkar; Struts Users Mailing List
Subject: RE: RE : Remote and local EJB

You can have properties file where you can define which interface should you
consider for calling EJBs. SO that you dont have to change your code to
serve your purpose.
Let me know what do you think

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 11:30 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: RE : Remote and local EJB


If we know that EJBs and struts classes will reside in same JVM then why we
should also invoke the stateless session bean remotely? We can invoke that
session bean using the local interface... rite .?

Although I agree that in furure, we may deploy web and app classes on
different machines, so that's why I am looking for a solution where we can
take advantage of both local and remote interface of EJB.

I would say we should prefer the local EJB call instead of remote EJB call
as far as possible.

Viral







-Original Message-
From: Shashank Dixit [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 10:29 AM
To: Struts Users Mailing List; Viral_Thakkar;
[EMAIL PROTECTED]
Subject: RE: RE : Remote and local EJB

Hi Viral

Ideally there should be one stateless session bean within action class and
business component EJBs so that you have only one remote call and all other
EJB calls are local. You should always program considering different tiers
on different machines, although you are using the web and app tier on same
machine now. Let me know what do you think on this.

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 9:40 AM
To: Struts Users Mailing List; Piper, James D CECOM SEC EPS
Subject: RE : Remote and local EJB


Thanks Jim.

I am using the oracle 9iAS. I also developed the EJB which supports both
remote and local access. I am also able to invoke this EJB from my action
class. I accessed this EJB using the remote and also using local interface
separately.

The reason why I want this EJB to be deployed both as local and remote is
that at present EJB will be accessed by the struts action class, both are in
same JVM so I can access the EJB using the local interface.

In future when we do clustering then at that time, EJB bean may be at
different server, in different JVM, at that time struts action class should
dynamically find the remote EJB.

One way I think, we can handle such situation in the catch block of the
NamingException() while accessing the local bean, we need to lookup the
remote EJB. But it seems that this is not the good programming practice.

So I am looking for some design pattern or framework, which supports the
solution to this problem.

Thanks,
Viral


-Original Message-
From: Piper, James D CECOM SEC EPS
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 7:49 PM
To: Viral_Thakkar
Subject: RE: RE : Remote and local EJB

So let me see if I understand what it is you are wanting to accomplish.  It
sounds like you have a bunch of EJBs, a Struts application and several
servers.  You would like http requests coming in to be 'evaluated' by your
application and then based on some information within that request (i.e.
users name, users ip address, users browsers type, users preference
selection, or possibly even the current servers load) invoke either a local
or a remote EJB.  For example maybe you have an EJB that does some realy
heavy calculatations like a ray-tracer and for some important users you want
the results to come back faster than for other less important users.  So you
make your ray tracing EJB and deploy it on both the local server (i.e. the
same one running your Struts app) and on some other EJB server far far away.
Then register them both in your ejb-jar.xml with different names ie.
RayTraceLocal and RayTraceRemote.  So now to access either the remote or the
local EJB depending on the request you write your Struts action class to
first evaluate the HTTP request to figure out if this request is coming from
the important user or not and the

RE: multiple input form editing problem

2003-08-21 Thread Mohan Radhakrishnan
Hi
   http://jakarta.apache.org/struts/faqs/indexedprops.html

Struts doc. seems to be sufficient for this query.
Mohan



-Original Message-
From: Florent LOTHON [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 5:41 PM
To: Struts Users Mailing List
Subject: multiple input form editing problem


LO,

I have a form with multiple input as this







...

i made a usersForm as this :

private String[] name = null;
private String[] surname = null;
...

I would like to show the content of a the "usersForm " object


I tried as this :
<%
int i=0;
%>


<%
String surname = "surname["+i+"]";
String name = "name["+i+"]";
i++;
%>





This show magically the correct values on screen but as this in HTML code :







So when i submit this form
The usersForm can't retrieve new values because of the bad name of property
(surname[0], name[0], surname[1], name[1],...)

I think it must exist a simpliest solution using "indexed" attribute or
others but i don't know what.
And the documentations on struts are so poor for this kind of problem.

sincerly

Florent




--
Ce message est protege par les regles relatives au secret des
correspondances ; il peut en outre contenir des informations a caractere
confidentiel ou protegees par differentes regles et notamment le secret des
affaires ; il est etabli a destination exclusive de son destinataire. Toute
divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de
ce message, ou des informations qu'il contient, doit etre prealablement
autorisee.
Tout message electronique est susceptible d'alteration et son integrite ne
peut etre assuree. Les AGF declinent toute responsabilite au titre de ce
message s'il a ete modifie ou falsifie.
Si vous n'etes pas destinataire de ce message, merci de le detruire
immediatement et d'avertir l'expediteur de l'erreur de distribution et de la
destruction du message.
This message is protected by the secrecy of correspondence rules ;
furthermore it may contain privileged or confidential information that is
protected by law, notably by the secrecy of business relations rule ; it is
intended solely for the attention of   the addressee . Any disclosure, use,
dissemination or reproduction (either whole or  partial) of this message or
the information contained herein is strictly prohibited without prior
consent.
Any electronic message  is susceptible to alteration  and  its integrity can
not be assured.  AGF declines any  responsibility for  this message in the
event of  alteration  or falsification..
If you are not the intended  recipient, please destroy it immediately and
notify the sender of the wrong delivery and the mail deletion.
--



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



RE: [OT] Shopping cart best practices - Cookie, HttpSession or DB

2003-08-21 Thread Brian McSweeney
Hey Tero,
Thanks for the reply. Really appreciate the tips.
Brian


-Original Message-
From: Paananen, Tero [mailto:[EMAIL PROTECTED] 
Sent: 20 August 2003 18:36
To: 'Struts Users Mailing List'
Subject: RE: [OT] Shopping cart best practices - Cookie, HttpSession or
DB

 
> The options I have to implement the shopping cart:
>  
> a)   Cookies -  satisfies 1 and 2, but assumes user 
> doesn't turn off
> cookies
>  
> b)   HttpSession object - satisfies 1, but not 2
>  
> c)   Database shopping cart object - satisfies 2, but not 1.
>  
> I'd like to know,
>  
> a)   am I basically correct with these assumptions.
> b)   What would people recommend based on their experience.
> c)   any struts open source project that might have this?

Use a combination of a), b) and c) :)

Store an identifier to the shopping cart in session
(security implications here...make sure you don't
code an unsecure app), store the shopping cart itself in
db, use session cookies (or URL rewriting) to identify,
which session the user requests are associated to
(this is done automatically by your servlet container).

I'm sure you can do this in multiple ways, but that's
how I would do it.

-TPP

-
This email may contain confidential and privileged material for the sole
use of the intended recipient(s). Any review, use, retention,
distribution or disclosure by others is strictly prohibited. If you are
not the intended recipient (or authorized to receive for the recipient),
please contact the sender by reply email and delete all copies of this
message.  Also, email is susceptible to data corruption, interception,
tampering, unauthorized amendment and viruses. We only send and receive
emails on the basis that we are not liable for any such corruption,
interception, tampering, amendment or viruses or any consequence
thereof.


-
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: Performance of UI for Struts.

2003-08-21 Thread David Graham
--- deepaksawdekar <[EMAIL PROTECTED]> wrote:
> Hi,
> Please excuse me for the question but I want to test the performance of
> my User interface developed using struts. Mainly I want to test how much
> time it takes to load the page if execute method of action class doesn't
> do any thing except forwarding the request. 
> Is there any tool to do this?
> Some pointer on the performance of UI using Struts will be added
> advantage.

One thing you can do to increase performance is use JSTL tags instead of
Struts tags wherever possible.  Servlet containers can optimize the
standard tags into java code instead of invoking them with the traditional
tag lifecycle.  Resin and Tomcat 5 currently perform this optimization on
at least a subset of the JSTL tags.

David

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: changes in application.properties does not vent itself ...

2003-08-21 Thread Jiri Chaloupka
Hmmm ...
I was stop all JBoss, clear temps in disk, clear cache in browser, but 
it sis still dzsplazs old value.

in deploy/test.war/WEB-INF/src/java/resources/application.properties is 
new value but server still displays old :(
in struts-config is default:


What can I find ?

Cezar Nasui wrote:

Hi

Usualy restarting Tomcat or reloading the app from Tomcat Maanger should do
the trick,
Maybe try clearing the cache of the browser,
HTH,
Cezar
Hallo,
i want to try to change some value in application.properties file :
welcome.title=myTest Application
but browser shows still the old value.
I was tied to restart application (unzipped war), application server
(JBoss) and all computer too, but there is stil old value.
Where can be mistake?
my konfiguration:
Struts 1.1, JBoss 3.2.1 with Tomcat container, JDK SUN 1.4.2, OS Linux
and Win too
Thanks, Jiri

 



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


RE: [OT] Shopping cart best practices - Cookie, HttpSession or DB

2003-08-21 Thread Brian McSweeney
Hi Vic,

Definitely life would be easier, but I don't think it's as good :-)

Thanks though,
Brian

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Vic Cekvenich
Sent: 21 August 2003 02:30
To: [EMAIL PROTECTED]
Subject: Re: [OT] Shopping cart best practices - Cookie, HttpSession or
DB

I think you'd make your life easier if your required login.
.V

Brian McSweeney wrote:

> Hi all,
>  
> Quick question. I want to implement a shopping cart. I know this has 
> been done a million times in a million open source projects however I 
> have a few questions, and seeing as everyone in here seems so
> knowledgeable.
>  
> What I'd like:
>  
> 1) User can add to shopping cart without having to check in. (checkout
> requires login).
>  
> 2) User can leave the site and un-checked out shopping cart data will
> remain.
>  
> The options I have to implement the shopping cart:
>  
> a)   Cookies -  satisfies 1 and 2, but assumes user doesn't turn
off
> cookies
>  
> b)   HttpSession object - satisfies 1, but not 2
>  
> c)   Database shopping cart object - satisfies 2, but not 1.
>  
> I'd like to know,
>  
> a)   am I basically correct with these assumptions.
> b)   What would people recommend based on their experience.
> c)   any struts open source project that might have this?
>  
> Thanks very much,
> Brian
>  
>  
>  
> 



-
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: changes in application.properties does not vent itself ...

2003-08-21 Thread Jiri Chaloupka
Huh ..
now I see that it is in classes/resources ...
now it is works
Cezar Nasui wrote:

Hi

Usualy restarting Tomcat or reloading the app from Tomcat Maanger should do
the trick,
Maybe try clearing the cache of the browser,
HTH,
Cezar
Hallo,
i want to try to change some value in application.properties file :
welcome.title=myTest Application
but browser shows still the old value.
I was tied to restart application (unzipped war), application server
(JBoss) and all computer too, but there is stil old value.
Where can be mistake?
my konfiguration:
Struts 1.1, JBoss 3.2.1 with Tomcat container, JDK SUN 1.4.2, OS Linux
and Win too
Thanks, Jiri

 



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


Re: login request + ActionServlet RequestProcessor Action

2003-08-21 Thread Andy Richards
Hmm

Strugling a bit with this one now.?? I have extended requestProcessor and 
tried to perform a requestDispatch and responseRedirect, however both fail as 
the error message informs me the reponse has already been submitted. I 
thought i may be able to use declarative exception handling with global 
exceptions in the stuts config to redirect the user to my login page (but no 
joy!). Anyone have any ideas? Also what method should i override in the 
RequestProcessor when handling my login?

many thanks

Andy

On Thursday 21 Aug 2003 11:40 am, Kok Wei, Koh wrote:
> Yeah you should only need to define your custom
> AuthenticationRequestProcessor class which extends RequestProcessor in
> controller element of your struts-config.xml.
>
> Andy Richards wrote:
> > Hi Kok
> >
> > Good point, never thought about that! One point towards extending the
> > requestProcessor then, as if i am right i configure this in my
> > struts-config.xml and dont need to extend it from every action class.
> >
> > Thanks
> >
> > Andy
> >
> > On Thursday 21 Aug 2003 10:26 am, Kok Wei, Koh wrote:
> >>Hi Andy,
> >>
> >>I guess the decision boils down to how your application is going to be
> >>written. For a project I worked on couple of weeks back, I ran into a
> >>problem where one of my Actions needs to extend a class to inherit some
> >>functionality, but I was stucked because I need to extend my
> >>"AuthenticationAction" which handles all my user login stuff.
> >>
> >>I can't extend from 2 classes, right? I then went on to research the
> >>RequestProcessor. I used tiles of Struts 1.1 in my project so what I did
> >>was I ported the "AuthenticationAction" code to say
> >>"AuthenticationRequestProcessor" and it extends "TilesRequestProcessor"
> >>which extends the Struts "RequestProcessor".
> >>
> >>So it all depends on if you're gonna run into problems like this?
> >>
> >>My 2 cents. Hope this helps.
> >>
> >>Andy Richards wrote:
> >>>Hi
> >>>
> >>>After deciding which approach to take and reading a few of my struts
> >>>books about the controller object ; ) I am now confused as which is the
> >>>most appropriate class to extend to perform my login functionality.
> >>> David suggests extending the base action class, however i have read
> >>> that the RequestProcessor class was added to struts1.1 to extend the
> >>>ActionServlet. From what i can see this class handles all requests and
> >>>one of its methods calls the appropriate action. Therefore which would
> >>> be the better class to extend  ActionServlet, RequestProcessor or
> >>> Action. Any ideas.?
> >>>
> >>>thanks
> >>>
> >>>Andy
> >>>
> >>>On Wednesday 20 Aug 2003 2:41 pm, David G. Friedman wrote:
> Dear Andy,
> 
> I'm doing the same thing you suggest.  My approach is
> to extend the base Action (or any type of Action) class
> by adding a functon 'checkLogin'.  It takes the 'request'
> as the argument, checks the session for a User bean, and
> throws an exception if the bean is missing or if the ID
> number on the bean is zero/unset.  In my execute() method
> I make my first line 'checkLogin(request)' and it handles
> my authentication.
> 
> If you try this approach, keep in mind I'm using Struts
> v1.1 final so I can use exceptions.
> 
> Tonight I'm going to try switching it to an interface so
> I can use it to extend any action type by using 3 lines
> (and without sub-classing):
> 
> 1. import com.mycompany.auth.LoginCheck;
> 2. public class MyAction extends Action implements LoginCheck
> 3. checkLogin(request) <--- 1st line from within the execute
> or DispatchAction, or LookupDispatchAction method, etc.
> 
> Regards,
> David
> 
> ---Original Message---
> From: Andy Richards <[EMAIL PROTECTED]>
> Sent: 08/20/03 09:46 AM
> To: [EMAIL PROTECTED]
> Subject: login request
> 
> >Hi, i have created a form and a action which checks to see if a user
> 
> exists
> in
> my database and if so a value object is placed into the session. What i
> am
> 
> 
> unsure of is how to a action called everytime a request is made? Can i
> configure struts-config.xml to send all requests via an action to see
>  if this
> session object exists, and if not redirect the user to the login page?
> 
> many thanks
> 
> Andy
> >>>
> >>>-
> >>>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: Struts and Jetspeed

2003-08-21 Thread BaTien Duong
Craig R. McClanahan wrote:

On Wed, 20 Aug 2003, BaTien Duong wrote:

 

Date: Wed, 20 Aug 2003 13:31:17 -0600
From: BaTien Duong <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Struts and Jetspeed
Emerson Cargnin wrote:

   

any advice in choosing tiles vs jetspeedy?
I suppose tiles integrates better, but at the other side jettyspeed
follows the portlets specification. Any other comments?
 

It is still too early to tell. I believe in simplicity and the right
design that up to now Struts-Tiles give us elegant controller-templating
engine. Craig has stated his "ideal goal" for developing Struts to work
with JSR-168. The challenge is to have something like tiles as a
template engine according to JSR-168 specifications for Portal / Portlet
container(s).
   

There is also an implicit non-goal that I should state explicitly -- I'm
totally uninterested in building in (to Struts) support for non-JSR 168
based portal servers -- be they open source ones like Jetspeed or
commercial ones (BEA, IBM, Oracle, Sun, whatever).  This is for the same
reason that I'm not interested in supporting any non-Servlet-API variant
on servlets -- that's not where the market is.  Providers of non-168
portal servers are welcome to provide their own adaptations of they want
to, and several of them already do.
Fortunately, all of the servers portal mentioned above (including
Jetspeed) are planning to provide JSR-168 compatible support, so
implementing 168 support into Struts is instantly useful on all of them.
That's the power of common standards.
 

I think after the release of JSR-168 Reference Inplementation,
   

which has been proposed to become an Apache project, by the way; see the
'jakarta-jetspeed-2' CVS repository ...
 

many
Struts developers  (i know at least a number of Portals based on
Struts-Tiles, all except basic portal, stating to support JSR-168)  (i
am one of them) will seriously put some time in this refactoring process.
   

Yep ... JSR-168 is going to be a very popular API, quite likely rivalling
servlet in the number of server choices people will have.  And supporting
it gracefully in Struts means you'll be able to deploy a Struts based app
using either servlet or portlet based servers, depending on your needs,
with minimal changes.
 

Thanks for this forcefull statement that indicates the right leadership. 
I totally agree with this. That is why i think Struts with the best 
design and least burden of past technologies is the best candidate to 
realize the importance of JSR-168 Portal/Portlet container and WSRP for 
later stage. Hope many developers / designers will join in to realize 
the benefits of industry standards.

BaTien
DBGROUPS
 

BaTien
DBGROUPS
   

Craig McClanahan

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

 




File Upload error

2003-08-21 Thread Erez Efrati
Hi,

I am trying to do file uploading of several files and I keep getting the
following error:

java.lang.NoSuchMethodError:
org.apache.commons.fileupload.MultipartStream.setHeaderEncoding(Ljava/la
ng/String;)V

I am using JBoss/Tomcat 4.1.24. The upload struts sample works just fine
under 4.1.27 - I haven't tried it under 4.1.24.

Does anyone have a clue?

Thanks,
Erez



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



RE: [OT] Web Services, what have I done?

2003-08-21 Thread Greg Hess
Many thanks for your input,

I am trying to justify converting my implementation to use SOAP and
WSDL. My main concern is in the complexities that this would introduce
into this web service. If a large majority of developers out there are
not familiar with SOAP and WSDL it might add a large learning curve for
the clients of the web service. 

Is this standard really taking off, enough to justify my time and
efforts in the conversion and my clients in learning SOAP and WSDL or am
I in the dark and most already know it?

One of my main objectives right now is to document the web service and
love the idea of being able to use WSDL to do it. Having to document my
whole implementation will take some time and would prefer only having to
document the RPC's and functionality not to mention using a commercial
approach that probably handles many issues I have not yet encountered.

Greg




 -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 20, 2003 11:58 PM
> To: Struts Users Mailing List
> Subject: RE: [OT] Web Services, what have I done?
> 
> Im just getting started looking at web services myself , so dont have
a
> detailed technical grasp, but a seminar I attended a couple of days
ago is
> still fresh in my mind so Ill have a go at fielding this one...
> 
> What you have done would fit into the 'academic' definition of a 'web
> service quite nicely'. Of course it doesn't make use of the standards
> (SOAP,
> WSDL) which means its a proprietary implementation of a web service
and
> for
> anyone to use it they would have to use your methodology and message
> format.
> Roughly speaking, your dtd seems to be taking the place of of the wsdl
> document, and your own xml format taking the place of the SOAP
envelope &
> data.
> 
> The 'popular' conception of a web service is of course one that
involves
> the
> use of SOAP, WSDL, UDDI and such like, so when you talk about 'web
> services'
> this is what comes to peoples minds.
> 
> Id most strongly suggest that you now convert (or investigate how
> difficult
> it would be to convert) what you have done to make use of soap and
wsdl to
> make it easier for others to make use of your service. Having
reinvented
> parts of those wheels yourself, you will probably find it a quite
> interesting exercise to see how what you do compares with the
standards.
> With the knowledge you gained doing it your way, you should find
learning
> the standard way much easier as you will see much of the reasoning
behind
> things in the standard having covered that ground yourself already!
> 
> You will want to take a look at the AXIS project first as you will
> probably
> want to make use of it:
> http://ws.apache.org/axis/
> 
> IBM are pretty big on Web Services (and have donated a ton of web
services
> stuff to the opensource community) so go take a look at whats
available on
> their developerWorks site:
> http://www-106.ibm.com/developerworks/webservices/
> 
> And of course the w3c web service stuff is at:
> http://www.w3.org/2002/ws/
> 
> And the WS-I at:
> http://www.ws-i.org/
> 
> 
> 
> 
> -Original Message-
> From: Greg Hess [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 21 August 2003 03:11
> To: Struts
> Subject: [OT] Web Services, what have I done?
> 
> 
> Hi All,
> 
> This post might seem odd but I am looking for some insight into a
solution
> that I have implemented. I am trying to get a better understanding of
how
> my
> implementation fits into the grand scheme of a Web Service and how I
might
> document this implementation. I have been reading about WSDL and about
> SOAP
> and am still not sure what I have done J, and how my implementation is
> compatible or not compatible with what the industry is calling a Web
> Service
> mainly for documentation purposes even though I would love to build
this
> functionality based on industry standards.
> 
> I have built a web app using STRUTS of course that allows for external
> remote systems to invoke RPC's (Remote Procedure Call) on an area of
the
> apps functionality. I allow remote systems to communicate using XML
over
> HTTP POST. Communication involves the invocation request and response.
I
> have created a invocation.dtd that defines the invocation data
structure
> and
> all the supported methods and arguments and the response.dtd that
defines
> the result data structure returned by any invocation.
> As far as I can understand so far this is very similar to a SOAP
envelope.
> 
> The client of this implementation builds the invocation XML data
structure
> as defined by invocation.dtd, opens a connection to defined URL and
writes
> the XML invocation directly to the connections OutputStream and reads
the
> XML response directly from the connections InputStream.
> 
> Having built this implementation and ducking the learning curve of Web
> Services, SOAP implementation because I found it difficult to
implement
> with
> my shaky understanding of Web Services I am hoping that I might now b

RE: File Upload error

2003-08-21 Thread Alex Shneyderman
Make sure you do not have another file upload jar in your classpath.

Where are you hosting your app, what OS?

Alex.

> -Original Message-
> From: Erez Efrati [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 11:14 AM
> To: 'Struts Users Mailing List'
> Subject: File Upload error
> 
> Hi,
> 
> I am trying to do file uploading of several files and I keep getting
the
> following error:
> 
> java.lang.NoSuchMethodError:
>
org.apache.commons.fileupload.MultipartStream.setHeaderEncoding(Ljava/la
> ng/String;)V
> 
> I am using JBoss/Tomcat 4.1.24. The upload struts sample works just
fine
> under 4.1.27 - I haven't tried it under 4.1.24.
> 
> Does anyone have a clue?
> 
> Thanks,
> Erez
> 
> 
> 
> -
> 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: Does Tiles supports skins???

2003-08-21 Thread Holman, Cal
You can achieve this by using a controllerURL to change the definition on the fly.  I 
use this technique for my personal site so the user can set their own style sheet and 
layout.  I am not a graphics person so the results are not very impressive.  Here is 
the link: http://www.calandva.com/holmansite/do/portal/Settings 

Cal 

http://www.calandva.com/Last update 08/01/03


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 19:52
To: [EMAIL PROTECTED]
Subject: Does Tiles supports skins???

Hi,

I am am newbie working with Struts and Tiles and I am having problems
to develop and application that the user can make a choice among the
differents skins from the application.

The layout I'm currently using is the classic one (header, menu, body
and footer)

Each skin has its own css's, layouts, images, and the header, menu and
footer.

I have the tiles defined in the tile-defs.xml for the default skin and
my first thought was to overload the whole tile definition at runtime
through a jsp,using the user skin preference that I have in session.

But does not work, because when I put in the value a <%= => the
results is an empty string form this tile.

Does someone know a method to do this?

Thanks folks.

Antonio González


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

  
Learn more about Paymentech's payment processing services at www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary 
and confidential information intended only for the use of the recipient(s) named 
above.  If you are not the intended recipient, you may not print, distribute, or copy 
this message or any attachments.  If you have received this communication in error, 
please notify the sender by return e-mail and delete this message and any attachments 
from your computer.

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



tag writing newbie

2003-08-21 Thread Mike Whittaker
I have a List of subclasses that need to be iterated over and rendered in
jsp.

I notice that 'instanceof' is a reserved word in jstl, but has not been
implemented yet. So I now feel the need to write a tag.

On 1st glance I thought custom tag would be limited to Strings, but I see
that I can get at Request object.

So I am proposing this sort of thing:



 Rendering mySubClass 
...


Then in the tag class

List myList = (List)request.getAttribute("myList")
myList.get(//int from loop.count//)
// do is instanceof
// set variable for tag attribute 'set' ie 'type' to a String indicating
subclass

Questions:
0/ Is there a better/easier way to accomplish this?
1/ Can I use EL in my own tags (${loop.count}), if not automatic how?
2/ Is there a simpler way to get at the objects in my List within tag class,
than this?

--
Mike W



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



RE: Horizon: a view management plugin

2003-08-21 Thread Pedro Emanuel de Castro Faria Salgado
> Tell me more about your plugin.
>
> How are the beans defined?

The beans are defined on a xml file.

   
  
   
 Can you specify validation with the beans?

no... what do you mean by validation with the beans?
i use my views like a DTO and i copy the dao/bo values
(never thought of doing validation on this step...)
to it with BeanUtils or PropertyUtils.

>
> How dependent is this project on being loaded within a servlet container
> or more specifically, a Struts plugin?  (e.g. Can I use it in a
> standalone app?)

i use it as a Struts plugin but you can use the factory in anyway you
want...

In attachment goes the source code.
Put in the lib directory:
  commons-beanutils
  commons-collections
  commons-digester
  log4j
  servlet.jar
  struts.jar

later i can email you an web app example... so you can take a peek
at a real cenario.

it doesn't do nothing yet but if you run ant javadoc you could check
the javadoc documentation docs/api...

the license is missing but it will be open (don't know
what open source/free software license to use).

Comments and ideas for improvement are welcome :)

Hope you find it has useful as i did,

Pedro Salgado

>
>
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 678.910.8017
> AIM:jmitchtx
>
>
>
>
>> -Original Message-
>> From: Robert Leland [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, August 20, 2003 10:06 PM
>> To: Struts Users Mailing List
>> Subject: Re: Horizon: a view management plugin
>>
>>
>> Pedro Emanuel de Castro Faria Salgado wrote:
>>
>> >Hi,
>> >
>> >   I have built a plugin for Struts that creates view beans using
>> >dynabeans that are defined on a xml file and i was wondering
>> if anyone
>> >in the Struts project/mailing list was interested on checking the use
>> of it?
>> >
>> When I see dynabean are you saying BeanUtils.DynaBean and what is a
>> 'view bean',
>> do you mean a Action Form ? If so what is the difference
>> between  your
>> plugin and  a DynaActionForm ?
>>
>> Given that your plugin is generally useful then there are
>> several options :
>>
>> 1) Since web space can gotten for free now days you could
>> always post it
>> on a site with
>> some documentation on how to use it.
>> 2) We are using the http://www.sf.net/projects/struts site as an
>> incubator for projects you can post there
>>  to see if there is interest.
>> 3) Find someone else with a struts web site, that would host it.
>>
>> Most importantly having an example, that is documented is key.
>>
>>
>>
>>
>> -
>> 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]



Pedro Salgado
(JuniFEUP)



Horizon.zip
Description: Zip compressed data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

writing an actionform for nested indexed properties

2003-08-21 Thread Cameron Hickey
I am trying to write an actionform which will properly handle an array
of indexed properties which look like this:

ip[0].itemPropertys[0].itemPropertyId
ip[0].itemPropertys[0].value

ip[1].itemPropertys[0].itemPropertyId
ip[1].itemPropertys[0].value

etc...


In my Action form, what getters and setters do I need?

This is what I have so far:

public List getIp() { return ip;}
public void setIp(List ipList) {ip = ipList;}

public List getItemPropertys(int idx) {return (List) ip.get(idx); } 
public void setItemPropertys(int idx,ItemProperty ipe)
{ip.set(idx,ipe);}

public ItemProperty getItemProperty(int idx, List ipl) {return
(ItemProperty) ipl.get(idx);}
public void setItemProperty(int idx,List ipl, ItemProperty tip)
{ipl.set(idx,tip);}

public String getValue(ItemProperty tip) {return tip.getValue();}
public void setValue(String s, ItemProperty tip) {tip.setValue(s);}

public int getItemPropertyId(ItemProperty tip) {return
tip.getItemPropertyId();}
public void setItemPropertyId(int i, ItemProperty tip)
{tip.setItemPropertyId(i);}




but when I try to submit the form, I get this error:


java.lang.NullPointerException
at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUt
ils.java:497)
at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUt
ils.java:410)
at
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUti
ls.java:729)
at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.jav
a:780)
at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:793)
at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)


which I assume is coming from the fact that I don't have all the right
getters and setters available, since it must be trying to call one that
does not exist (thus the null pointer).

Is this right?

Should I have other getters and setters?



THANKS FOR ANY HELP!!

Cameron


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



Re: [OT] Shopping cart best practices - Cookie, HttpSession or DB

2003-08-21 Thread Mark Lowe
I haven't any tech input, but I've an idea how I'd stagger the 
development.I'd forget about cookies and db's at first, save them for a 
later stage.

1. Store your cart in session, and when that all works. For everyone. 
Gets to the checkout and funds are exchanged.

2. Create a login where clever stuff like saving your objects to db's 
goes on.

3. Then once you've a logged in user start thinking about when to save 
the cart.

if(user.isLogged()) {
//or however your api lets you do it
cart.save();
}
None of what I've said is ground breaking, but It does avoid messing 
with cookies, up to this stage. When the user logs in s/he gets his/her 
cart back.

4. I guess the final stage could be to do the cookie stuff, so users 
are logged in as soon as they get to the site. And thus the retrieval 
of the cart also, as its already in place integration would be smooth.

Don't know who useful this is, but there's nothing to offer in terms of 
the actual mechanisms in play. But by getting folks paying asap, the 
extras don't become show stoppers.

Cheers Mark

On Thursday, August 21, 2003, at 02:33 PM, Brian McSweeney wrote:

Hi Vic,

Definitely life would be easier, but I don't think it's as good :-)

Thanks though,
Brian
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Vic Cekvenich
Sent: 21 August 2003 02:30
To: [EMAIL PROTECTED]
Subject: Re: [OT] Shopping cart best practices - Cookie, HttpSession or
DB
I think you'd make your life easier if your required login.
.V
Brian McSweeney wrote:

Hi all,

Quick question. I want to implement a shopping cart. I know this has
been done a million times in a million open source projects however I
have a few questions, and seeing as everyone in here seems so
knowledgeable.
What I'd like:

1) User can add to shopping cart without having to check in. (checkout
requires login).
2) User can leave the site and un-checked out shopping cart data will
remain.
The options I have to implement the shopping cart:

a)   Cookies -  satisfies 1 and 2, but assumes user doesn't turn
off
cookies

b)   HttpSession object - satisfies 1, but not 2

c)   Database shopping cart object - satisfies 2, but not 1.

I'd like to know,

a)   am I basically correct with these assumptions.
b)   What would people recommend based on their experience.
c)   any struts open source project that might have this?
Thanks very much,
Brian





-
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: HttpServletResponse in ActionForm.reset()

2003-08-21 Thread Jing Zhou
What do you want to do with HttpServletResponse in
ActionForm.reset()?
The reset() method is intended to reset necessary
properties in form beans in case they are not posted
from browsers. If anything gets wrong in the method,
you could throw IllegalArgumentException or
IllegalStataException.

Jing
Netspread Carrier
http://www.netspread.com

- Original Message - 
From: "Jung, Eric (Contractor)" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, August 21, 2003 7:44 AM
Subject: HttpServletResponse in ActionForm.reset()


Hi everyone,
I posted this question a couple days ago, but no one took a bite. Any
suggestions?
I'm trying to get the HttpServletResponse from within the ActionForm.reset()
method. Any ideas?

Thank you in advance for any help...

Sincerely,

Eric H. Jung
Software Engineer
Russell/Mellon Analytical Services
Everett, MA, USA

-
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: is there any Dependable Option List Tag ?

2003-08-21 Thread Kommineni, Sateesh (IndSys)
Hi All,

  Thanks for your suggestions..

   The JavaScript option which most of you mentioned cannot be made as a
component . If we have a Tag Lib tag for this , we can just pass say an
ArrayList and the dependency relationship so that it will be reused across
many pages/ Applications..

  Any way thanks for the responses..

-Sateesh

-Original Message-
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 10:23 PM
To: 'Struts Users Mailing List'
Subject: RE: is there any Dependable Option List Tag ?


Sateesh,
What you want to do is typically done on the client side in JavaScript. That
is not to say that it can't be done at the server, but for performance
reasons, the JavaScript solution avoids having to refresh the page each time
an item or items are moved from one select box to another. Once the items
are moved, then the request can be sent to the server and the changes can be
updated in the DB or wherever.

Regards,

Richard


-Original Message-
From: Kommineni, Sateesh (IndSys) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 20, 2003 5:50 AM
To: Struts Users Mailing List
Subject: is there any Dependable Option List Tag ?


Hi,

   If we have two related Drop Down boxes in a Form and need to populate
those when we load the page and when we change the value in the first drop
down we need to load the corresponding values in the second .. Can any
TagLib supports this..If so could you pls provide me some examples..

Thanks
Sateesh


"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information. If the
reader of this message is not the intended recipient, you are notified that
any dissemination, distribution or copy of this 
communication is strictly Prohibited. 
If you have received this message by error, please notify us 
immediately, return the original mail to the sender and delete the 
message from your system."


-
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]


"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this 
communication is strictly Prohibited. 
If you have received this message by error, please notify us 
immediately, return the original mail to the sender and delete the 
message from your system."


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



Calendar Popup taglib

2003-08-21 Thread Kruse, Matt
I now have a (very beta) version of the calendar popup taglib available for
download and testing:
http://www.mattkruse.com/javascript/javascripttoolbox.zip

I'm not sure if it's in a correct or usable form as-is, but anyone familiar
with Struts should be able to get the examples running in their container of
choice.

I have a few more things to add (like setting disabled dates, etc) but I
wanted to get some feedback now before cleaning everything up and adding
more functionality.

If you have any thoughts, please let me know so I can make it more useable
to the struts community!

Matt Kruse


Re: Horizon: a view management plugin

2003-08-21 Thread Pedro Emanuel de Castro Faria Salgado

> Pedro Emanuel de Castro Faria Salgado wrote:
>
>>Hi,
>>
>>   I have built a plugin for Struts that creates view beans using
>>dynabeans that are defined on a xml file and i was wondering if anyone
>> in the Struts project/mailing list was interested on checking the use
>> of it?
>>
> When I see dynabean are you saying BeanUtils.DynaBean and what is a
> 'view bean',
> do you mean a Action Form ?

yes

> If so what is the difference between  your
> plugin and  a DynaActionForm ?

i think, actually, there is none... the difference is for what i use
the view beans for: transfering data from actions to
build combobox on form and present data that isn't on a form.

i know i can use the form itself to put a collection to
build a combobox and use another form bean property
to store the user input but it is less
confusing if i define forms with only the properties the
user can enter data and
another bean for transmitting data (dto... in my case i call it view bean).

before the plugin i had to define a new java class
(attributes + getters/setters) for each
new dto i wanted, now, i only need to add some lines
to a xml file...

>
> Given that your plugin is generally useful then there are several
> options :
>
> 1) Since web space can gotten for free now days you could always post it
>  on a site with
> some documentation on how to use it.

i will see what i can do...

> 2) We are using the http://www.sf.net/projects/struts site as an
> incubator for projects you can post there
>  to see if there is interest.

thank you for the tip...

> 3) Find someone else with a struts web site, that would host it.
>
> Most importantly having an example, that is documented is key.
>

I have already sent the source on another email so
you can take a look (src + javadoc + ant file)
and i am finishing a small web app.


thanks for the tips...

Pedro Salgado
>
>
>
> - 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: [OT] Web Services, what have I done?

2003-08-21 Thread Andrew Shirk
Yes, SOAP, WSDL and UDDI are THE standards for web services. The primary 
motivation for web services is interoperability among disparate systems. 
Without the using the standards, you won't get the interoperability. The 
Java Web Services Developer Pack (JWSDP - http://java.sun.com/webservices/) 
from Sun including JAX-RPC make it relatively painless to develop your web 
service in a standardized way. You should probably also read the tutorial: 
http://java.sun.com/webservices/docs/1.2/tutorial/doc/index.html

Andrew

At 10:35 AM 8/21/2003 -0400, you wrote:
Many thanks for your input,

I am trying to justify converting my implementation to use SOAP and
WSDL. My main concern is in the complexities that this would introduce
into this web service. If a large majority of developers out there are
not familiar with SOAP and WSDL it might add a large learning curve for
the clients of the web service.
Is this standard really taking off, enough to justify my time and
efforts in the conversion and my clients in learning SOAP and WSDL or am
I in the dark and most already know it?
One of my main objectives right now is to document the web service and
love the idea of being able to use WSDL to do it. Having to document my
whole implementation will take some time and would prefer only having to
document the RPC's and functionality not to mention using a commercial
approach that probably handles many issues I have not yet encountered.
Greg



 -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 20, 2003 11:58 PM
> To: Struts Users Mailing List
> Subject: RE: [OT] Web Services, what have I done?
>
> Im just getting started looking at web services myself , so dont have
a
> detailed technical grasp, but a seminar I attended a couple of days
ago is
> still fresh in my mind so Ill have a go at fielding this one...
>
> What you have done would fit into the 'academic' definition of a 'web
> service quite nicely'. Of course it doesn't make use of the standards
> (SOAP,
> WSDL) which means its a proprietary implementation of a web service
and
> for
> anyone to use it they would have to use your methodology and message
> format.
> Roughly speaking, your dtd seems to be taking the place of of the wsdl
> document, and your own xml format taking the place of the SOAP
envelope &
> data.
>
> The 'popular' conception of a web service is of course one that
involves
> the
> use of SOAP, WSDL, UDDI and such like, so when you talk about 'web
> services'
> this is what comes to peoples minds.
>
> Id most strongly suggest that you now convert (or investigate how
> difficult
> it would be to convert) what you have done to make use of soap and
wsdl to
> make it easier for others to make use of your service. Having
reinvented
> parts of those wheels yourself, you will probably find it a quite
> interesting exercise to see how what you do compares with the
standards.
> With the knowledge you gained doing it your way, you should find
learning
> the standard way much easier as you will see much of the reasoning
behind
> things in the standard having covered that ground yourself already!
>
> You will want to take a look at the AXIS project first as you will
> probably
> want to make use of it:
> http://ws.apache.org/axis/
>
> IBM are pretty big on Web Services (and have donated a ton of web
services
> stuff to the opensource community) so go take a look at whats
available on
> their developerWorks site:
> http://www-106.ibm.com/developerworks/webservices/
>
> And of course the w3c web service stuff is at:
> http://www.w3.org/2002/ws/
>
> And the WS-I at:
> http://www.ws-i.org/
>
>
>
>
> -Original Message-
> From: Greg Hess [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 21 August 2003 03:11
> To: Struts
> Subject: [OT] Web Services, what have I done?
>
>
> Hi All,
>
> This post might seem odd but I am looking for some insight into a
solution
> that I have implemented. I am trying to get a better understanding of
how
> my
> implementation fits into the grand scheme of a Web Service and how I
might
> document this implementation. I have been reading about WSDL and about
> SOAP
> and am still not sure what I have done J, and how my implementation is
> compatible or not compatible with what the industry is calling a Web
> Service
> mainly for documentation purposes even though I would love to build
this
> functionality based on industry standards.
>
> I have built a web app using STRUTS of course that allows for external
> remote systems to invoke RPC's (Remote Procedure Call) on an area of
the
> apps functionality. I allow remote systems to communicate using XML
over
> HTTP POST. Communication involves the invocation request and response.
I
> have created a invocation.dtd that defines the invocation data
structure
> and
> all the supported methods and arguments and the response.dtd that
defines
> the result data structure returned by any invocation.
> As far as I can understand so far this is very sim

redirect and post form

2003-08-21 Thread Peter Bliznak
Hi,
I have app which needs to go to external url to make payment.
I am aware of how to redirect but from what I understand it is
not possible to redirect and post. ( only to put parameters to
request). That is not acceptable solution if customer's and account
credential are taken into account.
My  question is : is there ANY solution to this?
I cannot possible be first person running into this scenario.
-- gather info -- post it into hidden fields on next page -- and from there
  it SHOULD get posted to
  external(absolute) URL for proccesing
Any info would be appreaciated

Regards,

Peter



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


Re: Need Instructions To Setup The Artimus Example

2003-08-21 Thread Caroline Jen
Rick, thanks a lot for taking the trouble to find the
web link to the Husted discussion forum.  I have
posted my question there and hoping to get some
instructions soon.  I appreciate your help.

Caroline
--- Rick Reumann <[EMAIL PROTECTED]> wrote:
> On Wed, Aug 20,'03 (10:38 PM GMT-0700), Caroline
> wrote: 
> 
> > I have gone to his book site but cannot find a
> > discussion forum.  
> 
> You can get to the forum here: 
> 
>
http://www.manning.com/getpage.html?project=husted&filename=forum.html
> 
> Click on "author online"
> 
> (I admit not easy to find from his personal site.
> Took me a while).
>  
> -- 
> Rick
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: [OT] Shopping cart best practices - Cookie, HttpSession or DB

2003-08-21 Thread Brian McSweeney
Hi Mark,

Actually this is EXACTLY what I was thinking of doing.
The one problem that I had with this idea is that I was 
a bit worried about filling up the session object with 
lots of stuff. 

Is this not really a problem?

Cheers,
Brian





-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: 21 August 2003 16:02
To: Struts Users Mailing List
Subject: Re: [OT] Shopping cart best practices - Cookie, HttpSession or
DB

I haven't any tech input, but I've an idea how I'd stagger the 
development.I'd forget about cookies and db's at first, save them for a 
later stage.

1. Store your cart in session, and when that all works. For everyone. 
Gets to the checkout and funds are exchanged.

2. Create a login where clever stuff like saving your objects to db's 
goes on.

3. Then once you've a logged in user start thinking about when to save 
the cart.

if(user.isLogged()) {
//or however your api lets you do it
cart.save();
}

None of what I've said is ground breaking, but It does avoid messing 
with cookies, up to this stage. When the user logs in s/he gets his/her 
cart back.

4. I guess the final stage could be to do the cookie stuff, so users 
are logged in as soon as they get to the site. And thus the retrieval 
of the cart also, as its already in place integration would be smooth.

Don't know who useful this is, but there's nothing to offer in terms of 
the actual mechanisms in play. But by getting folks paying asap, the 
extras don't become show stoppers.

Cheers Mark

On Thursday, August 21, 2003, at 02:33 PM, Brian McSweeney wrote:

> Hi Vic,
>
> Definitely life would be easier, but I don't think it's as good :-)
>
> Thanks though,
> Brian
>
> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Vic Cekvenich
> Sent: 21 August 2003 02:30
> To: [EMAIL PROTECTED]
> Subject: Re: [OT] Shopping cart best practices - Cookie, HttpSession
or
> DB
>
> I think you'd make your life easier if your required login.
> .V
>
> Brian McSweeney wrote:
>
>> Hi all,
>>
>> Quick question. I want to implement a shopping cart. I know this has
>> been done a million times in a million open source projects however I
>> have a few questions, and seeing as everyone in here seems so
>> knowledgeable.
>>
>> What I'd like:
>>
>> 1) User can add to shopping cart without having to check in.
(checkout
>> requires login).
>>
>> 2) User can leave the site and un-checked out shopping cart data will
>> remain.
>>
>> The options I have to implement the shopping cart:
>>
>> a)   Cookies -  satisfies 1 and 2, but assumes user doesn't turn
> off
>> cookies
>>
>> b)   HttpSession object - satisfies 1, but not 2
>>
>> c)   Database shopping cart object - satisfies 2, but not 1.
>>
>> I'd like to know,
>>
>> a)   am I basically correct with these assumptions.
>> b)   What would people recommend based on their experience.
>> c)   any struts open source project that might have this?
>>
>> Thanks very much,
>> Brian
>>
>>
>>
>>
>
>
>
> -
> 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]


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



RE: File Upload error

2003-08-21 Thread Erez Efrati
Alex, 

I found it!! It was a beta version of the FileUpload in the
JBoss/Tomcat-4.1.24. I just replaced it with the FileUpload 1.0 that
came with Struts and it works now, thank god :)

Erez

-Original Message-
From: Alex Shneyderman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 4:48 PM
To: 'Struts Users Mailing List'
Subject: RE: File Upload error

Make sure you do not have another file upload jar in your classpath.

Where are you hosting your app, what OS?

Alex.

> -Original Message-
> From: Erez Efrati [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 11:14 AM
> To: 'Struts Users Mailing List'
> Subject: File Upload error
> 
> Hi,
> 
> I am trying to do file uploading of several files and I keep getting
the
> following error:
> 
> java.lang.NoSuchMethodError:
>
org.apache.commons.fileupload.MultipartStream.setHeaderEncoding(Ljava/la
> ng/String;)V
> 
> I am using JBoss/Tomcat 4.1.24. The upload struts sample works just
fine
> under 4.1.27 - I haven't tried it under 4.1.24.
> 
> Does anyone have a clue?
> 
> Thanks,
> Erez
> 
> 
> 
> -
> 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: [OT] Shopping cart best practices - Cookie, HttpSession or DB

2003-08-21 Thread Greg Ludington
>1. Store your cart in session, and when that all works. For everyone. 
>Gets to the checkout and funds are exchanged.

While I agree with the previous posters who said that it would make your
life easier if you can require login, if you absolutely need to save
carts of users regardless of login status, you might consider having
your Cart object impelment
javax.servlet.http.HttpSessionBindingListener.  Objects implementing
this interface are notified when they are bound to or unbound from
(either explicitly or by the session itself expiring/invalidated) a
session, and can perform tasks at these times.

In your case, when your Cart object is unbound you would save its
contents to your database.  (Conversely, when you first bind a Cart
object to a session, you can check the database and refresh its
contents, if any.)  Nothing about this approach prohibits you from
saving Cart information at other appropriate times -- user logins,
purchases, and the like -- this approach just allows you the ability to
store information, like cart contents, at the end of a client session.

-Greg



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



Re: Performance of UI for Struts.

2003-08-21 Thread Craig R. McClanahan
On Thu, 21 Aug 2003, deepaksawdekar wrote:

> Date: Thu, 21 Aug 2003 09:33:42 +0530
> From: deepaksawdekar <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Performance of UI for Struts.
>
> Hi, Please excuse me for the question but I want to test the performance
> of my User interface developed using struts. Mainly I want to test how
> much time it takes to load the page if execute method of action class
> doesn't do any thing except forwarding the request.  Is there any tool
> to do this? Some pointer on the performance of UI using Struts will be
> added advantage.
>

I typically use JMeter (available from Apache) for this sort of thing.

One issue to keep in mind, though, is that page rendering speed for JSP
pages with lots of custom tags (typical for Struts-based apps) is *very*
dependent on the quality of the JSP page compiler in your container.

For Tomcat, for instance, the page compiler was rewritten completely in
the 4.1 release time frame (and the new compiler is inherited in 5.x), and
the performance improvements were enormous -- with zero changes to the
actual application.

>
> TIA
> Deepak

Craig

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



DB Access from BLB

2003-08-21 Thread Kapadia Mitesh-C23457
Hello.  I am fairly new to STRUTS and am trying to write a BLB (Business
Logic Bean) in the 'Model' to connect to a database, do a simple query, and
return a resultset.

Should I then read the resultset into the DTO/Value Object/DataBean so I can
dispay them on the appropriate page?  

Any advice and assistance would be most appreciated.

Thanks in advance.

- Mitesh


Re: DB Access from BLB

2003-08-21 Thread Emerson Cargnin
I'm not so expericed in struts, so any correction  from the gurus are 
welcome.

If your DTO is a list, I think you have to put it at some context 
(req,session or app, it depends of the your app). So at at the page you 
use iterate (for a table list), or select/options (for a combobox), etc. 
If it's the data for changing (eg: editing data from a business entity), 
you can use BeanUtils.copyProperty to copy the data from your DTO to 
your from FormBean.

Emerson Cargnin

Kapadia Mitesh-C23457 wrote:
Hello.  I am fairly new to STRUTS and am trying to write a BLB (Business
Logic Bean) in the 'Model' to connect to a database, do a simple query, and
return a resultset.
Should I then read the resultset into the DTO/Value Object/DataBean so I can
dispay them on the appropriate page?  

Any advice and assistance would be most appreciated.

Thanks in advance.

- Mitesh



--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: tag writing newbie

2003-08-21 Thread Mike Jasnowski
>1/ Can I use EL in my own tags (${loop.count}), if not automatic how?

Yes, http://jakarta.apache.org/commons/el/api/index.html

Are you constructing a list of different types? If so that will complicate
things especially if they
have no common characteristics. If they are all of the same type, you should
be able to interate over them with standard JSTL and Struts tags

-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 6:51 AM
To: Struts List
Subject: tag writing newbie


I have a List of subclasses that need to be iterated over and rendered in
jsp.

I notice that 'instanceof' is a reserved word in jstl, but has not been
implemented yet. So I now feel the need to write a tag.

On 1st glance I thought custom tag would be limited to Strings, but I see
that I can get at Request object.

So I am proposing this sort of thing:



 Rendering mySubClass 
...


Then in the tag class

List myList = (List)request.getAttribute("myList")
myList.get(//int from loop.count//)
// do is instanceof
// set variable for tag attribute 'set' ie 'type' to a String indicating
subclass

Questions:
0/ Is there a better/easier way to accomplish this?
1/ Can I use EL in my own tags (${loop.count}), if not automatic how?
2/ Is there a simpler way to get at the objects in my List within tag class,
than this?

--
Mike W



-
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: Horizon: a view management plugin

2003-08-21 Thread Robert Taylor
Pedro,

I'ld be interested in your implementation as I did the same thing.
I define what I call view configurations in an XML file. On startup
they are cached and I can access them at run time. It sure beats
writing a bunch of throw-away Java beans which are used to present
data.

Accessing a particular view configuration is as simple as:

DynaBean view = ViewFactory.getInstance().getView(viewName);

robert

> -Original Message-
> From: Pedro Emanuel de Castro Faria Salgado
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 20, 2003 5:03 PM
> To: [EMAIL PROTECTED]
> Subject: Horizon: a view management plugin
>
>
> Hi,
>
>I have built a plugin for Struts that creates view beans using
> dynabeans that are defined on a xml file and i was wondering if anyone
> in the Struts project/mailing list was interested on checking the use
> of it?
>
>   It is a very simple plugin (i call it Horizon... because it can have a
> lot of views :) )
> but it gave me a big help on some projects i am currently working on...
> who knows somebody may find it useful :)
>
>   I will be waiting for a response for those who maybe interested
> (i will send a war file with a sample application, source code and javadoc
> documentation).
>
> Pedro Salgado
>
>
>
> -
> 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]



Struts Advanced Resoures: Flash

2003-08-21 Thread Micael
I am retrieving resources as indicated by the following two examples:

src='staticResource.do?content_type=image/gif&resource_source=graphics/struts-power.gif' 

   alt='Powered by Struts'
   height='15'/>
href='staticResource.do?content_type=text/plain&resource_source=css/index_css.css'/>

The "staticResource" class is as follows:


public final class ActionStaticResource
extends Action {  
  public ActionForward execute(ActionMapping 
mapping,
   ActionForm 
form,  
   HttpServletRequest 
request,  
   HttpServletResponse 
response)
  throws IOException,
 ServletException {  

response.setContentType(request.getParameter(StaticResource.CONTENT_TYPE));  

try {  
  String  fileName = WEB_INF.getClasspath() + 
  request.getParameter(StaticResource.RESOURCE_SOURCE);  
  FileInputStream fis  = new 
FileInputStream(fileName);  
  byte[]  imageBuf = new byte[1024];  
  BufferedInputStream bis  = new 
BufferedInputStream(fis);  
  byte[]  bytes= new 
byte[bis.available()];  
  OutputStreamos   = 
response.getOutputStream();  

  bis.read(bytes);  
  os.write(bytes);  
} catch(Exception e) { System.out.println(e);}  
return null;  
  }  
} /// ;-)  

However, I cannot get this to work with Flash files.  Someone have a 
suggestion?

LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank you 



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


RE: RE : Remote and local EJB

2003-08-21 Thread Alok Tijoriwala
Hi Viral,

As per my understanding containers are smart enough to
treat the invocation as remote or local. I know that
for IBM Websphere 5.0.

Typically the web layer and buisness layers are
separately deployed and so a very rare chance of
having a local interface for your EJB. And if the
communication is inevitable than its preferred using
normal Java Beans.

EJB-EJB communication may involve local interfaces for
certain highly couled EJB designs.

Regards
Alok

--- Shashank Dixit <[EMAIL PROTECTED]>
wrote:
> you mean you can mention these in ejb-jar.xml?
> How?
> 
> Shashank S. Dixit
> Software Analyst.
> Datamatics Ltd.
> Contact: 28291253 ext 146
> Mobile: 9820930075
> 
> Be brave against all odds. Never give up.
> 
> 
> -Original Message-
> From: Viral_Thakkar
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 3:35 PM
> To: [EMAIL PROTECTED]; Struts Users
> Mailing List
> Subject: RE : Remote and local EJB
> 
> 
> This seems to be good idea.
> 
> I think EJB configuration files may also help us to
> achieve the same.
> 
> 
> 
> -Original Message-
> From: Shashank Dixit
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 2:29 PM
> To: Viral_Thakkar; Struts Users Mailing List
> Subject: RE: RE : Remote and local EJB
> 
> You can have properties file where you can define
> which interface should you
> consider for calling EJBs. SO that you dont have to
> change your code to
> serve your purpose.
> Let me know what do you think
> 
> Shashank S. Dixit
> Software Analyst.
> Datamatics Ltd.
> Contact: 28291253 ext 146
> Mobile: 9820930075
> 
> Be brave against all odds. Never give up.
> 
> 
> -Original Message-
> From: Viral_Thakkar
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 11:30 AM
> To: Struts Users Mailing List;
> [EMAIL PROTECTED]
> Subject: RE: RE : Remote and local EJB
> 
> 
> If we know that EJBs and struts classes will reside
> in same JVM then why we
> should also invoke the stateless session bean
> remotely? We can invoke that
> session bean using the local interface... rite .?
> 
> Although I agree that in furure, we may deploy web
> and app classes on
> different machines, so that's why I am looking for a
> solution where we can
> take advantage of both local and remote interface of
> EJB.
> 
> I would say we should prefer the local EJB call
> instead of remote EJB call
> as far as possible.
> 
> Viral
> 
> 
> 
> 
> 
> 
> 
> -Original Message-
> From: Shashank Dixit
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 10:29 AM
> To: Struts Users Mailing List; Viral_Thakkar;
> [EMAIL PROTECTED]
> Subject: RE: RE : Remote and local EJB
> 
> Hi Viral
> 
> Ideally there should be one stateless session bean
> within action class and
> business component EJBs so that you have only one
> remote call and all other
> EJB calls are local. You should always program
> considering different tiers
> on different machines, although you are using the
> web and app tier on same
> machine now. Let me know what do you think on this.
> 
> Shashank S. Dixit
> Software Analyst.
> Datamatics Ltd.
> Contact: 28291253 ext 146
> Mobile: 9820930075
> 
> Be brave against all odds. Never give up.
> 
> 
> -Original Message-
> From: Viral_Thakkar
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 9:40 AM
> To: Struts Users Mailing List; Piper, James D CECOM
> SEC EPS
> Subject: RE : Remote and local EJB
> 
> 
> Thanks Jim.
> 
> I am using the oracle 9iAS. I also developed the EJB
> which supports both
> remote and local access. I am also able to invoke
> this EJB from my action
> class. I accessed this EJB using the remote and also
> using local interface
> separately.
> 
> The reason why I want this EJB to be deployed both
> as local and remote is
> that at present EJB will be accessed by the struts
> action class, both are in
> same JVM so I can access the EJB using the local
> interface.
> 
> In future when we do clustering then at that time,
> EJB bean may be at
> different server, in different JVM, at that time
> struts action class should
> dynamically find the remote EJB.
> 
> One way I think, we can handle such situation in the
> catch block of the
> NamingException() while accessing the local bean, we
> need to lookup the
> remote EJB. But it seems that this is not the good
> programming practice.
> 
> So I am looking for some design pattern or
> framework, which supports the
> solution to this problem.
> 
> Thanks,
> Viral
> 
> 
> -Original Message-
> From: Piper, James D CECOM SEC EPS
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 20, 2003 7:49 PM
> To: Viral_Thakkar
> Subject: RE: RE : Remote and local EJB
> 
> So let me see if I understand what it is you are
> wanting to accomplish.  It
> sounds like you have a bunch of EJBs, a Struts
> application and several
> servers.  You would like http requests coming in to
> be 'evaluated' by your
> application and then based on some information
> within that 

RE : Remote and local EJB

2003-08-21 Thread Viral_Thakkar
I think this part we need to explore. Even I don't know about this configuration but 
if we can find solution to this then nothing like that...

Otherwise configuration using the external properties/xml files always there... :)

But still I think we need to have code for both , accessing remote and local EJBs in 
the EJB client program (business delegate) and it will read some file and will execute 
only one of the block (remote or local)...

Wht u all say..???


 
-Original Message-
From: Shashank Dixit [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 6:00 PM
To: Struts Users Mailing List
Cc: Viral_Thakkar
Subject: RE: RE : Remote and local EJB

you mean you can mention these in ejb-jar.xml?
How?

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 3:35 PM
To: [EMAIL PROTECTED]; Struts Users Mailing List
Subject: RE : Remote and local EJB


This seems to be good idea.

I think EJB configuration files may also help us to achieve the same.



-Original Message-
From: Shashank Dixit [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 2:29 PM
To: Viral_Thakkar; Struts Users Mailing List
Subject: RE: RE : Remote and local EJB

You can have properties file where you can define which interface should you
consider for calling EJBs. SO that you dont have to change your code to
serve your purpose.
Let me know what do you think

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 11:30 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: RE : Remote and local EJB


If we know that EJBs and struts classes will reside in same JVM then why we
should also invoke the stateless session bean remotely? We can invoke that
session bean using the local interface... rite .?

Although I agree that in furure, we may deploy web and app classes on
different machines, so that's why I am looking for a solution where we can
take advantage of both local and remote interface of EJB.

I would say we should prefer the local EJB call instead of remote EJB call
as far as possible.

Viral







-Original Message-
From: Shashank Dixit [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 10:29 AM
To: Struts Users Mailing List; Viral_Thakkar;
[EMAIL PROTECTED]
Subject: RE: RE : Remote and local EJB

Hi Viral

Ideally there should be one stateless session bean within action class and
business component EJBs so that you have only one remote call and all other
EJB calls are local. You should always program considering different tiers
on different machines, although you are using the web and app tier on same
machine now. Let me know what do you think on this.

Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075

Be brave against all odds. Never give up.


-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 9:40 AM
To: Struts Users Mailing List; Piper, James D CECOM SEC EPS
Subject: RE : Remote and local EJB


Thanks Jim.

I am using the oracle 9iAS. I also developed the EJB which supports both
remote and local access. I am also able to invoke this EJB from my action
class. I accessed this EJB using the remote and also using local interface
separately.

The reason why I want this EJB to be deployed both as local and remote is
that at present EJB will be accessed by the struts action class, both are in
same JVM so I can access the EJB using the local interface.

In future when we do clustering then at that time, EJB bean may be at
different server, in different JVM, at that time struts action class should
dynamically find the remote EJB.

One way I think, we can handle such situation in the catch block of the
NamingException() while accessing the local bean, we need to lookup the
remote EJB. But it seems that this is not the good programming practice.

So I am looking for some design pattern or framework, which supports the
solution to this problem.

Thanks,
Viral


-Original Message-
From: Piper, James D CECOM SEC EPS
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 7:49 PM
To: Viral_Thakkar
Subject: RE: RE : Remote and local EJB

So let me see if I understand what it is you are wanting to accomplish.  It
sounds like you have a bunch of EJBs, a Struts application and several
servers.  You would like http requests coming in to be 'evaluated' by your
application and then based on some information within that request (i.e.
users name, users ip address, users browsers type, users preference
selection, or possibly even the current servers load) invoke either a local
or a remote EJB.  For example maybe

Re: Struts and Jetspeed

2003-08-21 Thread BaTien Duong
Vic Cekvenich wrote:



BaTien Duong wrote:

Emerson Cargnin wrote:

any advice in choosing tiles vs jetspeedy?
I suppose tiles integrates better, but at the other side jettyspeed 
follows the portlets specification. Any other comments?




It is still too early to tell. I believe in simplicity and the right 
design that up to now Struts-Tiles give us elegant 
controller-templating engine. Craig has stated his "ideal goal" for 
developing Struts to work with JSR-168. The challenge is to have 
something like tiles as a template engine according to JSR-168 
specifications for Portal / Portlet container(s).

I think after the release of JSR-168 Reference Inplementation, many 
Struts developers  (i know at least a number of Portals based on 
Struts-Tiles, all except basicPortal.com , stating to support 
JSR-168)  (i am one of them) will seriously put some time in this 
refactoring process.

Just FYI, this is the reason bP will bypass 168:
http://marc.theaimsgroup.com/?l=jetspeed-user&m=105850057414235&w=2
bP action event context actually handles the potlet  api and servlet 
api (as it was built to handle more the servlets... SOAP for example), 
but instead will focus on WS, SOA, XML-RPC and other things that 
address a heterogeneous environment, organizations that have C# and 
Java. If anyone wants to jump of the bridge... I will have even more 
clients. :-)

I plan to implent something better than dataGridGirl.com, Ex:
http://www.tufat.com/datagrid/datagrid2.html
So we just have different goals. What is the url to the portal you are 
building, if it is avialable?

.V
The discussion of pro and con of server-side and client-side 
technologies have been partly explored in Jetspeed  Mailing list. I 
generally agree with the view that given current status, the JSR-168 
authors have done a good job to balance what can be best to deliver at 
this time. The client side state maintenance still needs to be addressed 
by Java developer community.

My portal development actually takes the similar approach as you are 
planning to do to get our portlets and personalization engine working 
with standard Portal / Portlet containers, and gradually move into our 
Portal/Portlet container built from open technologies such as Struts. 
The site is http://www.dbgroups.com

BaTien
DBGROUPS


Re: is there any Dependable Option List Tag ?

2003-08-21 Thread Jing Zhou
To me, if resources and time allowed, I would use pure JavaScript to do it
for
faster performance. But using a server-side reusable logic is also very
appealing.

You could attach a custom event to the first drop-down list as follows:




In your action class, if you find the parameter with name "9change", you
could invoke a general purpose method that takes property1 as the current
selected item in the first drop-down list and property2 as a map holding
key/value
pairs. You use the property1 as the key to find the value which is type of
String[].
You assign the value to property3 to which the option of the second select
list is bound to.
And finally you return the action forward to the current page.

This example tells me that the reusable logic and reusable component are
very different and sometime the reusable logic is easier to use.
You could plug such reusable logic into anywhere in your page
without having to introduce a *compound* component in terms of new tags.

Jing
Netspread Carrier
http://www.netspread.com



- Original Message - 
From: "Kommineni, Sateesh (IndSys)" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, August 21, 2003 1:28 AM
Subject: RE: is there any Dependable Option List Tag ?


> Hi All,
>
>   Thanks for your suggestions..
>
>The JavaScript option which most of you mentioned cannot be made as a
> component . If we have a Tag Lib tag for this , we can just pass say an
> ArrayList and the dependency relationship so that it will be reused across
> many pages/ Applications..
>
>   Any way thanks for the responses..
>
> -Sateesh
>
> -Original Message-
> From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 20, 2003 10:23 PM
> To: 'Struts Users Mailing List'
> Subject: RE: is there any Dependable Option List Tag ?
>
>
> Sateesh,
> What you want to do is typically done on the client side in JavaScript.
That
> is not to say that it can't be done at the server, but for performance
> reasons, the JavaScript solution avoids having to refresh the page each
time
> an item or items are moved from one select box to another. Once the items
> are moved, then the request can be sent to the server and the changes can
be
> updated in the DB or wherever.
>
> Regards,
>
> Richard
>
>
> -Original Message-
> From: Kommineni, Sateesh (IndSys) [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 20, 2003 5:50 AM
> To: Struts Users Mailing List
> Subject: is there any Dependable Option List Tag ?
>
>
> Hi,
>
>If we have two related Drop Down boxes in a Form and need to populate
> those when we load the page and when we change the value in the first drop
> down we need to load the corresponding values in the second .. Can any
> TagLib supports this..If so could you pls provide me some examples..
>
> Thanks
> Sateesh
>
>
> "THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
> ADDRESSEE and may contain confidential and privileged information. If the
> reader of this message is not the intended recipient, you are notified
that
> any dissemination, distribution or copy of this
> communication is strictly Prohibited.
> If you have received this message by error, please notify us
> immediately, return the original mail to the sender and delete the
> message from your system."
>
>
> -
> 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]
>
>
> "THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
> ADDRESSEE and may contain confidential and privileged information.
> If the reader of this message is not the intended recipient,
> you are notified that any dissemination, distribution or copy of this
> communication is strictly Prohibited.
> If you have received this message by error, please notify us
> immediately, return the original mail to the sender and delete the
> message from your system."
>
>
> -
> 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: Setting a Welcome File + Tiles + PreCompiled JSP's

2003-08-21 Thread K.C. Baltz
I just have an index.jsp that I still include in the war, even though 
all my JSPs are pre-compiled.  I'm not actually sure if the file version 
or the pre-compiled version gets called.  Doesn't really matter I 
guess.And I use a META refresh to redirect to my main page:

">

K.C.

Pat Quinn wrote:

I'm using tiles and i know i can't set the  attribute in 
web.xml to a tile definition or a struts action url. I'm also 
precompiling all my JSP's so i can't assign it to a JSP... i was 
thinking about assign it to a html file and then onLoad i could 
redirect to my logon action url... to do this i'd have to hard code 
the ipaddress and port number into my url so i don't really want to do 
that. Any ideas how i might do this?

_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

-
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: Horizon: a view management plugin

2003-08-21 Thread Pedro Emanuel de Castro Faria Salgado
Hi,

> Pedro,
>
> I'ld be interested in your implementation as I did the same thing. I
> define what I call view configurations in an XML file. On startup they
> are cached and I can access them at run time. It sure beats
> writing a bunch of throw-away Java beans which are used to present data.
>
> Accessing a particular view configuration is as simple as:
>
> DynaBean view = ViewFactory.getInstance().getView(viewName);

  it is always good to see that someone else has done something similar...
it means that i one is working on the right track :) ...
i will also be needing some help, if you would like to join... :)

  i already posted the source code on another reply so i will
email you the code directly, so you can check what i did.

  comments are welcome,

Pedro Salgado

>
> robert
>
>> -Original Message-
>> From: Pedro Emanuel de Castro Faria Salgado
>> [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, August 20, 2003 5:03 PM
>> To: [EMAIL PROTECTED]
>> Subject: Horizon: a view management plugin
>>
>>
>> Hi,
>>
>>I have built a plugin for Struts that creates view beans using
>> dynabeans that are defined on a xml file and i was wondering if anyone
>> in the Struts project/mailing list was interested on checking the use
>> of it?
>>
>>   It is a very simple plugin (i call it Horizon... because it can have
>> a
>> lot of views :) )
>> but it gave me a big help on some projects i am currently working
>> on... who knows somebody may find it useful :)
>>
>>   I will be waiting for a response for those who maybe interested
>> (i will send a war file with a sample application, source code and
>> javadoc documentation).
>>
>> Pedro Salgado
>>
>>
>>
>> -
>> 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: Horizon: a view management plugin

2003-08-21 Thread Marcos Oliva
Hola Pedro, 

How can I get a hold of your module ?

Thanks

Marcos oliva

-Original Message-
From: Pedro Emanuel de Castro Faria Salgado
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 10:47 AM
To: [EMAIL PROTECTED]
Subject: RE: Horizon: a view management plugin

Hi,

> Pedro,
>
> I'ld be interested in your implementation as I did the same thing. I
> define what I call view configurations in an XML file. On startup they
> are cached and I can access them at run time. It sure beats
> writing a bunch of throw-away Java beans which are used to present
data.
>
> Accessing a particular view configuration is as simple as:
>
> DynaBean view = ViewFactory.getInstance().getView(viewName);

  it is always good to see that someone else has done something
similar...
it means that i one is working on the right track :) ...
i will also be needing some help, if you would like to join... :)

  i already posted the source code on another reply so i will
email you the code directly, so you can check what i did.

  comments are welcome,

Pedro Salgado

>
> robert
>
>> -Original Message-
>> From: Pedro Emanuel de Castro Faria Salgado
>> [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, August 20, 2003 5:03 PM
>> To: [EMAIL PROTECTED]
>> Subject: Horizon: a view management plugin
>>
>>
>> Hi,
>>
>>I have built a plugin for Struts that creates view beans using
>> dynabeans that are defined on a xml file and i was wondering if
anyone
>> in the Struts project/mailing list was interested on checking the use
>> of it?
>>
>>   It is a very simple plugin (i call it Horizon... because it can
have
>> a
>> lot of views :) )
>> but it gave me a big help on some projects i am currently working
>> on... who knows somebody may find it useful :)
>>
>>   I will be waiting for a response for those who maybe interested
>> (i will send a war file with a sample application, source code and
>> javadoc documentation).
>>
>> Pedro Salgado
>>
>>
>>
>> -
>> 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]


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



nested:iterate rendering fails

2003-08-21 Thread John . E . Gregg
Hi all,
 
I have a form with a nested bean.  That bean contains a collection I'm
trying to iterate with indexed properties.  I tried first doing this without
the nested tags but had no success.  (The page displayed but instead of
myForm.nestedBean.element[0].property, I only got element[0].property.)  I
did add the extra getter and setter to the nestedBean, but I guess Struts
expects it to be on the form.
 
I then tried the nested tags based on this post:
http://marc.theaimsgroup.com/?l=struts-user

&m=105364604308495&w=2.  This seemed promising, but the page won't even
render.  The relevant part of the stack trace is at the end of this message.
My jsp code looks like this:
 



...







"clientDoc" is the bean on the form.  "defects" is a collection on the form.
"statusEffectiveDate" is a property of each element in the defects
collection.  I ran the debugger and can see that NestedIterateTag's
"property" property is set to "clientDoc.defects," which seems reasonable,
and "originalProperty" is set to "defects."  Some attr is trying to be
looked up, but it's name is null.  I'm using Struts 1.1 rc1.
 
thanks a lot
 
 
java.lang.NullPointerException
 at java.util.Hashtable.get(Hashtable.java:329)
 at
org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java
:308)
 at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:787)
 at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:835)
 at
org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
 at
org.apache.struts.taglib.nested.logic.NestedIterateTag.doStartTag(NestedIter
ateTag.java:123)
 at
org.apache.jsp.doc_0002ddefects_jsp._jspService(doc_0002ddefects_jsp.java:15
8)
 
john gregg
Wells Fargo Services Company
Minneapolis, MN
 


RE: How to set charset UTF-8

2003-08-21 Thread struts
Did you try <% request.setCharacterEncoding("UTF-8"); %>  ?

-Original Message-
From: Billy Ng [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 4:14 PM
To: Struts Users Mailing List
Subject: How to set charset UTF-8


Hi folks,

I added the following to test what encoding my Struts app is using

<%  
   response.setContentType("text/html; charset=UTF-8");
   System.out.println(response.getCharacterEncoding());
%>

But it still print out the "ISO-8859-1", why?  How can I set the
contentType to "text/html; charset=UTF-8"

Thanks!

Billy Ng


This mailbox protected from junk email by Matador
from MailFrontier, Inc. http://info.mailfrontier.com



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



RE: is there any Dependable Option List Tag ?

2003-08-21 Thread Yee, Richard K,,DMDCWEST
Sateesh,
You can make the JavaScript solution as a component by having a tag library
produce the necessary java script and HTML tags together or by having it
just produce the HTML tags and including the necessary JavaScript functions
in a separate .js file.

You need to balance the ease of you development with the useability of the
product. What's the point of having easily reused code if it produces a web
site that is very slow and awkward to use?

Regards,

Richard


-Original Message-
From: Kommineni, Sateesh (IndSys) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 20, 2003 11:28 PM
To: Struts Users Mailing List
Subject: RE: is there any Dependable Option List Tag ?


Hi All,

  Thanks for your suggestions..

   The JavaScript option which most of you mentioned cannot be made as a
component . If we have a Tag Lib tag for this , we can just pass say an
ArrayList and the dependency relationship so that it will be reused across
many pages/ Applications..

  Any way thanks for the responses..

-Sateesh

-Original Message-
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 10:23 PM
To: 'Struts Users Mailing List'
Subject: RE: is there any Dependable Option List Tag ?


Sateesh,
What you want to do is typically done on the client side in JavaScript. That
is not to say that it can't be done at the server, but for performance
reasons, the JavaScript solution avoids having to refresh the page each time
an item or items are moved from one select box to another. Once the items
are moved, then the request can be sent to the server and the changes can be
updated in the DB or wherever.

Regards,

Richard


-Original Message-
From: Kommineni, Sateesh (IndSys) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 20, 2003 5:50 AM
To: Struts Users Mailing List
Subject: is there any Dependable Option List Tag ?


Hi,

   If we have two related Drop Down boxes in a Form and need to populate
those when we load the page and when we change the value in the first drop
down we need to load the corresponding values in the second .. Can any
TagLib supports this..If so could you pls provide me some examples..

Thanks
Sateesh


"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information. If the
reader of this message is not the intended recipient, you are notified that
any dissemination, distribution or copy of this 
communication is strictly Prohibited. 
If you have received this message by error, please notify us 
immediately, return the original mail to the sender and delete the 
message from your system."


-
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]


"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information. If the
reader of this message is not the intended recipient, you are notified that
any dissemination, distribution or copy of this 
communication is strictly Prohibited. 
If you have received this message by error, please notify us 
immediately, return the original mail to the sender and delete the 
message from your system."


-
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: Setting a Welcome File + Tiles + PreCompiled JSP's

2003-08-21 Thread Kevin Peters
I remember reading something when we first started building our STRUTS
application that said that you had to have a physical file outside the
WEB-INF directory representing your welcomefile.  All of our JSPs reside in
a subdirectory under WEB-INF, so we put a blank file named index.do in the
root directory and it works like a charm (no redirects needed).


Kevin

-Original Message-
From: K.C. Baltz [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 3:14 PM
To: Struts Users Mailing List
Subject: Re: Setting a Welcome File + Tiles + PreCompiled JSP's


I just have an index.jsp that I still include in the war, even though 
all my JSPs are pre-compiled.  I'm not actually sure if the file version 
or the pre-compiled version gets called.  Doesn't really matter I 
guess.And I use a META refresh to redirect to my main page:

">

K.C.

Pat Quinn wrote:

> I'm using tiles and i know i can't set the  attribute in 
> web.xml to a tile definition or a struts action url. I'm also 
> precompiling all my JSP's so i can't assign it to a JSP... i was 
> thinking about assign it to a html file and then onLoad i could 
> redirect to my logon action url... to do this i'd have to hard code 
> the ipaddress and port number into my url so i don't really want to do 
> that. Any ideas how i might do this?
>
> _
> MSN 8 with e-mail virus protection service: 2 months FREE* 
> http://join.msn.com/?page=features/virus
>
>
> -
> 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]


*** 
This electronic mail transmission contains confidential and/or privileged 
information intended only for the person(s) named.  Any use, distribution, 
copying or disclosure by another person is strictly prohibited. 
*** 



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



RE: Horizon: a view management plugin

2003-08-21 Thread Robert Taylor
I may be intestested. Email me off line and let me know
what you need help with.

robert

> -Original Message-
> From: Pedro Emanuel de Castro Faria Salgado
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 1:47 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Horizon: a view management plugin
>
>
> Hi,
>
> > Pedro,
> >
> > I'ld be interested in your implementation as I did the same thing. I
> > define what I call view configurations in an XML file. On startup they
> > are cached and I can access them at run time. It sure beats
> > writing a bunch of throw-away Java beans which are used to present data.
> >
> > Accessing a particular view configuration is as simple as:
> >
> > DynaBean view = ViewFactory.getInstance().getView(viewName);
>
>   it is always good to see that someone else has done something similar...
> it means that i one is working on the right track :) ...
> i will also be needing some help, if you would like to join... :)
>
>   i already posted the source code on another reply so i will
> email you the code directly, so you can check what i did.
>
>   comments are welcome,
>
> Pedro Salgado
>
> >
> > robert
> >
> >> -Original Message-
> >> From: Pedro Emanuel de Castro Faria Salgado
> >> [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, August 20, 2003 5:03 PM
> >> To: [EMAIL PROTECTED]
> >> Subject: Horizon: a view management plugin
> >>
> >>
> >> Hi,
> >>
> >>I have built a plugin for Struts that creates view beans using
> >> dynabeans that are defined on a xml file and i was wondering if anyone
> >> in the Struts project/mailing list was interested on checking the use
> >> of it?
> >>
> >>   It is a very simple plugin (i call it Horizon... because it can have
> >> a
> >> lot of views :) )
> >> but it gave me a big help on some projects i am currently working
> >> on... who knows somebody may find it useful :)
> >>
> >>   I will be waiting for a response for those who maybe interested
> >> (i will send a war file with a sample application, source code and
> >> javadoc documentation).
> >>
> >> Pedro Salgado
> >>
> >>
> >>
> >> -
> >> 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]
>


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



Re: writing an actionform for nested indexed properties

2003-08-21 Thread Nicholas L Mohler





Cameron,

Are you sure that your request attributes are named that way?  I read that
as a 3 dimensional table...do you really have that in your page?

If you are getting those request attributes, then I'm stumped, but I'd love
to know the answer :-)

Otherwise...you need a getter/setter for the collection which get s and
sets a collection of "bean" objects.  You also need a get method for a
single element in your indexed collection.  For example:

public Collection getIps() {return ips;}
public void setIps(ArrayList ips) {this.ips = ips;}

public ItemProperties getIp(int index) {
  while (index >= ips.size()) {
ips.add(new ItemProperties());
  }
  return (ItemProperties)ips.get(index);
}

Nick



   

  "Cameron Hickey" 

  <[EMAIL PROTECTED]To:   "'Struts Users Mailing 
List'" <[EMAIL PROTECTED]>
  com> cc: 

   Subject:  writing an actionform for 
nested indexed properties   
  08/21/2003 10:00 

  AM   

  Please respond to

  "Struts Users

  Mailing List"

   

   





I am trying to write an actionform which will properly handle an array
of indexed properties which look like this:

ip[0].itemPropertys[0].itemPropertyId
ip[0].itemPropertys[0].value

ip[1].itemPropertys[0].itemPropertyId
ip[1].itemPropertys[0].value

etc...


In my Action form, what getters and setters do I need?

This is what I have so far:

public List getIp() { return ip;}
public void setIp(List ipList) {ip = ipList;}

public List getItemPropertys(int idx) {return (List) ip.get(idx); }
public void setItemPropertys(int idx,ItemProperty ipe)
{ip.set(idx,ipe);}

public ItemProperty getItemProperty(int idx, List ipl) {return
(ItemProperty) ipl.get(idx);}
public void setItemProperty(int idx,List ipl, ItemProperty tip)
{ipl.set(idx,tip);}

public String getValue(ItemProperty tip) {return tip.getValue();}
public void setValue(String s, ItemProperty tip) {tip.setValue(s);}

public int getItemPropertyId(ItemProperty tip) {return
tip.getItemPropertyId();}
public void setItemPropertyId(int i, ItemProperty tip)
{tip.setItemPropertyId(i);}




but when I try to submit the form, I get this error:


java.lang.NullPointerException
 at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUt
ils.java:497)
 at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUt
ils.java:410)
 at
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUti
ls.java:729)
 at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.jav
a:780)
 at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:793)
 at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)


which I assume is coming from the fact that I don't have all the right
getters and setters available, since it must be trying to call one that
does not exist (thus the null pointer).

Is this right?

Should I have other getters and setters?



THANKS FOR ANY HELP!!

Cameron


-
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]



Validator with property String array problem

2003-08-21 Thread java-dude
Hi,

I am having problems using  Validator framework to perform client 
side validation on a String array property declared in a 
DynaValidatorForm.

The results are that the validation does seem to work in a fashion 
such that the user is not taken to the next page and is kept on 
current jsp while data entered is invalid BUT no pop up alert error 
messages are being diplayed. (For other forms in the application 
where I am validating single properties the validation and pop up 
error messages are working fine.)

Has anybody solved/encountered this problem ?

I have provided the relevant snippets from my current configuration 
to illustrate my implementation :-

struts-config.xml
=
.
.
.

 

.
.
.

validation.xml
==
.
.
.

  




minlength
1


maxlength
6


mask
^[0-9]*$

  

.
.
.

ApplicationResources.properties
===
.
.
.
prompt.theReading=The Reading
.
.
.

enterReading.jsp

.
.
.



.
.
.



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



Re: [OT] Shopping cart best practices - Cookie, HttpSession or DB

2003-08-21 Thread Adam Hardy
I think the issue of using up server memory with lots of shopping carts 
in the session is worth thinking about. It's just a question of maths - 
how much memory have you got, what is the peak number of users 
envisaged, how much stuff are you going to store in the session? even 
then I think some app servers swap out sessions to the hard drive when 
memory is low.

You don't need more than an array of item ids and quantities, methinks, 
so it should be small.



On 08/21/2003 06:38 PM Greg Ludington wrote:
1. Store your cart in session, and when that all works. For everyone. 
Gets to the checkout and funds are exchanged.


While I agree with the previous posters who said that it would make your
life easier if you can require login, if you absolutely need to save
carts of users regardless of login status, you might consider having
your Cart object impelment
javax.servlet.http.HttpSessionBindingListener.  Objects implementing
this interface are notified when they are bound to or unbound from
(either explicitly or by the session itself expiring/invalidated) a
session, and can perform tasks at these times.
In your case, when your Cart object is unbound you would save its
contents to your database.  (Conversely, when you first bind a Cart
object to a session, you can check the database and refresh its
contents, if any.)  Nothing about this approach prohibits you from
saving Cart information at other appropriate times -- user logins,
purchases, and the like -- this approach just allows you the ability to
store information, like cart contents, at the end of a client session.
-Greg



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

--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Quick Java question..

2003-08-21 Thread David Erickson
Hey as I've been building my actions I was thinking it could be useful for
me to have a method that does some database querying, but I would like to
give the user the ability to narrow down that query with as many input
fields as he needs.  Is there a way to write a method that takes a non-set
amount of arguments?  (Other than just passing the method a growable array..
which is a viable alternative)

Ie

public String myfunction(String a, String b, String c on down the line
indefinitly)

?
I thought I had seen this done somewhere somehow but I may be wrong.
Thanks!


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



RE: Whats the security trick for not permiting the browser back button on SignOut?

2003-08-21 Thread Cezar Nasui
Hi Brad,

Isn't suggested not to use with Struts direct links to the jsp pages?
>>
I don't recall exactly if this is the code needed to "erase"/change the
location
but it looks just like simple html link and still I think this doesn't solve
my refresh problem I mentioned before

Cezar

-Original Message-
From: Brad Balmer [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 8:07 AM
To: Struts Users Mailing List
Subject: Re: Whats the security trick for not permiting the browser back
button on SignOut?


I ran into a similar problem with my login application.  What I did was
simply replace the page name that is put in the history with a page that
I wanted.





Cezar Nasui wrote:

>Hi Henry,
>
>The problem I noticed is if you go Back to the first page after login and
>make a refresh on that page  you will be able to navigate again in your app
>as a  new session is created 'cause refresh re-post the login data.
>Your app does that? Do you know any solution for this one?
>I think with some JavaScript you can erase the history of the Back button.
I
>don;t recall exaclty the code but I'll look for it. What I want to know is
>if it's a good method as we know we shouldn't rely on user's settings (ex.
>Javascript not enabled).
>
>Cezar
>
>-Original Message-
>From: Henry Voyer [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, August 20, 2003 7:30 PM
>To: [EMAIL PROTECTED]
>Subject: Whats the security trick for not permiting the browser back
>button on SignOut?
>
>
>Hi fellow Strutser
>
>I have implemented securityFilter (http://securityFilter.org) in my struts
>app.
>But once i log off i can press the browsers back button and go back to the
>users content page.
>He cant do any action since the securityFilter dont let him but he can
still
>see the pages he already accessed.  i would like to know how to implement
>the redirection to signIn page for the browser back button once he SignOut.
>
>I have seen the examples of the Apache Admin site and the security app
>examples but i cant find how they do this.
>
>So guys whats the trick?
>
>Regards and thanks for all those who worked on the securityFilter and
struts
>examples.
>
>_
>Add photos to your e-mail with MSN 8. Get 2 months FREE*.
>http://join.msn.com/?page=features/featuredemail
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003
>
>
>-
>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]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003


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



flow question

2003-08-21 Thread Travis Stevens
To reach a goal, I need many different actions.  One is to select a 
record, then choose elements in that record and so on.
The select a record actions has actions within itself.  Display search 
criteria, display results.

Is it acceptable to have a single action as a controller, delegating 
request to each sub action, or is better to go sequentially from one 
action to another.  I guess the problem with a single action, is that 
one can only use one type of ActionForm.

Any other thoughts on this?

-Trav

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


RE: Quick Java question..

2003-08-21 Thread Mark Galbreath
sorry, dude, but param arguments are evaluated at compile time.  The best
you could do is overload the method.

Mark

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 6:00 PM
To: Struts Mailing List
Subject: Quick Java question..


Hey as I've been building my actions I was thinking it could be useful for
me to have a method that does some database querying, but I would like to
give the user the ability to narrow down that query with as many input
fields as he needs.  Is there a way to write a method that takes a non-set
amount of arguments?  (Other than just passing the method a growable array..
which is a viable alternative)

Ie

public String myfunction(String a, String b, String c on down the line
indefinitly)

?
I thought I had seen this done somewhere somehow but I may be wrong. 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: [OT] concatenation in java script

2003-08-21 Thread Adam Hardy
Hi Prashanth,
you need to code a function for the onsubmit event. Link the function to 
the onsubmit attribute of the form.

in the function, get the values from your dropdowns, concatenate them 
with your chosen seperator character and set the resulting string into 
the value property of a hidden field.

Then return true.

In your action form, have a property for the hidden field.

Check the archives for a discussion recently of the correct syntax for 
getting the value of a dropdown's selected option. Or check your 
favourite html website. I can't remember it exactly of the top of my head.

I'd be interested to know why you need to concatenate the values on the 
browser, instead of on the server.

Good luck
Adam
On 08/21/2003 04:08 AM Prashanth.S wrote:
Hi all,
I need to concatenate values from 2 dropdowns[user selects option from 2 dropdowns] 
and send it as a single request parameter.Is there any way to do this using java 
scripts???or how else can i do this
awaiting for reply
Thanks
Prashanth
-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Quick Java question..

2003-08-21 Thread Alex Shneyderman
You can make your parms Object []
This way you can pass as many params as you want.
Of course you will need to keep track of what element is what.

Maybe Java 1.5 will have the feature you are looking for :-)

Alex.

> -Original Message-
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 6:51 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Quick Java question..
> 
> sorry, dude, but param arguments are evaluated at compile time.  The
best
> you could do is overload the method.
> 
> Mark
> 
> -Original Message-
> From: David Erickson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 6:00 PM
> To: Struts Mailing List
> Subject: Quick Java question..
> 
> 
> Hey as I've been building my actions I was thinking it could be useful
for
> me to have a method that does some database querying, but I would like
to
> give the user the ability to narrow down that query with as many input
> fields as he needs.  Is there a way to write a method that takes a
non-set
> amount of arguments?  (Other than just passing the method a growable
> array..
> which is a viable alternative)
> 
> Ie
> 
> public String myfunction(String a, String b, String c on down the
line
> indefinitly)
> 
> ?
> I thought I had seen this done somewhere somehow but I may be wrong.
> 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]



Page After Login - Refresh problem

2003-08-21 Thread Cezar Nasui
Hello,

I used Struts to develop a web app which has a login form to permit access
to different functionnalities via a menu page. I use a session var I set at
login to check if the user has not logged out.
The problem that I have is, once I do the logoff, if I use the Back button
of the browser to the menu page and do a refresh a new session gets created
and I'm able to use the app.
I have a filter to do the verification but I tried before doing it in each
Action and I have the same problem. I don't access .jsp pages directly, I
have an Action for each of them.
I read some posts but none seems to talk about my specific problem.

It sounds like a begginer caveat but I have no idea what should I do or what
am I doing wrong.
Any help appreciated,

Cezar

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003


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



Sending a file for download and refreshing the page

2003-08-21 Thread Derek Richardson
My application allows you to download files. This is done by opening a new browser 
window (separate from the main application) which walks the user through a wizard to 
select a download. In the final action of this wizard, I set the mime type to 
"application\download" and the Content-Disposition header to "attachment; 
file=file.txt", write the file being downloaded to the ServletOutputStream that I 
obtain from the HttpServletResponse, and flush the buffer. All very simple.
 
The problem is that, after the file is downloaded, the browser window is just left 
hanging there with the last contents displayed. I need a way to close that window. The 
best solution would be to display a confirmation page in the window after the download 
and then allow a user to click a button to close the window. Second best would be to 
just close the window.
 
I tried returning an ActionForward, both a regular forward and a redirect, from my 
action and it seems that it is simply ignored. I tried setting 
onsubmit="window.close()" on the form that starts the download, but then the download 
doesn't happen.
 
I searched the archives, with no success.
 
Any help is appreciated.
 
Derek Richardson
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Quick Java question..

2003-08-21 Thread Michael Thompson
Or wait till 1.5 ;)

http://developer.java.sun.com/developer/community/chat/JavaLive/2003/jl0729.html

*Neal Gafter*: Then there's autoboxing/unboxing and varargs. Boxing 
allows you to use a primitive int instead of a |java.lang.Integer|, and 
unboxing does the reverse. varargs allows you to declare a method that 
takes a variable number of arguments, which are automatically packed up 
into an array before being passed to the method.

   --m

Alex Shneyderman wrote:

You can make your parms Object []
This way you can pass as many params as you want.
Of course you will need to keep track of what element is what.
Maybe Java 1.5 will have the feature you are looking for :-)

Alex.

 

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 6:51 PM
To: 'Struts Users Mailing List'
Subject: RE: Quick Java question..
sorry, dude, but param arguments are evaluated at compile time.  The
   

best
 

you could do is overload the method.

Mark

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 6:00 PM
To: Struts Mailing List
Subject: Quick Java question..
Hey as I've been building my actions I was thinking it could be useful
   

for
 

me to have a method that does some database querying, but I would like
   

to
 

give the user the ability to narrow down that query with as many input
fields as he needs.  Is there a way to write a method that takes a
   

non-set
 

amount of arguments?  (Other than just passing the method a growable
array..
which is a viable alternative)
Ie

public String myfunction(String a, String b, String c on down the
   

line
 

indefinitly)

?
I thought I had seen this done somewhere somehow but I may be wrong.
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]
 



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


Solution: Whats the security trick for not permiting the browser back button on SignOut?

2003-08-21 Thread Henry Voyer
Hi everyone

I found the solution. Its related to the browser cached pages.
The trick is that in struts you specified to the controller not to let the
browser to cache the html pages of your apps. That way the browser has to
ask for the page every time that its been accessed. And in consequence, to
validate the authentication of the user.

So in the controller config in struts-config.xml you put something like

  

nocache="true" is the trick.

PS. Don't forget to redirect the error 400 to the login page. In web.xml add

   
  400
  /index.jsp
   

Regards




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



how many concurent users on the system

2003-08-21 Thread Rachid Drissi
Hi All,

anybody knows by chance a program(s) that  would show us (statistics) how  many 
concurent users are on the application at certain point of time

Thanks,
Rachid.

Telling Users to Wait

2003-08-21 Thread Mark Silva
Hello Struts Gurus,

I am facing an issue in my application where I need to run a database
creation script, and a database import script through the web (running
bat files on the server).  I can run these files fine, but they take a
few minutes to run...  

How can I tell the user when they have finished running?  This seems to
be a sort of push technology I am in need of, but maybe there is another
way?.  I can definitely tell them to wait for a few minutes, but how do
I actually tell them when the process is done (since there is not
another page request at this time.)

Has anyone done something similar to this?

Thanks,
Mark

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



RE: Telling Users to Wait

2003-08-21 Thread Shane Mingins
I did something similar and used a refresh tag to update the screen whilst
the process was running ... it would show % completed (in text i.e. 25%
etc).

I had my database processing running in a new thread.

I had a session attribute BEEN_HERE, if that was null I start the process.  

When the process is complete and BEEN_HERE was not null I removed the
attribute and forwarded to the next page.

HTH
Shane



-Original Message-
From: Mark Silva [mailto:[EMAIL PROTECTED] 
Sent: Friday, 22 August 2003 12:03 p.m.
To: Struts Users Mailing List
Subject: Telling Users to Wait

Hello Struts Gurus,

I am facing an issue in my application where I need to run a database
creation script, and a database import script through the web (running
bat files on the server).  I can run these files fine, but they take a
few minutes to run...  

How can I tell the user when they have finished running?  This seems to
be a sort of push technology I am in need of, but maybe there is another
way?.  I can definitely tell them to wait for a few minutes, but how do
I actually tell them when the process is done (since there is not
another page request at this time.)

Has anyone done something similar to this?

Thanks,
Mark

-
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: Telling Users to Wait

2003-08-21 Thread Charles Canning
Hi Mark,

One way to do it is have a page refresh that checks for a completion flag.
The page/action would poll the object with the flag on eahc refresh, when
set, display completion message.

chuck

-Original Message-
From: Mark Silva [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 7:03 PM
To: Struts Users Mailing List
Subject: Telling Users to Wait


Hello Struts Gurus,

I am facing an issue in my application where I need to run a database
creation script, and a database import script through the web (running
bat files on the server).  I can run these files fine, but they take a
few minutes to run...

How can I tell the user when they have finished running?  This seems to
be a sort of push technology I am in need of, but maybe there is another
way?.  I can definitely tell them to wait for a few minutes, but how do
I actually tell them when the process is done (since there is not
another page request at this time.)

Has anyone done something similar to this?

Thanks,
Mark

-
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: how many concurent users on the system

2003-08-21 Thread James Mitchell
http://developer.java.sun.com/developer/EJTechTips/2003/tt0626.html

Scroll down to "SERVLET LIFE CYCLE LISTENERS"

That's a hint, the rest is up to you.

--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
AIM:jmitchtx




> -Original Message-
> From: Rachid Drissi [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, August 21, 2003 7:21 PM
> To: [EMAIL PROTECTED]
> Subject: how many concurent users on the system
> 
> 
> Hi All,
> 
> anybody knows by chance a program(s) that  would show us 
> (statistics) how  many concurent users are on the application 
> at certain point of time
> 
> Thanks,
> Rachid.
> 


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



OT -

2003-08-21 Thread Ray Madigan
I am using many 

RE: How to set charset UTF-8

2003-08-21 Thread Van Riper, Mike
> I added the following to test what encoding my Struts app is using
> 
> <%  
>response.setContentType("text/html; charset=UTF-8");
>System.out.println(response.getCharacterEncoding());
> %>
> 
> But it still print out the "ISO-8859-1", why?  How can I set 
> the contentType to "text/html; charset=UTF-8"

This is just a hunch, but, I suspect you can't change the character encoding
after you have started writing content to the stream. In that case, your
best bet is to do this at the very top of the JSP page:

 <%@ page contentType="text/html;charset=UTF-8" language="java" %>

Also, there is another consideration if you are using Tiles. Again this is
just a hunch, but, I suspect that you would have to have that directive as
the first line of your Tiles master layout template JSP. The concept
mentioned above for a single page applies to a Tiles page generated
dynamically from multiple JSPs all writing to the same response stream.

We ran into something like this using the Struts template custom tags with
Struts 1.0 back in 2001. We were correctly setting the character encoding
using the page directive on individual content JSPs, but, had left it off
our master page layout template JSP. So, it never took until we tracked that
down. Duh!

Hope this helps, Van

Mike Van Riper
mailto:[EMAIL PROTECTED]
http://www.baychi.org/bof/struts


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



ot: Re: RE : Remote and local EJB

2003-08-21 Thread Vic Cekvenich
Consider adding "OT": or using an EJB mail list.
.V
Alok Tijoriwala wrote:
Hi Viral,

As per my understanding containers are smart enough to
treat the invocation as remote or local. I know that
for IBM Websphere 5.0.
Typically the web layer and buisness layers are
separately deployed and so a very rare chance of
having a local interface for your EJB. And if the
communication is inevitable than its preferred using
normal Java Beans.
EJB-EJB communication may involve local interfaces for
certain highly couled EJB designs.
Regards
Alok
--- Shashank Dixit <[EMAIL PROTECTED]>
wrote:
you mean you can mention these in ejb-jar.xml?
How?
Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075
Be brave against all odds. Never give up.

-Original Message-
From: Viral_Thakkar
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 3:35 PM
To: [EMAIL PROTECTED]; Struts Users
Mailing List
Subject: RE : Remote and local EJB
This seems to be good idea.

I think EJB configuration files may also help us to
achieve the same.


-Original Message-
From: Shashank Dixit
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 2:29 PM
To: Viral_Thakkar; Struts Users Mailing List
Subject: RE: RE : Remote and local EJB
You can have properties file where you can define
which interface should you
consider for calling EJBs. SO that you dont have to
change your code to
serve your purpose.
Let me know what do you think
Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075
Be brave against all odds. Never give up.

-Original Message-
From: Viral_Thakkar
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 11:30 AM
To: Struts Users Mailing List;
[EMAIL PROTECTED]
Subject: RE: RE : Remote and local EJB
If we know that EJBs and struts classes will reside
in same JVM then why we
should also invoke the stateless session bean
remotely? We can invoke that
session bean using the local interface... rite .?
Although I agree that in furure, we may deploy web
and app classes on
different machines, so that's why I am looking for a
solution where we can
take advantage of both local and remote interface of
EJB.
I would say we should prefer the local EJB call
instead of remote EJB call
as far as possible.
Viral







-Original Message-
From: Shashank Dixit
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 10:29 AM
To: Struts Users Mailing List; Viral_Thakkar;
[EMAIL PROTECTED]
Subject: RE: RE : Remote and local EJB
Hi Viral

Ideally there should be one stateless session bean
within action class and
business component EJBs so that you have only one
remote call and all other
EJB calls are local. You should always program
considering different tiers
on different machines, although you are using the
web and app tier on same
machine now. Let me know what do you think on this.
Shashank S. Dixit
Software Analyst.
Datamatics Ltd.
Contact: 28291253 ext 146
Mobile: 9820930075
Be brave against all odds. Never give up.

-Original Message-
From: Viral_Thakkar
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 9:40 AM
To: Struts Users Mailing List; Piper, James D CECOM
SEC EPS
Subject: RE : Remote and local EJB
Thanks Jim.

I am using the oracle 9iAS. I also developed the EJB
which supports both
remote and local access. I am also able to invoke
this EJB from my action
class. I accessed this EJB using the remote and also
using local interface
separately.
The reason why I want this EJB to be deployed both
as local and remote is
that at present EJB will be accessed by the struts
action class, both are in
same JVM so I can access the EJB using the local
interface.
In future when we do clustering then at that time,
EJB bean may be at
different server, in different JVM, at that time
struts action class should
dynamically find the remote EJB.
One way I think, we can handle such situation in the
catch block of the
NamingException() while accessing the local bean, we
need to lookup the
remote EJB. But it seems that this is not the good
programming practice.
So I am looking for some design pattern or
framework, which supports the
solution to this problem.
Thanks,
Viral
-Original Message-
From: Piper, James D CECOM SEC EPS
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 7:49 PM
To: Viral_Thakkar
Subject: RE: RE : Remote and local EJB
So let me see if I understand what it is you are
wanting to accomplish.  It
sounds like you have a bunch of EJBs, a Struts
application and several
servers.  You would like http requests coming in to
be 'evaluated' by your
application and then based on some information
within that request (i.e.
users name, users ip address, users browsers type,
users preference
selection, or possibly even the current servers
load) invoke either a local
or a remote EJB.  For example maybe you have an EJB
that does some realy
heavy calculatations like a ray-tracer and for some
important users you want
th

Disallow user to modify URL in browser address bar

2003-08-21 Thread sriram
How to identify if user has manipulated the URL in Address Bar of the browser?

For ex., the application displays a page with the following URL:

http://localhost:8080/app/str/testview_srchpost.do

Now, the user modifies the URL in the address bard. Instead of testview_srchpost.do, 
user types testtwoview_srchpost.do and clicks ENTER.

I want to restrict such types of URL modification Struts application. I should take 
the user to a default access denied page when ever user does such changes.

How to identify this action of the user? Pl. give some ideas.



Re: Telling Users to Wait

2003-08-21 Thread David Thielen
Hi;

The method I use (which gives no % update) is I forward to a page that says
please wait and has an animated gif. That page does a "
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, August 21, 2003 6:02 PM
Subject: Telling Users to Wait


Hello Struts Gurus,

I am facing an issue in my application where I need to run a database
creation script, and a database import script through the web (running
bat files on the server).  I can run these files fine, but they take a
few minutes to run...

How can I tell the user when they have finished running?  This seems to
be a sort of push technology I am in need of, but maybe there is another
way?.  I can definitely tell them to wait for a few minutes, but how do
I actually tell them when the process is done (since there is not
another page request at this time.)

Has anyone done something similar to this?

Thanks,
Mark

-
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]