Re: new template tag framework

2001-02-07 Thread Cedric dumoulin


  Sorry for this late answer, I was far away from a computer for near three weeks
(somewhere in the tropics ...).

  Sure, I do not object to integrate part or whole of Components proposal, and I am
open to any discussion to improve it.

 I have designed Components to be able to build pages by assembling "independent"
and "reusable" pieces of jsp code. Later I have unified Components syntax with
David's Template in order to not provide another tool, and because David’s Template
has already been adopted. Now, components can be seen as an extended template
proposal. It is an additional taglib that you can use if you need provided features.

  It uses some Struts utilities, but doesn't rely on Struts. The provided servlet
extends the Struts one, in order to be able to "catch" include calls from Struts,
and reroute them if needed. Provided servlet could be simplified if Struts servlet
provide such a hook. May be one day ... It is the only intrusion in Struts.

  Cedric


David Geary wrote:

 I think this is a good idea. In a couple of weeks, I'll have some time to
 integrate it, unless someone objects.

 david

 "Craig R. McClanahan" wrote:

  "Deadman, Hal" wrote:
 
   I just tried out this Components extension to Struts and I like how it
   allows you centralize the template component definitions in an xml file and
   that it allows you to extend a template component and just override the
   parts that are different. Are there any plans for adopting this as part of
   Struts? It appears the authors would like it to be part of struts. Has it
   been voted down or is it being put off until after the 1.0 release?
  
 
  It certainly won't be added to 1.0 at this point.  For 1.1, I'm certainly open
  to cool additions, and will be looking at this one closely.
 
  
   Hal
  
 
  Craig
 
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
   Nathan Eric Probst
   Sent: Thursday, January 25, 2001 2:13 AM
   To: [EMAIL PROTECTED]
   Subject: Re: new template tag framework
  
   Check out the Components extention to Struts:
   http://gauss.ficsgrp.com/cdm
  
   nathan
  
   Quoc Le wrote:
  
The struts-template example implements a "C-Frame"  using
the new template tag framework.  I was a little disappointed
to find, though, that each new page inserted inside the
C-Frame requires 2 jsp/html files.  (One jsp to use the template
jsp and another html/jsp file to hold the content - options.jsp
and options.html for example).
   
It would be nice if there were a way to have variable content
inside the C-Frame without having to create 2 new pages
for each new page.
   
Does anyone know of an easy way to do this?
   
Thanks,
Quoc Le




Re: Tomcat/Struts-friendly hosting services

2001-02-07 Thread Tom Miller

Thanks, the suggestions were helpful in my research!

--
Tom Miller
Miller Associates, Inc.
[EMAIL PROTECTED]
641.469.3535 Phone
413.581.6326 FAX





RE: Illegal target of jump or branch Error

2001-02-07 Thread TMalvos


Thank you for your explanations.  As a result I changed the -ms and -mx
options for the Java VM to request 256 MB of heap memory...and it worked.


   
   
"D'Orto,   
   
David"   To: "'[EMAIL PROTECTED]'" 
[EMAIL PROTECTED]  
DOrto@Bluestcc: (bcc: Todd Malvoso/GRS/GRN)   
   
one.com Subject: RE: "Illegal target of jump or 
branch" Error
   
   
02/07/01   
   
09:05 AM   
   
Please 
   
respond to 
   
struts-user
   
   
   
   
   




I have also seen this problem when a jsp was being compiled that had a lot
of struts tags in it (like 250 or so).  I also believe it has to do with
the
method that is generated when the jsp is compiled being too large.  When I
took the class that was generated by Tomcat for the page and compile it on
the command line, I get the 64kb limit exception.  I do not know why the
"Illegal target of jump or branch" error gets thrown in Tomcat as opposed
to
the 64kb limit exception.

Dave D'Orto
[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 5:48 AM
To: [EMAIL PROTECTED]
Subject: Re: "Illegal target of jump or branch" Error



I think this is due to hitting the 64kb limit in a class file (a 16bit
offset for the byte code in a method). I had similar problems using Jasper.
I managed to refactor the page so that the number of actual tags was
reduced (put a loop in it, so the tags were called multiple times). Using
scriptlets (!) can also help significantly... or if you can afford the
flush, use jsp:include  (roll on JSP 1.2).





[EMAIL PROTECTED] on 07/02/2001 06:59:08

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Ken X Horn)
Subject:  Re: "Illegal target of jump or branch" Error



Interesting. A colleague of mine started seeing exactly the same problem
today, but with Resin instead of WebLogic. I had never seen it before.

It seems, on the face of it, to have something to do with the complexity of
the page. The page we were having problems with has a boatload of custom
tags on it (some Struts, others our own). When we commented out a sizeable
number of those tags, it started working again. Which particular chunk of
tags we removed did not make a difference, which is what led me to believe
it was related to page complexity. However, that's as far as I've got.

I'd be very interested in hearing the "real" reason behind this error, as
well as what we might be able to do about it.

--
Martin Cooper
Tumbleweed Communications


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 06, 2001 8:00 AM
Subject: HELP: "Illegal target of jump or branch" Error


 I receive the following error when accessing my JSP in WebLogic 5.1
(sp8):

 Tue Feb 06 10:56:07 EST 2001:E WebAppServletContext-smartforms
Servlet
 failed with Exception
 java.lang.VerifyError: (class: jsp_servlet/_test, method: _jspService
 signature: (Ljavax/servlet/htt
 p/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Illegal
 target of jump or branch
 at java.lang.Class.newInstance0(Native Method)
 at java.lang.Class.newInstance(Class.java, Compiled Code)
 at

weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java


:431)
 at

weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja


va,

 Compiled
 Code)
 at


Redirecting the user

2001-02-07 Thread Ken-Ove . Andersen

Hi!

I have a question concerning redirecting:

On our site we have a page with an input field and a drop-down-list-box.
Based on the value of the drop-down-listbox we want to redirect the user to
different servers. We also want to send the value of the input field as a
parameter for each redirect.

To do this I put the following code in my action-class:

if (valueOfDropDownListBox.equals("A"))
return new ActionForward("http://siteA?param1=" + inputFieldValue,
true);
else
return new ActionForward("http://siteB?param2=" + inputFieldValue,
true);

There will be requests with very different inputField-values (this will
cause the creation of lots of new ActionForward objects). Is this an okay
way to solve this, or is there a better way to do the redirecting with
parameters in STRUTS?

Greetings

Ken



Re: JBuilder Enterprise

2001-02-07 Thread Steven D. Wilkinson

Bruce,
Do you compile your code with JB?  The reason why I ask...
If you have a library in your JB project, it will automatically put that on the
classpath when you launch your main class for the project.  Hopefully this
states the problem simply... 

Problem... 
Put struts.jar in my project so I can compile in JB.
When Tomcat's main (Catalina for me I'm using Tomcat 4.0) is called the
struts.jar is added to the classpath.

Solution...
use ant to build my code and don't include struts.jar in my project.  

Did you find another solution to the problem?

After about 8 emails on inprise newsgroup they had a couple of suggestions.  I
just wanted to see what your experience was.

Thanks in advance,

Steve


Bruce McCleave wrote:
 
 Hotspot is what causes debugging to be so slow.  We have found that passing
 "-classic" as a VM Parameter, which disables HotSpot, will dramatically
 increase performance.  In my case I went from a 2 minute startup time to
 about 5 seconds, it actually makes the debugger usable.
 
 That was with JBuilder Professional 4.0.
 
 ~Bruce
 
 -Original Message-
 From: Deping Chian [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 06, 2001 9:09 AM
 To: [EMAIL PROTECTED]
 Subject: Re: JBuilder Enterprise
 
 Lind Jrgen wrote:
 
  Hi,
 
  after the discussion on using JBuilder for Web Development, I decided
  to try the Enterprise Edition... While my stuff worked fine with the
  Foundation version (and an "external" Tomcat), I cannot get it running
  within the JBuilder Environment. After I managed to tell the internal
  Tomcat where to find the struts TLDs, Tomcat complains about some missing
  attribute:
 
  javax.servlet.ServletException: Missing resources attribute
  org.apache.struts.action.MESSAGE
 Discard JB4's internal Tomcat (older version). Download tomcat 3.2.1,
 and new struts nightly build.
 
 create a new library set (call it tomcat3.2.1 if you want), add all jar
 files in tomcat-3.2.1/lib directory. I do database apps with
 interclient, so I put my interclient.jar there. Also I used
 GenericDataSource class of struts, so I put jdbc2_0-stdext.jar there
 (download from Sun).
 
 I have been using these for one of my projects for a while. Debugging is
 ok in Linux even for struts calls. Debugging can be slow in windows
 unless you include a -class VM parameters.
 
 If you updrade to another version of JBuilder or struts, you should
 delete all the work files. Otherwise, it is very likely to have
 problems.
 
 Deping
 
   at
 
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
  l.java:386)
   at
 
 www.p_00025blic_0005fhtml.webapps.odin_0002dtracer.jsp._0002fwww_0002fpublic
 
 _0005fhtml_0002fwebapps_0002fodin_0002dtracer_0002fjsp_0002flogon_0002ejsplo
 
 gon_jsp_0._jspService(_0002fwww_0002fpublic_0005fhtml_0002fwebapps_0002fodin
  _0002dtracer_0002fjsp_0002flogon_0002ejsplogon_jsp_0.java:305)
 
  Any ideas what this means and how to fix it?
 
  Regards,
 
  Jrgen

-- 
-
Steven D. Wilkinson, [EMAIL PROTECTED]



RE: JBuilder Enterprise

2001-02-07 Thread Bruce McCleave

I have set up JBuilder to mimic my tomcat environment.  First I set up my
JBuilder project to build my classes in "/WEB-INF/classes" then I changed
the working directory to {tomcat_root}/bin (this is not required).

As for the Jars, I include them in the project so that the build can find
all the jars.  In our final build struts.jar is placed in "/WEB-INF/lib"
where tomcat automatically picks up the jars.

Hope that helps,

~Bruce

-Original Message-
From: Steven D. Wilkinson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 7:59 AM
To: [EMAIL PROTECTED]
Subject: Re: JBuilder Enterprise


Bruce,
Do you compile your code with JB?  The reason why I ask...
If you have a library in your JB project, it will automatically put that on
the
classpath when you launch your main class for the project.  Hopefully this
states the problem simply... 

Problem... 
Put struts.jar in my project so I can compile in JB.
When Tomcat's main (Catalina for me I'm using Tomcat 4.0) is called the
struts.jar is added to the classpath.

Solution...
use ant to build my code and don't include struts.jar in my project.  

Did you find another solution to the problem?

After about 8 emails on inprise newsgroup they had a couple of suggestions.
I
just wanted to see what your experience was.

Thanks in advance,

Steve


Bruce McCleave wrote:
 
 Hotspot is what causes debugging to be so slow.  We have found that
passing
 "-classic" as a VM Parameter, which disables HotSpot, will dramatically
 increase performance.  In my case I went from a 2 minute startup time to
 about 5 seconds, it actually makes the debugger usable.
 
 That was with JBuilder Professional 4.0.
 
 ~Bruce
 
 -Original Message-
 From: Deping Chian [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 06, 2001 9:09 AM
 To: [EMAIL PROTECTED]
 Subject: Re: JBuilder Enterprise
 
 Lind Jrgen wrote:
 
  Hi,
 
  after the discussion on using JBuilder for Web Development, I decided
  to try the Enterprise Edition... While my stuff worked fine with the
  Foundation version (and an "external" Tomcat), I cannot get it running
  within the JBuilder Environment. After I managed to tell the internal
  Tomcat where to find the struts TLDs, Tomcat complains about some
missing
  attribute:
 
  javax.servlet.ServletException: Missing resources attribute
  org.apache.struts.action.MESSAGE
 Discard JB4's internal Tomcat (older version). Download tomcat 3.2.1,
 and new struts nightly build.
 
 create a new library set (call it tomcat3.2.1 if you want), add all jar
 files in tomcat-3.2.1/lib directory. I do database apps with
 interclient, so I put my interclient.jar there. Also I used
 GenericDataSource class of struts, so I put jdbc2_0-stdext.jar there
 (download from Sun).
 
 I have been using these for one of my projects for a while. Debugging is
 ok in Linux even for struts calls. Debugging can be slow in windows
 unless you include a -class VM parameters.
 
 If you updrade to another version of JBuilder or struts, you should
 delete all the work files. Otherwise, it is very likely to have
 problems.
 
 Deping
 
   at
 

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
  l.java:386)
   at
 

www.p_00025blic_0005fhtml.webapps.odin_0002dtracer.jsp._0002fwww_0002fpublic
 

_0005fhtml_0002fwebapps_0002fodin_0002dtracer_0002fjsp_0002flogon_0002ejsplo
 

gon_jsp_0._jspService(_0002fwww_0002fpublic_0005fhtml_0002fwebapps_0002fodin
  _0002dtracer_0002fjsp_0002flogon_0002ejsplogon_jsp_0.java:305)
 
  Any ideas what this means and how to fix it?
 
  Regards,
 
  Jrgen

-- 
-
Steven D. Wilkinson, [EMAIL PROTECTED]



Using Struts to achieve asynchronous comms

2001-02-07 Thread Gregory Polimis

Hello all. I've been wrestling with an asynchronous comms problem (for
almost a week) and am wondering if implementing struts can help.
I'm developing a web application that'll send a message to a server,
then wait for a response and display that response to a web browser (the
client). The problem is, the server requires an indeterminate
amount of time (from several seconds up to minutes, perhaps even hours
in production) so the servlet must 'wait' somehow until a response is
ready. Implementing blocking calls at the servlet level doean't seem
the way to go and I don't think a producer/consumer pattern will help
either.

Still searching the archives (my connection is unreliable today for some
reason) so my apologies if this has been dealt with already. Please
point me to the right resources if possible.  Thanks in advance for any
and all replies.

Greg




Re: Using Struts to achieve asynchronous comms

2001-02-07 Thread Joe Peer

hi,

maybe my approch is ridicolous but it would be very simple:

szenario:

1. your client request servlet url.
(your servlet stores the session id of your user (in any way) to remember 
him/her)
2. your servlets starts the process doing the heavy work (i suppose ;=)
3. your servlet sends *immediate* response, containing a html site with a 
meta refresh tag or some other code forcing the users browser to reload the 
site (== contact the servlet url), ie. every minute or so
4. every time the servlet gets contacted it checks if the working process 
is finished for the user. if not ready it sends the same html site again
5. finally if the user contacts the servlet again and if the result is 
available you redirect or forward him/her to the result page

this is how i would do it probable
joe

At 18:08 07.02.01, you wrote:
Hello all. I've been wrestling with an asynchronous comms problem (for
almost a week) and am wondering if implementing struts can help.
I'm developing a web application that'll send a message to a server,
then wait for a response and display that response to a web browser (the
client). The problem is, the server requires an indeterminate
amount of time (from several seconds up to minutes, perhaps even hours
in production) so the servlet must 'wait' somehow until a response is
ready. Implementing blocking calls at the servlet level doean't seem
the way to go and I don't think a producer/consumer pattern will help
either.

Still searching the archives (my connection is unreliable today for some
reason) so my apologies if this has been dealt with already. Please
point me to the right resources if possible.  Thanks in advance for any
and all replies.

Greg




specifying default values for forms

2001-02-07 Thread Deadman, Hal



Is there a way to 
specify default values other than zero for when an ActionForm setter method 
takes a numberargument and the conversion of the string input fails? I 
seem to recall discussion of this feature but I can't dig up the thread. 


Thanks, 
Hal


can't start tomcat

2001-02-07 Thread majid kamal

Hi, I have tomcat3.1, it was woking fine, now I downloaded the last version
under windows2000, but when I try to start it like this :
C:\tomcat\bin\tomcat start
I got this error :
Unable to locate servlet.jar, check the value of TOMCAT_HOME.

TOMCAT_HOME is set to C:\tomcat; 

Could you please help me.
Thanks



__
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com




can't start tomcat ????

2001-02-07 Thread majid kamal


Hi, I have tomcat3.1, it was woking fine, now I downloaded the last version
under windows2000, but when I try to start it like this :
C:\tomcat\bin\tomcat start
I got this error :
Unable to locate servlet.jar, check the value of TOMCAT_HOME.

TOMCAT_HOME is set to C:\tomcat; 

Could you please help me.
Thanks

-- 
majid kamal
[EMAIL PROTECTED] - email
(781) 685-1450 x2371 - voicemail/fax



__
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com




Re: can't start tomcat ????

2001-02-07 Thread Peter Alfors

Have you checked that TOMCAT_HOME is actually being set before you run
tomcat.bat?
Maybe try to run startup.bat.  It will tell you if it TOMCAT_HOME is not
specified.
Also, did you check to make sure that the servlet.jar is in the tomcat\lib
directory?

majid kamal wrote:

 Hi, I have tomcat3.1, it was woking fine, now I downloaded the last version
 under windows2000, but when I try to start it like this :
 C:\tomcat\bin\tomcat start
 I got this error :
 Unable to locate servlet.jar, check the value of TOMCAT_HOME.

 TOMCAT_HOME is set to C:\tomcat;

 Could you please help me.
 Thanks

 --
 majid kamal
 [EMAIL PROTECTED] - email
 (781) 685-1450 x2371 - voicemail/fax

 __
 FREE voicemail, email, and fax...all in one place.
 Sign Up Now! http://www.onebox.com


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC="http://www.irista.com/logo/irista.gif"BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: specifying default values for forms

2001-02-07 Thread horn_ken



In Struts 1.1, we need to provide finer-grained control over this as
part of enhanced validation processing (i.e. things like per-property
default values and such).

We're currently looking at ways of implementing user preferences, so that
when ever we construct a given bean (for a specific form probably), the
user's default values are set. Has any coding started on this / design been
done as yet?

My current thoughts are:

a) Some sort of bean factory that could apply any suitable defaults, based
on info in the session / our own classes -- maybe via some sort of
framework hook.

b) Same as (a) but maybe using a custom tag instead of jsp:useBean /

c) Always enter an app / screen via an action, so that it can initialise
the required beans, so that useBean never constructs the beans.

Ideas?

Ken.





[EMAIL PROTECTED] on 07/02/2001 17:51:08

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Ken X Horn)
Subject:  Re: specifying default values for forms



"Deadman, Hal" wrote:

  Is there a way to specify default values other than zero for when an
 ActionForm setter method takes a number argument and the conversion of
 the string input fails? I seem to recall discussion of this feature
 but I can't dig up the thread. Thanks, Hal

The ConvertUtils class was recently enhanced to include mechanisms to
set the default value returned in such cases.  These settings are global
to your webapp, so they will affect conversion failures on all
properties of a given type.  This is in the current nightly builds.

In Struts 1.1, we need to provide finer-grained control over this as
part of enhanced validation processing (i.e. things like per-property
default values and such).

Craig




"Deadman, Hal" wrote:
Is
there a way to specify default values other than zero for when an ActionForm
setter method takes a number argument and the conversion of the string
input fails? I seem to recall discussion of this feature but I can't dig
up the thread.Thanks,
Hal

The ConvertUtils class was recently enhanced to include mechanisms
to set the default value returned in such cases. These settings are
global to your webapp, so they will affect conversion failures on all properties
of a given type. This is in the current nightly builds.
In Struts 1.1, we need to provide finer-grained control over this as
part of enhanced validation processing (i.e. things like per-property default
values and such).
Craig




Re: can't start tomcat ????

2001-02-07 Thread Peter Alfors

the semi-colon is probably it.  I didn't notice that.  :)

Mike Campbell wrote:

  "PA" == Peter Alfors [EMAIL PROTECTED] writes:

 PA Have you checked that TOMCAT_HOME is actually being set before you
 PA run tomcat.bat? Maybe try to run startup.bat. It will tell you if
 PA it TOMCAT_HOME is not specified. Also, did you check to make sure
 PA that the servlet.jar is in the tomcat\lib directory?

 PA majid kamal wrote:

  Hi, I have tomcat3.1, it was woking fine, now I downloaded the last version
  under windows2000, but when I try to start it like this :
  C:\tomcat\bin\tomcat start
  I got this error :
  Unable to locate servlet.jar, check the value of TOMCAT_HOME.
 
  TOMCAT_HOME is set to C:\tomcat;

 Is TOMCAT_HOME supposed to have a trailing semicolon?

 --


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC="http://www.irista.com/logo/irista.gif"BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



RE: What is the use of ActionFormBean?

2001-02-07 Thread Rajan Gupta

I am looking for a specific example for the use of ActionFormBean

The example provided with Struts does not use the formBean parameter in
the servlet initialization parameter. Do not confuse ActionForm with
ActionFormBean!.


Any help will be appreciated

--- "Allamsetty, Venkata" [EMAIL PROTECTED] wrote:
 Here is some useful info that I have come across. 
 
 
 
 list of resources on the Struts frame work
 
 
 
   http://jakarta.apache.org/struts/userGuide/index.html
 
   http://www.husted.com/about/struts/example-tour.html
 
 
 Other Struts-Related Articles
 
   new! Components Library for building JSP views by Cedric
 Dumoulin
   - http://gauss.ficsgrp.com/cdm/index.html 
   new! Struts Framework Trailmaps by Bluestone -

http://gallery.bluestone.com/scripts/SaISAPI.dll/Gallery.class/demos/trailMa
 ps/index.jsp 
   [0.5]  Strut Your Struff by Thor Kristmundsson -
 http://www.javaworld.com/javaworld/jw-12-2000/jw-1201-struts.html 
   [0.5] Using the Struts Framework to Develop a Message Board by
 Maneesh Sahu - 
   [access requires registration with informit.com first] - Click
 Here 
   A MVC Framework from Kevin Duffy
   http://www.brainopolis.com/jsp/mvc/KDuffey_MVC.html 
   Apache Struts: A Web application framework by David Geary
 [source
 code only] -
  

http://www.javareport.com/html/from_pages/view_recent_articles_jr.cfm?Articl
 eID=2023  
   JSP templates by David Geary
   -
 http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb_p.html 
  
 http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb.html 
  
 http://www.javaworld.com/javaworld/jw-09-2000/jw-0929-letters.html 
   Encapsulate reusable functionality in JSP by Simon Brown
  
 http://www.javaworld.com/javaworld/jw-08-2000/jw-0811-jsptags.html
 
   [ opinion ] Freeware: Is it really worth it? by Anil Hemrajani
 -
  

http://www.javaworld.com/javaworld/jw-11-2000/jw-1103-soapbox.html#resources
 
   The Problem with JSP by Jason Hunter -
 http://www.servlets.com/soapbox/problems-jsp.html (or "Why we need
 Struts" -
 ed.) 
   Template Resolution in XML/HTML by Anders Kristensen -
 http://www-uk.hpl.hp.com/people/ak/doc/trix-tr.html 
 
 
 
 
 
 
 Thanks Husted for the great job on documenting struts. 
 
 
 
 -VA
 
 -Original Message-
 From: Rajan Gupta [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 06, 2001 2:12 PM
 To: [EMAIL PROTECTED]
 Subject: What is the use of ActionFormBean?
 
 
 Hi! All,
 Can somebody please provide me with some documentation on ActionFormBean
 
  its typical usage.
 
 Thanks in advance,
 
 Cheers
 Rajan
 
 
 
 __
 Do You Yahoo!?
 Yahoo! Auctions - Buy the things you want at great prices.
 http://auctions.yahoo.com/


__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/



RE: Using Struts to achieve asynchronous comms

2001-02-07 Thread Nick Chalko

If security isn't an issue  store it in the "job id" in the URL

http://my.company.com/servlet/getlongactionResult?jobid=1234

Even if the "session" times out, the user can check on the job


-Original Message-
From: Joe Peer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 9:23 AM
To: [EMAIL PROTECTED]
Subject: Re: Using Struts to achieve asynchronous comms


hi,

maybe my approch is ridicolous but it would be very simple:

szenario:

1. your client request servlet url.
(your servlet stores the session id of your user (in any way) to remember 
him/her)
2. your servlets starts the process doing the heavy work (i suppose ;=)
3. your servlet sends *immediate* response, containing a html site with a 
meta refresh tag or some other code forcing the users browser to reload the 
site (== contact the servlet url), ie. every minute or so
4. every time the servlet gets contacted it checks if the working process 
is finished for the user. if not ready it sends the same html site again
5. finally if the user contacts the servlet again and if the result is 
available you redirect or forward him/her to the result page

this is how i would do it probable
joe

At 18:08 07.02.01, you wrote:
Hello all. I've been wrestling with an asynchronous comms problem (for
almost a week) and am wondering if implementing struts can help.
I'm developing a web application that'll send a message to a server,
then wait for a response and display that response to a web browser (the
client). The problem is, the server requires an indeterminate
amount of time (from several seconds up to minutes, perhaps even hours
in production) so the servlet must 'wait' somehow until a response is
ready. Implementing blocking calls at the servlet level doean't seem
the way to go and I don't think a producer/consumer pattern will help
either.

Still searching the archives (my connection is unreliable today for some
reason) so my apologies if this has been dealt with already. Please
point me to the right resources if possible.  Thanks in advance for any
and all replies.

Greg



Ted's FAQ What Web sites are already Powered by Struts?

2001-02-07 Thread Dan Connelly




  Brewtrade - http://java-genius.com/ 
  TeaTimeJ - http://www.webappcabaret.com/teatimej/ 
  
What! Only two public sites powered by Struts? And, 
java-genius.com always gives me a DNS error anyway. So there's really only 
one site in this list that I would daresuggestto people who ask me 
about Struts in the real world.

There must be more public sites than this.There's http://jakarta.apache.org/strutsat 
least(although it doesn't do anything showy).

Please help me explain to MVC-clueless colleagues and bosses why I am 
spending so much time getting into Jakarta Struts (as opposed to the 
superficially similar, released, commercial,freely downloadableJSP 
taglibs, like Allaire's JRun Tag Libraryor WDIG's 
TeaServlets). Please post up some additions to 
Ted's list.

Also, how about adding more "Struts competitors" to my 
list of two? (And,while you're at it,do the competitive 
analysis.)

Dan Connelly (who is not Dan Connolly, W3C)




HTML examples

2001-02-07 Thread Sean Giles

Are there any complex examples for using the form:tags?  I'm just getting
started with struts and am having a problem using the form:select and
form:option tags.

Thanks
Sean Giles



Re: Ted's FAQ What Web sites are already Powered by Struts?

2001-02-07 Thread Ted Husted

On 2/7/2001 at 2:26 PM [EMAIL PROTECTED] wrote:

We use struts in portions of the Ironmax website
(http://www.ironmax.com)
Namely the irst step in the RFQ process, and we use struts in all of
our
informational products.

Are the links to ".ojsp" files going through the controller (e.g. ".do"
files)?

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





Re: Ted's FAQ What Web sites are already Powered by Struts?

2001-02-07 Thread jbirchfield


Yes, we use .ojsp and .sjsp for 'open' and 'secured' portions of the site.
They get mapped to one of two controllers.

James Birchfield

Ironmax
a better way to buy, sell and rent construction equipment
5 Corporate Center
9960 Corporate Campus Drive,
Suite 2000
Louisville, KY 40223


   
   
"Ted Husted"   
   
news.ted@husTo: "Struts List" 
[EMAIL PROTECTED]   
ted.com cc:   
   
 Subject: Re: Ted's FAQ "What Web sites 
are already Powered by Struts?"   
02/07/01   
   
03:07 PM   
   
Please 
   
respond to 
   
struts-user
   
   
   
   
   




On 2/7/2001 at 2:26 PM [EMAIL PROTECTED] wrote:

We use struts in portions of the Ironmax website
(http://www.ironmax.com)
Namely the irst step in the RFQ process, and we use struts in all of
our
informational products.

Are the links to ".ojsp" files going through the controller (e.g. ".do"
files)?

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/









any wireless site ?

2001-02-07 Thread prakhar bhatnagar

Hi
 We are developing wireless b2b application using struts architecture. Is there any wireless site which is built using struts architecture.

thanks.

PrakGet your FREE download of MSN Explorer at http://explorer.msn.com


Re: Not sure if this is clear but I wanted to keep it short:

2001-02-07 Thread Craig R. McClanahan



Ravi Manthena wrote:

 Not sure if this is clear but I wanted to keep it short:
 --
 Working : JSP Source

  jsp:useBean id="wrapper" scope="page"
  class="com.arrow.util.StrutsUtil"/

  h3Object[] OutPut/h3
  logic:iterate id="element" name="bean" collection="%=
  wrapper.getDriver() %" offset="0" length="5"
  brbean:write name="element"/
  /logic:iterate

  Question :
  How can we call a method on the instance of each ArrayObject

  Example :
  bean.getFirstName()


How about:

bean:write name="element" property="firstName"/

?


  Any Suggestions will be great.

  Ravi Manthena
  [EMAIL PROTECTED]

Craig McClanahan





Re: Not sure if this is clear but I wanted to keep it short:

2001-02-07 Thread Steven D. Wilkinson

Here is one of my examples:
logic:iterate id="category" type="com.ecs.com.struts.common.Category" 
 name="%= Constants.CATEGORIES_ARRAY_KEY %"
  tr
td
  html:link page="/showCDs.do" name="category" property="mapping"
bean:write name="category" property="categoryName" filter="true"/
  /html:link
/td
  /tr
/logic:iterate

The Category class is defined as follows:  

public class Category implements Serializable {
   private int categoryId = 0;
   private String categoryName = null;
   private HashMap mapping = new HashMap();  //mappings for link parameters

   public Category() {
   }

   public int getCategoryId() {
  return categoryId;
   }

   public void setCategoryId(int categoryId) {
  this.categoryId = categoryId;
   }

   public String getCategoryName() {
  return categoryName;
   }

   public void setCategoryName(String categoryName) {
  this.categoryName = categoryName;
   }

   /**
* The Mapping HashMap that is passed to the LinkTag in the form
* tag library.  The HashMap is a collection of parameters that will
* be used to make a query string and add it to the link.
*/
   public void setMapping() {
  mapping.put(Constants.CATEGORY_ID, new Integer(categoryId));
  mapping.put(Constants.CATEGORY_NAME, categoryName);
   }
   
   public Map getMapping() {
  return mapping;
   }
   
   public String toString() {
  StringBuffer sb = new StringBuffer("Category[categoryId=");
  sb.append(categoryId);
  sb.append(", categoryName=");
  sb.append(categoryName);
  sb.append("]");
  return sb.toString();
   }

}



Hope that helps...  I'm doing something a little more strange by using the
HashMap for a mapping, but it looked cool!

Steve

Ravi Manthena wrote:
 
 Not sure if this is clear but I wanted to keep it short:
 --
 Working : JSP Source
 
  jsp:useBean id="wrapper" scope="page"
  class="com.arrow.util.StrutsUtil"/
 
  h3Object[] OutPut/h3
  logic:iterate id="element" name="bean" collection="%=
  wrapper.getDriver() %" offset="0" length="5"
  brbean:write name="element"/
  /logic:iterate
 
  Question :
  How can we call a method on the instance of each ArrayObject
 
  Example :
  bean.getFirstName()
 
  Any Suggestions will be great.
 
  Ravi Manthena
  [EMAIL PROTECTED]

-- 
-
Steven D. Wilkinson, [EMAIL PROTECTED]



Forwarding to the same page

2001-02-07 Thread Kishore Subramanian

Hi,

Is there a way for an Action class to find out which page/action called it ?
Iam faced with a problem where the Action class should perform its work and forward 
the page back to callee page.

Note - I cannot add any "forward" tags to this Action mapping because this Action is 
part of a framework.

Any clues ?

Thanks,
Kishore




Re: Forwarding to the same page

2001-02-07 Thread Martin Cooper

You can call mapping.getInput() in your Action class. This will get you the
URI that provided your input, and is what Struts uses to send you back to
your input form if the ActionForm validation fails.

--
Martin Cooper
Tumbleweed Communications


- Original Message -
From: "Kishore Subramanian" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 07, 2001 2:40 PM
Subject: Forwarding to the same page


 Hi,

 Is there a way for an Action class to find out which page/action called it
?
 Iam faced with a problem where the Action class should perform its work
and forward the page back to callee page.

 Note - I cannot add any "forward" tags to this Action mapping because this
Action is part of a framework.

 Any clues ?

 Thanks,
 Kishore






Re: Forwarding to the same page

2001-02-07 Thread Peter Alfors

You can use:
request.getHeader("Referer");
to return the referring page.

Or, we have a class that takes a request object and performs methods against it.
One thing that it does is return the referring page. (without the query string or 
path).
This is the method from it

m_request is a member variable of the class...

   public String getReferrer()
   {
   String sFullRef, sRefPlus, sReferer;

   sFullRef = m_request.getHeader("Referer");
   if(sFullRef == null) return "";

   int iPos = sFullRef.lastIndexOf("/");
   if(iPos = 0) {
 sRefPlus = sFullRef.substring(iPos+1, sFullRef.length());
   }
   else {
 sRefPlus = sFullRef.substring(0, sFullRef.length());
   }

   iPos = sRefPlus.indexOf("?");
   if(iPos = 0) {
 sReferer = sRefPlus.substring(0, iPos);
   }
   else {
 sReferer = sRefPlus;
   }

   return sReferer;
   } // ends getReferer()

HTH,
Pete


Kishore Subramanian wrote:

 Hi,

 Is there a way for an Action class to find out which page/action called it ?
 Iam faced with a problem where the Action class should perform its work and forward 
the page back to callee page.

 Note - I cannot add any "forward" tags to this Action mapping because this Action is 
part of a framework.

 Any clues ?

 Thanks,
 Kishore


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC="http://www.irista.com/logo/irista.gif"BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Forwarding to the same page

2001-02-07 Thread Mike Campbell

 "MC" == Martin Cooper [EMAIL PROTECTED] writes:

MC You can call mapping.getInput() in your Action class. This will
MC get you the URI that provided your input, and is what Struts uses
MC to send you back to your input form if the ActionForm validation
MC fails.

Doesn't getInput() return what struts-config.xml has in the
"...input=..." part of the action ... section?  Or have I
misunderstood that?



Re: bean tag parameter confusion

2001-02-07 Thread Craig R. McClanahan



Mike Campbell wrote:

  I have an action class in which I've instantiated a bean, and called
 request.setAttribute("output", my bean here);Now, in my JSP, I'm
 trying to "get at" that bean with bean:define  I'm having a bit
 of trouble understanding the difference between the "id" and the
 "name" parameters.I can't use bean:define name="output"
 type="the.correct.type", since the "id" parameter is required.
 However, bean:define id="output" type="the.correct.type" gives me an
 error. (null pointer exception in the page context findAttribute()
 call).What DOES seem to work is bean:define id="anythingIChoose"
 name="output" type="the.correct.type" followed by bean:write
 name="output" property="someBeanProperty"Also curiously (to me
 anyway), bean:write name="anythingIChoose"
 property="someBeanProperty" seems to work if preceeded by the above
 bean:defineCan someone tell me what the id and name parameters
 do for bean:define, when all I'm looking to do is reference a bean on
 the request put there by the action class?  It appears that id,
 although required by the TLD, needn't be used, though it CAN be.
 What's the preferred pattern here?--


  Mike Campbell Email: [EMAIL PROTECTED]
  S1 Corporationvoice: 678.421.4641
  Software Engineer fax: 678.421.4865
  R  D web: http://www.s1.com/
  Black Knight


When you say you want to "get at" that bean, what is it exactly that you
wish to do?  For example, if all you want to do is render the value of
the bean (or a property of the bean) to the output page, you should use
bean:write instead of bean:define.

In bean:define, the "id" attribute tells you the name of the attribute
(and scripting variable) that will be *created* by this tag -- exactly
the same as the "id" attribute on the standard jsp:useBean tag works.
The "name" attribute, on the other hand, is the bean *from* which you
are copying the value to be created.

Craig McClanahan





Re: Forwarding to the same page

2001-02-07 Thread Martin Cooper

Yes, you are correct, that's where it comes from. It's true that there's no
guarantee that this is where you really came from, but it is where you'll go
back to if your validation fails, and in the vast majority of cases, I would
guess, you want to go back to where you came from to show the errors. ;-)

--
Martin Cooper
Tumbleweed Communications


- Original Message -
From: "Mike Campbell" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 07, 2001 3:21 PM
Subject: Re: Forwarding to the same page


  "MC" == Martin Cooper [EMAIL PROTECTED] writes:

 MC You can call mapping.getInput() in your Action class. This will
 MC get you the URI that provided your input, and is what Struts uses
 MC to send you back to your input form if the ActionForm validation
 MC fails.

 Doesn't getInput() return what struts-config.xml has in the
 "...input=..." part of the action ... section?  Or have I
 misunderstood that?





link tag parameters problem

2001-02-07 Thread Deadman, Hal



I have a two Struts 
link tags on a page. The first one sets a parameter but the parameter shows up 
on both links instead of just the first one.I am using Weblogic 6.0. 
Should the param* attributes be getting reset in the release() method of the 
link tag? When is the release method on a tag 
called?


Thanks, 
Hal


html:link paramId="orderId" paramName="order" 
paramProperty="orderId" page="/viewOrderDetail.do"
%= "Order No. " + 
order.getOrderId()%
/html:link

html:link 
page="/createOrder.do"bean:message 
key="link.createorder"//html:link


An array in a form bean

2001-02-07 Thread John Hunt

I want to have a series of text boxes ( say 10 ) in a
html page. I would like to use a formbean for this
with an array for the text boxes. So they all go under
the same name I guess. 
How should the getter and setter methods be? How would
we have it in the html page??
What should be done in case the number is variable???
Thanks
Hunt

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



property in form tag

2001-02-07 Thread John Hunt

Can we access arrays in form:form tag as
form:form property="memberVariable[i]" / ??
In this case should we have methods like

public void setMemberVariable( int index, String Value
) 

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



Forwarding to the callee page

2001-02-07 Thread Kishore Subramanian


Hi,

Is there a way for an Action class to find out which page/action called it ?
Iam faced with a problem where the Action class should perform its work and forward 
the page back to callee page.

Note - I cannot add any "forward" tags to this Action mapping because this Action is 
part of a framework.

Any clues ?

Thanks,
Kishore

=
Kishore Subramanian
Agile Software
Off : 408 999 7128
http://www.agilesoft.com
=




Wanted: Translator For JSP Book

2001-02-07 Thread David Geary

I'm looking for somebody that can translate some English
phrases into a CJK (Chinese-Japanese-Korean) language.

This is for my Advanced JSP book; please reply to this email for
details.


david

(Sorry for this off-topic message to struts-user)