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

2002-08-30 Thread Hardee, Tony

Do you feel this list should discontinue it's long heritage of relaxed 
 fridays?
 
 (   )  Yes
 (   )  No
 ( X )  Other

I vote to keep the topic [BEER] off this list. 

I think it is everyone's best interest to reduce the number of e-mails on
this list.  Not only do excessive e-mails flood inboxes they also pollute
mail archive including the search results. 

I like the camaraderie of this list and I appreciate that people want to
blow of some steam at the end of the week.  However, unless that steam is
caused by Struts :{, then I feel they should do it on another list.

I like the off topic technical related discussions in this list.  This users
on this list have a vast wealth of diverse information which they readily
share.  That is fantastic!!

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




RE: Re: trouble with DynaValidatorForm

2002-08-27 Thread Hardee, Tony

Can you elaborate on what was invalid.  I'm going through a similar
iteration now.

-Original Message-
From: Donald Ball [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 2:49 PM
To: [EMAIL PROTECTED]
Subject: Fwd: Re: trouble with DynaValidatorForm


Never mind, I found the problem - invalid validator.xml. Pretty good stuff
going on now, thanks to the struts team.

btw, never got an answer to my second original question - is anyone writing
the jakarta docs for the Dyna and Validator stuff? If not, I could try to
take a stab at it.

- donald


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




Looking for jaxp 1.0.1

2002-05-09 Thread Hardee, Tony

The WebSphere - Steps for the Example Application
(http://jakarta.apache.org/struts/doc-1.0.2/installation-was352-x.html)
mention:

Copy jaxp 1.0.1's (NOT 1.1.1's) jaxp.jar and parser.jar to the servlets
directory of the strut-example webapp

I can't find a copy of the jaxp.jar and parser.jar files.  On the sun site I
was only able to downlowd jaxp as part of the Java XML Pack Spring 02.

Does anyone know where I can obtain a copy of jaxp 1.0.1 jaxp.jar and
parser.jar?

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




RE: Default Button

2002-05-07 Thread Hardee, Tony


I have a tag that generates java script.  Below is the relevant code from
the tag

out.println();
out.println(!-- Map Enter Key - BEGIN --);
out.println(SCRIPT LANGUAGE=\JavaScript\);
out.println(!--);
out.println(  function getKey(keyStroke) {);
out.println(isNetscape=(document.layers););
out.println(eventChooser = (isNetscape) ? keyStroke.which :
event.keyCode;);
out.println(if (eventChooser == 13) {);
out.println(  window.location=\ + location + \;);
out.println(});
out.println(  });
out.println(  document.onkeypress = getKey;);
out.println(--);
out.println(/script);
out.println(!-- Map Enter Key - END --);
out.println();

To use the code/tag in the jsp I simply type

ccom:MapEnterKey location=javascript:submitForm()/

Hope this helps.


-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 10:33 AM
To: Struts Users Mailing List
Subject: RE: Default Button


There is no default.

When the user hits enter in any input field (except textarea) the enclosing
form is submitted.

JM




 -Original Message-
 From: IS Struts [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 07, 2002 10:26 AM
 To: [EMAIL PROTECTED]
 Subject: Default Button


 How do you make a button a default button on a JSP, so when the
 user hits the 'Enter' key the button is submitted?

 Any suggestions are appreciated,
 Rich


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




FW: [FAQ News:Promotion] Half Price

2002-05-06 Thread Hardee, Tony

I would like to see eFAQ in action handling Struts.  Wouldn't it be nice if
the people at jcorporate gave back to struts by  hosting and operating an
eFAQ struts site.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 04, 2002 7:38 PM
To: [EMAIL PROTECTED]
Subject: [FAQ News:Promotion] Half Price 


Message posted by user 'scann' at 2002-05-04 10:12:08

eFAQ, for managing and facilitating a stand alone frequently asked questions
database, will be offered at 50% off regular price for the months of May and
June.  Now only $99 (Object Code) version or $599(Source Code) version. 

Contact [EMAIL PROTECTED] to place your order.



Reply to this message:
http://www.jcorporate.com:80/eforum/Browse.do?state=promptReplyMessageId=31
80

Browse Thread:
http://www.jcorporate.com:80/eforum/Browse.do?state=browseMessagesThreadId=
726GroupId=40

You are receiving this email because you are subscribed to an eForum
discussion group at www.jcorporate.com. If you want to change your
subscription, use this link:
http://www.jcorporate.com:80/eforum/Browse.do?state=promptGroupSubscribe.
You must be logged in (or have a cookie stored from a previous login) to use
this link. You can login here: http://www.jcorporate.com:80/Login.do

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




RE: Struts eFAQ

2002-05-06 Thread Hardee, Tony

Sandra,

I would be willing to be a contributor.  My preference would be for you to
set it up and host it.

I'm interested to see this thing in action.  Hopefully, it can reduce the
amount of mail across the struts list.  Let me know when you need me to
start contributing.

Cheers,

Tony

-Original Message-
From: Sandra Cann [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 11:01 AM
To: Struts Users Mailing List
Subject: RE: [FAQ News:Promotion] Half Price 


Tony

It would be cool since eFAQ is a Struts based application. Hey, if one or
more people would contribute to maintaining the questions and answers, I
would gladly provide the eFAQ software and set it up.  We can host it
onsite; or it can be hosted somewhere else? Your choice.

Sandra

 -Original Message-
 From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
 Sent: Monday, May 06, 2002 8:32 AM
 To: Struts Users Mailing List
 Subject: FW: [FAQ News:Promotion] Half Price


 I would like to see eFAQ in action handling Struts.  Wouldn't it
 be nice if
 the people at jcorporate gave back to struts by  hosting and operating an
 eFAQ struts site.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, May 04, 2002 7:38 PM
 To: [EMAIL PROTECTED]
 Subject: [FAQ News:Promotion] Half Price


 Message posted by user 'scann' at 2002-05-04 10:12:08

 eFAQ, for managing and facilitating a stand alone frequently
 asked questions
 database, will be offered at 50% off regular price for the months
 of May and
 June.  Now only $99 (Object Code) version or $599(Source Code) version.

 Contact [EMAIL PROTECTED] to place your order.



 Reply to this message:
 http://www.jcorporate.com:80/eforum/Browse.do?state=promptReplyMe
ssageId=31
80

Browse Thread:
http://www.jcorporate.com:80/eforum/Browse.do?state=browseMessagesThreadId=
726GroupId=40

You are receiving this email because you are subscribed to an eForum
discussion group at www.jcorporate.com. If you want to change your
subscription, use this link:
http://www.jcorporate.com:80/eforum/Browse.do?state=promptGroupSubscribe.
You must be logged in (or have a cookie stored from a previous login) to use
this link. You can login here: http://www.jcorporate.com:80/Login.do

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




OT: Generation and display of charts/graphs

2002-05-06 Thread Hardee, Tony


**
***  Off Topic (i.e., not related to STRUTS)
*

**

Does anyone on this list have recommendations for Java software (preferably
free) to facilitate generation and web display of charts and graphs (e.g.,
Highest weekly temperature in Hawaii for last year, etc.).


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




RE: html:select help!

2002-05-01 Thread Hardee, Tony

Not sure how this applies to the html:select tag, but in html:

select name=country

option selected style=background-color:#FFAA00;
font-style:italic; color:blue value=us
United States of America
/option

option value=afAfghanistan, Islamic State of

/option

option value=al Albania

/option

/select

Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


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




RE: Difference between MVC and MVC2 architectures

2002-04-29 Thread Hardee, Tony

Below is an excerpt from an Java World article circa 1999 (author:
mailto:[EMAIL PROTECTED]) describing the difference between
Model 1 vs. Model 2.

The early JSP specifications advocated two philosophical approaches for
building applications using JSP technology. These approaches, termed the JSP
Model 1 and Model 2 architectures, differ essentially in the location at
which the bulk of the request processing was performed. In the Model 1
architecture, shown in Figure 1, the JSP page alone is responsible for
processing the incoming request and replying back to the client. There is
still separation of presentation from content, because all data access is
performed using beans. Although the Model 1 architecture should be perfectly
suitable for simple applications, it may not be desirable for complex
implementations. Indiscriminate usage of this architecture usually leads to
a significant amount of scriptlets or Java code embedded within the JSP
page, especially if there is a significant amount of request processing to
be performed. While this may not seem to be much of a problem for Java
developers, it is certainly an issue if your JSP pages are created and
maintained by designers -- which is usually the norm on large projects.
Ultimately, it may even lead to an unclear definition of roles and
allocation of responsibilities, causing easily avoidable project-management
headaches. 


I believe sun originated the terms Model 1 and Model 2 in this context.


- Original Message -
From: Galbreath, Mark [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Monday, April 29, 2002 11:20 AM
Subject: RE: Difference between MVC and MVC2 architectures


 There's no such thing as MVC-2 (it's Model 2) and it's not an
 architecture; it's a design pattern.  Further, what little difference
 between the two is thoroughly explained on the first page of
 jakarta.apache.org/struts.

 Mark

 -Original Message-
 From: bhatia10 [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 29, 2002 12:11 PM
 To: Struts Users Mailing List
 Subject: Difference between MVC and MVC2 architectures


 What is the difference between a MVC and MVC-2 architectures. How does
 Struts satisfy the MVC-2 architecture and why is it not just the MVC
 architecture.

 I would appreciate it if someone cud explain this briefy.

 Regards.



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

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




OT: Dynamic JSP include

2002-03-21 Thread Hardee, Tony

I apologize in advance for submitting an off topic request to the struts
user community.  However, this group is quite knowledgeable and helpful and
I could really use some assistance.

Basically I want to have a dynamic include in a JSP.  Ideally I would like
the following snipping to work.

1  % 
2  String product = request.getParameter(product);
3  if (product != null) {
4   product = product.replace(' ', '_');
5  } else {
6 product = ;
7  }
8  String includeFile = static-html/opinion-request/ + product +
9   _process_overview.html;
10 %
11 jsp:include page=%=includeFile%/

Unfortunately, line 11 does not work as desired.  I have tried variations
placing  around the %= directive but that does not help.

Any help is greatly appreciated.

Tony


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




RE: OT: Dynamic JSP include

2002-03-21 Thread Hardee, Tony

Martin, 

You nailed it!  The URL was incorrect.  I was missing a / at the
beginning.

Thanks for your assistance.

Cheers,

Tony

-Original Message-
From: Martin Samm [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 8:55 AM
To: Struts Users Mailing List
Subject: Re: OT: Dynamic JSP include


i'm surpised, i do the same thing in one of my JSP's (tomcat 3.2 on RH7.1 
linux) : 

i create a variable (incPage) in a preceeding % % block then issue 

jsp:include page=%= incPage % flush=true/

Which works fine - is the URL you generate correct?

On Thursday 21 Mar 2002 1:48 pm, you wrote:
 I apologize in advance for submitting an off topic request to the struts
 user community.  However, this group is quite knowledgeable and helpful
and
 I could really use some assistance.

 Basically I want to have a dynamic include in a JSP.  Ideally I would like
 the following snipping to work.

 1  %
 2  String product = request.getParameter(product);
 3  if (product != null) {
 4   product = product.replace(' ', '_');
 5  } else {
 6   product = ;
 7  }
 8  String includeFile = static-html/opinion-request/ + product +
 9   _process_overview.html;
 10 %
 11 jsp:include page=%=includeFile%/

 Unfortunately, line 11 does not work as desired.  I have tried variations
 placing  around the %= directive but that does not help.

 Any help is greatly appreciated.

 Tony

-- 
Martin Samm
[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]




Funny request parameters

2001-08-06 Thread Hardee, Tony

We just upgraded our versions of WebLogic and Struts. 
WebLogic :  6.0 sp 2   ==  6.1.  
Struts: 1.0 nightly build Feb ? 2001 == 1.0
Most things worked without a hitch, however we are experiencing a problem
that I am having difficulty resolving.

We have the following entries defined in struts_config.xml:

!-- update buyer form bean --
form-bean  name=updateBuyerForm
type=net.ps.gui.user.UpdateBuyerForm/

!-- update buyer --
actionpath=/updateBuyer
   type=net.ps.gui.user.UpdateBuyerAction
   name=updateBuyerForm
  scope=request
  input=/pages/updateBuyer.jsp
   validate=false
  forward name=success  path=/pages/updateBuyer.jsp/
  forward name=failure  path=/pages/updateBuyer.jsp/
  forward name=securityErrorpath=/logoff/
/action

The UpdateBuyer form has a step attribute with a getStep() and a setStep()
method.

The update buyer action is first invoked with the url
../cmd/updateBuyer?step=prepare. where /cmd/*  is mapped to the struts
action servlet.  Everything works as expected.  The updateBuyer jsp displays
a form with a hidden property for step where the value is 'commit'

html:form action=/cmd/updateBuyer
  html:hidden property=step value=commit/ 
...

html:submit
  bean:message key=button.submit/
/html:submit
/html:form

When the user fills in the form and pushes the submit button, the
updateBuyer action is invoked and the step parameter in the
HttpServletRequest object has two values 'prepare' and 'commit'.  I would
only expect one value (i.e., 'commit').  This behavior is consistent for all
parameters that are passed in via the original url.

Previously this code worked.  Nowhere in the updateBuyer.jsp can 'prepare'
be found.  It is as if the request state from the previous request is being
maintained across requests.

Does anyone have an idea as to what might be occurring.

Thanks in advance,

Tony





RE: Newbie questions

2001-07-30 Thread Hardee, Tony

Form beans may reuse other form beans.  For example, one could define a
DateForm bean and then reuse that DateForm in other forms that require a
date.  An example of this reuse is in the struts example.  Dot notation is
used to reference attributes.  For example, the month field of the DateForm
would be referenced as 'date.month' assuming that the containing form had a
getDate() accessor method returning a DateForm and that DateForm had a
getMonth() accessor method.

Tony

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 4:43 PM
To: [EMAIL PROTECTED]
Subject: Re: Newbie questions


Anthony Xin Chen wrote:
 1)  Is  it  possible  to  assigne  more than one form bean to the same
 action mapping?

No. As it stands, perform() takes a single ActionForm in its signature.

 If it is not possible, is it possible to map one form bean to multiple
 html forms on web page.

Yes. They would either use the same Action path, or different mappings
could all specify the same ActionForm. 

 2) I am also looking for example on how to use Javascript with Struts.

In what sense? The html tags expose all the Javascript event handlers.
Otherwise, it's the same as using Javascript with any JSP or HTML file.
See also 

 http://husted.com/about/struts/FAQ/view-js.htm 

-Ted.



RE: Interfaces in Struts

2001-06-12 Thread Hardee, Tony

Anthony,

Instead of:

public final class ProfileForm extends ActionForm implements Profile {

private int proifleno ;
private String firstname ;
private String lastname ;
.
.

try:

public final class ProfileForm extends ActionForm {

private ProfileDBM profile = null;

public Profile getProfile() {
if (profile == null) {
profile = new ProfileDBM();
}
return profile;
  }
.
.


Struts allows you to nest beans within forms.  You would reference the
firstName in Struts tags using the dot notation (i.e., profile.firstName).

Using the nested beans, you do not have to reimplement the mindless get/set
methods in both your ProfileDBM and
ProfileForm.

Cheers,

Tony


-Original Message-
From: Anthony Martin [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 11, 2001 9:34 PM
To: '[EMAIL PROTECTED]'
Subject: Interfaces in Struts


I wanted to share my approach because it seems successful for what we're
doing.  I can't imagine we're the only ones doing it, but just in case we
are, I wanted to share.  I'd also like to hear any and all comments and
criticisms.

We use Struts to present database tables to the user so that we may collect
information from them, validate it, and process it.  Nothing new here.

In order to make sure we only have to design these beans once, I used
interfaces from the beginning.  So a profile starts out as something like
this:

/*
 * Profile.java
 */

package com.trams.project ;

public interface Profile {

int proifleno = 0 ;
String firstname = null ;
String lastname = null ;
.
.
.

int getProfileno ( ) ;
void setProfileno ( int profileno ) ;

String getFirstname ( ) ;
void setFirstname( String firstname ) ;

void setLastname ( String lastname ) ;
String getLastname ( ) ;

.
.
.

}

// end of Profile.java

Once I have the interface, I also write the class that uses it.  In this
case, a database interactivity class that constructs SQL statements in order
to process the data presented to it:

/*
 * ProfileDBM.java
 */

package com.trams.project ;

public class ProfileDBM extends DatabaseManager {

Profile table = null ;

public void setTable ( Object table ) { this.table = (Profile) table
; }

public void create ( ) {

.
.
.

}

public void retrieve ( ) {

.
.
.
table.setProfileno(rs.getInt(PROFILENO)) ;
table.setFirstname(rs.getString(FIRSTNAME)) ;
table.setLastname(rs.getString(LASTNAME)) ;
.
.
.

}

public void update ( ) {

.
.
.

}

public void delete ( ) {

.
.
.

}

}

At this point you can see (or have to trust) that nothing uses Struts,
Servlets, or anything other than basic packages.  The above code could be
used to populate any object with Profile information, be it a command line
utility, AWT object, or even a Struts ActionForm.

I then implement my Profile into an ActionForm:

/*
 * ProfileForm.java
 */

package com.trams.project ;

public final class ProfileForm extends ActionForm implements Profile {

private int proifleno ;
private String firstname ;
private String lastname ;
.
.
.

int getProfileno ( ) { return this.profileno ; }
void setProfileno ( int profileno ) { this.profileno = profileno ; }

String getFirstname ( ) { return this.firstname ; }
void setFirstname( String firstname ) { this.firstname = firstname ;
}

void setLastname ( String lastname ) { return this.lastname ; }
String getLastname ( ) { this.lastname = lastname ; }

.
.
.

}

Then a fragment of my ProfileAction.java file:

.
.
.
ProfileForm profileForm = (ProfileForm) form ;

ProfileDBM dbm = new ProfileDBM() ;
dbm.setCon(con) ; // part of my DatabaseManager class
dbm.setTable(profileForm) ;
dbm.retrieve() ;
.
.
.

That populates the entire form so it can be displayed and manipulated by the
user.  The other methods aid in creating, updating, and deleting.

Nothing really spectacular, I know.  But I remember people talking about it,
and I just wanted to share what I've been doing.  Again, we've had great
success in representing our existing database.  And at this rate, we'll have
more than a Struts API for accessing our database.  We'll also have
independent interfaces that could be used by any developer who wants the SQL
logic all worked out for them.


Anthony

RE: Design Suggestion

2001-05-14 Thread Hardee, Tony

My version of the code has:


public abstract class ActionForm implements Serializable {

The only interface ActionForm implements is Serializable.

-Original Message-
From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 1:51 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Design Suggestion



What you can do is try to create a BaseActionForm which extends ActionForm
and implements some interface (like FormInterface or something). This should
solve your problem. 

cheers,
Amar..

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 12:38 PM
To: '[EMAIL PROTECTED]'
Subject: Design Suggestion


I have a situation where it would be useful if the ActionForm was an
interface rather than an abstract class.  Basically, I had developed some
subclasses of ActionForm that I found useful.  I am now integrating with
another developer who also has useful subclasses of ActionForms.
Unfortunately the implementations are orthogonal.  They create a situation
that could be solved with multiple inheritance.  Since multiple inheritance
is neither supported nor desired, the best solution involves the ability to
extend ActionForm with interfaces rather than through inheritance.

Does anyone know why the ActionForm should not be defined as an interface
with a BasicActionForm providing the current implementation?

Would anyone care to caution me on making this change within my own version
of struts?



RE: Interface testing

2001-03-07 Thread Hardee, Tony

I have a SuccessAction which is just an simple action that forwards to
success.  To test a JSP with the request first flowing through the
ActionServlet you need only specify a mapping for the JSP to test in the
struts-config.xml file.  In the mapping specify SuccessAction as the type
and your jsp as the success forward.  You can define any path that you want.
You still might need to create an associated ActionForm, however creating a
stub ActionForm to test your JSP is fairly trivial.

To test the back-end without having a JSP, I have defined a Snoop.JSP that
works with a Snooper class.  I have overridden the ActionServlet (i.e., the
processActionForward) method to redirect any forwards to *.jsp to Snoop.jsp
if the request has a http request parameter 'snoop'.  Snoop.jsp with the
assistance of the Snooper class uses java introspection to dump the contents
of the session and request contents.  This allows the Action (i.e.,
controller/model) to be developed independently of the view (i.e., JSP).

-Original Message-
From: Zach Thompson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 1:34 PM
To: [EMAIL PROTECTED]
Subject: Re: Interface testing


Thanks - I think JUnit will help a lot to improve my development process.

I'm still interesting in hearing about techniques people use to separate
the design of the UI (jsp pages) from the backend implementation 
(Action classes).  Currently, I have to write ActionForm's and Action's 
so the jsp pages don't get exceptions.  I'd like to be able to decouple
these two separate phases of development as much as possible...

Zach

Michael Kelly wrote:
 I've been using JUnit to test the form and action objects (which required
 creating response, request, and servlet stubs for the perform method of
 the action object).  Then I use HTTPUnit for the interface testing.
 
 -=michael=-
 
 ==
  Michael S. Kelly      _
  Axian, Inc. // |_  __(_) ___  _ __
  4800 SW Griffith Dr., Ste. 202 //| |\\/ /| |/ _ \| '_ \
  Beaverton, OR  97005 USA _//_| | / / | | |_| | | | |
  Voice: (503)644-6106 x122   ((   //  |_|/_/\\|_|\_/|_|_| |_|
  Fax:   (503)643-8425 ``-''  ``-''
  http://www.axian.com/   Software Consulting and Training
  mailto:[EMAIL PROTECTED]
  Axian mailto:[EMAIL PROTECTED]
 ==
 
 On Sun, 4 Mar 2001, Zach Thompson wrote:
 
  Hello,
  
  Does anyone have suggestions about how to test the user interface of
  a Struts application before the backend (Action and ActionForm)'s have
been
  implemented?
  
  I'm having trouble separating development of the UI from the backend.
It
  seems like we spend too much time going back and forth trying to get the

  jsp and all the Struts tags to interact well with the Action's.
Sometimes
  the UI is unstable or untestable until something on the backend is
fixed.  I
  think my development process is broken...
  
  xmlc from Enhydra (enhydra.org) was one approach I looked at, and I like

  the concept of mocking up the entire site up in html before code is
  written.  We have found that use tests can lead to major re-designs of
  the backend (especially when the use tests are conducted by clients).
  Ideally, I'd have the UI and the backend be two separate, independently
  functioning units that can implemented and tested at different times by
  different groups and plugged together.
  
  Do I need to create Action and ActionForm stubs to use for testing?  Is 
  there something that could be integrated into Struts to help with this?
  Maybe have a setting in struts-config.xml that allows jsp's to run even
  if there are errors in Struts tags (beans not found, etc.)?
  Or, am I just going about this all wrong?
  
  Thanks so much,
  
  Zach
  
 



JSP includes of

2001-03-01 Thread Hardee, Tony

I am having trouble using includes and custom tags in JSPs with Struts. 

The application is unable to find the tag descriptor files. For example, I
have an include file that contains:

// header.jsp
%@ page language="java" %
%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %
%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %
%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %

and call it in the JSP:
jsp:include page="include/header.jsp"/ 

The .tld files can not be resolved. The include directory is one level under
the JSP and I have tried different paths to the .tld files with no success.
How can I get this to work if at all?

Solutions are appreciated.



RE: JSP includes of

2001-03-01 Thread Hardee, Tony

The application finds the header file; I am also sourcing an image which
appears on the page from the include. However, it is unable to resolve the
tag library descriptors. Thus the include statement is fine, it is the
taglib uri that is not working from the include.


Thanks
-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 4:46 PM
To: [EMAIL PROTECTED]
Subject: Re: JSP includes of


Try to change jsp:include page="include/header.jsp"/ to put a full path to
header.jsp file. For example:
jsp:include page="/WEB-INF/include/header.jsp"/. But I am not sure.

Katarina Nelson wrote:

 Try to include the needed .tld files into the "include/header.jsp" page.
 It worked for me.

 /Katarina

 -Original Message-
 From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
 Sent: den 1 mars 2001 22:29
 To: '[EMAIL PROTECTED]'
 Subject: JSP includes of

 I am having trouble using includes and custom tags in JSPs with Struts.

 The application is unable to find the tag descriptor files. For example, I
 have an include file that contains:

 // header.jsp
 %@ page language="java" %
 %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %
 %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %
 %@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %

 and call it in the JSP:
 jsp:include page="include/header.jsp"/

 The .tld files can not be resolved. The include directory is one level
under
 the JSP and I have tried different paths to the .tld files with no
success.
 How can I get this to work if at all?

 Solutions are appreciated.



Struts Example using Prefix Matching

2001-02-15 Thread Hardee, Tony

Does anyone have an example Struts application using prefix mapping where
all URLs that start after the context path are routed to the ActionServlet?
I would like a rigid model 2 architecture where all requests are routed
through the controlling servlet.
  



Where are log messages going?

2001-02-15 Thread Hardee, Tony

I have a modified version of the example application running in WebLogic
6.0.  In the servlet configuration I have the following debug init
parameter:

init-param
  param-namedebug/param-name
  param-value1/param-value
/init-param

Unfortunately, I do not see any of the log messages from Struts.  What else
do I need to do?

Tony Hardee



RE: Struts Example using Prefix Matching

2001-02-15 Thread Hardee, Tony

Craig,

I had already made the change you mention below but it caused a number of
other issues.

1.  Is the proper mapping in the struts-config.xml file


!-- Process a user logon --
actionpath="/logon"
   type="com.xxx.gui.user.LogonAction"
   name="logonForm"
  scope="request"
  input="/logon.jsp"
/action

   or

!-- Process a user logon --
actionpath="logon"
   type="com.xxx.gui.user.LogonAction"
   name="logonForm"
  scope="request"
  input="/logon.jsp"
/action

It seems like the initial request path matches case two.  However
subsequent forwarding need the first entry.

2.  Image files (e.g., *.gif) files are routed through the controller but
are not forwarded or mapped.

Thank you for your assistance.




-Original Message-
From: Craig Tataryn [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 15, 2001 11:35 AM
To: [EMAIL PROTECTED]
Subject: Re: Struts Example using Prefix Matching


In your web.xml file change:

servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
/servlet-mapping

TO:

servlet-mapping
    servlet-nameaction/servlet-name
url-pattern*/url-pattern
/servlet-mapping

Craig T.

"Hardee, Tony" wrote:

 Does anyone have an example Struts application using prefix mapping where
 all URLs that start after the context path are routed to the
ActionServlet?
 I would like a rigid model 2 architecture where all requests are routed
 through the controlling servlet.