Howto struts on OS/390??

2002-02-16 Thread Torsten Trzeciak

Hi,
we would like to run a struts 1.01 web application on an OS/390
computer.
Is there a howto available (Websphere 3.5.x /tomcat) because we have
difficulties with Webpshere 3.5.
Is tomcat  possible? Who has any experience?



RE: Determining the name of a calling class

2002-02-16 Thread Robert

My pleasure :-)

Robert

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 15, 2002 5:15 PM
To: 'Struts Users Mailing List'
Subject: RE: Determining the name of a calling class

Most excellent - if this is not a reference to the new 1.4 utility!  

Thanks Robert!

-Original Message-
From: Robert [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 4:35 PM

Yes there is, and there was a recent article in JavaDev Journal
describing this. Basically what you have to do is is create a Throwable
object, which you can then inspect the stacktrace. The stack trace
contains the calling order of objects. Yes you have to parse it, but it
works. The article presented a couple of utility classes to handle the
parsing and such. It was presented as a sort of security mechanism. 

It was in the November 2001 issue and the source is at:
www.sys-con.com/java/sourcec.cfm volume 6 issue 11.

Hope that helps

Robert

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



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




Re: Request: Property vs Attribute

2002-02-16 Thread Andreas Mack

On Fri, 2002-02-15 at 14:04, Ted Husted wrote:
 You might want to start with an ActionForm bean that represents the OK
 dialog page. 
 
 This should include properties for a base forward and for a paramId and
 param (like the html:link tag). 
 
 The Action for the OK button would then look for the given forward, 
 
 ActionForward baseForward = mapping.findForward(okForm.getForward());
 
 and create a new forward, with the paramId and param properties,
 something like
[...]

Hi Ted,

thanks for the suggestion.
I've implemented it, but I faced the difficulty to get the info
into the form in the first place. I mean I am in an Action class and
want to direct to the okdialog. The ActionForm doesn't exist yet, right?

My solution is to set those infos (forward, message, paramId etc) as
request.attributes. In the validate method of the form I do sth like 
if (forward == null) {
forward = (String)request.getAttribute(forward);
}
if (message == null) {
message = (String)request.getAttribute(message);
}

Would that be ok or are there other ways ?

-- 
Andreas Mack [EMAIL PROTECTED]
mediales. GmbH http://www.mediales.de



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




Re: struts.jar outside of WEB_INF/lib on Tomcat4?

2002-02-16 Thread Adam Hardy

I've often heard that you can't put struts.jar in CATALINA_HOME/lib but I've never 
heard anyone say why it doesn't work.

Is it a bug?





On Fri, 15 February 2002, Main, David wrote:

 
 Hi there,
 
 Has anyone had success placing struts.jar in %CATALINA_HOME%/lib to share it across 
all webapps? The reason I ask is that I have a shared library of utility classes in 
%CATALINA_HOME%/classes and one of them needs to import struts for image upload. 
 
 My problem is that the struts-based webapps only seem to work if struts.jar is in 
WEB-INF/lib, but my utility class requires it to be in %CATALINA_HOME%/lib. And, if I 
put it in both places, I get the following nasty linkage error:
 
 java.lang.LinkageError: Class org/apache/struts/upload/FormFile violates loader 
constraints
 
 I know there are workarounds like duplicating the utility class for each webapp, but 
I'm hoping for a more elegant solution.
 
 I'm using Tomcat4.0.1 on Win2K. If anyone has any suggestions, I'd appreciate them.
 
 Thanks,
 
 David
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

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




Re: Quick question about iterators beans on a page

2002-02-16 Thread Adam Hardy

On Fri, 15 February 2002, [EMAIL PROTECTED] wrote:
 Adam, I've just cracked this myself.
 
 In your Action, set your collection to a session attribute:
 Vector someVec = valueBean.getSomeData();
 session.setAttribute(itData, someVec);
 
 Then in your JSP:
 logic:iterate name=itData id=list scope=session
 ...
 /logic:iterate


I've still got 2 questions though:

(1) if you put it in the request, then it will get cleaned up by the server at the end 
of the page automatically, but in the session it will stay until the session dies, 
right?

(2) is it thread-safe? Guess it must be, but why? Does it all stay in one thread of 
the main struts controller servlet, and out of reach of any other threads?

thanks
Adam


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

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




Re: Quick question about iterators beans on a page

2002-02-16 Thread Mark Woon

Adam Hardy wrote:

 (1) if you put it in the request, then it will get cleaned up by the server at the 
end of the page automatically, but in the session it will stay until the session 
dies, right?

Yup.  But you can also clean it out of the session yourself.


 (2) is it thread-safe? Guess it must be, but why? Does it all stay in one thread of 
the main struts controller servlet, and out of reach of any other threads?

Depends on what you mean.  If it's a read-only collection, then sure, it's thread 
safe.  But if you expect that list to change, then no, it's not thread-safe, because 
multiple
requests from the same user would be able to access the collection.

-Mark


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




Re: Datetime validation taglib for struts?

2002-02-16 Thread Patrick Refondini

Transformation mechanism for binary data, taking the date example.

Trying to deal with java.util.Date in Struts I have came to look for :

1. Validation mechanism
I tested the Struts Validator Ted mentioned. Centralized xml config, 18n 
support, out of the box JavaScript for client side checks, ... great !

2. Transformation mechanism
I am looking for a way to benefit from java.util.Date automatic 
population in ActionForm like Strings or primitive types are.

2.1 The actual properties conversion takes place in 
org.apache.commons.beanutils.ConvertUtils this might be extended to 
support java.util.Date conversion.
2.2 Thanks to the Struts Validator it seems there is a generic way to 
know which date pattern is used for which field at submission time.
The ActionServlet or as proposed (...). A transformation plugin to the 
Validator (...) could exploit this to do any required request 
parameters pre-processing to let ConverUtils always receive dates of a 
similar pattern.

Do you think this could lead to a solution ?

Patrick



Ted Husted wrote:

The domain-type validations, like whether it is a date, can be handled
in the ActionForm validate, if that's helpful. The Struts Validator is
very good for this, and keeps everything out in an XML file where it can
be easier reviewed. Range checks that depend on the model state would
still have to be performed in the action, though. 

A lot of it depends on what you already got. If the model beans already
do the validation, let them. If they don't, do what you can in the
ActionForm. 

Transformations are trickier. I don't have a really good solution for
transforming binary data. There are some tools, like Rey Francois'
mapper, but I haven't put them into a production app myself. 

For properties representing formatted binary data, I tend to have
getDate (binary) and getDateText (string) properties. 

The action sets the binary property, which in turn also sets the String
field. The form sets the String property (property=dateText), which
also tries to convert it into a binary. 

If it fails, the binary field goes to null, but all exceptions are
caught. Otherwise, it updates the binary field. 

The validator can then look at whether dateText and/or date are empty,
and post the appropriate validation error (if any). 

The methods in question rely on static methods in a utility class, to
eliminate as much unique code from the action form bean as possible. 

When the form gets to the action, the model bean can get it's value from
the binary property. 

Since I tend to use reflection for this, I use the real property name
for the binary version, and append Text for the formatted for
display version. The same approach can be used for String fields like
telephone numbers, where you might want to store only the digits,
without any punctuation. The telephoneText property copes with hyphens
and spaces. The telephone property is a string with all digits.

This is probably the most common approach right now, but it's a pain to
setup. It also means that properties are sharing fields, or else you at
least need a setDateTextRaw() property to avoid looping. 

A transformation plugin to the Validator that could be configured with
XML would be much better. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/



[EMAIL PROTECTED] wrote:

Thanks Mark for your answer.

I was just curious how most others here choose when to perform things
like date/numeric validation?

thanks,
Therion


Mark Woon
[EMAIL PROTECTED]To: Struts Users Mailing List 
[EMAIL PROTECTED]
nford.EDU   cc:
 Subject: Re: Datetime validation 
taglib for struts?
02/14/02 02:24 PM
Please respond to
Struts Users
Mailing List



[EMAIL PROTECTED] wrote:

Does there exist a taglib or a way to perform date/time validation on an
input form WITHOUT having to use Javascript in the form?

[snip]

I don't see any that will actually perform validation on a field after
focus has been lost...

I don't see how you could possibly perform client-side validation (after
focus
has been lost) without using Javascript...

-Mark

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

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


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





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




Re: TILES: using Defenitions as Forwards in Struts 1.1 dev

2002-02-16 Thread Vic Cekvenich

I would like a tiles that works with Struts 1.1 (and Validation). (If 
there is a sample app with all 3 above... just so I can copy the lib 
folder and see the new settings).

So use TilesController now?
What else is different for Struts 1.1?

[EMAIL PROTECTED]

Cedric Dumoulin wrote:

   Important changes have been made in latest Struts 1.1 dev. The old mechanism
 consisting to subclass ActionServlet doesn't work anymore.
   I have a Tiles version working with  Struts nightly build. It add a new class
 (TilesController), and a new struts-config.xml. Unfortunately, it is not
 compatible with Struts1.0.x, so I have to change Tiles distribution and to update
 some documentation. I will release it as soon as possible. If you need it
 immediately, send me a mail.
 
 Cedric
 
 
 Hertzel Karbasi - OPTinity eBusiness Solutions wrote:
 
 
Hello All

I'm using Contrib/Tiles (Last version) with Struts Nightly build and trying
using tutorials: Definitions as forward.
It seems that ActionComponentServlet is not compatible with struts nightly
build (1.1 dev) as the following occurs:
org.apache.struts.tiles.ActionComponentServlet.process -
getApplicationConfig(request).getProcessor().process(request, response); -
org.apache.struts.action.RequestProcessor.process -
org.apache.struts.action.RequestProcessor.processActionForward(request,
response, forward);

So the method
org.apache.struts.tiles.ActionComponentServlet.processActionForward(ActionFo
rward forward,ActionMapping mapping,

ActionForm formInstance,HttpServletRequest request,HttpServletResponse
response)
who is responsible to get the forwards from definitions is not called.
Anyway this method does not exists in Struts 1.1 ActionServlet and can not
be overrided.

IMO the standard RequestProcessor should be subclessed and provided in
ApplicationConfig.

Any assistance will be appreciated .
Thanks
Hertzel

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

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



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




Re: TILES: using Defenitions as Forwards in Struts 1.1 dev

2002-02-16 Thread Ted Husted

Cedric's working on this. Some recent changes in the Nightly Build
change the way ActionForwards are handled, which affects how the
handling of definitions is implemented. For more, see

The BIG Check-In for Multi-App Support
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg04354.html

Action mappings and The BIG Check-In
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg04773.html

[proposal] Multi-app sources modifications
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg04740.html

Struts Next
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg04460.html

I'm in the middle of some changes to the Web site, which will make it
easier for us to announce these changes, and update the documentation
for the Nightly Build. 

-Ted.

Vic Cekvenich wrote:
 
 I would like a tiles that works with Struts 1.1 (and Validation). (If
 there is a sample app with all 3 above... just so I can copy the lib
 folder and see the new settings).
 
 So use TilesController now?
 What else is different for Struts 1.1?
 
 [EMAIL PROTECTED]
 
 Cedric Dumoulin wrote:
 
Important changes have been made in latest Struts 1.1 dev. The old mechanism
  consisting to subclass ActionServlet doesn't work anymore.
I have a Tiles version working with  Struts nightly build. It add a new class
  (TilesController), and a new struts-config.xml. Unfortunately, it is not
  compatible with Struts1.0.x, so I have to change Tiles distribution and to update
  some documentation. I will release it as soon as possible. If you need it
  immediately, send me a mail.
 
  Cedric
 
 
  Hertzel Karbasi - OPTinity eBusiness Solutions wrote:
 
 
 Hello All
 
 I'm using Contrib/Tiles (Last version) with Struts Nightly build and trying
 using tutorials: Definitions as forward.
 It seems that ActionComponentServlet is not compatible with struts nightly
 build (1.1 dev) as the following occurs:
 org.apache.struts.tiles.ActionComponentServlet.process -
 getApplicationConfig(request).getProcessor().process(request, response); -
 org.apache.struts.action.RequestProcessor.process -
 org.apache.struts.action.RequestProcessor.processActionForward(request,
 response, forward);
 
 So the method
 org.apache.struts.tiles.ActionComponentServlet.processActionForward(ActionFo
 rward forward,ActionMapping mapping,
 
 ActionForm formInstance,HttpServletRequest request,HttpServletResponse
 response)
 who is responsible to get the forwards from definitions is not called.
 Anyway this method does not exists in Struts 1.1 ActionServlet and can not
 be overrided.
 
 IMO the standard RequestProcessor should be subclessed and provided in
 ApplicationConfig.
 
 Any assistance will be appreciated .
 Thanks
 Hertzel
 
   
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 
  --
  To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/

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




Re: Quick question about iterators beans on a page

2002-02-16 Thread Ted Husted

The container gives each request its own thread. 

If the list is created with new in the action, and then placed into the
request, it is thread-safe. Just the same as if you had created it on
the JSP. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/



Adam Hardy wrote:
 
 On Sat, 16 February 2002, Mark Woon wrote:
   (2) is it thread-safe? Guess it must be, but why? Does it all stay in one thread 
of the main struts controller servlet, and out of reach of any other threads?
 
  Depends on what you mean.  If it's a read-only collection, then sure, it's thread 
safe.  But if you expect that list to change, then no, it's not thread-safe, because 
multiple
  requests from the same user would be able to access the collection.
 
  -Mark
 
 Argh! The list is user dependent - it's got to be thread-safe.
 
 So if the Action puts the array for the iterator in the request, how can I make sure 
that no other user gets it?
 
 I know what you're going to say - put it in the session, right? But then at the end 
of the day a user who uses the site intensively all day might end up with a rowset or 
even two in their session for every page in the site.
 
 So what do I do?
 
 Thanks
 Adam
 
 Find the best deals on the web at AltaVista Shopping!
 http://www.shopping.altavista.com
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: Quick question about iterators beans on a page

2002-02-16 Thread Mark Woon

Adam Hardy wrote:

 On Sat, 16 February 2002, Mark Woon wrote:
   (2) is it thread-safe? Guess it must be, but why? Does it all stay in one thread 
of the main struts controller servlet, and out of reach of any other threads?
 
  Depends on what you mean.  If it's a read-only collection, then sure, it's thread 
safe.  But if you expect that list to change, then no, it's not thread-safe, because 
multiple
  requests from the same user would be able to access the collection.
 
  -Mark

 Argh! The list is user dependent - it's got to be thread-safe.

 So if the Action puts the array for the iterator in the request, how can I make sure 
that no other user gets it?

 I know what you're going to say - put it in the session, right? But then at the end 
of the day a user who uses the site intensively all day might end up with a rowset or 
even two in their session for every page in the site.

No, it's safe in the request.  Question #1 referred to putting things in the session.  
I assumed that Question #2 referred to putting things in the session to.  Things in 
the request are thread safe, as Ted mentioned.  Things
in the session aren't.

Also, if you're sticking things in the session, you can remove them yourself once you 
know you're done with them rather than wait for their session to timeout.

-Mark



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




RE: Showing a result after a long running query

2002-02-16 Thread Michael

out of curiosity, how are you doing the server side transaction
asynchronously?  you can't block on the request thread, so obviously
you hurl a prosessing page and close the socket..
but in the back end, how is the request processed?

i just finished a credit card processor application where
i used meta-refresh in the web page with a timestamp to handle a timeout.
but in the initial request i use JMS (java message service) to queue
a request to a destinination and that request is handled my a JMS message
listener.
JMS processes the request and stores/commits the response in the target
payment record.



-Original Message-
From: Jim Tyrrell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 11:25 AM
To: '[EMAIL PROTECTED]'
Subject: Showing a result after a long running query


Hello all,

I have looked at the struts docs and all over the net and I have posted to
forums at java.sun.com.

I want to show a user a page that says I am working on your problem and then
when the processing is done I will send to them/display for them the output
of the long running database query/process whatever.

Note I do not want the working in progress page to be shown again if I hit
the back button of the browser. I should just get to the form that I
inputted my parameters into to get the process rolling.

Does struts support this?
Does anyone know how to do this with some other technology?

This seems like a common problem and there should be an easy solution or at
least you would think so.

Thank You
Jim Tyrrell


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



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




RE: Form - Bean conversion - Not getting values

2002-02-16 Thread James Mitchell

I apologize for not getting back to you sooner.
I realized that as I began responding to you last post, my response was
quickly becoming a full blown tutorial on wizards in struts.
I think I'll publish a tutorial on my web site in a few days, but for
now here is a summary what I wrote


If I understand correctly:
1. You are trying to persist input values across multiple
   pages (such as a 3-step-wizard might do)
2. You are wanting to reuse existing bean classes within struts framework
(perhaps and Entity Bean???)


**Requirements - User must be able to hit next and previous (submit buttons
on page  **Not Browser buttons**)
and system should maintain state across pages. (Without using session or db
persistence)




I have written several wizards in struts and I have found that
the best way to handle the persistance (on the servlet container side) is to
create your wizard in such a way that you use the same jsp and same action
class
for each step in the process.  Just use a different section of the page.
(Separated by logic:equal tags)

Doing this will:
1. Allow you to have better consistency across your pages (look and feel)
2. Allow for Code reuse (my personal favorite)

Lets assume this is a 3 step wizard.
Step 1. - fill in first name and last name
Step 2. = fill in address
Step 3. - check an I agree on a terms page.

The ActionForms/Beans and fields we want to use are as follows:
(assuming they have accessor methods implemented)

com.mybean.MyActionForm
  boolean agreed

com.mybean.MyExistingCustomerBean (could be an Entity bean)
  String firstName
  String lastName
  String address1
  String address2
  String city
  String state
  String zipCode


Be sure to expose all fields into the html output (even if it's not used,
just put it in a hidden input tag).  Doing this will
persist your ActionForm and Bean fields from step1 to the end, and allows
the user to hit previous and back submit buttons.

-
--

I'm not sure how you want to validate the ActionForm or Bean class at any
given step, but:
1. Change the ActionForm scope to request
2. Add a field in your ActionForm called step and put a hidden field in
the jsp named step.
3. Put two submit buttons (each named action) in your jsp page (one is
Previous and the other is Next

So when you are in the action class you will know where you are coming from
by getting the form.getStep() and you will know where you should forward
to by getting the form.getAction().
Therefore:
if ( form.getStep().equals( 1 )  ( form.getAction().equals(
Next ) ){
  form.setStep( 2 );
}

if ( form.getStep().equals( 2 )  ( form.getAction().equals(
Next ) ){
  form.setStep( 3 );
}else{
  form.setStep( 1 );
}

// if the action is not Finish then forward to next (see action mapping
forward below)
...
...



--- struts-config.xml ---

 form-beans
   form-bean  name=MyForm  type=mypackage.MyForm/
 /form-beans

  action-mappings
actionpath=/doWizard
   type=mypackage.MyAction
   name=MyForm
   scope=request  - make this request
   validate=false
  forward name=next path=/wizard.jsp/
  forward name=success  path=/wizardcomplete.jsp/
/action



--- wizard.jsp ---
%@ page language=java %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
!doctype html public -//w3c//dtd html 4.0 transitional//en

html:html locale=true

jsp:include page=/includes/header.jsp flush=true/


html:form action=/doWizard

!-- This is step one --
logic:equal name=yourForm property=step
   scope=request value=1- make sure your
ActionForm.getStep() retuns 1 as a default.
  First Name: html:text property=bean.firstName
 size=16 maxlength=16/br
  Last Name:  html:text property=bean.lastName
 size=16 maxlength=16/br
  input type=submit name=action value=Next
/logic:equal

!-- This is step two --
logic:equal name=yourForm property=step
   scope=request value=2

  Address1: html:text property=bean.address1 /br
  Address2: html:text property=bean.address2 /br
  city: html:text property=bean.city /br
  state:html:text property=bean.state/br
  zipCode:  html:text property=bean.zipCode  /br

  input type=submit name=action value=Previous
  input type=submit name=action value=Next
/logic:equal

!-- This is step three --
logic:equal name=yourForm property=step
   scope=request value=3
  html:link page=/viewLegal.do
bean:message key=global.legal/
  /html:link
  html:checkbox property=agreed/
  input type=submit 

Sun JDK 1.4.0 final release

2002-02-16 Thread srinivas

hi all,

The final release of JDK 1.4.0 is now available

Sun JDK 1.4 download page:

http://java.sun.com/j2se/1.4/download.html

Summary of new JDK 1.4 features:

http://java.sun.com/j2se/1.4/docs/relnotes/features.html

Highlights:

SSL API: javax.net.ssl
JAXP API and XML parser
Logging API: java.util.logging
assert capability
java.nio - next generation I/O library
JAAS - authentication and authorization API

regards,
srinivas.

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




Action Forwards

2002-02-16 Thread Tim Sawyer

Hi,

There's nothing to stop me forwarding to a do rather than a jsp in the
struts config is there?  Like this:

action   path=/AddFindParty/FindPartyResults

type=com.pancredit.tkbespoke.tjs.strutstest.action.FindPartyPostAction
  name=addFindPartyModuleForm
 scope=session
 input=index.jsp
  forward name=success path=/AddFindParty/FindPartyResults.do/
/action

Cheers,

Tim.



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




RE: Showing a result after a long running query

2002-02-16 Thread James Mitchell

Ahhh, the long running query problem.  Yes its a classic.

I agree with Michael though.  The answer to your dilemma has nothing to do
with struts, java, or anything else on the server side of the application
at all.  This is a limit of web technology in general.

I've written a few applications that handle similar opportunities (my
friendly name for problems).

In one case, the user created downloadable files that were extracted from a
DRP system (KBM on AS/400 DB2).
The challenge was how to create the file and let the user download it all
from the web.

What I ended up with was a Crystal Reports-like web application, where the
user used a wizard to create the initial parameters that were passed to an
asynchronous process that ran in the background and updated the db when it
was finished.  The user just had to sit back and wait for the extract to
finish.  They could refresh the page of processing jobs all they wanted, but
it wouldn't let them download it until it was finished.

You might try creating some summary tables for common long running
queries, if you are reporting summary analysis.  This technique has helped
me eliminate the need for my Crystal Reports-like app on my current
project.



James Mitchell
Software Engineer
Open-Tools.org
Home Phone (770) 822-3359
Cell Phone: (678) 910-8017


-Original Message-
From: Michael [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 16, 2002 2:09 PM
To: Struts Users Mailing List
Subject: RE: Showing a result after a long running query


out of curiosity, how are you doing the server side transaction
asynchronously?  you can't block on the request thread, so obviously
you hurl a prosessing page and close the socket..
but in the back end, how is the request processed?

i just finished a credit card processor application where
i used meta-refresh in the web page with a timestamp to handle a timeout.
but in the initial request i use JMS (java message service) to queue
a request to a destinination and that request is handled my a JMS message
listener.
JMS processes the request and stores/commits the response in the target
payment record.



-Original Message-
From: Jim Tyrrell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 11:25 AM
To: '[EMAIL PROTECTED]'
Subject: Showing a result after a long running query


Hello all,

I have looked at the struts docs and all over the net and I have posted to
forums at java.sun.com.

I want to show a user a page that says I am working on your problem and then
when the processing is done I will send to them/display for them the output
of the long running database query/process whatever.

Note I do not want the working in progress page to be shown again if I hit
the back button of the browser. I should just get to the form that I
inputted my parameters into to get the process rolling.

Does struts support this?
Does anyone know how to do this with some other technology?

This seems like a common problem and there should be an easy solution or at
least you would think so.

Thank You
Jim Tyrrell


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



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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




RE: Action Forwards

2002-02-16 Thread James Mitchell

No problem at all.

Here is an example of what I am using.

In my IndexAction, I get a property from the ApplicationResources that
determines whether the index page should be a login or the main menu.  This
lets me decide at deployment time whether the user sees a login or the main
menu.


my index.jsp has a request.
- index.jsp
%
pageContext.forward( /index.do);
%
- struts-config.xml

  action-mappings
action path=/index type=com.xyz.IndexAction
forward   name=login path=/index.do?action=login/
forward   name=main  path=/main.do/
/action

action path=/login type=com.xyz.LoginAction
scope=request
name=userView
validate=true
input=/index.jsp
forward name=login   path=/login.jsp /
forward name=success path=/mainmenu.jsp /
forward name=failure path=/index.jsp/
/action

action path=/main type=com.xyz.MainAction
input=/index.jsp
forward name=success path=/mainmenu.jsp /
/action





James Mitchell
Software Engineer
Open-Tools.org
Home Phone (770) 822-3359
Cell Phone: (678) 910-8017


-Original Message-
From: Tim Sawyer [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 16, 2002 6:49 PM
To: Struts List
Subject: Action Forwards


Hi,

There's nothing to stop me forwarding to a do rather than a jsp in the
struts config is there?  Like this:

action   path=/AddFindParty/FindPartyResults

type=com.pancredit.tkbespoke.tjs.strutstest.action.FindPartyPostAction
  name=addFindPartyModuleForm
 scope=session
 input=index.jsp
  forward name=success path=/AddFindParty/FindPartyResults.do/
/action

Cheers,

Tim.



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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




FOP and strus

2002-02-16 Thread John Ng

Hi, I am looking into FOP in generating PDF in
struts...  the examples so far that I have seen are
only taking static XML files and XLS files.  Can
someone tell me how to use FOP to generate pdf with
dynamic XML string (generated by some java objects) on
the fly?

I would apprecaite if you could even provide me with
some sample code.

Thanks
John


__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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




Re: FOP and strus

2002-02-16 Thread Nick Pellow

John,
We wrote a servlet that took the name of a URI as a parameter.
That URI, essentially mapped to a JSP, whose output was FOP.
The servlet:
requested the URI, got the FOP, formatted the FOP, then sent that back to
the browser. This may not be ideal for all situations, but it worked nicely
for us.

You could look at using something like webmacro/velocity as it would be
neater than a JSP for
this. It depends on what you are doing.

Regards,
Nick

- Original Message -
From: John Ng [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Sunday, February 17, 2002 3:16 PM
Subject: FOP and strus


 Hi, I am looking into FOP in generating PDF in
 struts...  the examples so far that I have seen are
 only taking static XML files and XLS files.  Can
 someone tell me how to use FOP to generate pdf with
 dynamic XML string (generated by some java objects) on
 the fly?

 I would apprecaite if you could even provide me with
 some sample code.

 Thanks
 John


 __
 Do You Yahoo!?
 Yahoo! Sports - Coverage of the 2002 Olympic Games
 http://sports.yahoo.com

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




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




Mapped properties - How To

2002-02-16 Thread Erik Tennant

The mapped property feature is extremely useful, although somewhat elusive. 
I've been struggling to get this feature to work, and after spending more 
time than I would care to admit trying to figure it out, I thought I would 
share a simple how-to on the matter since I ran across several messages in 
the archives from people who had similar challenges.

First, I grabbed a nightly build of struts (Feb 15, 2002).

Second, I added an input tag similar to this in my .jsp page:
input type=text name=item(color) value=blue

Third, I added the following two methods to my form bean (note: it's 
important to have the get method, even if you don't plan to use it):
public Object getItem(String key) {

}

public void setItem(String key, Object value) {

}


-Erik


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




Re: Mapped properties - How To

2002-02-16 Thread Arron Bates

Sorry to say, it's not going to work. There's a bug in the PropertyUtils 
class that makes it happen.
You could do some collection tricks and get it coming out in an Array, 
and that would work, but not the mapped property.

Arron.

Erik Tennant wrote:

 The mapped property feature is extremely useful, although somewhat 
 elusive. I've been struggling to get this feature to work, and after 
 spending more time than I would care to admit trying to figure it out, 
 I thought I would share a simple how-to on the matter since I ran 
 across several messages in the archives from people who had similar 
 challenges.

 First, I grabbed a nightly build of struts (Feb 15, 2002).

 Second, I added an input tag similar to this in my .jsp page:
 input type=text name=item(color) value=blue

 Third, I added the following two methods to my form bean (note: it's 
 important to have the get method, even if you don't plan to use it):
 public Object getItem(String key) {

 }

 public void setItem(String key, Object value) {

 }


 -Erik


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





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