how to get connection from my normal servlet

2002-06-18 Thread Vikramjit Singh

good day to all,

I am trying to use struts in my application. I have my own connection
pooling, in which one servlet is loaded on start-up. I put the connection in
the ServletContext, and from the servlet i get the connection. 
Thats the old way.

Now with struts, am sending the form parameters to the ActionServlet which
is taking the values from the ActionServlet, but how do i get the connection
for the database?. I have been going through some examples related to struts
and database, seems like i have to used DataSourceName. Is that the only
option, cant i use the traditional way of getting the connection and
inserting into the database.

Thanking in advance.

Regards,
Vikramjit Singh,
Systems Engineer,
GTL Ltd.
Ph. 7612929-1031


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Problem with ActionErrors and ApplicationResources.properties

2002-06-18 Thread Barbara Post

Did not come thru so repost darn mail provider of mine ! ;-)


> Hello,
> 
> I am doing the following :
> 
> msg = msgResources.getMessage(new Locale("en",
> "US"),"errors.missing.field");
> 
> if I println this I get the correct value. It means it looks into
> ApplicationResources_en_US.properties and retrieves
> errors.missing.field=Mandatory field :
> 
> After execution of :
> errors.add("company", new ActionError(msg));
> 
> and on the jsp :
> 
> 
> 
> I get printed n my jsp :
> 
> ???fr_FR.Mandatory field :???
> 
> So I don't understand why it uses my default locale and adds question
> marks
> 
> Any clue ? Thanks.
> 
> Barbara
> 
> 

 
__
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Accessing pages within a sub-application

2002-06-18 Thread @Basebeans.com

Subject: Re: Accessing pages within a sub-application
From: Serge Shikov <[EMAIL PROTECTED]>
 ===
Craig R. McClanahan wrote:
> 
> Try using the standard action SwitchAction
> (org.apache.struts.actions.SwitchAction) for switching from one sub-app to
> another.  Simply forwarding to a JSP page in the new subapp will not work,
> because tags on that page still behave as if you are in the old subapp.

Craig, could you clarify, what doea "standard action" mean here? As I 
know, latest Struts release 1.1 B1 doesn't contain this class, so it's 
only available from CVS. Also, where can I see some real examples of 
struts-config.xml with sub-applications?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Output to Excel **

2002-06-18 Thread Amitkumar_J_Malhotra


i also wanted to ask some thing on this,
we have a standard template for excel files that has the company logo and
all the standard field names, writing output to an excel file is no problem
, but i wanted to ask you all if i could use this template to write the
values in a standard format.
has anyone tried this as yet,
any suggestions will be appreciated.

regards,
amit malhotra



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Using java.util.Map in place of an ActionForm?

2002-06-18 Thread @Basebeans.com

Subject: Re: Using java.util.Map in place of an ActionForm?
From: "Matt Raible" <[EMAIL PROTECTED]>
 ===
I was hoping there was a way I did not have to write (1) a java class, and
(2) any XML to define it. Guess not.  I'm aware of how to use the
DynaActionForm, I'm using it right now, but if I have to define every
DynaForm in struts-config.xml, this file will become very large - quickly.

Thanks,

Matt

"Bhattad, Nilesh " <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> I looked at DynaActionForm. In order to use DynaActionForm, I'll have to
> specify all form field properties in struts-config.xml
> So it'll look something like this...
>
> 
>
> 
> type="org.apache.struts.action.DynaActionForm">
>   
>   
> 
>
>
> 
> type="org.apache.struts.action.DynaActionForm">
>   
>   
> 
> 
>
> 
>
>
> In my application, HTML field names are coming dynamically. As I don't
have
> HTML field names at design time, I cannot use Struts proposed
> DynaActionForm. It needs to mention all form attributes in
> struts-config.xml.
>
> Instead my struts-config.xml looks something like..
>
> 
>  type="com.test.form.DynaForm">
> 
> 
>
> 
> type="com.test.action.ActionHandler"
>name="test"
>scope="request">
>
>
>  path="/changepassword.jsp"/>
> 
> 
>
> So, my Action class and Form class are common for all the JSP pages.
>
>
>
> -Original Message-
> From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 5:25 PM
> To: [EMAIL PROTECTED]
> Subject: Using java.util.Map in place of an ActionForm?
>
> Subject: Using java.util.Map in place of an ActionForm?
> From: "Matt Raible" <[EMAIL PROTECTED]>
>  ===
> I've seen talk of using a Map instead of an ActionForm for my forms.
>
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg32945.html
>
> Is this referring to DynaActionForms, or something else?
>
> Matt
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Output to Excel

2002-06-18 Thread Daniel J. D'Cotta

Hi



Can you give me a link to any resource for response.setHeader() with
"Content-Disposition", "Content-Type", etc ?



-Original Message-
From: Michael Rimov [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 19, 2002 2:11 AM
To: Struts Users Mailing List
Subject: Re: Output to Excel


At 04:08 PM 6/17/2002 -0400, you wrote:
>Hi,
>
>I have a question regarding how to design a way that serves a text file to
>the user via web pages, ie: a csv file.
>
>Would you
>
>1. create a DAO that writes to a text file, and somehow get the Servlet to
>serve the file?
>2. create an Action class with:
>
>response.setHeader("Content-Disposition","attachment;filename=data.csv");
> response.setHeader("Content-Type", "application/ms-excel");
> and have the following JSP write the actual contents. This way,
the
>JSP can use JSPTags, but the formatting is off.
>3. Any other way.

I prefer create an Action class with:

response.setHeader("Content-Disposition","inline;filename=myfile.xls");
response.setContentType("application/vnd.ms-excel");

Then write out standard html tables.  Excel will format them.  Formatting
support varies between versions starting at:

Excel 97 - basic table layout, no real coloring.

to
Excel XP - Even CSS formatting support for fonts and colors.

But even in Excel 97. I still find it a lot more workable than straight
csv.  If you need to support Excel 95, you'll need to use csv instead.

There's an example of this in Expresso called ExcelViewHandler:
com.jcorporate.expresso.core.servlet.viewhandler.ExcelViewHandler

HTH!
 -Mike




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Are there any Java Graphics gurus out there?

2002-06-18 Thread Arron Bates

I don't mean to sound harsh, but if your post starts off with 
"Wy off topic"... then it really shouldn't be posted.

A page on the Sun site about handling images of all kinds, and there's a 
code sample for TIFF...

http://java.sun.com/products/java-media/jai/iio.html

It will get you to an Image object, and then from there you can pass it 
to the JPEGImageEncoder or whatever. As I said before (off the list), 
the information is already out there, you just have to go get it. I 
found this by searching "java reading tiff image files" on 
www.google.com and it was the third link down.

But I hope you get the solution you need. I already know that the answer 
wont be from this list...



Arron.



Jerry Jalenak wrote:

>Michael,
>
>Thanks for the reply. My problem is fairly basic, but I can't seem to figure
>it out.  Here goes
>
>>From my webapp I capture a 'control number' that I then pass over to an
>image server through a socket connection (port 4177).  The image server then
>responds with the number of images related to the control number along with
>the file names.  This much work fine.  I then pass each file name back to
>the image server through a different socket connection (port 4178).  The
>image server responds with the file size, then streams the file back to me.
>The file is a TIFF image.  What I am struggling with is how to capture this
>TIFF image, and convert it to JPEG.  I've looked at the ImageIO classes, but
>they don't natively support TIFF (yet).  I read someplace this morning that
>you can register the JAI TIFF class for use with ImageIO, but can't figure
>out how to do that.  JAI might be the answer, but again, I can't figure out
>how to do a JAI.create where the source is a socket and not a file.
>
>I know there's got to be an easier way to do this, but with my limited
>background in Java (only been coding in this for a few months now), I am at
>a total loss.  Any help is greatly appreciated.
>
>Thanks.
>
>Jerry
>
>-Original Message-
>From: Michael Mehrle [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, June 18, 2002 5:46 PM
>To: Struts Users Mailing List
>Subject: Re: Are there any Java Graphics gurus out there?
>
>
>Java Guru  I don't know, but I have done a lot of Java graphics in the
>past what do you need?
>
>- Original Message -
>From: "Jerry Jalenak" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Tuesday, June 18, 2002 6:33 AM
>Subject: Are there any Java Graphics gurus out there?
>
>
>>Way off topic, but I'm desparate.
>>
>>If any of you have any experience with working with graphics, could you
>>please contact me off-list at [EMAIL PROTECTED]?
>>
>>Thanks.
>>
>>
>>Jerry
>>
>>This transmission (and any information attached to it) may be confidential
>>
>and is intended solely for the use of the individual or entity to which it
>is addressed. If you are not the intended recipient or the person
>responsible for delivering the transmission to the intended recipient, be
>advised that you have received this transmission in error and that any use,
>dissemination, forwarding, printing, or copying of this information is
>strictly prohibited. If you have received this transmission in error, please
>immediately notify LabOne at (800)388-4675.
>
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
>
>
>>For additional commands, e-mail:
>>
>
>
>>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: html:link question

2002-06-18 Thread Billy Ng

I thought there was an attribute for hyperlink.  Thanks!

Billy Ng

- Original Message - 
From: "Chakradhar Tallam" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 6:32 PM
Subject: RE: html:link question


> 
> 
> and in ApplicationResources.properties, u'll have some thing like
> HelloWorld=Hello World
> 
> CT.
> 
> -Original Message-
> From: Billy Ng [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 19 June 2002 10:38 AM
> To: [EMAIL PROTECTED]
> Subject: html:link question
> 
> 
> A silly question.  I am trying to use the html:link in struts-html.tld.
> Would anybody tell me which attribute name is to define the text in the
> hypertext link (HelloWorld) like:
> 
> HelloWorld
> 
> Thanks!
> 
> Billy Ng
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:link question

2002-06-18 Thread Chakradhar Tallam



and in ApplicationResources.properties, u'll have some thing like
HelloWorld=Hello World

CT.

-Original Message-
From: Billy Ng [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 19 June 2002 10:38 AM
To: [EMAIL PROTECTED]
Subject: html:link question


A silly question.  I am trying to use the html:link in struts-html.tld.
Would anybody tell me which attribute name is to define the text in the
hypertext link (HelloWorld) like:

HelloWorld

Thanks!

Billy Ng


--
To unsubscribe, e-mail:

For additional commands, e-mail:




Re: struts on weblogic 5.1.0 with SP6

2002-06-18 Thread Tadashi Ishikawa


There are three main problems I knew on WLS5.1sp6.

1. ClassLoader Problem
ApplicationResource.properties won't be found.

2. load-on-starup is ignored.

3. Classes used by JSP or Servlet must be loaded earlier.

So,You shoud follow steps described below.

(1)expand struts-example.war to directory Not in CLASSPATH.

(2)expand attached zip file?and copy WebAppStartup.class to directory 
which WLS can pick up.
(ex. /export/weblogic/classes)

(3)edit weblogic.properties to add following lines.(example)
weblogic.httpd.register.*.do=org.apache.struts.action.ActionServlet
weblogic.httpd.webApp.struts-example=/export/home/weblogic/jakarta-struts/webapps/struts-example
# WebAppStartup for Struts
weblogic.system.startupClass.myStartup=WebAppStartup
weblogic.system.startupArgs.myStartup=\
webAppContext=struts-example

Hope this helps.

Pradeep Sakre wrote:

>Thanks Daniel ,
>But is it not possible with weblogic 5.1.0 with any patch.I need to
>deploy on weblogic5.1.0 only.
>
>Regards,
>Pradeep Sakre.
>
>__
>-Original Message-
>From: Daniel Jaffa [mailto:[EMAIL PROTECTED]] 
>Sent: Monday, June 17, 2002 8:32 PM
>To: Struts Users Mailing List; [EMAIL PROTECTED]
>Subject: Re: struts on weblogic 5.1.0 with SP6
>
>
>MessageFirst off, u need to upgrade to at least sp 8 ( Though i suggest
>sp 11 or 12.  Bea has made serveral upgrades to 5.1)  Second if you can
>go to wl 6.1, Just to let u know i am using both sp 8 on one machine
>(not very happy) and sp 12 on another (Very happy, works great)
>
>  - Original Message - 
>  From: Pradeep Sakre 
>  To: Struts Users Mailing List ; [EMAIL PROTECTED] 
>  Sent: Monday, June 17, 2002 3:19 AM
>  Subject: struts on weblogic 5.1.0 with SP6
>
>
>  Hi
>
>  I am not able to deploy struts application on weblogic 5.1.0 service
>pack 6. can some one tell whether it's possible to deploy struts with
>sp6 if not what are the modifications to be done.
>
>  Thanks in advance,
>
>  Regards,
>  Pradeep Sakre.
> 
>
>__
>
>  "Success is how high you bounce when you hit bottom."
>
>  Pradeep Sakre
> 
>
>__
>
>
>
>
>
>--
>
>
>  --
>  To unsubscribe, e-mail:
>
>  For additional commands, e-mail:
>
>
>
>
>
>**Disclaimer
>
>Information contained in this E-MAIL being proprietary to Wipro Limited is 
>'privileged' and 'confidential' and intended for use only by the individual
> or entity to which it is addressed. You are notified that any use, copying 
>or dissemination of the information contained in the E-MAIL in any manner 
>whatsoever is strictly prohibited.
>
>***
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
> Wipro_Disclaimer.txt
>
> Content-Type:
>
> text/plain
> Content-Encoding:
>
> 7bit
>
>
> 
> ??? 1.3
>
> Content-Type:
>
> text/plain
>
>




WebAppStartup.zip
Description: Zip compressed data

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


html:link question

2002-06-18 Thread Billy Ng

A silly question.  I am trying to use the html:link in struts-html.tld.
Would anybody tell me which attribute name is to define the text in the
hypertext link (HelloWorld) like:

HelloWorld

Thanks!

Billy Ng


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Are there any Java Graphics gurus out there?

2002-06-18 Thread Jerry Jalenak

Michael,

Thanks for the reply. My problem is fairly basic, but I can't seem to figure
it out.  Here goes

>From my webapp I capture a 'control number' that I then pass over to an
image server through a socket connection (port 4177).  The image server then
responds with the number of images related to the control number along with
the file names.  This much work fine.  I then pass each file name back to
the image server through a different socket connection (port 4178).  The
image server responds with the file size, then streams the file back to me.
The file is a TIFF image.  What I am struggling with is how to capture this
TIFF image, and convert it to JPEG.  I've looked at the ImageIO classes, but
they don't natively support TIFF (yet).  I read someplace this morning that
you can register the JAI TIFF class for use with ImageIO, but can't figure
out how to do that.  JAI might be the answer, but again, I can't figure out
how to do a JAI.create where the source is a socket and not a file.

I know there's got to be an easier way to do this, but with my limited
background in Java (only been coding in this for a few months now), I am at
a total loss.  Any help is greatly appreciated.

Thanks.

Jerry

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 5:46 PM
To: Struts Users Mailing List
Subject: Re: Are there any Java Graphics gurus out there?


Java Guru  I don't know, but I have done a lot of Java graphics in the
past what do you need?

- Original Message -
From: "Jerry Jalenak" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 6:33 AM
Subject: Are there any Java Graphics gurus out there?


> Way off topic, but I'm desparate.
>
> If any of you have any experience with working with graphics, could you
> please contact me off-list at [EMAIL PROTECTED]?
>
> Thanks.
>
>
> Jerry
>
> This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at (800)388-4675.
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Multiple MessageResources

2002-06-18 Thread Juan Alvarado \(Struts List\)


If you have the following in your struts-config.xml:

  

how do you access the second one from an action???

MessageResources messages = getResources(request);

Returns only the first one.

Thanks in advance
**
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




StrutsValidator - error while compiling 1.1 beta 1

2002-06-18 Thread otisg

Hello,

I am trying to compile Struts 1.1 beta 1
from source using ant and I'm getting the
following error:

[javac]
/usr/local/src/java/jakarta-struts-1.1-b1-src/src/share/org/apache/struts/util/StrutsValidator.java:145:
exception
org.apache.regexp.RESyntaxException is never
thrown in body of corresponding try statement
[javac] } catch (RESyntaxException e) {


I found some old posts mentioning that this
is due to jakarta-regexp -> jakarta-oro
switch, so I made appropriate changes in
build.xml and build.properties, so now this
is what I have there:

# grep regexp build*
build.properties:regexp.jar=/usr/local/jakarta-oro/oro.jar
build.xml:  
build.xml:


This looks right to me, and it matches
changes that I got from CVS change log for
these files.

Yet, I get that error when compiling.
Do I need to make any other changes?
Jakarta-oro jar is before jakarta-regexp jar
in my CLASSPATH, too.

Thanks,
Otis



Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Are there any Java Graphics gurus out there?

2002-06-18 Thread Michael Mehrle

Java Guru  I don't know, but I have done a lot of Java graphics in the
past what do you need?

- Original Message -
From: "Jerry Jalenak" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 6:33 AM
Subject: Are there any Java Graphics gurus out there?


> Way off topic, but I'm desparate.
>
> If any of you have any experience with working with graphics, could you
> please contact me off-list at [EMAIL PROTECTED]?
>
> Thanks.
>
>
> Jerry
>
> This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at (800)388-4675.
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Using java.util.Map in place of an ActionForm?

2002-06-18 Thread Ted Husted

In Struts 1.1b, you can use a Map to the host the properties of an
ActionForm. 

 private Map values = null;

 public void setValues(Map values) {
 this.values = values;
 }
 public Map getValues() {
 return this.values;
 }

 public void setValue(String key, Object value) {
 getValues().put(key,value);
 }
 public Object getValue(String key) {
 return getValues().get(key);
 }

 ... 

 


This will store whatever you throw at it, so only one is needed per
application, and no additional configuration is necessary. 

The downside is that a GUI tool designed to explore JavaBeans will not
see your properties (except as the contents of a Map property), and the
HTML forms need to be written using a different syntax than is used for
conventional ActionForms or DynaActionForms.


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


"Struts Newsgroup (@Basebeans.com)" wrote:
> 
> Subject: Using java.util.Map in place of an ActionForm?
> From: "Matt Raible" <[EMAIL PROTECTED]>
>  ===
> I've seen talk of using a Map instead of an ActionForm for my forms.
> 
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg32945.html
> 
> Is this referring to DynaActionForms, or something else?
> 
> Matt
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Who's using Struts and license issue

2002-06-18 Thread Kevin . Bedell


To add to Ted's thoughts -

Struts is now going to be distributed directly with Tomcat (the servlet/jsp
reference implementation) as part of it management application. This
essentially guarantees it to be the most widely distributed web application
framework.

If you get a copy of "Crossing the Chasm" by Geoffrey Moore (
http://www.amazon.com/exec/obidos/ASIN/0066620023/qid=1024436358/sr=2-1/ref=sr_2_1/104-9680446-6979158

) and read it - it outlines the classic adoption patterns for new
technologies and new technology products. One of the critical stages he
identifies in the adoption of new technology is the point at which a market
leader is chosen by consumers.

Struts (and Java Frameworks as well) is absolutely following the path he
lays out and it is emerging as the market leader. In the next year or so
we'll see a number of fringe framework projects either falling off or
merging with each other and Struts will be the dominant framework - if not
the dominant approach to web application development within J2EE.

my 2 cents

Kevin




Ted Husted <[EMAIL PROTECTED]> on 06/18/2002 05:22:20 PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   Struts Users Mailing List <[EMAIL PROTECTED]>
cc:(bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:  Re: Who's using Struts and license issue


You just need to include the Apache License

http://apache.org/LICENSE

along with any of your own copyrights, disclaimers, or licensing
notices. Or, if you don't do any of that, in a file next to to the JARs.

What's going on, is that when you credit yourself, Apache wants to be
credited too.

Just saying that it is "Powered by Struts" really would not be
sufficient, though that is always a welcome touch.

Since Struts is open source, and people don't need to register to use
it, any advice about who is using it is going to be anecdotal.

Besides the many others you will see posted on the list, in the
Rochester area I happen to know its being used by firms like Xerox,
Kodak, and Paychex. AFAIK, these are all intranet applications, like the
one you anticipate

I very much doubt that there is another framework with better market
penetration that Struts. (Or that will have more books about it ship
sometime this year =:0)

Something to mention to the suits is that our esteemed leader, Craig
McClanahan, was not only the primary architect of Tomcat 4 and the
implementation architect of the Java Web Services Developer Pack, but he
is now Sun's specification lead for JavaServer Faces (JSR-127) as well
as the Web Layer Architect for the J2EE platform.

I don't know about anyone else, but I'm pretty comfortable with having
Craig on my development team =;O)

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


Scott Carlson wrote:
>
> I'm trying to get a Fortune 125 company to convert from their existing
internal
> web framework.  During my analysis two questions have come up.
>
> First, Who's using Struts?  Is there a list of big companies that are
using
> Struts in a production external application mode?  Does anyone have
metrics on
> that?
>
> Second,  The license.  Clause 3 says that you must give credit to
> Apache/Struts.  It looks like a "Powered by Struts" is sufficient.  Does
this
> apply as well for intranet applications?   For Internet applications,
does this
> need to be on each page of the application, or just the first page of
each app?
>  Does it have to be visible to the user, or can it just be in the
comments of
> the code?
>
> Personally, I've got no problems with Struts or plastering "powered by
Struts"
> on every page.  The more I use it, the better I like it.  However, this
is an
> old Brick and Mortar company.  They are stuck in their old ways, and they
> aren't liking some of my answers so far.
>
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.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]>








--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




struts:template X Tiles

2002-06-18 Thread Ricardo de Souza Moura

What the differences between a tag lib struts:template e Tiles ?

_
Converse com amigos on-line, conheça o MSN Messenger: 
http://messenger.msn.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using java.util.Map in place of an ActionForm?

2002-06-18 Thread Bhattad, Nilesh

I looked at DynaActionForm. In order to use DynaActionForm, I'll have to
specify all form field properties in struts-config.xml
So it'll look something like this...


















In my application, HTML field names are coming dynamically. As I don't have
HTML field names at design time, I cannot use Struts proposed
DynaActionForm. It needs to mention all form attributes in
struts-config.xml. 

Instead my struts-config.xml looks something like..














So, my Action class and Form class are common for all the JSP pages.



-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 18, 2002 5:25 PM
To: [EMAIL PROTECTED]
Subject: Using java.util.Map in place of an ActionForm?

Subject: Using java.util.Map in place of an ActionForm?
From: "Matt Raible" <[EMAIL PROTECTED]>
 ===
I've seen talk of using a Map instead of an ActionForm for my forms.

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg32945.html

Is this referring to DynaActionForms, or something else?

Matt



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: validator with 1.1

2002-06-18 Thread @Basebeans.com

Subject: Re: validator with 1.1
From: "Matt Raible" <[EMAIL PROTECTED]>
 ===
import org.apache.struts.validator.ValidatorForm;

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> Heya...
>
> My big question right now is what do I extend my actionform from?
> ValidatorForm seems to be gone now...
>
> Thanks
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Using java.util.Map in place of an ActionForm?

2002-06-18 Thread @Basebeans.com

Subject: Using java.util.Map in place of an ActionForm?
From: "Matt Raible" <[EMAIL PROTECTED]>
 ===
I've seen talk of using a Map instead of an ActionForm for my forms.

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg32945.html

Is this referring to DynaActionForms, or something else?

Matt



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Accessing pages within a sub-application

2002-06-18 Thread Craig R. McClanahan



On Tue, 18 Jun 2002, Vlad Baranovsky wrote:

> Date: Tue, 18 Jun 2002 11:48:02 -0700
> From: Vlad Baranovsky <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Accessing pages within a sub-application
>
> Hello, I was wondering if someone might have insight into the following problem:
>
> I have a struts-based application to which I have added a sub-application.  When I 
>try to directly access a .jsp file that belongs to the sub-application and has an 
> tag in it, I receive the following exception:
>
> javax.servlet.jsp.JspException: Cannot retrieve mapping for action /doSomething at 
>org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:828) at 
>org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:528)
>
> ..where the action "doSomething" is defined in the sub-application's 
>struts-config.xml file.
>
> By looking at the tag library source code and doing some tests, I've discovered that 
>the the cause of the problem might be here (the first few lines of the lookup method 
>of FormTag):
>
> appConfig = (ApplicationConfig)
> pageContext.getRequest().getAttribute(Action.APPLICATION_KEY);
> if (appConfig == null) { // Backwards compatibility hack
> appConfig = (ApplicationConfig)
> pageContext.getServletContext().getAttribute(Action.APPLICATION_KEY);
> }
>
> It appears that the "backwards compatibility hack" is invoked, and the application 
>config object is retrieved from the servlet context, rather than the request.  
>Because the sub-application's config object is located under the key 
>"Action.APPLICATION_KEY+"/subapplicationname" in the servlet context, the config 
>object for the main application is retrieved, and consequently, the mapping for the 
>action cannot be found.  If this .jsp file is forwarded to by an action, however, the 
>correct config object is retrieved from the request, and the page loads without 
>exceptions.
>
> My question is, am I misunderstanding something?  Or is there no support for this 
>kind of operation?  (meaning, just typing the URL of such a .jsp into a browser) Any 
>suggestions would be appreciated.
>

Try using the standard action SwitchAction
(org.apache.struts.actions.SwitchAction) for switching from one sub-app to
another.  Simply forwarding to a JSP page in the new subapp will not work,
because tags on that page still behave as if you are in the old subapp.

> Thanks,
> Vlad
>

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using html:link

2002-06-18 Thread Craig R. McClanahan



On Tue, 18 Jun 2002, Trieu, Danny wrote:

> Date: Tue, 18 Jun 2002 12:28:25 -0700
> From: "Trieu, Danny" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Using html:link
>
> Global, you can see it from anywhere in you apps, where as local is only
> visible to the action it mapped to
>

One more detail is useful ... local forward definitions override any
global definition for the same forward name.  Thus, you can set up
situations where, say, the "Main Menu" forward goes to page /mainmenu.jsp
for every action except some specific one where you want to do something
else - just define a "Main Menu" global forward for the usual case, and a
local "Main Menu" forward for the particular action that needs different
behavior.

> danny,
>

Craig


> ps. Don't worry we are all learning Struts, here.
>
> > -Original Message-
> > From:   Ryan Cuprak [SMTP:[EMAIL PROTECTED]]
> > Sent:   Tuesday, June 18, 2002 12:20 PM
> > To: Struts Users Mailing List
> > Subject:Re: Using html:link
> >
> >
> > This is a bit of a newbie question, but what is the difference between a
> > local forward and a global forward? So, in the action mappings, those are
> > 'local forwards'?
> >
> > Thanks,
> > Ryan
> > (I am new to struts and trying to find my way around =)
> >
> > On 6/19/02 12:04 PM, "Joseph Barefoot" <[EMAIL PROTECTED]> wrote:
> >
> > > It also must be a global forward, not a local forward (i.e., in the
> > "action"
> > > element).  So put it in your struts-config like so:
> > >
> > > 
> > > 
> > > 
> > >
> > >
> > > peace,
> > > Joe
> > >> -Original Message-
> > >> From: Trieu, Danny [mailto:[EMAIL PROTECTED]]
> > >> Sent: Tuesday, June 18, 2002 11:58 AM
> > >> To: 'Struts Users Mailing List'
> > >> Subject: RE: Using html:link
> > >>
> > >>
> > >> An action is not a forward  you need to create a
> > >> forward.. like this
> > >>
> > >> 
> > >>
> > >>> -Original Message-
> > >>> From:[EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> > >>> Sent:Tuesday, June 18, 2002 11:47 AM
> > >>> To:[EMAIL PROTECTED]
> > >>> Subject:Using html:link
> > >>>
> > >>> From: Ryan D. Cuprak
> > >>>
> > >>> Hello,
> > >>>   I am trying to embedd a link in a jsp page that links to another jsp
> > >>> page
> > >>> using the html:link. Presently I get the exception:
> > >>> javax.servlet.ServletException: Cannot create rewrite URL:
> > >>> java.net.MalformedURLException: Cannot retrive ActionForward
> > >> named /search
> > >>>  when I attempt to view the page displaying the link.
> > >>>
> > >>> In the page I have:
> > >>> Perform a
> > >>> Search
> > >>>
> > >>> And the struts-config.xml has:
> > >>>
> > >>>  > >>> path="/search"
> > >>> scope="request"
> > >>> forward="/images/search.jsp"/>
> > >>>
> > >>> The web.xml contains a mapping (don't know if this matters):
> > >>> 
> > >>> auth
> > >>> /authentication/*
> > >>> 
> > >>>
> > >>> auth is the ActionServlet.
> > >>>
> > >>> What am I doing wrong?
> > >>>
> > >>> Thanks,
> > >>> Ryan Cuprak
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> To unsubscribe, e-mail:
> > >>> 
> > >>> For additional commands, e-mail:
> > >>> 
> > >>
> > >> --
> > >> To unsubscribe, e-mail:
> > >> 
> > >> For additional commands, e-mail:
> > >> 
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional commands, e-mail:
> > 
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Who's using Struts and license issue

2002-06-18 Thread Ted Husted

You just need to include the Apache License 

http://apache.org/LICENSE

along with any of your own copyrights, disclaimers, or licensing
notices. Or, if you don't do any of that, in a file next to to the JARs.

What's going on, is that when you credit yourself, Apache wants to be
credited too. 

Just saying that it is "Powered by Struts" really would not be
sufficient, though that is always a welcome touch. 

Since Struts is open source, and people don't need to register to use
it, any advice about who is using it is going to be anecdotal.

Besides the many others you will see posted on the list, in the
Rochester area I happen to know its being used by firms like Xerox,
Kodak, and Paychex. AFAIK, these are all intranet applications, like the
one you anticipate

I very much doubt that there is another framework with better market
penetration that Struts. (Or that will have more books about it ship
sometime this year =:0)

Something to mention to the suits is that our esteemed leader, Craig
McClanahan, was not only the primary architect of Tomcat 4 and the
implementation architect of the Java Web Services Developer Pack, but he
is now Sun's specification lead for JavaServer Faces (JSR-127) as well
as the Web Layer Architect for the J2EE platform.

I don't know about anyone else, but I'm pretty comfortable with having
Craig on my development team =;O)

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


Scott Carlson wrote:
> 
> I'm trying to get a Fortune 125 company to convert from their existing internal
> web framework.  During my analysis two questions have come up.
> 
> First, Who's using Struts?  Is there a list of big companies that are using
> Struts in a production external application mode?  Does anyone have metrics on
> that?
> 
> Second,  The license.  Clause 3 says that you must give credit to
> Apache/Struts.  It looks like a "Powered by Struts" is sufficient.  Does this
> apply as well for intranet applications?   For Internet applications, does this
> need to be on each page of the application, or just the first page of each app?
>  Does it have to be visible to the user, or can it just be in the comments of
> the code?
> 
> Personally, I've got no problems with Struts or plastering "powered by Struts"
> on every page.  The more I use it, the better I like it.  However, this is an
> old Brick and Mortar company.  They are stuck in their old ways, and they
> aren't liking some of my answers so far.
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Who's using Struts and license issue

2002-06-18 Thread Brad_Horstkotte


>From the apache license:

"
* 3. The end-user documentation included with the redistribution, if
 *any, must include the following acknowlegement:
 *   "This product includes software developed by the
 *Apache Software Foundation (http://www.apache.org/)."
 *Alternately, this acknowlegement may appear in the software itself,
 *if and wherever such third-party acknowlegements normally appear.
"

For most web sites, there is no redistribution or source or binaries, and
no end-user documentation,
so for an internet site, it doesn't seem to me to be an issue.

Brad



   
   
"Tero P
   
Paananen"To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]   cc: (bcc: Brad Horstkotte/AFS/CAPITAL)
   
>Subject: RE: Who's using Struts and 
license issue
   
   
06/18/2002 
   
02:02 PM   
   
Please respond 
   
to "Struts 
   
Users Mailing  
   
List"  
   
   
   
   
   




> Personally, I've got no problems with Struts or plastering
> "powered by Struts" on every page.

I would, if I were in charge of brand management/marketing.

Does the Struts license allow putting that sentence in
a meta tag (bad) or as an HTML comment (good), so that
it's invisible to the regular user?

  -TPP

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






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Passing a parameter into an action from the action mapping?

2002-06-18 Thread Joe Germuska

At 1:17 PM -0700 2002/06/18, James Holmes wrote:
>The parameter that Joe is talking about is for the
> tag in your struts-config.xml.
>
>Take a look at the Struts Console.  It makes setting
>all this stuff a breeeze.
>
>http://www.jamesholmes.com/struts/

Well, gee, you can also take a look at StrutsBuilder, which does some 
similar things, and generates stub files for your Actions and Form 
Beans, etc too

http://sourceforge.net/projects/rivernorth/

:-)

-- 
--
* Joe Germuska{ [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
--Sam Goody, 1956
tune in posse radio: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Who's using Struts and license issue

2002-06-18 Thread Kevin . Bedell


The License issue you're describing only applies if you are redistributing
the software - that is if you distribute the software to some other entity
and THEY install it. If this is the case, any docs (or the code you give
them) must include an acknowledgement.

 *
 * 3. The end-user documentation included with the redistribution, if
 *any, must include the following acknowlegement:
 *   "This product includes software developed by the
 *Apache Software Foundation (http://www.apache.org/)."
 *Alternately, this acknowlegement may appear in the software itself,
 *if and wherever such third-party acknowlegements normally appear.
 *

Note the phrase "included with the redistribution".


Of the 5 clauses in the license
, the first three have to do with redistributing the code and the last two
have to do with products you deliver that include the code.

If you're using the software on your site, then no acknowledgements are
required - though it would be nice...

This is the standard apache license. It's the same as the one used for the
web server - and the 50%+ sites on the Internet that use the Apache web
server don't all have acknowledgements...







Scott Carlson <[EMAIL PROTECTED]> on 06/18/2002 04:47:38 PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   Struts Users Mailing List <[EMAIL PROTECTED]>
cc:(bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:  Who's using Struts and license issue


I'm trying to get a Fortune 125 company to convert from their existing
internal
web framework.  During my analysis two questions have come up.

First, Who's using Struts?  Is there a list of big companies that are using
Struts in a production external application mode?  Does anyone have metrics
on
that?

Second,  The license.  Clause 3 says that you must give credit to
Apache/Struts.  It looks like a "Powered by Struts" is sufficient.  Does
this
apply as well for intranet applications?   For Internet applications, does
this
need to be on each page of the application, or just the first page of each
app?
 Does it have to be visible to the user, or can it just be in the comments
of
the code?

Personally, I've got no problems with Struts or plastering "powered by
Struts"
on every page.  The more I use it, the better I like it.  However, this is
an
old Brick and Mortar company.  They are stuck in their old ways, and they
aren't liking some of my answers so far.

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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








--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Who's using Struts and license issue

2002-06-18 Thread Tero P Paananen

> Personally, I've got no problems with Struts or plastering 
> "powered by Struts" on every page.

I would, if I were in charge of brand management/marketing.

Does the Struts license allow putting that sentence in
a meta tag (bad) or as an HTML comment (good), so that
it's invisible to the regular user?

-TPP

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Who's using Struts and license issue

2002-06-18 Thread Cliff Rowley

Dan Cancro wrote:
> Here are some users that I've seen mentioned on the mailing list: 
> 
> Fannie Mae, Shell, Deutsche Bank, IBM, Sun, HP, Hallmark, Pizza Hut, Daimler
> Chrysler, Capital One.
> 
> -Dan

What about the licensing issues?  I'd be quite interested to hear 
comments on those.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: detecting ActionErrors in a jsp page

2002-06-18 Thread mtstruts

Hi Jim, 

I'm not sure exactly what you want to do but here are a couple of suggestions:

1) If you want to display the actual error on the JSP page, use the  
tag.  This tag is explained in the Struts UserGuide:

http://jakarta.apache.org/struts/api/org/apache/struts/taglib/html/package-summary.html#doc.Other.errors

2) If you want to know if an error occured, you could get the errors ArrayList from 
the session in the JSP and test using empty() method whether there are any errors 
(returns boolean). See the JavaDocs:

http://jakarta.apache.org/struts/doc-1.0.2/api/index.html

Good luck!

Jim Clayson <[EMAIL PROTECTED]> wrote:

>Hi,
> 
>I would like to determine from within my jsp page whether or not any
>ActionError objects were generated in my action's perform method.
> 
>I  am doing the following in the perform method to set the error:
> 
>   errors.add(ActionErrors.GLOBAL_ERROR, new
>ActionError("my.resource.key"));
> 
>and
> 
>   saveErrors(request, errors);
> 
>How can I say the following in a jsp page:
> 
>if(an error has been generated for this request){
>   //use this html body tag
>}else{
>   //use a different html body tag
>}
> 
>I have displayed the contents of the request in the jsp which tells me that
>there is an attribute stored in it under 'org.apache.struts.action.ERROR'.
>I'm not sure how I should be using or accessing this object.
> 
>Any help is appreciated!
>Jim
> 
>
>__ 
>
>
>
>Jim Clayson
>
>
>Infogain Limited
>
>
>tel: 01628 580600
>fax: 01628 580610
>email: [EMAIL PROTECTED]   
>web: www.infogain.com   
>
> 
>
>Disclaimer:  Neither this e-mail nor any attachment places any legal or
>contractual obligations on Infogain Limited. Any reproduction, disclosure or
>dissemination beyond the intended addressees is strictly prohibited save for
>the legitimate business purposes of Infogain Limited and its clients or
>partners.
>
>__ 
>
> 
> 
>


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Who's using Struts and license issue

2002-06-18 Thread Dan Cancro

Here are some users that I've seen mentioned on the mailing list: 

Fannie Mae, Shell, Deutsche Bank, IBM, Sun, HP, Hallmark, Pizza Hut, Daimler
Chrysler, Capital One.

-Dan

> -Original Message-
> From: Scott Carlson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 1:48 PM
> To: Struts Users Mailing List
> Subject: Who's using Struts and license issue
> 
> 
> I'm trying to get a Fortune 125 company to convert from their 
> existing internal
> web framework.  During my analysis two questions have come up.
> 
> First, Who's using Struts?  Is there a list of big companies 
> that are using
> Struts in a production external application mode?  Does 
> anyone have metrics on
> that?
> 
> Second,  The license.  Clause 3 says that you must give credit to
> Apache/Struts.  It looks like a "Powered by Struts" is 
> sufficient.  Does this
> apply as well for intranet applications?   For Internet 
> applications, does this
> need to be on each page of the application, or just the first 
> page of each app?
>  Does it have to be visible to the user, or can it just be in 
> the comments of
> the code?  
> 
> Personally, I've got no problems with Struts or plastering 
> "powered by Struts"
> on every page.  The more I use it, the better I like it.  
> However, this is an
> old Brick and Mortar company.  They are stuck in their old 
> ways, and they
> aren't liking some of my answers so far.
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Who's using Struts and license issue

2002-06-18 Thread Scott Carlson

I'm trying to get a Fortune 125 company to convert from their existing internal
web framework.  During my analysis two questions have come up.

First, Who's using Struts?  Is there a list of big companies that are using
Struts in a production external application mode?  Does anyone have metrics on
that?

Second,  The license.  Clause 3 says that you must give credit to
Apache/Struts.  It looks like a "Powered by Struts" is sufficient.  Does this
apply as well for intranet applications?   For Internet applications, does this
need to be on each page of the application, or just the first page of each app?
 Does it have to be visible to the user, or can it just be in the comments of
the code?  

Personally, I've got no problems with Struts or plastering "powered by Struts"
on every page.  The more I use it, the better I like it.  However, this is an
old Brick and Mortar company.  They are stuck in their old ways, and they
aren't liking some of my answers so far.

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Passing a parameter into an action from the action mapping?

2002-06-18 Thread wbchmura

No, I was using the struts-console source window...

The easiest way I have found to view it has been (dare I say) using 
Internet Explorer...



-Original Message-
From: jmitchtx [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 4:40 PM
To: struts-user
Subject: RE: Passing a parameter into an action from the action mapping?


What are you using to view the file?
Notepad?


If so, or you just want a quick way to view it (outside of the Console), 
use
Textpad.
http://www.textpad.com

It's a serious text editor with everything from 'go to' line and/or 
column,
macros for re-use of common tasks, search and replace using regular
expressions [based on POSIX standard P1003.2, but the syntax can be that 
of
POSIX, or UNIX extended regular expressions (the default)], block text
selection and SORTING!!!

I usually associate .xml so that I get syntax highlighting.
It's not an IDE, but it has limited support for running javac with 'jump 
to'
for compile errors.



James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 4:28 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Passing a parameter into an action from the action 
mapping?
>
>
> Already there...
>
> The only thing that I would love to see in struts console is if I view
> source having it on more than one line...  In my development 
environment
> (windows) there is no line feeds or anything
>
>
> -Original Message-
> From: jholmes612 [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 4:18 PM
> To: struts-user
> Subject: Re: Passing a parameter into an action from the action 
mapping?
>
>
> The parameter that Joe is talking about is for the
>  tag in your struts-config.xml.
>
> Take a look at the Struts Console.  It makes setting
> all this stuff a breeeze.
>
> http://www.jamesholmes.com/struts/
>
> -james
> [EMAIL PROTECTED]
>
>
> --- Joe Germuska <[EMAIL PROTECTED]> wrote:
> > At 4:11 PM -0400 2002/06/18,
> > [EMAIL PROTECTED] wrote:
> > >I thought I saw a solution for this somewhere but I
> > cannot find it...
> >
> > set the value of the "parameter" attribute, then use
> >
> > "mapping.getParameter()" in the action.
> >
> > It's not a dumb idea at all -- it's the kind of
> > reusability that
> > Struts makes easy...
> >
> > Joe
> >
> >
> >
> > >I have the following set up...
> > >
> > >
> > > > >forward="plantsec.mainmenu">
> > > > redirect="false" />
> > >
> > > > forward="plantsec.todo" />
> > > > >type="com.ebind.plantsec.create.actionCreateNew"
> > name="formNewRequest"
> > >input="plantsec.create.new" scope="request">
> > > > redirect="false" />
> > > > redirect="false" />
> > >
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > >
> > >
> > >All of my calls to Search are the same, just with a
> > different duration.
> > >I was looking at dispatch, but these are all from
> > links so I would need
> > >to do /search.do?dur=1week
> > >
> > >Is there a way in the action mapping to say when
> > they go to /search1w.do
> > >it forwards them into the same action with some
> > sort of parameter?
> > >
> > >Or is it just a dumb ass idea and should I just do
> > the dispatch?
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:
> > 
> > >For additional commands, e-mail:
> > 
> >
> >
> > --
> > --
> > * Joe Germuska{ [EMAIL PROTECTED] }
> > "It's pitiful, sometimes, if they've got it bad.
> > Their eyes get
> > glazed, they go white, their hands tremble As I
> > watch them I
> > often feel that a dope peddler is a gentleman
> > compared with the man
> > who sells records."
> > --Sam Goody, 1956
> > tune in posse radio:
> > 
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
>
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Passing a parameter into an action from the action mapping?

2002-06-18 Thread wbchmura

I installed 1.11 a few days before you released 1.12... Have not had 
time to upgrade yet.

Thanks, I'll try it

-Original Message-
From: jholmes612 [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 4:32 PM
To: struts-user
Subject: RE: Passing a parameter into an action from the action mapping?


Hmm…try using the Output Options underneath the
Options menu in the standalone version (1.12 and
later).

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/

--- [EMAIL PROTECTED] wrote:
> Already there...
> 
> The only thing that I would love to see in struts
> console is if I view 
> source having it on more than one line...  In my
> development environment 
> (windows) there is no line feeds or anything
> 
> 
> -Original Message-
> From: jholmes612 [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 4:18 PM
> To: struts-user
> Subject: Re: Passing a parameter into an action from
> the action mapping?
> 
> 
> The parameter that Joe is talking about is for the
>  tag in your struts-config.xml.
> 
> Take a look at the Struts Console.  It makes setting
> all this stuff a breeeze.
> 
> http://www.jamesholmes.com/struts/
> 
> -james
> [EMAIL PROTECTED]
> 
> 
> --- Joe Germuska <[EMAIL PROTECTED]> wrote:
> > At 4:11 PM -0400 2002/06/18,
> > [EMAIL PROTECTED] wrote:
> > >I thought I saw a solution for this somewhere but
> I
> > cannot find it...
> > 
> > set the value of the "parameter" attribute, then
> use
> > 
> > "mapping.getParameter()" in the action.
> > 
> > It's not a dumb idea at all -- it's the kind of
> > reusability that 
> > Struts makes easy...
> > 
> > Joe
> > 
> > 
> > 
> > >I have the following set up...
> > >
> > >
> > > > >forward="plantsec.mainmenu">
> > > > redirect="false" />
> > >
> > > > forward="plantsec.todo" />
> > > > >type="com.ebind.plantsec.create.actionCreateNew"
> > name="formNewRequest"
> > >input="plantsec.create.new" scope="request">
> > > path="plantsec.create.new"
> > redirect="false" />
> > > > redirect="false" />
> > >
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > >
> > >
> > >All of my calls to Search are the same, just with
> a
> > different duration. 
> > >I was looking at dispatch, but these are all from
> > links so I would need
> > >to do /search.do?dur=1week
> > >
> > >Is there a way in the action mapping to say when
> > they go to /search1w.do
> > >it forwards them into the same action with some
> > sort of parameter?
> > >
> > >Or is it just a dumb ass idea and should I just
> do
> > the dispatch?
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:  
> >
> 
> > >For additional commands, e-mail:
> > 
> > 
> > 
> > -- 
> > --
> > * Joe Germuska{ [EMAIL PROTECTED] }
> > "It's pitiful, sometimes, if they've got it bad.
> > Their eyes get 
> > glazed, they go white, their hands tremble As
> I
> > watch them I 
> > often feel that a dope peddler is a gentleman
> > compared with the man 
> > who sells records."
> > --Sam Goody, 1956
> > tune in posse radio:
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> >
> 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Passing a parameter into an action from the action mapping?

2002-06-18 Thread James Mitchell

What are you using to view the file?
Notepad?


If so, or you just want a quick way to view it (outside of the Console), use
Textpad.
http://www.textpad.com

It's a serious text editor with everything from 'go to' line and/or column,
macros for re-use of common tasks, search and replace using regular
expressions [based on POSIX standard P1003.2, but the syntax can be that of
POSIX, or UNIX extended regular expressions (the default)], block text
selection and SORTING!!!

I usually associate .xml so that I get syntax highlighting.
It's not an IDE, but it has limited support for running javac with 'jump to'
for compile errors.



James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 4:28 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Passing a parameter into an action from the action mapping?
>
>
> Already there...
>
> The only thing that I would love to see in struts console is if I view
> source having it on more than one line...  In my development environment
> (windows) there is no line feeds or anything
>
>
> -Original Message-
> From: jholmes612 [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 4:18 PM
> To: struts-user
> Subject: Re: Passing a parameter into an action from the action mapping?
>
>
> The parameter that Joe is talking about is for the
>  tag in your struts-config.xml.
>
> Take a look at the Struts Console.  It makes setting
> all this stuff a breeeze.
>
> http://www.jamesholmes.com/struts/
>
> -james
> [EMAIL PROTECTED]
>
>
> --- Joe Germuska <[EMAIL PROTECTED]> wrote:
> > At 4:11 PM -0400 2002/06/18,
> > [EMAIL PROTECTED] wrote:
> > >I thought I saw a solution for this somewhere but I
> > cannot find it...
> >
> > set the value of the "parameter" attribute, then use
> >
> > "mapping.getParameter()" in the action.
> >
> > It's not a dumb idea at all -- it's the kind of
> > reusability that
> > Struts makes easy...
> >
> > Joe
> >
> >
> >
> > >I have the following set up...
> > >
> > >
> > > > >forward="plantsec.mainmenu">
> > > > redirect="false" />
> > >
> > > > forward="plantsec.todo" />
> > > > >type="com.ebind.plantsec.create.actionCreateNew"
> > name="formNewRequest"
> > >input="plantsec.create.new" scope="request">
> > > > redirect="false" />
> > > > redirect="false" />
> > >
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > >
> > >
> > >All of my calls to Search are the same, just with a
> > different duration.
> > >I was looking at dispatch, but these are all from
> > links so I would need
> > >to do /search.do?dur=1week
> > >
> > >Is there a way in the action mapping to say when
> > they go to /search1w.do
> > >it forwards them into the same action with some
> > sort of parameter?
> > >
> > >Or is it just a dumb ass idea and should I just do
> > the dispatch?
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:
> > 
> > >For additional commands, e-mail:
> > 
> >
> >
> > --
> > --
> > * Joe Germuska{ [EMAIL PROTECTED] }
> > "It's pitiful, sometimes, if they've got it bad.
> > Their eyes get
> > glazed, they go white, their hands tremble As I
> > watch them I
> > often feel that a dope peddler is a gentleman
> > compared with the man
> > who sells records."
> > --Sam Goody, 1956
> > tune in posse radio:
> > 
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
>
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Absolute URL in forward tag

2002-06-18 Thread Tero P Paananen

> is it possible to give an absolute URL (like 
> http://www.xyz.com) in the 'path' attribute of
> 'forward' tag?

Yes, but only, if it's a redirect (redirect="true").

-TPP

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Absolute URL in forward tag

2002-06-18 Thread James Mitchell

Can you display the error you get when you tried?

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org

> -Original Message-
> From: Bhaskar Gopalan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 4:10 PM
> To: Struts Group (E-mail)
> Subject: Absolute URL in forward tag
> 
> 
> Hi,
> 
> is it possible to give an absolute URL (like http://www.xyz.com) in the
> 'path' attribute of
> 'forward' tag?
> 
> Thnx,
> Bhaskar
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Passing a parameter into an action from the action mapping?

2002-06-18 Thread James Holmes

Hmm…try using the Output Options underneath the
Options menu in the standalone version (1.12 and
later).

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/

--- [EMAIL PROTECTED] wrote:
> Already there...
> 
> The only thing that I would love to see in struts
> console is if I view 
> source having it on more than one line...  In my
> development environment 
> (windows) there is no line feeds or anything
> 
> 
> -Original Message-
> From: jholmes612 [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 4:18 PM
> To: struts-user
> Subject: Re: Passing a parameter into an action from
> the action mapping?
> 
> 
> The parameter that Joe is talking about is for the
>  tag in your struts-config.xml.
> 
> Take a look at the Struts Console.  It makes setting
> all this stuff a breeeze.
> 
> http://www.jamesholmes.com/struts/
> 
> -james
> [EMAIL PROTECTED]
> 
> 
> --- Joe Germuska <[EMAIL PROTECTED]> wrote:
> > At 4:11 PM -0400 2002/06/18,
> > [EMAIL PROTECTED] wrote:
> > >I thought I saw a solution for this somewhere but
> I
> > cannot find it...
> > 
> > set the value of the "parameter" attribute, then
> use
> > 
> > "mapping.getParameter()" in the action.
> > 
> > It's not a dumb idea at all -- it's the kind of
> > reusability that 
> > Struts makes easy...
> > 
> > Joe
> > 
> > 
> > 
> > >I have the following set up...
> > >
> > >
> > > > >forward="plantsec.mainmenu">
> > > > redirect="false" />
> > >
> > > > forward="plantsec.todo" />
> > > > >type="com.ebind.plantsec.create.actionCreateNew"
> > name="formNewRequest"
> > >input="plantsec.create.new" scope="request">
> > > path="plantsec.create.new"
> > redirect="false" />
> > > > redirect="false" />
> > >
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > > > >type="com.ebind.plantsec.search.actionSearch" />
> > >
> > >
> > >All of my calls to Search are the same, just with
> a
> > different duration. 
> > >I was looking at dispatch, but these are all from
> > links so I would need
> > >to do /search.do?dur=1week
> > >
> > >Is there a way in the action mapping to say when
> > they go to /search1w.do
> > >it forwards them into the same action with some
> > sort of parameter?
> > >
> > >Or is it just a dumb ass idea and should I just
> do
> > the dispatch?
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:  
> >
> 
> > >For additional commands, e-mail:
> > 
> > 
> > 
> > -- 
> > --
> > * Joe Germuska{ [EMAIL PROTECTED] }
> > "It's pitiful, sometimes, if they've got it bad.
> > Their eyes get 
> > glazed, they go white, their hands tremble As
> I
> > watch them I 
> > often feel that a dope peddler is a gentleman
> > compared with the man 
> > who sells records."
> > --Sam Goody, 1956
> > tune in posse radio:
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> >
> 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Single ActionServlet, ActionForm, Action across entire applic atio n... is it ok ?

2002-06-18 Thread Bhattad, Nilesh

Sorry for confusion.  I specified to have single Form object across the
application. Actually I meant to say that I want to write a single
ActionForm class which is reusable across the application. Though each JSP
page will have its own INSTANCE of Form object with a HashMap populated with
all parameters contained in that JSP page. 

This approach speeds up the development process as I don't have to write
separate ActionForm per page. Also my struts-config.xml have very few
entries. 

But is there any disadvantage of having a single ActionForm class common to
all the pages?

Thank for your help Keith.

- Nilesh


-Original Message-
From: Bhattad, Nilesh [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 18, 2002 4:04 PM
To: 'Struts Users Mailing List'
Subject: RE: Single ActionServlet, ActionForm, Action across entire applic
atio n... is it ok ?

I want to keep Form object within "request" scope only.  But instead of
defining separate ActionForm class per JSP page with getters and setters, I
prefer to have a single class which has a HashMap in it.
Each JSP page will have different instance of this DynaForm object.

- Nilesh

-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 18, 2002 3:59 PM
To: 'Struts Users Mailing List'
Subject: RE: Single ActionServlet, ActionForm, Action across entire applic
atio n... is it ok ?

Hi,
If you want to use the same form-bean for several input forms, can't you
just change the scope of the mapped actions to "session" or possibly
"application"?  I"m not sure what your needs are, but that's all I do.

~ Keith



-Original Message-
From: Bhattad, Nilesh [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 3:57 PM
To: Struts mailing list ([EMAIL PROTECTED])
Subject: Single ActionServlet, ActionForm, Action across entire
applicatio n... is it ok ?


Hello 

Recently I started working on Struts. I'm using Struts 1.0.2 version. 
Struts framework recommends to create separate ActionForm and Action object
for each JSP page.
Instead, I created a single Form object DynaForm which has a HashMap in it.
And I'm using this form object for all the JSP pages in my application. I
downloaded the Struts source. And added following lines of code in 
org.apache.struts.util.PropertyUtils::getSimpleProperty() method


if(bean instanceof DynaForm)
{
try
{
return ((DynaForm)bean).getObject(name);
}catch(Exception e)
{
log.debug(e.getMessage());
return null;
}
}

Also I have an XML file which defines the application flow




index
home


home
account




All nextpage node values are defined in struts-config.xml in
 section. So based on this XML, I decide the application
flow from my Action object. 
I have a single Action object called as ActionHandler which is common across
the entire application.

Each JSP page is assigned to a separate Request Object which does the
business logic specific to that page. Another XML is defined for the mapping
of JSP page and Request object. Based on this XML, ActionHandler executes
exact Request object.

Now my doubts are..

1. First of all, is it advisable to change the Struts code for any reason?
In order to have a single Form object across the entire application, I did
not find any option other than changing Struts code. Is there any better way
of doing this?

2. I'm using Action object as a controller. The job of ActionHandler is to
do some generic stuff like session check, basic form validation and then
calling corresponding Request object. Is it advisable to have a single
Action object across the application? 

Please let me know your ideas on this. Thanks in advance !!


Njoy..
Nilesh

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Select Tag

2002-06-18 Thread Scott Carlson

Sesha,
   I have this code in my jsp. Notice the multiple attribute.

Select Type



In my form bean, the property is an array of Strings.
private String accountType[];
public void setAccountType(String parm[]) { accountType = parm; }
public String[] getAccountType() { return accountType; }

Does this answer your question?

> From: "Sesha" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Select Tag
> Date: Tue, 18 Jun 2002 09:03:03 -0700
> 
> 
> This is pertaining to Select Tag. 
> 
> Is it is possible that value attribute in select tag can take a String
> array.
> 
> When I select multiple items in the select and submit to the same page, how
> can we retain these values. Presently I am able to reatin only one of the
> selected values. I notice that the value attribute in the select tag takes
> only a String. Is there a work around for this that you might know.
> 
> Thank You
> Sesha
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Passing a parameter into an action from the action mapping?

2002-06-18 Thread wbchmura

Already there...

The only thing that I would love to see in struts console is if I view 
source having it on more than one line...  In my development environment 
(windows) there is no line feeds or anything


-Original Message-
From: jholmes612 [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 4:18 PM
To: struts-user
Subject: Re: Passing a parameter into an action from the action mapping?


The parameter that Joe is talking about is for the
 tag in your struts-config.xml.

Take a look at the Struts Console.  It makes setting
all this stuff a breeeze.

http://www.jamesholmes.com/struts/

-james
[EMAIL PROTECTED]


--- Joe Germuska <[EMAIL PROTECTED]> wrote:
> At 4:11 PM -0400 2002/06/18,
> [EMAIL PROTECTED] wrote:
> >I thought I saw a solution for this somewhere but I
> cannot find it...
> 
> set the value of the "parameter" attribute, then use
> 
> "mapping.getParameter()" in the action.
> 
> It's not a dumb idea at all -- it's the kind of
> reusability that 
> Struts makes easy...
> 
> Joe
> 
> 
> 
> >I have the following set up...
> >
> >
> > >forward="plantsec.mainmenu">
> > redirect="false" />
> >
> > forward="plantsec.todo" />
> > >type="com.ebind.plantsec.create.actionCreateNew"
> name="formNewRequest"
> >input="plantsec.create.new" scope="request">
> > redirect="false" />
> > redirect="false" />
> >
> > >type="com.ebind.plantsec.search.actionSearch" />
> > >type="com.ebind.plantsec.search.actionSearch" />
> > >type="com.ebind.plantsec.search.actionSearch" />
> > >type="com.ebind.plantsec.search.actionSearch" />
> > >type="com.ebind.plantsec.search.actionSearch" />
> > >type="com.ebind.plantsec.search.actionSearch" />
> >
> >
> >All of my calls to Search are the same, just with a
> different duration. 
> >I was looking at dispatch, but these are all from
> links so I would need
> >to do /search.do?dur=1week
> >
> >Is there a way in the action mapping to say when
> they go to /search1w.do
> >it forwards them into the same action with some
> sort of parameter?
> >
> >Or is it just a dumb ass idea and should I just do
> the dispatch?
> >
> >
> >
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:  
> 
> >For additional commands, e-mail:
> 
> 
> 
> -- 
> --
> * Joe Germuska{ [EMAIL PROTECTED] }
> "It's pitiful, sometimes, if they've got it bad.
> Their eyes get 
> glazed, they go white, their hands tremble As I
> watch them I 
> often feel that a dope peddler is a gentleman
> compared with the man 
> who sells records."
>   --Sam Goody, 1956
> tune in posse radio:
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Passing a parameter into an action from the action mapping?

2002-06-18 Thread wbchmura

Doh!

I tried that with request.getParameter()

Duh - the difference is wonderfully obvious now!

Thanks

-Original Message-
From: Joe [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 4:10 PM
To: struts-user
Subject: Re: Passing a parameter into an action from the action mapping?


At 4:11 PM -0400 2002/06/18, [EMAIL PROTECTED] wrote:
>I thought I saw a solution for this somewhere but I cannot find it...

set the value of the "parameter" attribute, then use 
"mapping.getParameter()" in the action.

It's not a dumb idea at all -- it's the kind of reusability that 
Struts makes easy...

Joe



>I have the following set up...
>
>
>forward="plantsec.mainmenu">
>
>
>
>type="com.ebind.plantsec.create.actionCreateNew" name="formNewRequest"
>input="plantsec.create.new" scope="request">
>
>
>
>type="com.ebind.plantsec.search.actionSearch" />
>type="com.ebind.plantsec.search.actionSearch" />
>type="com.ebind.plantsec.search.actionSearch" />
>type="com.ebind.plantsec.search.actionSearch" />
>type="com.ebind.plantsec.search.actionSearch" />
>type="com.ebind.plantsec.search.actionSearch" />
>
>
>All of my calls to Search are the same, just with a different duration. 

>I was looking at dispatch, but these are all from links so I would need
>to do /search.do?dur=1week
>
>Is there a way in the action mapping to say when they go to 
/search1w.do
>it forwards them into the same action with some sort of parameter?
>
>Or is it just a dumb ass idea and should I just do the dispatch?
>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   

>For additional commands, e-mail: 



-- 
--
* Joe Germuska{ [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
--Sam Goody, 1956
tune in posse radio: 

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Passing a parameter into an action from the action mapping?

2002-06-18 Thread James Holmes

The parameter that Joe is talking about is for the
 tag in your struts-config.xml.

Take a look at the Struts Console.  It makes setting
all this stuff a breeeze.

http://www.jamesholmes.com/struts/

-james
[EMAIL PROTECTED]


--- Joe Germuska <[EMAIL PROTECTED]> wrote:
> At 4:11 PM -0400 2002/06/18,
> [EMAIL PROTECTED] wrote:
> >I thought I saw a solution for this somewhere but I
> cannot find it...
> 
> set the value of the "parameter" attribute, then use
> 
> "mapping.getParameter()" in the action.
> 
> It's not a dumb idea at all -- it's the kind of
> reusability that 
> Struts makes easy...
> 
> Joe
> 
> 
> 
> >I have the following set up...
> >
> >
> > >forward="plantsec.mainmenu">
> > redirect="false" />
> >
> > forward="plantsec.todo" />
> > >type="com.ebind.plantsec.create.actionCreateNew"
> name="formNewRequest"
> >input="plantsec.create.new" scope="request">
> > redirect="false" />
> > redirect="false" />
> >
> > >type="com.ebind.plantsec.search.actionSearch" />
> > >type="com.ebind.plantsec.search.actionSearch" />
> > >type="com.ebind.plantsec.search.actionSearch" />
> > >type="com.ebind.plantsec.search.actionSearch" />
> > >type="com.ebind.plantsec.search.actionSearch" />
> > >type="com.ebind.plantsec.search.actionSearch" />
> >
> >
> >All of my calls to Search are the same, just with a
> different duration. 
> >I was looking at dispatch, but these are all from
> links so I would need
> >to do /search.do?dur=1week
> >
> >Is there a way in the action mapping to say when
> they go to /search1w.do
> >it forwards them into the same action with some
> sort of parameter?
> >
> >Or is it just a dumb ass idea and should I just do
> the dispatch?
> >
> >
> >
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:  
> 
> >For additional commands, e-mail:
> 
> 
> 
> -- 
> --
> * Joe Germuska{ [EMAIL PROTECTED] }
> "It's pitiful, sometimes, if they've got it bad.
> Their eyes get 
> glazed, they go white, their hands tremble As I
> watch them I 
> often feel that a dope peddler is a gentleman
> compared with the man 
> who sells records."
>   --Sam Goody, 1956
> tune in posse radio:
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Absolute URL in forward tag

2002-06-18 Thread Bhaskar Gopalan

Hi,

is it possible to give an absolute URL (like http://www.xyz.com) in the
'path' attribute of
'forward' tag?

Thnx,
Bhaskar



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Uploading and parsing an excel file

2002-06-18 Thread Tim Heath

I need to upload and parse an excel file.  I want the user to be able
to browse their hd through netscape to do this.  Can anyone tell me how
to do this well?  In my current jsp's I have:

<%@ taglib uri="struts-html.tld" prefix="html" %>
<%@ taglib uri="struts-bean.tld" prefix="bean" %>
<%@ taglib uri="struts-logic.tld" prefix="logic" %>
<%@ taglib uri="struts-nested.tld" prefix="nested" %>


Do I have the right tld's to do this?

Thanks,

Tim Heath

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Installing of Struts on WSAD and also on Websphere App Server 4.02

2002-06-18 Thread Soomar, Muki (R.)

Here are the steps to start developing with WSAD.

1. Importing the struts-example.

   1.1 Creat a new WEB project using the web application view and
  the web project wizard. While in the wizard you can select your
  project name and the EAR name

  Skip the next screen on the wizard and go to the screen where
  you define the Java Build Settings. Accept the defaults here - 
   the source folder where all your source files will be kept and
  the classes where all your compiled source will be put. Click
  on the libraries tab on this screen. Using the "Add external
 Jars" button, browse to the directory where you have the 
"struts.jar" file is located and select that.

  Click on "Finish" when your project structure would have been
  created for  you.

1.2 Select the new project created in your navigator and then
   Go to File->import and select the "WAR file" option and select
   NEXT. Browse to the location  where you have the 
   downloaded stuts-example.war file and select it. 
   If by any chance, your project  is not automatically filled up,
   select the newly created project to import this file into. 
   Select the option "Overwrite existing resources
   without warning" as this is the first time. This will 
   overwrite your web.xml, .classpaths and other 
   things based on the example war file. 
   Hit FINISH and the war file will be imported
   into your project. You are ready to go now...

   2. Creating the TOMCAT server instance and configuration for testing. 
   You need to have TOMCAT installed before moving forward.

 2.1 Select the Server view and create a new server project.

 2.2 In the Server Configuration window, right click the "Server
   Instances" node and select  new -> server instance 
   and confguration.

   A configuration wizard will pop up. Fill in the server name
  as anything you want it to be refered by.

  For the server instance type, select the Apache Tomcat 3.2
  local server (if using tomcat 3.2)  or Tomcat v4.0 
  Local Server (if using 4.0)

  Click next. Here you will have to select the Tomcat 
  Server instance by locating   the directory where you 
  installed tomcat. Hit the FINISH button.

 2.3  In your Server Configuration window, you will see the newly
created server instance under both the instances 
and the configurations nodes. Right click
the Tomcat Server sub-node under the Server 
   Configurations node and select
the project you just created. This will register 
the project with the server.

 2.4 On the servers window next to the server configuration 
window, you can start the server by clicking 
on the start icon.

  2.5 Open a web browser by clicking on the web 
browser icon at the top. Type in 
http://localhost:8080/struts-example/index.jsp


Hope this helps. I spent considerable amount of time figuring this out so
thought would help other people doing the same thing.

Good luck..
   

Muki Soomar
Solutions Architect
Ford Motor Co.

Muki Soomar
Solutions Architect


-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 2:10 PM
To: [EMAIL PROTECTED]
Subject: Installing of Struts on WSAD and also on Websphere App Server
4.02


Subject: Installing of Struts on WSAD and also on Websphere App Server 4.02
From: "SJC" <[EMAIL PROTECTED]>
 ===
I am new to Struts and would like to get familiar with this framework by
installing examples on WebSphere Application Developer Studio. If anybody
has tried installing on WSAD I would appreciate if u could please let me
know the steps to do this.

Thanks.

SJC



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Passing a parameter into an action from the action mapping?

2002-06-18 Thread Joe Germuska

At 4:11 PM -0400 2002/06/18, [EMAIL PROTECTED] wrote:
>I thought I saw a solution for this somewhere but I cannot find it...

set the value of the "parameter" attribute, then use 
"mapping.getParameter()" in the action.

It's not a dumb idea at all -- it's the kind of reusability that 
Struts makes easy...

Joe



>I have the following set up...
>
>
>forward="plantsec.mainmenu">
>
>
>
>type="com.ebind.plantsec.create.actionCreateNew" name="formNewRequest"
>input="plantsec.create.new" scope="request">
>
>
>
>type="com.ebind.plantsec.search.actionSearch" />
>type="com.ebind.plantsec.search.actionSearch" />
>type="com.ebind.plantsec.search.actionSearch" />
>type="com.ebind.plantsec.search.actionSearch" />
>type="com.ebind.plantsec.search.actionSearch" />
>type="com.ebind.plantsec.search.actionSearch" />
>
>
>All of my calls to Search are the same, just with a different duration. 
>I was looking at dispatch, but these are all from links so I would need
>to do /search.do?dur=1week
>
>Is there a way in the action mapping to say when they go to /search1w.do
>it forwards them into the same action with some sort of parameter?
>
>Or is it just a dumb ass idea and should I just do the dispatch?
>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


-- 
--
* Joe Germuska{ [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
--Sam Goody, 1956
tune in posse radio: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Installing of Struts on WSAD and also on Websphere App Server 4.02

2002-06-18 Thread Soomar, Muki (R.)

Here are the steps to start developing with WSAD.

1. Importing the struts-example.

   1.1 Creat a new WEB project using the web application view and
  the web project wizard. While in the wizard you can select your
  project name and the EAR name

  Skip the next screen on the wizard and go to the screen where
  you define the Java Build Settings. Accept the defaults here - 
   the source folder where all your source files will be kept and
the
  classes where all your compiled source will be put. Click
   on the libraries tab on this screen. Using the "Add external
Jars" 
  button, browse to the directory where you have the "struts.jar"
file
  is located and select that.

  Click on "Finish" when your project structure would have been
created for
  you.

1.2 Select the new project created in your navigator and then
   Go to File->import and select the "WAR file" option and select
NEXT. 
   Browse to the location  where you have the downloaded 
   stuts-example.war file and select it. If by any chance, your
project
   is not automatically filled up, select the newly created project
to import
   this file into. Select the option "Overwrite existing resources
without warning"
   as this is the first time. This will overwrite your web.xml,
.classpaths and other 
things based on the example war file. Hit FINISH and the war
file will be imported
into your project. You are ready to go now...

   2. Creating the TOMCAT server instance and configuration for testing. You
need to have
TOMCAT installed before moving forward.

 2.1 Select the Server view and create a new server project.

 2.2 In the Server Configuration window, right click the "Server
Instances" node and
select  new -> server instance and confguration.

A configuration wizard will pop up. Fill in the server name
as anything you want 
it to be refered by.

For the server instance type, select the Apache Tomcat 3.2
local server (if using tomcat 3.2)
 or Tomcat v4.0 Local Server (if using 4.0)

Click next. Here you will have to select the Tomcat Server instance
by locating
the directory where you installed tomcat. Hit the FINISH button.

 2.3  In your Server Configuration window, you will see the newly
created server
instance under both the instances and the configurations
nodes. Right click
the Tomcat Server sub-node under the Server Configurations node and
select
the project you just created. This will register the project with
the server.

 2.4 On the servers window next to the server configuration window,
you can start the
server by clicking on the start icon.

  2.5 Open a web browser by clicking on the web browser icon at the
top. Typ in 
http://localhost:8080/struts-example/index.jsp


Hope this helps. I spent considerable amount of time figuring this out so
thought would
help other people doing the same thing.

Good luck..
   

Muki Soomar
Solutions Architect
Ford Motor Co.


-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 2:26 PM
To: 'Struts Users Mailing List'
Subject: RE: Installing of Struts on WSAD and also on Websphere App
Server 4.02


Hi,
I'm using struts on WSAD.  I didn't download the struts package myself, but
I believe the download includes a few war files.  You can go to "File" and
select "Import" and choose "WAR file".  Import the struts-blank.war if you
want to create a new application with the struts framework.  Import the
other ones if you want to look through the projects to pick them apart and
see how they work.  Is this helpful at all?

Keith Kamholz
Moog 
East Aurora, NY
(716) 687-7282
[EMAIL PROTECTED]


-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 2:10 PM
To: [EMAIL PROTECTED]
Subject: Installing of Struts on WSAD and also on Websphere App Server
4.02


Subject: Installing of Struts on WSAD and also on Websphere App Server 4.02
From: "SJC" <[EMAIL PROTECTED]>
 ===
I am new to Struts and would like to get familiar with this framework by
installing examples on WebSphere Application Developer Studio. If anybody
has tried installing on WSAD I would appreciate if u could please let me
know the steps to do this.

Thanks.

SJC



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Output to Excel

2002-06-18 Thread Joe Germuska

At 12:55 PM -0700 2002/06/18, Vincent Aumont wrote:
>If  you need something beyond CSV (i.e. formatting, coloring, etc.), 
>you can also
>use the Java Excel API (http://www.andykhan.com/jexcelapi). It 
>generates xls that
>all versions of Excel can read. The product is LGPL'ed.
>
>-Vincent.

Or Jakarta POI: 
Apache license, of course.

Joe




>Michael Rimov wrote:
>
>>  I prefer create an Action class with:
>>
>>  response.setHeader("Content-Disposition","inline;filename=myfile.xls");
>>  response.setContentType("application/vnd.ms-excel");
>>
>>  Then write out standard html tables.  Excel will format them.  Formatting
>>  support varies between versions
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


-- 
--
* Joe Germuska{ [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
--Sam Goody, 1956
tune in posse radio: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Passing a parameter into an action from the action mapping?

2002-06-18 Thread wbchmura


I thought I saw a solution for this somewhere but I cannot find it...

I have the following set up...

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


All of my calls to Search are the same, just with a different duration.  
I was looking at dispatch, but these are all from links so I would need 
to do /search.do?dur=1week

Is there a way in the action mapping to say when they go to /search1w.do 
it forwards them into the same action with some sort of parameter?

Or is it just a dumb ass idea and should I just do the dispatch?







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Single ActionServlet, ActionForm, Action across entire applic atio n... is it ok ?

2002-06-18 Thread Bhattad, Nilesh

I want to keep Form object within "request" scope only.  But instead of
defining separate ActionForm class per JSP page with getters and setters, I
prefer to have a single class which has a HashMap in it.
Each JSP page will have different instance of this DynaForm object.

- Nilesh

-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 18, 2002 3:59 PM
To: 'Struts Users Mailing List'
Subject: RE: Single ActionServlet, ActionForm, Action across entire applic
atio n... is it ok ?

Hi,
If you want to use the same form-bean for several input forms, can't you
just change the scope of the mapped actions to "session" or possibly
"application"?  I"m not sure what your needs are, but that's all I do.

~ Keith



-Original Message-
From: Bhattad, Nilesh [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 3:57 PM
To: Struts mailing list ([EMAIL PROTECTED])
Subject: Single ActionServlet, ActionForm, Action across entire
applicatio n... is it ok ?


Hello 

Recently I started working on Struts. I'm using Struts 1.0.2 version. 
Struts framework recommends to create separate ActionForm and Action object
for each JSP page.
Instead, I created a single Form object DynaForm which has a HashMap in it.
And I'm using this form object for all the JSP pages in my application. I
downloaded the Struts source. And added following lines of code in 
org.apache.struts.util.PropertyUtils::getSimpleProperty() method


if(bean instanceof DynaForm)
{
try
{
return ((DynaForm)bean).getObject(name);
}catch(Exception e)
{
log.debug(e.getMessage());
return null;
}
}

Also I have an XML file which defines the application flow




index
home


home
account




All nextpage node values are defined in struts-config.xml in
 section. So based on this XML, I decide the application
flow from my Action object. 
I have a single Action object called as ActionHandler which is common across
the entire application.

Each JSP page is assigned to a separate Request Object which does the
business logic specific to that page. Another XML is defined for the mapping
of JSP page and Request object. Based on this XML, ActionHandler executes
exact Request object.

Now my doubts are..

1. First of all, is it advisable to change the Struts code for any reason?
In order to have a single Form object across the entire application, I did
not find any option other than changing Struts code. Is there any better way
of doing this?

2. I'm using Action object as a controller. The job of ActionHandler is to
do some generic stuff like session check, basic form validation and then
calling corresponding Request object. Is it advisable to have a single
Action object across the application? 

Please let me know your ideas on this. Thanks in advance !!


Njoy..
Nilesh

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Accessing pages within a sub-application

2002-06-18 Thread Ralph Roland

I fought this same problem recently...  Your request to get the .jsp does
not flow through the Struts ActionServlet.  It's the ActionServlet that
stores a reference to the current (sub-application) configuration object in
the Request.  When the struts FormTag.doStartTag is executed it tries to
pull this reference from the Request, it's not there - so it tries to pull
it from the servlet context.  It does find one in the servlet context, but
this is the main configuration object, not the sub-app specific one.  The
specific sub-app action is not defined in the main struts-config file, so
it's not found in the main app config object, and this error message is
emitted.

My work-around for this problem was to add a new attribute to the FormTag
called subApplication, that can be used in the FormTag.lookup method to find
the correct sub-application configuration object - stored in the servlet
context under the tag "Action.APPLICATION_KEY+"/subapplicationname" (as you
point out).

Perhaps not the most ellegant solution, but it works for us...

BTW, someone's probably going to point out that requests to get the .jsp
directly are not correct to begin with...  but, if the page in question has
any local (thispage.jsp#foo) hrefs, the browser is going to re-request the
page anyway - forcing this problem to surface.

Good luck,
Ralph

> -Original Message-
> From: Vlad Baranovsky [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 2:48 PM
> To: [EMAIL PROTECTED]
> Subject: Accessing pages within a sub-application
>
>
> Hello, I was wondering if someone might have insight into the
> following problem:
>
> I have a struts-based application to which I have added a
> sub-application.  When I try to directly access a .jsp file that
> belongs to the sub-application and has an  tag in it,
> I receive the following exception:
>
> javax.servlet.jsp.JspException: Cannot retrieve mapping for
> action /doSomething at
> org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:828) at
> org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:528)
>
> ..where the action "doSomething" is defined in the
> sub-application's struts-config.xml file.
>
> By looking at the tag library source code and doing some tests,
> I've discovered that the the cause of the problem might be here
> (the first few lines of the lookup method of FormTag):
>
> appConfig = (ApplicationConfig)
> pageContext.getRequest().getAttribute(Action.APPLICATION_KEY);
> if (appConfig == null) { // Backwards compatibility hack
> appConfig = (ApplicationConfig)
>
> pageContext.getServletContext().getAttribute(Action.APPLICATION_KEY);
> }
>
> It appears that the "backwards compatibility hack" is invoked,
> and the application config object is retrieved from the servlet
> context, rather than the request.  Because the sub-application's
> config object is located under the key
> "Action.APPLICATION_KEY+"/subapplicationname" in the servlet
> context, the config object for the main application is retrieved,
> and consequently, the mapping for the action cannot be found.  If
> this .jsp file is forwarded to by an action, however, the correct
> config object is retrieved from the request, and the page loads
> without exceptions.
>
> My question is, am I misunderstanding something?  Or is there no
> support for this kind of operation?  (meaning, just typing the
> URL of such a .jsp into a browser) Any suggestions would be appreciated.
>
> Thanks,
> Vlad
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Single ActionServlet, ActionForm, Action across entire applicatio n... is it ok ?

2002-06-18 Thread Kamholz, Keith (corp-staff) USX

Hi,
If you want to use the same form-bean for several input forms, can't you
just change the scope of the mapped actions to "session" or possibly
"application"?  I"m not sure what your needs are, but that's all I do.

~ Keith



-Original Message-
From: Bhattad, Nilesh [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 3:57 PM
To: Struts mailing list ([EMAIL PROTECTED])
Subject: Single ActionServlet, ActionForm, Action across entire
applicatio n... is it ok ?


Hello 

Recently I started working on Struts. I'm using Struts 1.0.2 version. 
Struts framework recommends to create separate ActionForm and Action object
for each JSP page.
Instead, I created a single Form object DynaForm which has a HashMap in it.
And I'm using this form object for all the JSP pages in my application. I
downloaded the Struts source. And added following lines of code in 
org.apache.struts.util.PropertyUtils::getSimpleProperty() method


if(bean instanceof DynaForm)
{
try
{
return ((DynaForm)bean).getObject(name);
}catch(Exception e)
{
log.debug(e.getMessage());
return null;
}
}

Also I have an XML file which defines the application flow




index
home


home
account




All nextpage node values are defined in struts-config.xml in
 section. So based on this XML, I decide the application
flow from my Action object. 
I have a single Action object called as ActionHandler which is common across
the entire application.

Each JSP page is assigned to a separate Request Object which does the
business logic specific to that page. Another XML is defined for the mapping
of JSP page and Request object. Based on this XML, ActionHandler executes
exact Request object.

Now my doubts are..

1. First of all, is it advisable to change the Struts code for any reason?
In order to have a single Form object across the entire application, I did
not find any option other than changing Struts code. Is there any better way
of doing this?

2. I'm using Action object as a controller. The job of ActionHandler is to
do some generic stuff like session check, basic form validation and then
calling corresponding Request object. Is it advisable to have a single
Action object across the application? 

Please let me know your ideas on this. Thanks in advance !!


Njoy..
Nilesh

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Single ActionServlet, ActionForm, Action across entire application... is it ok ?

2002-06-18 Thread Bhattad, Nilesh

Hello 

Recently I started working on Struts. I'm using Struts 1.0.2 version. 
Struts framework recommends to create separate ActionForm and Action object
for each JSP page.
Instead, I created a single Form object DynaForm which has a HashMap in it.
And I'm using this form object for all the JSP pages in my application. I
downloaded the Struts source. And added following lines of code in 
org.apache.struts.util.PropertyUtils::getSimpleProperty() method


if(bean instanceof DynaForm)
{
try
{
return ((DynaForm)bean).getObject(name);
}catch(Exception e)
{
log.debug(e.getMessage());
return null;
}
}

Also I have an XML file which defines the application flow




index
home


home
account




All nextpage node values are defined in struts-config.xml in
 section. So based on this XML, I decide the application
flow from my Action object. 
I have a single Action object called as ActionHandler which is common across
the entire application.

Each JSP page is assigned to a separate Request Object which does the
business logic specific to that page. Another XML is defined for the mapping
of JSP page and Request object. Based on this XML, ActionHandler executes
exact Request object.

Now my doubts are..

1. First of all, is it advisable to change the Struts code for any reason?
In order to have a single Form object across the entire application, I did
not find any option other than changing Struts code. Is there any better way
of doing this?

2. I'm using Action object as a controller. The job of ActionHandler is to
do some generic stuff like session check, basic form validation and then
calling corresponding Request object. Is it advisable to have a single
Action object across the application? 

Please let me know your ideas on this. Thanks in advance !!


Njoy..
Nilesh

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Output to Excel

2002-06-18 Thread Vincent Aumont

If  you need something beyond CSV (i.e. formatting, coloring, etc.), you can also
use the Java Excel API (http://www.andykhan.com/jexcelapi). It generates xls that
all versions of Excel can read. The product is LGPL'ed.

-Vincent.

Michael Rimov wrote:

> I prefer create an Action class with:
>
> response.setHeader("Content-Disposition","inline;filename=myfile.xls");
> response.setContentType("application/vnd.ms-excel");
>
> Then write out standard html tables.  Excel will format them.  Formatting
> support varies between versions




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tiles definition problem

2002-06-18 Thread wbchmura


This was not bad for getting to know tiles also...
http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html

-Original Message-
From: Chmura, William B. 
Sent: Tuesday, June 18, 2002 1:25 PM
To: struts-user
Subject: RE: Tiles definition problem



I am not sure I understand what you are saying here, but I think I know 
where you are heading...

You action mapping looks okay... When your action sends it to wiz1, it 
will go to the tiles definition below and build it there...

Is this what you were looking for?

--
BodyOnlyLayout.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
...some html...




... more html...
















   












-Original Message-
From: java.sse [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 11:46 AM
To: struts-user
Subject: Tiles definition problem


Hi all,

I'm trying to use the Tiles definitions to define my
pages, and not have JSP pages assembling the tiles. I
can get Tiles to recognize a named definition for the
header element, but I can't get it to use a named
definition for the main page (the action forward). See
the files below. If I set the forward for "input1" to
wiz1.jsp, then it works fine. But I want to use the
definition "wiz1" and avoid having a wiz1.jsp. When I
set the action forward to "wiz1" I get a file not
found error.

Things are basically working since the header
definition works. But the page definition isn't.

Ideas?

Thanks,

Dave

--
tiles-defs.xml:
http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>




















--
wiz1.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>









-
struts-config.xml:












__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: NoClassDefFoundError: org/apache/regexp/RESyntaxException

2002-06-18 Thread Ted Husted

Be sure that Xerces 1.4.4  is available
to the container -AND- Jakarta-RegExp 1.2
(http://jakarta.apache.org/builds/jakarta-regexp/release/v1.2/) is in
the WEB-INF/lib.

Greg Hess wrote:
> 
> Hi All,
> 
> I am migrating my Struts 1.0.2 web app to use Struts 1.1. When my form posts
> to the Action servlet I get this error:
> 
> java.lang.NoClassDefFoundError: org/apache/regexp/RESyntaxException
> at java.lang.Class.getDeclaredMethods0(Native Method)
> at java.lang.Class.privateGetDeclaredMethods(Class.java:1613)
> at java.lang.Class.privateGetPublicMethods(Class.java:1641)
> at java.lang.Class.getMethod0(Class.java:1730)
> at java.lang.Class.getMethod(Class.java:951)
> at org.apache.commons.validator.Validator.validate(Unknown Source)
> at
> org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:269)
> at
> org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.j
> ava:910)
> at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:245)
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
> at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
> at
> com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:9
> 5)
> at com.caucho.server.http.Invocation.service(Invocation.java:291)
> at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:132)
> at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:217)
> at
> com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:159)
> at com.caucho.server.TcpConnection.run(TcpConnection.java:136)
> at java.lang.Thread.run(Thread.java:536)
> 
> I am assuming I have a regexp syntax error somewhere, it is not in my
> validation.xml as I have just removed all mask's.
> My action mapping is as follows:
> 
> 
>  path="/trialRegistration"
> type="org.apache.struts.actions.ForwardAction"
> name="trialRegForm"
> scope="request"
> input="/WEB-INF/pages/storefront/trialregistration.jsp"
> parameter="/factory.do">
> 
> 
> 
>  name="trialRegForm"
> 
>type="com.wrappedapps.marketplace.view.storefront.TrialRegistrationForm"
> />
> 
> Does anyone know what might be happening?
> 
> Thanks,
> Greg
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using html:link

2002-06-18 Thread Trieu, Danny

Global, you can see it from anywhere in you apps, where as local is only
visible to the action it mapped to

danny,

ps. Don't worry we are all learning Struts, here.

> -Original Message-
> From: Ryan Cuprak [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 12:20 PM
> To:   Struts Users Mailing List
> Subject:  Re: Using html:link
> 
> 
> This is a bit of a newbie question, but what is the difference between a
> local forward and a global forward? So, in the action mappings, those are
> 'local forwards'?
> 
> Thanks,
> Ryan 
> (I am new to struts and trying to find my way around =)
> 
> On 6/19/02 12:04 PM, "Joseph Barefoot" <[EMAIL PROTECTED]> wrote:
> 
> > It also must be a global forward, not a local forward (i.e., in the
> "action"
> > element).  So put it in your struts-config like so:
> > 
> > 
> > 
> > 
> > 
> > 
> > peace,
> > Joe
> >> -Original Message-
> >> From: Trieu, Danny [mailto:[EMAIL PROTECTED]]
> >> Sent: Tuesday, June 18, 2002 11:58 AM
> >> To: 'Struts Users Mailing List'
> >> Subject: RE: Using html:link
> >> 
> >> 
> >> An action is not a forward  you need to create a
> >> forward.. like this
> >> 
> >> 
> >> 
> >>> -Original Message-
> >>> From:[EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> >>> Sent:Tuesday, June 18, 2002 11:47 AM
> >>> To:[EMAIL PROTECTED]
> >>> Subject:Using html:link
> >>> 
> >>> From: Ryan D. Cuprak
> >>> 
> >>> Hello,
> >>>   I am trying to embedd a link in a jsp page that links to another jsp
> >>> page
> >>> using the html:link. Presently I get the exception:
> >>> javax.servlet.ServletException: Cannot create rewrite URL:
> >>> java.net.MalformedURLException: Cannot retrive ActionForward
> >> named /search
> >>>  when I attempt to view the page displaying the link.
> >>> 
> >>> In the page I have:
> >>> Perform a
> >>> Search
> >>> 
> >>> And the struts-config.xml has:
> >>> 
> >>>  >>> path="/search"
> >>> scope="request"
> >>> forward="/images/search.jsp"/>
> >>> 
> >>> The web.xml contains a mapping (don't know if this matters):
> >>> 
> >>> auth
> >>> /authentication/*
> >>> 
> >>> 
> >>> auth is the ActionServlet.
> >>> 
> >>> What am I doing wrong?
> >>> 
> >>> Thanks,
> >>> Ryan Cuprak
> >>> 
> >>> 
> >>> 
> >>> --
> >>> To unsubscribe, e-mail:
> >>> 
> >>> For additional commands, e-mail:
> >>> 
> >> 
> >> --
> >> To unsubscribe, e-mail:
> >> 
> >> For additional commands, e-mail:
> >> 
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> > 
> > 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using html:link

2002-06-18 Thread Trieu, Danny

Correct,  for workflow case, this is one of the way to capture input from
multiple page into a container beans.  But after you finish your workflow,
if there isn't a requirement to have it in the session, remove it from
session.  If memorry is an issue and/or fail-over(clustering) is
requirement,  manage your user's session right will help you apps scale
better and lesser errors.  Also, if you have your bean in the session, any
time you update the state of your bean, make sure you set it back into the
session so the container know to update others beans in the cluster.

> -Original Message-
> From: Kamholz, Keith   (corp-staff) USX [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 12:15 PM
> To:   'Struts Users Mailing List'
> Subject:  RE: Using html:link
> 
> I'm just used to putting the bean in the session because I've run into
> problems when i add input to the bean from a few different forms in
> different JSP pages.  I have to put it in the session scope in order to do
> so, right?
> 
> Keith Kamholz
> Moog 
> East Aurora, NY
> (716) 687-7282
> [EMAIL PROTECTED]
> 
> 
> -Original Message-
> From: Trieu, Danny [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 3:11 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Using html:link
> 
> 
> if you want to go to a jsp page, why do you need to create an Action class
> and an ActionForm bean plus put the bean in the session   This is one
> of
> those common mistake that will lead to creat too many action class and
> ActionForm beans.Another thing is, if there isn't a need for the bean
> other then the lifetime of the request, don't put it in the session
> 
> > -Original Message-
> > From:   Kamholz, Keith   (corp-staff) USX [SMTP:[EMAIL PROTECTED]]
> > Sent:   Tuesday, June 18, 2002 12:02 PM
> > To: 'Struts Users Mailing List'
> > Subject:RE: Using html:link
> > 
> > Hi,
> > I would approach it a little differently.
> > Just create an Action that knows whether or not to go to the Search page
> > or
> > the Page after that.
> > 
> > The struts-config would say:
> >  > type="NameOfActionClass"
> > name="NameOfBeanThatStoresInfo"
> > scope="session"
> > input="/images/search.jsp">
> > 
> >  > path="followingPage.jsp">
> > 
> > 
> > Then in the action class that handles this path, the "execute" method
> > would
> > test the bean associated with the search page, and return either
> > "mapping.findForward('search')" or
> "mapping.findForward('followingPage')",
> > depending on the business logic you use to process the info.
> > Then in your page, you can just have a line that reads " > page="/search.do">SEARCH".
> > (I use *.do for my mapping for the
> org.apache.struts.action.ActionServlet
> > class).
> > I think all that will allow you to do what you need to.
> > 
> > Keith Kamholz
> > Moog 
> > East Aurora, NY
> > (716) 687-7282
> > [EMAIL PROTECTED]
> > 
> > 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 18, 2002 2:47 PM
> > To: [EMAIL PROTECTED]
> > Subject: Using html:link
> > 
> > 
> > From: Ryan D. Cuprak
> > 
> > Hello,
> >   I am trying to embedd a link in a jsp page that links to another jsp
> > page
> > using the html:link. Presently I get the exception:
> > javax.servlet.ServletException: Cannot create rewrite URL:
> > java.net.MalformedURLException: Cannot retrive ActionForward named
> /search
> >  when I attempt to view the page displaying the link.
> > 
> > In the page I have:
> > Perform a
> > Search
> > 
> > And the struts-config.xml has:
> > 
> >  > path="/search"
> > scope="request"
> > forward="/images/search.jsp"/>
> > 
> > The web.xml contains a mapping (don't know if this matters):
> > 
> > auth
> > /authentication/*
> > 
> > 
> > auth is the ActionServlet.
> > 
> > What am I doing wrong?
> > 
> > Thanks,
> > Ryan Cuprak
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Using html:link

2002-06-18 Thread Ryan Cuprak


This is a bit of a newbie question, but what is the difference between a
local forward and a global forward? So, in the action mappings, those are
'local forwards'?

Thanks,
Ryan 
(I am new to struts and trying to find my way around =)

On 6/19/02 12:04 PM, "Joseph Barefoot" <[EMAIL PROTECTED]> wrote:

> It also must be a global forward, not a local forward (i.e., in the "action"
> element).  So put it in your struts-config like so:
> 
> 
> 
> 
> 
> 
> peace,
> Joe
>> -Original Message-
>> From: Trieu, Danny [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, June 18, 2002 11:58 AM
>> To: 'Struts Users Mailing List'
>> Subject: RE: Using html:link
>> 
>> 
>> An action is not a forward  you need to create a
>> forward.. like this
>> 
>> 
>> 
>>> -Original Message-
>>> From:[EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
>>> Sent:Tuesday, June 18, 2002 11:47 AM
>>> To:[EMAIL PROTECTED]
>>> Subject:Using html:link
>>> 
>>> From: Ryan D. Cuprak
>>> 
>>> Hello,
>>>   I am trying to embedd a link in a jsp page that links to another jsp
>>> page
>>> using the html:link. Presently I get the exception:
>>> javax.servlet.ServletException: Cannot create rewrite URL:
>>> java.net.MalformedURLException: Cannot retrive ActionForward
>> named /search
>>>  when I attempt to view the page displaying the link.
>>> 
>>> In the page I have:
>>> Perform a
>>> Search
>>> 
>>> And the struts-config.xml has:
>>> 
>>> >> path="/search"
>>> scope="request"
>>> forward="/images/search.jsp"/>
>>> 
>>> The web.xml contains a mapping (don't know if this matters):
>>> 
>>> auth
>>> /authentication/*
>>> 
>>> 
>>> auth is the ActionServlet.
>>> 
>>> What am I doing wrong?
>>> 
>>> Thanks,
>>> Ryan Cuprak
>>> 
>>> 
>>> 
>>> --
>>> To unsubscribe, e-mail:
>>> 
>>> For additional commands, e-mail:
>>> 
>> 
>> --
>> To unsubscribe, e-mail:
>> 
>> For additional commands, e-mail:
>> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: CSS

2002-06-18 Thread Trieu, Danny

in the header section of your jsp ... include the  tag to
generate a base reference contenxt to all you relative resource.

> -Original Message-
> From: Dan Trevino [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 12:19 PM
> To:   Struts Users Mailing List
> Subject:  Re: CSS
> 
> Did you check the permissions on project.css?
> 
> On Mon, 2002-06-17 at 04:16, Sudhir wrote:
> > Hi,
> > 
> > In my application I have got the .css file in the same directory where
> my JSP pages are there.  But my application is not able to
> > catch that css.  Can anybody tell me which tag I need to add to get the
> .css recognized.
> > 
> > I tried adding this tag inside head
> > 
> > but no impact.
> > 
> > Thanks and Best Regards,
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using html:link

2002-06-18 Thread Kamholz, Keith (corp-staff) USX

I'm just used to putting the bean in the session because I've run into
problems when i add input to the bean from a few different forms in
different JSP pages.  I have to put it in the session scope in order to do
so, right?

Keith Kamholz
Moog 
East Aurora, NY
(716) 687-7282
[EMAIL PROTECTED]


-Original Message-
From: Trieu, Danny [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 3:11 PM
To: 'Struts Users Mailing List'
Subject: RE: Using html:link


if you want to go to a jsp page, why do you need to create an Action class
and an ActionForm bean plus put the bean in the session   This is one of
those common mistake that will lead to creat too many action class and
ActionForm beans.Another thing is, if there isn't a need for the bean
other then the lifetime of the request, don't put it in the session

> -Original Message-
> From: Kamholz, Keith   (corp-staff) USX [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 12:02 PM
> To:   'Struts Users Mailing List'
> Subject:  RE: Using html:link
> 
> Hi,
> I would approach it a little differently.
> Just create an Action that knows whether or not to go to the Search page
> or
> the Page after that.
> 
> The struts-config would say:
>type="NameOfActionClass"
>   name="NameOfBeanThatStoresInfo"
>   scope="session"
>   input="/images/search.jsp">
>   
>path="followingPage.jsp">
> 
> 
> Then in the action class that handles this path, the "execute" method
> would
> test the bean associated with the search page, and return either
> "mapping.findForward('search')" or "mapping.findForward('followingPage')",
> depending on the business logic you use to process the info.
> Then in your page, you can just have a line that reads " page="/search.do">SEARCH".
> (I use *.do for my mapping for the org.apache.struts.action.ActionServlet
> class).
> I think all that will allow you to do what you need to.
> 
> Keith Kamholz
> Moog 
> East Aurora, NY
> (716) 687-7282
> [EMAIL PROTECTED]
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 2:47 PM
> To: [EMAIL PROTECTED]
> Subject: Using html:link
> 
> 
> From: Ryan D. Cuprak
> 
> Hello,
>   I am trying to embedd a link in a jsp page that links to another jsp
> page
> using the html:link. Presently I get the exception:
> javax.servlet.ServletException: Cannot create rewrite URL:
> java.net.MalformedURLException: Cannot retrive ActionForward named /search
>  when I attempt to view the page displaying the link.
> 
> In the page I have:
> Perform a
> Search
> 
> And the struts-config.xml has:
> 
>  path="/search"
> scope="request"
> forward="/images/search.jsp"/>
> 
> The web.xml contains a mapping (don't know if this matters):
> 
> auth
> /authentication/*
> 
> 
> auth is the ActionServlet.
> 
> What am I doing wrong?
> 
> Thanks,
> Ryan Cuprak
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: CSS

2002-06-18 Thread Dan Trevino

Did you check the permissions on project.css?

On Mon, 2002-06-17 at 04:16, Sudhir wrote:
> Hi,
> 
> In my application I have got the .css file in the same directory where my JSP pages 
>are there.  But my application is not able to
> catch that css.  Can anybody tell me which tag I need to add to get the .css 
>recognized.
> 
> I tried adding this tag inside head
> 
> but no impact.
> 
> Thanks and Best Regards,
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using html:link

2002-06-18 Thread Trieu, Danny

You are right, I assume it was in the global forward thks

> -Original Message-
> From: Joseph Barefoot [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, June 19, 2002 12:05 PM
> To:   Struts Users Mailing List
> Subject:  RE: Using html:link
> 
> It also must be a global forward, not a local forward (i.e., in the
> "action"
> element).  So put it in your struts-config like so:
> 
> 
>   
> 
> 
> 
> peace,
> Joe
> > -Original Message-
> > From: Trieu, Danny [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 18, 2002 11:58 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Using html:link
> >
> >
> > An action is not a forward  you need to create a
> > forward.. like this
> >
> > 
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 18, 2002 11:47 AM
> > > To:   [EMAIL PROTECTED]
> > > Subject:  Using html:link
> > >
> > > From: Ryan D. Cuprak
> > >
> > > Hello,
> > >   I am trying to embedd a link in a jsp page that links to another jsp
> > > page
> > > using the html:link. Presently I get the exception:
> > > javax.servlet.ServletException: Cannot create rewrite URL:
> > > java.net.MalformedURLException: Cannot retrive ActionForward
> > named /search
> > >  when I attempt to view the page displaying the link.
> > >
> > > In the page I have:
> > > Perform a
> > > Search
> > >
> > > And the struts-config.xml has:
> > >
> > >  > > path="/search"
> > > scope="request"
> > > forward="/images/search.jsp"/>
> > >
> > > The web.xml contains a mapping (don't know if this matters):
> > > 
> > > auth
> > > /authentication/*
> > > 
> > >
> > > auth is the ActionServlet.
> > >
> > > What am I doing wrong?
> > >
> > > Thanks,
> > > Ryan Cuprak
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > 
> > > For additional commands, e-mail:
> > > 
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: i18n

2002-06-18 Thread Joseph Barefoot

You can put it however you like, but if you don't have a getAction() and
setAction() as James describes, then the value "Edit Coverage" will never be
stored anywhere.  Add these to your form and then retrieve the value from
the form bean associated with your action class as he also described, and
match the value to determine the action.

Or you can retrieve it directly from the request (i.e.
request.getParameter("action")), if you want to break Struts MVC concepts.

Or, finally, you can use a different property name (e.g. editAction,
cancelAction, continueAction) for each of the buttons (and add getter/setter
pairs for these properties to the form bean), and then it doesn't matter
what the value attribute is set to.  Just check to see which of the three
properties (form fields) has a value instead.  The one that isn't null will
be the one that was clicked.


peace,
Joe

> -Original Message-
> From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 11:38 AM
> To: 'Struts Users Mailing List'
> Subject: RE: i18n
>
>
> Nope. I will put it this way. I have 3 buttons un my JSP. Cancel, continue
> and Edit. How do I know which button was pressed in my action class?. The
> way how I implement the buttons is :
>
> >>pageproperty="buttonEditImage"
> >altProperty="buttonEditText"
> >property="action"
> >value="Edit_Coverage"
> >border="0"/>
>
> That example goes for the "edit" button.
>
> -Carlos
>
>
> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 2:29 PM
> To: Struts Users Mailing List
> Subject: RE: i18n
>
>
> I'm assuming by your using the property="action", that you have a field on
> your form for action (getAction() and setAction())
>
> MyActionForm frm = (MyActionForm) form;
> String action = frm.getAction()
> if (action != null) {
>   // insert code here
> }
>
> You might also look into the DispatchAction, its very easily
> implemented and
> it can be a real timesaver.
> See Chuck's book (Chapter 5 around page 23)
> You can get review online at:
> http://www.theserverside.com/resources/strutsreview.jsp
>
>
>
>
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
>
> > -Original Message-
> > From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 18, 2002 1:24 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: i18n
> >
> >
> > WEll, that code is placed in the JSP. It's a button. I want to
> > know when the
> > button is pressed. Is that clear enough?
> >
> >
> > -Original Message-
> > From: James Mitchell [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 18, 2002 12:12 PM
> > To: Struts Users Mailing List
> > Subject: RE: i18n
> >
> >
> > You'll have to restate your question with a little more clarity please.
> > I, personally, have no clue what it is you need.
> >
> > James Mitchell
> > Software Engineer\Struts Evangelist
> > Struts-Atlanta, the "Open Minded Developer Network"
> > http://struts-atlanta.open-tools.org
> >
> >   -Original Message-
> >   From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
> >   Sent: Tuesday, June 18, 2002 11:52 AM
> >   To: Struts (E-mail)
> >   Subject: i18n
> >
> >
> >   Does anyone know how to get the data stored in "value" from de action
> > class?
> >
> >>pageproperty="buttonEditImage"
> >altProperty="buttonEditText"
> >property="action"
> >value="Edit_Coverage"
> >border="0"/>
> >
> >
> >   Thanks
> >
> >
> >   -Carlos.
> >
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using html:link

2002-06-18 Thread Trieu, Danny

if you want to go to a jsp page, why do you need to create an Action class
and an ActionForm bean plus put the bean in the session   This is one of
those common mistake that will lead to creat too many action class and
ActionForm beans.Another thing is, if there isn't a need for the bean
other then the lifetime of the request, don't put it in the session

> -Original Message-
> From: Kamholz, Keith   (corp-staff) USX [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 12:02 PM
> To:   'Struts Users Mailing List'
> Subject:  RE: Using html:link
> 
> Hi,
> I would approach it a little differently.
> Just create an Action that knows whether or not to go to the Search page
> or
> the Page after that.
> 
> The struts-config would say:
>type="NameOfActionClass"
>   name="NameOfBeanThatStoresInfo"
>   scope="session"
>   input="/images/search.jsp">
>   
>path="followingPage.jsp">
> 
> 
> Then in the action class that handles this path, the "execute" method
> would
> test the bean associated with the search page, and return either
> "mapping.findForward('search')" or "mapping.findForward('followingPage')",
> depending on the business logic you use to process the info.
> Then in your page, you can just have a line that reads " page="/search.do">SEARCH".
> (I use *.do for my mapping for the org.apache.struts.action.ActionServlet
> class).
> I think all that will allow you to do what you need to.
> 
> Keith Kamholz
> Moog 
> East Aurora, NY
> (716) 687-7282
> [EMAIL PROTECTED]
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 2:47 PM
> To: [EMAIL PROTECTED]
> Subject: Using html:link
> 
> 
> From: Ryan D. Cuprak
> 
> Hello,
>   I am trying to embedd a link in a jsp page that links to another jsp
> page
> using the html:link. Presently I get the exception:
> javax.servlet.ServletException: Cannot create rewrite URL:
> java.net.MalformedURLException: Cannot retrive ActionForward named /search
>  when I attempt to view the page displaying the link.
> 
> In the page I have:
> Perform a
> Search
> 
> And the struts-config.xml has:
> 
>  path="/search"
> scope="request"
> forward="/images/search.jsp"/>
> 
> The web.xml contains a mapping (don't know if this matters):
> 
> auth
> /authentication/*
> 
> 
> auth is the ActionServlet.
> 
> What am I doing wrong?
> 
> Thanks,
> Ryan Cuprak
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: struts and WLS5.1sp10

2002-06-18 Thread Daniel Jaffa

Mark,

I am running on weblogic 5.1 sp 11 and 12. And in the past also ran it on
5.10 sp 10

You know that u can not run a war file on 5.1 right.

Email me and i will send u my startweblogic.cmd and parts of my
weblogic.properties files

Dan Jaffa
- Original Message -
From: "Mark Chester" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 11:02 AM
Subject: struts and WLS5.1sp10


> All,
>
> Weird issues with struts and WLS5.1sp10. Following these instructions
> http://jakarta.apache.org/struts/userGuide/installation-wls.html I get
>
> Tue Jun 18 09:27:49 CDT 2002:  Error
> loading servlet: jsp_servlet._index
> java.lang.ClassNotFoundException: jsp_servlet._index
> at
> weblogic.boot.ServerClassLoader.findLocalClass(ServerClassLoader.java:372)
> at weblogic.boot.ServerClassLoader.loadClass(ServerClassLoader.java:112)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> at
>
weblogic.utils.classloaders.GenericClassLoader.parentLoadClass(GenericClassL
> oader.java:487)
> at
>
weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(GenericClassL
> oader.java:356)
> at
>
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.
> java:172)
> at
>
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.
> java:146)
> at weblogic.servlet.jsp.OneOffJspLoader.loadClass(JspStub.java:435)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> at
>
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
> a:291)
> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:185)
> at
>
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:16
> 4)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :99)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:742)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:686)
> at
>
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
> Manager.java:247)
> at
>
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
> at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
> Tue Jun 18 09:27:49 CDT 2002:  Servlet
> failed with Exception
> javax.servlet.ServletException: Servlet class: jsp_servlet._index could
not
> be loaded - the requested class wasn't found in the classpath
>
/opt/onebiz/webapps/struts-example.war:/opt/onebiz/webapps/_tmp_war/struts.j
> ar
> at
>
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
> a:299)
> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:185)
> at
>
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:16
> 4)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :99)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:742)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:686)
> at
>
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
> Manager.java:247)
> at
>
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
> at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
> I've see this
> http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg00284.html
but
> it disclaims use on anything except sp8. Anybody got any ideas?
>
> Thanks,
>
> Mark Chester
> Application Developer
> VML, Inc.
> 816-218-2833
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using html:link

2002-06-18 Thread Joseph Barefoot

It also must be a global forward, not a local forward (i.e., in the "action"
element).  So put it in your struts-config like so:






peace,
Joe
> -Original Message-
> From: Trieu, Danny [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 11:58 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Using html:link
>
>
> An action is not a forward  you need to create a
> forward.. like this
>
> 
>
> > -Original Message-
> > From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> > Sent:   Tuesday, June 18, 2002 11:47 AM
> > To: [EMAIL PROTECTED]
> > Subject:Using html:link
> >
> > From: Ryan D. Cuprak
> >
> > Hello,
> >   I am trying to embedd a link in a jsp page that links to another jsp
> > page
> > using the html:link. Presently I get the exception:
> > javax.servlet.ServletException: Cannot create rewrite URL:
> > java.net.MalformedURLException: Cannot retrive ActionForward
> named /search
> >  when I attempt to view the page displaying the link.
> >
> > In the page I have:
> > Perform a
> > Search
> >
> > And the struts-config.xml has:
> >
> >  > path="/search"
> > scope="request"
> > forward="/images/search.jsp"/>
> >
> > The web.xml contains a mapping (don't know if this matters):
> > 
> > auth
> > /authentication/*
> > 
> >
> > auth is the ActionServlet.
> >
> > What am I doing wrong?
> >
> > Thanks,
> > Ryan Cuprak
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using html:link

2002-06-18 Thread Kamholz, Keith (corp-staff) USX

Hi,
I would approach it a little differently.
Just create an Action that knows whether or not to go to the Search page or
the Page after that.

The struts-config would say:





Then in the action class that handles this path, the "execute" method would
test the bean associated with the search page, and return either
"mapping.findForward('search')" or "mapping.findForward('followingPage')",
depending on the business logic you use to process the info.
Then in your page, you can just have a line that reads "SEARCH".
(I use *.do for my mapping for the org.apache.struts.action.ActionServlet
class).
I think all that will allow you to do what you need to.

Keith Kamholz
Moog 
East Aurora, NY
(716) 687-7282
[EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 2:47 PM
To: [EMAIL PROTECTED]
Subject: Using html:link


From: Ryan D. Cuprak

Hello,
  I am trying to embedd a link in a jsp page that links to another jsp page
using the html:link. Presently I get the exception:
javax.servlet.ServletException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrive ActionForward named /search
 when I attempt to view the page displaying the link.

In the page I have:
Perform a
Search

And the struts-config.xml has:



The web.xml contains a mapping (don't know if this matters):

auth
/authentication/*


auth is the ActionServlet.

What am I doing wrong?

Thanks,
Ryan Cuprak



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: i18n

2002-06-18 Thread micael

He wants to know how to get "Edit Coverage" from the action.

At 02:00 PM 6/18/2002 -0400, you wrote:
>WEll, that code is placed in the JSP. It's a button. I want to know when the
>button is pressed. Is that clear enough?
>
>-Original Message-
>From: James Mitchell [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, June 18, 2002 12:12 PM
>To: Struts Users Mailing List
>Subject: RE: i18n
>
>
>You'll have to restate your question with a little more clarity please.
>I, personally, have no clue what it is you need.
>
>James Mitchell
>Software Engineer\Struts Evangelist
>Struts-Atlanta, the "Open Minded Developer Network"
>http://struts-atlanta.open-tools.org
>
>   -Original Message-
>   From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
>   Sent: Tuesday, June 18, 2002 11:52 AM
>   To: Struts (E-mail)
>   Subject: i18n
>
>
>   Does anyone know how to get the data stored in "value" from de action
>class?
>
>   pageproperty="buttonEditImage"
>altProperty="buttonEditText"
>property="action"
>value="Edit_Coverage"
>border="0"/>
>
>
>   Thanks
>
>
>   -Carlos.
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using html:link

2002-06-18 Thread Trieu, Danny

An action is not a forward  you need to create a forward.. like this



> -Original Message-
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 11:47 AM
> To:   [EMAIL PROTECTED]
> Subject:  Using html:link
> 
> From: Ryan D. Cuprak
> 
> Hello,
>   I am trying to embedd a link in a jsp page that links to another jsp
> page
> using the html:link. Presently I get the exception:
> javax.servlet.ServletException: Cannot create rewrite URL:
> java.net.MalformedURLException: Cannot retrive ActionForward named /search
>  when I attempt to view the page displaying the link.
> 
> In the page I have:
> Perform a
> Search
> 
> And the struts-config.xml has:
> 
>  path="/search"
> scope="request"
> forward="/images/search.jsp"/>
> 
> The web.xml contains a mapping (don't know if this matters):
> 
> auth
> /authentication/*
> 
> 
> auth is the ActionServlet.
> 
> What am I doing wrong?
> 
> Thanks,
> Ryan Cuprak
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Accessing pages within a sub-application

2002-06-18 Thread Vlad Baranovsky

Hello, I was wondering if someone might have insight into the following problem:

I have a struts-based application to which I have added a sub-application.  When I try 
to directly access a .jsp file that belongs to the sub-application and has an 
 tag in it, I receive the following exception:

javax.servlet.jsp.JspException: Cannot retrieve mapping for action /doSomething at 
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:828) at 
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:528) 

..where the action "doSomething" is defined in the sub-application's struts-config.xml 
file.  

By looking at the tag library source code and doing some tests, I've discovered that 
the the cause of the problem might be here (the first few lines of the lookup method 
of FormTag):

appConfig = (ApplicationConfig)
pageContext.getRequest().getAttribute(Action.APPLICATION_KEY);
if (appConfig == null) { // Backwards compatibility hack
appConfig = (ApplicationConfig)
pageContext.getServletContext().getAttribute(Action.APPLICATION_KEY);
}

It appears that the "backwards compatibility hack" is invoked, and the application 
config object is retrieved from the servlet context, rather than the request.  Because 
the sub-application's config object is located under the key 
"Action.APPLICATION_KEY+"/subapplicationname" in the servlet context, the config 
object for the main application is retrieved, and consequently, the mapping for the 
action cannot be found.  If this .jsp file is forwarded to by an action, however, the 
correct config object is retrieved from the request, and the page loads without 
exceptions.

My question is, am I misunderstanding something?  Or is there no support for this kind 
of operation?  (meaning, just typing the URL of such a .jsp into a browser) Any 
suggestions would be appreciated.

Thanks,
Vlad

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Using html:link

2002-06-18 Thread ryan . cuprak

From: Ryan D. Cuprak

Hello,
  I am trying to embedd a link in a jsp page that links to another jsp page
using the html:link. Presently I get the exception:
javax.servlet.ServletException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrive ActionForward named /search
 when I attempt to view the page displaying the link.

In the page I have:
Perform a Search

And the struts-config.xml has:



The web.xml contains a mapping (don't know if this matters):

auth
/authentication/*


auth is the ActionServlet.

What am I doing wrong?

Thanks,
Ryan Cuprak



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: i18n

2002-06-18 Thread Carlos Fernandez

Nope. I will put it this way. I have 3 buttons un my JSP. Cancel, continue
and Edit. How do I know which button was pressed in my action class?. The
way how I implement the buttons is : 

>   pageproperty="buttonEditImage"
>altProperty="buttonEditText"
>property="action"
>value="Edit_Coverage"
>border="0"/>

That example goes for the "edit" button.

-Carlos


-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 2:29 PM
To: Struts Users Mailing List
Subject: RE: i18n


I'm assuming by your using the property="action", that you have a field on
your form for action (getAction() and setAction())

MyActionForm frm = (MyActionForm) form;
String action = frm.getAction()
if (action != null) {
  // insert code here
}

You might also look into the DispatchAction, its very easily implemented and
it can be a real timesaver.
See Chuck's book (Chapter 5 around page 23)
You can get review online at:
http://www.theserverside.com/resources/strutsreview.jsp




James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org

> -Original Message-
> From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 1:24 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: i18n
>
>
> WEll, that code is placed in the JSP. It's a button. I want to
> know when the
> button is pressed. Is that clear enough?
>
>
> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 12:12 PM
> To: Struts Users Mailing List
> Subject: RE: i18n
>
>
> You'll have to restate your question with a little more clarity please.
> I, personally, have no clue what it is you need.
>
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
>
>   -Original Message-
>   From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
>   Sent: Tuesday, June 18, 2002 11:52 AM
>   To: Struts (E-mail)
>   Subject: i18n
>
>
>   Does anyone know how to get the data stored in "value" from de action
> class?
>
>   pageproperty="buttonEditImage"
>altProperty="buttonEditText"
>property="action"
>value="Edit_Coverage"
>border="0"/>
>
>
>   Thanks
>
>
>   -Carlos.
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Weird Upload problems

2002-06-18 Thread Anthony Balandran

Hello All-

I have looked and looked for any information on this exception I am
getting.  I have not been successful.  I don't even understand why I am
getting a -26 back from the substring method in String.  I expected to
receive a -1 or the position of the substring.  The number varies
greatly, sometimes it's -225 or something like that.  By the way, the
online javadoc is missing the MultipartBoundaryInputStream class.  I
have compared the source of the version of this class I have to the
latest nightly build and they are the same so upgrading wouldn't do me
any good.  I am using enctype="multipart/form-data".  I am using jdk
1.3.1_03.  Any clues at all would be very helpful.


java.lang.StringIndexOutOfBoundsException: String index out of range:-26
at java.lang.String.substring(String.java:1520)
at 
org.apache.struts.upload.MultipartBoundaryInputStream.readContentDisposition(MultipartBoundaryInputStream.java:377)
at 
org.apache.struts.upload.MultipartBoundaryInputStream.readElementHeaders(MultipartBoundaryInputStream.java:356)
at 
org.apache.struts.upload.MultipartBoundaryInputStream.resetForNextBoundary(MultipartBoundaryInputStream.java:158)
at 
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.java:235)
at com.ceiva.servlets.UploadFile.upload(UploadFile.java:203)
at com.ceiva.servlets.UploadFile.doGet(UploadFile.java:70)
at com.ceiva.servlets.UploadFile.doPost(UploadFile.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
at com.ceiva.servlets.CeivaServlet.service(CeivaServlet.java:37)
at 
com.ceiva.servlets.CeivaValidatingServlet.service(CeivaValidatingServlet.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at 
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:95)
at com.caucho.http.security.SecurityFilter.doFilter(SecurityFilter.java:114)
at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:87)
at com.caucho.server.http.Invocation.service(Invocation.java:291)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:132)
at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:341)
at 
com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:271)
at com.caucho.server.TcpConnection.run(TcpConnection.java:136)
at java.lang.Thread.run(Thread.java:479)



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Installing of Struts on WSAD and also on Websphere App Server 4.02

2002-06-18 Thread Kamholz, Keith (corp-staff) USX

Hi,
I'm using struts on WSAD.  I didn't download the struts package myself, but
I believe the download includes a few war files.  You can go to "File" and
select "Import" and choose "WAR file".  Import the struts-blank.war if you
want to create a new application with the struts framework.  Import the
other ones if you want to look through the projects to pick them apart and
see how they work.  Is this helpful at all?

Keith Kamholz
Moog 
East Aurora, NY
(716) 687-7282
[EMAIL PROTECTED]


-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 2:10 PM
To: [EMAIL PROTECTED]
Subject: Installing of Struts on WSAD and also on Websphere App Server
4.02


Subject: Installing of Struts on WSAD and also on Websphere App Server 4.02
From: "SJC" <[EMAIL PROTECTED]>
 ===
I am new to Struts and would like to get familiar with this framework by
installing examples on WebSphere Application Developer Studio. If anybody
has tried installing on WSAD I would appreciate if u could please let me
know the steps to do this.

Thanks.

SJC



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: i18n

2002-06-18 Thread James Mitchell

I'm assuming by your using the property="action", that you have a field on
your form for action (getAction() and setAction())

MyActionForm frm = (MyActionForm) form;
String action = frm.getAction()
if (action != null) {
  // insert code here
}

You might also look into the DispatchAction, its very easily implemented and
it can be a real timesaver.
See Chuck's book (Chapter 5 around page 23)
You can get review online at:
http://www.theserverside.com/resources/strutsreview.jsp




James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org

> -Original Message-
> From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 1:24 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: i18n
>
>
> WEll, that code is placed in the JSP. It's a button. I want to
> know when the
> button is pressed. Is that clear enough?
>
>
> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 12:12 PM
> To: Struts Users Mailing List
> Subject: RE: i18n
>
>
> You'll have to restate your question with a little more clarity please.
> I, personally, have no clue what it is you need.
>
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
>
>   -Original Message-
>   From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
>   Sent: Tuesday, June 18, 2002 11:52 AM
>   To: Struts (E-mail)
>   Subject: i18n
>
>
>   Does anyone know how to get the data stored in "value" from de action
> class?
>
>   pageproperty="buttonEditImage"
>altProperty="buttonEditText"
>property="action"
>value="Edit_Coverage"
>border="0"/>
>
>
>   Thanks
>
>
>   -Carlos.
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Same Action, different Views

2002-06-18 Thread Robert Williams

Generating anything in the response from within an Action is a violation of
MVC concepts.  I don't think you want to do that.  Better to send a
parameter with the input that controls which forward to use from your Action
to generate the response.  One "jsp" should generate the HTML response and
another should generate what ever the GUI needs.  You won't be able to use
Struts tags in the GUI response, but that shouldn't be a problem, as you
will have to format the response in some non-HTML format.  Hmmm maybe XML???

bob

- Original Message -
From: "Joseph Barefoot" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 19, 2002 1:05 PM
Subject: RE: Same Action, different Views


> hmmm...wouldn't you need to do something wildly different in your Action,
> i.e. write specific data to the HTTPServletResponse, when using the GUI
> client?  Unless you have it set up to follow HTTP forwards and parse the
> responses or something as a browser would
>
>
>
> > -Original Message-
> > From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
> > Sent: Tuesday, June 18, 2002 10:55 AM
> > To: [EMAIL PROTECTED]
> > Subject: Same Action, different Views
> >
> >
> > Subject: Same Action, different Views
> > From: "C. Allen Sher" <[EMAIL PROTECTED]>
> >  ===
> > What is the preferred way to implement "Same Model+Action,
> > Different Views"
> > in struts?
> > I want to build an Action that answers to HTTP requests both from
> > a browser
> > and from a GUI.
> > The Action and the Bean are the same, the view for the GUI does not need
> > much of the HTML dress-up.
> >
> > I thought about have two Actions in struts-config.xml that uses the same
> > Action class.
> > Do we have anything more elegant than that?
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Output to Excel

2002-06-18 Thread Michael Rimov

At 04:08 PM 6/17/2002 -0400, you wrote:
>Hi,
>
>I have a question regarding how to design a way that serves a text file to
>the user via web pages, ie: a csv file.
>
>Would you
>
>1. create a DAO that writes to a text file, and somehow get the Servlet to
>serve the file?
>2. create an Action class with:
>
>response.setHeader("Content-Disposition","attachment;filename=data.csv");
> response.setHeader("Content-Type", "application/ms-excel");
> and have the following JSP write the actual contents. This way, the
>JSP can use JSPTags, but the formatting is off.
>3. Any other way.

I prefer create an Action class with:

response.setHeader("Content-Disposition","inline;filename=myfile.xls");
response.setContentType("application/vnd.ms-excel");

Then write out standard html tables.  Excel will format them.  Formatting 
support varies between versions starting at:

Excel 97 - basic table layout, no real coloring.

to
Excel XP - Even CSS formatting support for fonts and colors.

But even in Excel 97. I still find it a lot more workable than straight 
csv.  If you need to support Excel 95, you'll need to use csv instead.

There's an example of this in Expresso called ExcelViewHandler:
com.jcorporate.expresso.core.servlet.viewhandler.ExcelViewHandler

HTH!
 -Mike




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Installing of Struts on WSAD and also on Websphere App Server 4.02

2002-06-18 Thread @Basebeans.com

Subject: Installing of Struts on WSAD and also on Websphere App Server 4.02
From: "SJC" <[EMAIL PROTECTED]>
 ===
I am new to Struts and would like to get familiar with this framework by
installing examples on WebSphere Application Developer Studio. If anybody
has tried installing on WSAD I would appreciate if u could please let me
know the steps to do this.

Thanks.

SJC



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Same Action, different Views

2002-06-18 Thread Joseph Barefoot

hmmm...wouldn't you need to do something wildly different in your Action,
i.e. write specific data to the HTTPServletResponse, when using the GUI
client?  Unless you have it set up to follow HTTP forwards and parse the
responses or something as a browser would



> -Original Message-
> From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 10:55 AM
> To: [EMAIL PROTECTED]
> Subject: Same Action, different Views
>
>
> Subject: Same Action, different Views
> From: "C. Allen Sher" <[EMAIL PROTECTED]>
>  ===
> What is the preferred way to implement "Same Model+Action,
> Different Views"
> in struts?
> I want to build an Action that answers to HTTP requests both from
> a browser
> and from a GUI.
> The Action and the Bean are the same, the view for the GUI does not need
> much of the HTML dress-up.
>
> I thought about have two Actions in struts-config.xml that uses the same
> Action class.
> Do we have anything more elegant than that?
>
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: i18n

2002-06-18 Thread Carlos Fernandez

WEll, that code is placed in the JSP. It's a button. I want to know when the
button is pressed. Is that clear enough?

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 12:12 PM
To: Struts Users Mailing List
Subject: RE: i18n


You'll have to restate your question with a little more clarity please.
I, personally, have no clue what it is you need.

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org

  -Original Message-
  From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, June 18, 2002 11:52 AM
  To: Struts (E-mail)
  Subject: i18n


  Does anyone know how to get the data stored in "value" from de action
class?

  


  Thanks


  -Carlos.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: doGet and doPost

2002-06-18 Thread James Holmes

Struts is an application framework that implements the
MVC (Model 2) design pattern.

Check out the link below for some helpful information
on the MVC pattern and how it applies to web
applications.

http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/


--- James Mitchell <[EMAIL PROTECTED]> wrote:
> You are misunderstanding the concepts.
> 
> Struts provides a framework that does request
> handling for your.
> 
> You simply implement an Action class and struts will
> call your method.
> You can then do whatever you want.see docs.
> 
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
> 
> > -Original Message-
> > From: Billy Ng [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 18, 2002 12:59 PM
> > To: [EMAIL PROTECTED]
> > Subject: doGet and doPost
> > 
> > 
> > Hi folks,
> > 
> > I am new to Struts.  I always like to separate the
> GET and POST 
> > actions.  In 
> > Struts, I don't see there is doGet() and doPost()
> methods in 
> > Action object.  
> > Would anybody please tell me how to do it in
> Struts?
> > 
> > Thanks in advance!
> > 
> > Billy Ng
> > 
> > 
> >
>
_
> > Send and receive Hotmail on your mobile device:
> http://mobile.msn.com
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> >
> 
> > For additional commands, e-mail: 
> > 
> > 
> > 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Same Action, different Views

2002-06-18 Thread @Basebeans.com

Subject: Same Action, different Views
From: "C. Allen Sher" <[EMAIL PROTECTED]>
 ===
What is the preferred way to implement "Same Model+Action, Different Views"
in struts?
I want to build an Action that answers to HTTP requests both from a browser
and from a GUI.
The Action and the Bean are the same, the view for the GUI does not need
much of the HTML dress-up.

I thought about have two Actions in struts-config.xml that uses the same
Action class.
Do we have anything more elegant than that?




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tiles definition problem

2002-06-18 Thread wbchmura


I am not sure I understand what you are saying here, but I think I know 
where you are heading...

You action mapping looks okay... When your action sends it to wiz1, it 
will go to the tiles definition below and build it there...

Is this what you were looking for?

--
BodyOnlyLayout.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
...some html...




... more html...
















   












-Original Message-
From: java.sse [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 11:46 AM
To: struts-user
Subject: Tiles definition problem


Hi all,

I'm trying to use the Tiles definitions to define my
pages, and not have JSP pages assembling the tiles. I
can get Tiles to recognize a named definition for the
header element, but I can't get it to use a named
definition for the main page (the action forward). See
the files below. If I set the forward for "input1" to
wiz1.jsp, then it works fine. But I want to use the
definition "wiz1" and avoid having a wiz1.jsp. When I
set the action forward to "wiz1" I get a file not
found error.

Things are basically working since the header
definition works. But the page definition isn't.

Ideas?

Thanks,

Dave

--
tiles-defs.xml:
http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>




















--
wiz1.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>









-
struts-config.xml:












__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Subclass Actions vs Request processor? - Design Question

2002-06-18 Thread Jeff_Mychasiw



I would like some clarification, Here is what I think I understand
With pre 1.1, if you wanted to perform a task for every action/page your choices
were to override the Action servlet or subclass the Action
and define an abstract myPerform() method.  The parent class would perform
common functionality in it's perform method then call the myPerform().

I also understand that it is a good idea to create a super action(s) regardless
of whether you think you will need it or not.

I am in the process of design of our first Struts app and I am at that point.

So:
1 - I think in the future,  if I want to perform common functionality for each
request, then I should plan to use the request processor.

2 - I should still create an Application specific super Action Class to hold
common helper methods but I do not need to force an abstract myPerform()

Am I off base?



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: doGet and doPost

2002-06-18 Thread James Mitchell

You are misunderstanding the concepts.

Struts provides a framework that does request handling for your.

You simply implement an Action class and struts will call your method.
You can then do whatever you want.see docs.

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org

> -Original Message-
> From: Billy Ng [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 12:59 PM
> To: [EMAIL PROTECTED]
> Subject: doGet and doPost
> 
> 
> Hi folks,
> 
> I am new to Struts.  I always like to separate the GET and POST 
> actions.  In 
> Struts, I don't see there is doGet() and doPost() methods in 
> Action object.  
> Would anybody please tell me how to do it in Struts?
> 
> Thanks in advance!
> 
> Billy Ng
> 
> 
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




doGet and doPost

2002-06-18 Thread Billy Ng

Hi folks,

I am new to Struts.  I always like to separate the GET and POST actions.  In 
Struts, I don't see there is doGet() and doPost() methods in Action object.  
Would anybody please tell me how to do it in Struts?

Thanks in advance!

Billy Ng


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Sample code for handling variable number of text fields

2002-06-18 Thread Harjeet Singh

Thanks Ted. That should work for me..

- Original Message -
From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, June 15, 2002 4:40 PM
Subject: Re: Sample code for handling variable number of text fields


> You can just use an array.
>
> private String[] key= null;
>
> public String[] getKey() {
> return this.key;
> }
>
> public void setKey(String[] key) {
> this.key = key;
> }
>
>
> 
> 
> 
> 
> name
> 
> 
> 
> 
> <%-- REMEMBER TO SPECIFY THE ITERATE ID AS THE NAME --%>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> Harjeet Singh wrote:
> >
> > Hello everybody,
> >
> > This is newbie question. I have a form with the number of textfields on
it
> > which are known at runtime only, i.e. depend on the search result on DB.
> > Could anyone send me sample code for this, on how to get the values from
the
> > forms (in the Formbean) as well as set vaues in it on re-populate.
> >
> > Help would be greatly appreciated.
> >
> > Thanks,
> > Harjeet.
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

>
> -- Ted Husted, Husted dot Com, Fairport NY US
> -- Developing Java Web Applications with Struts
> -- Tel: +1 585 737-3463
> -- Web: http://husted.com/about/services
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Forms and editing FormFiles

2002-06-18 Thread Joe Germuska

At 11:17 AM -0500 2002/06/18, John Nicholas wrote:
>OK, I didn't explain my problem very well . I have no problems with 
>saving the  graphic uploaded or displaying it later. I'm wondering 
>how to handle editing this same data later. My original form lets 
>the user add an entry to a database. Let's pretend it's an address 
>book with pictures so the form lets me put in name, address and 
>upload a jpeg. In the database I store the name, address and path to 
>the graphic. Later I want to be able to edit this data. I have the 
>form come up prepopulated with their name and address and those 
>fields can be changed and updated in the database.
>
>I'm wondering how the file upload field should be handled. Should I 
>put anything in it or leave it empty? If I leave it empty I could 
>replace the graphic only if they upload one and leave it as the 
>original if they don't. That might imply to the user that there 
>isn't a graphic when there is plus I'd have to validate the graphic 
>differently.
>
>Do users expect the name of the original graphic to be there and if 
>so how to get it in there without confusing the ActionForm? I 
>obviously wouldn't be sending the graphic back to them and having 
>them upload it again through the form the way you do with text in a 
>text field but I don't see how to only send the name of the graphic 
>and only maybe get a graphic back.

You can't "pre-fill" an upload form field.  No popular browsers have 
any support for the "value" attribute.  I was checking that in 
response to an earlier post on struts-user today.  Here's a link with 
more info 
 
Just found that w/Google, so I'm not endorsing it.

If you have a form where the upload is optional, check the "fileSize" 
property of your formFile to see if someone gave you anything to 
handle or not.

Joe

-- 
--
* Joe Germuska{ [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
--Sam Goody, 1956
tune in posse radio: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Forms and editing FormFiles

2002-06-18 Thread John Nicholas

OK, I didn't explain my problem very well . I have no problems with 
saving the  graphic uploaded or displaying it later. I'm wondering how 
to handle editing this same data later. My original form lets the user 
add an entry to a database. Let's pretend it's an address book with 
pictures so the form lets me put in name, address and upload a jpeg. In 
the database I store the name, address and path to the graphic. Later I 
want to be able to edit this data. I have the form come up prepopulated 
with their name and address and those fields can be changed and updated 
in the database.

I'm wondering how the file upload field should be handled. Should I put 
anything in it or leave it empty? If I leave it empty I could replace 
the graphic only if they upload one and leave it as the original if they 
don't. That might imply to the user that there isn't a graphic when 
there is plus I'd have to validate the graphic differently.

Do users expect the name of the original graphic to be there and if so 
how to get it in there without confusing the ActionForm? I obviously 
wouldn't be sending the graphic back to them and having them upload it 
again through the form the way you do with text in a text field but I 
don't see how to only send the name of the graphic and only maybe get a 
graphic back.

Thanks, John

James Mitchell wrote:
> The display of the image is separate from handling of the uploaded file.
> 
> In fact, the file could be of any type (e.g. .doc, .swf, .xls, .jpg)
> 
> Whether you save the image to the db as binary or save it to disk, the image
> is acquired from the browser through a separate http request.
> 
> If saved on disk, your jsp/html page is typically done with:
> 
> 
> If you saved to db then you would need to write something like:
> 
> 
> Then have a action class (or action class -> jsp) that handles writing
> binary file to browser.
> You could:
>  -call db layer and get the binary image, then write it using
>   response directly from your action
> or
>  -save the image into a bean and pass to a jsp, then have the jsp do
>   the same (Don't forget to set the content type)
> 
> Some browsers can have trouble with the second approach, you may need to
> specify the type as image/gif or image/jpeg.
> 
> How you handle this is completely up to you.
> 
> I hope that helps.
> 
> 
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
> 
> 
>>-Original Message-
>>From: John Nicholas [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, June 18, 2002 11:28 AM
>>To: [EMAIL PROTECTED]
>>Subject: Forms and editing FormFiles
>>
>>
>>I have a file upload field in a form. I was adapting the form to handle
>>editing existing entries and ran into a stumbling block. When bringing
>>up a pre-populated form that has a file upload field how should I handle
>>it? Do I need to load the formfile in the bean? Then what?
>>
>>Example:
>>Let's say I have form to add people and thier pictures to an app
>>Name: _ <-- reg text input
>>Picture: _ [Browse] <-- file upload
>>
>>Now when I bringing this up to edit it and prepopulating from an action
>>Name: John
>>Picture: __ <-- what should show here? just the file name?
>>
>> It seems wasteful to load the image into  the actionform when usually
>>I'm not editing it plus I'm not sure the best way to do that. (Any one
>>have sample code for loading a FormFile object from a file?)  Maybe not
>>on little web gifs but what about a form where people are uploading
>>large pdfs. I don't want to force people to reupload everytime. In my
>>real app the people editing it later are not usually going to be the
>>people who uploaded the binary files. What is the standard behavior for
>>this?
>>
>>Thanks, John
>>
>>
>>--
>>To unsubscribe, e-mail:
> 
> 
> For additional commands, e-mail:
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 
> 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: i18n

2002-06-18 Thread James Mitchell

You'll have to restate your question with a little more clarity please.
I, personally, have no clue what it is you need.

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org

  -Original Message-
  From: Carlos Fernandez [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, June 18, 2002 11:52 AM
  To: Struts (E-mail)
  Subject: i18n


  Does anyone know how to get the data stored in "value" from de action
class?

  


  Thanks


  -Carlos.



Select Tag

2002-06-18 Thread Sesha


This is pertaining to Select Tag. 

Is it is possible that value attribute in select tag can take a String
array.

When I select multiple items in the select and submit to the same page, how
can we retain these values. Presently I am able to reatin only one of the
selected values. I notice that the value attribute in the select tag takes
only a String. Is there a work around for this that you might know.

Thank You
Sesha



begin 666 Wipro_Disclaimer.txt
M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BI$:7-C;&%I;65R*BHJ*BHJ*BHJ
M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ#0H-"DEN9F]R;6%T:6]N(&-O
M;G1A:6YE9"!I;B!T:&ES($4M34%)3"!B96EN9R!P2!T;R!7
M:7!R;R!,:6UI=&5D(&ES( T*)W!R:79I;&5G960G(&%N9" G8V]N9FED96YT
M:6%L)R!A;F0@:6YT96YD960@9F]R('5S92!O;FQY(&)Y('1H92!I;F1I=FED
M=6%L#0H@;W(@96YT:71Y('1O('=H:6-H(&ET(&ES(&%D9')E2!U2!Pmailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 




RE: Forms and editing FormFiles

2002-06-18 Thread James Mitchell

The display of the image is separate from handling of the uploaded file.

In fact, the file could be of any type (e.g. .doc, .swf, .xls, .jpg)

Whether you save the image to the db as binary or save it to disk, the image
is acquired from the browser through a separate http request.

If saved on disk, your jsp/html page is typically done with:


If you saved to db then you would need to write something like:


Then have a action class (or action class -> jsp) that handles writing
binary file to browser.
You could:
 -call db layer and get the binary image, then write it using
  response directly from your action
or
 -save the image into a bean and pass to a jsp, then have the jsp do
  the same (Don't forget to set the content type)

Some browsers can have trouble with the second approach, you may need to
specify the type as image/gif or image/jpeg.

How you handle this is completely up to you.

I hope that helps.


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org

> -Original Message-
> From: John Nicholas [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 11:28 AM
> To: [EMAIL PROTECTED]
> Subject: Forms and editing FormFiles
>
>
> I have a file upload field in a form. I was adapting the form to handle
> editing existing entries and ran into a stumbling block. When bringing
> up a pre-populated form that has a file upload field how should I handle
> it? Do I need to load the formfile in the bean? Then what?
>
> Example:
> Let's say I have form to add people and thier pictures to an app
> Name: _ <-- reg text input
> Picture: _ [Browse] <-- file upload
>
> Now when I bringing this up to edit it and prepopulating from an action
> Name: John
> Picture: __ <-- what should show here? just the file name?
>
>  It seems wasteful to load the image into  the actionform when usually
> I'm not editing it plus I'm not sure the best way to do that. (Any one
> have sample code for loading a FormFile object from a file?)  Maybe not
> on little web gifs but what about a form where people are uploading
> large pdfs. I don't want to force people to reupload everytime. In my
> real app the people editing it later are not usually going to be the
> people who uploaded the binary files. What is the standard behavior for
> this?
>
> Thanks, John
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




i18n

2002-06-18 Thread Carlos Fernandez



Does anyone know how 
to get the data stored in "value" from de action class?
 
 pageproperty="buttonEditImage" altProperty="buttonEditText" property="action" value="Edit_Coverage" border="0"/>
 
 
Thanks
 
 
-Carlos.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: Cannot Find Bean?

2002-06-18 Thread Eiring Tim

Keith,
You are exactly right, you need to specify the scope of the bean that
you are iterating through. 

Ex:


You will also need to specify scope on your:



 -Tim

Timothy Eiring
Consultant
Greenbrier and Russel, Inc.
250 N. Sunny Slope Road
Suite 375
Brookfield, WI 53005

office: 262.780.3400
fax: 262.780.3410
cell: 414.732.9986
www.gr.com

>>> [EMAIL PROTECTED] 06/18/02 09:15AM >>>
Here is some of the code:

Code from display JSP:
(Similar code contained for my MassChange bean and TWCMC bean)

Mass Delete Detail Information:
Add






Struts-config:

















(BLAH BLAH BLAH.)





I know I could have combined the actions, but the way the app is set up
I
need to use separate beans for each form.  The problematic beans are
mcItems, mdItems, and twcmcItems.  HeaderBean works fine.  I don't
suppose I
could specify a scope in my form-bean declaration could I?
Thanks in advance for any help

~ Keith


-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 18, 2002 10:07 AM
To: Struts Users Mailing List
Subject: RE: Cannot Find Bean?


Can you send a few snips of your action-mapping and formbean from
struts-config?

Also the jsp code that's trying to access the bean.

Thx

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org 

> -Original Message-
> From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, June 18, 2002 9:58 AM
> To: Struts (E-mail)
> Subject: FW: Cannot Find Bean?
>
>
> I just found out that all 3 beans I referred to in my original
> message cause
> the same error message at the same point.  My main bean that is
> used for the
> form works fine though.  I don't think I did anything different
> with it than
> I did with the 3 problematic ones.
> !!!
> I think the computer is going out the window  :-)
>
>
>
> -Original Message-
> From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, June 18, 2002 9:29 AM
> To: Struts (E-mail)
> Subject: Cannot Find Bean?
>
>
> Hi everyone,
>   I'm having a little bit of trouble with one of my beans.  I
> have 3 nearly
> identical beans, with a few different properties.  They are all
clearly
> defined in my struts-config.  I submit a form which corresponds to a
4th
> bean, and if a certain checkbox is checked, some output is
> printed from one
> of the 3 beans.  If I try to access my "twcmcItems" bean, I get an
error
> that says:
> X Servlet Error: Cannot find bean twcmcItems in scope null:
> javax.servlet.jsp.JspException: Cannot find bean twcmcItems in scope
null
>
> Are there any common mistakes that I should check for?  I'm sure you
don't
> have enough info to know why it's not working, but I'm not even sure
where
> to look for a mistake.  Thanks for any help!
>
> Keith Kamholz
> Moog
> East Aurora, NY
> (716) 687-7282
> [EMAIL PROTECTED] 
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:  

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tiles definition problem

2002-06-18 Thread Dave Peckham

Hi all,

I'm trying to use the Tiles definitions to define my
pages, and not have JSP pages assembling the tiles. I
can get Tiles to recognize a named definition for the
header element, but I can't get it to use a named
definition for the main page (the action forward). See
the files below. If I set the forward for "input1" to
wiz1.jsp, then it works fine. But I want to use the
definition "wiz1" and avoid having a wiz1.jsp. When I
set the action forward to "wiz1" I get a file not
found error.

Things are basically working since the header
definition works. But the page definition isn't.

Ideas?

Thanks,

Dave

--
tiles-defs.xml:
http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>




















--
wiz1.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>









-
struts-config.xml:












__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Dynamic tags in HTML form

2002-06-18 Thread Scott Carlson

Joel, this is what I have.
I have a viewbean in request scope called createaccount, it has two methods,
getAccountTypesKeys(), and getAccountTypes(), that return keys and values for
the select box.  This can be done with a single collection, and also with a
map.


Select Type



> From: "Joel Baker" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: Dynamic  tags in HTML form
> Date: Tue, 18 Jun 2002 14:47:30 +0100
> 
> Hi there,
> 
> I am trying to create a form in Struts that displays to the user a
> multi-select form element whose contents (ie:  tags) are pulled from
> a SQL database over JDBC.
> 
> ie:
> 
>   
>   
>   Joel Baker
>   Fred Flinstone
>   Foo Bar
>   
>   
> 
> but with the contents of the option tags dynamically created.
> 
> I have searched the docs and have come across things like options (
> http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options ) as
> well as mumblings about dynamic properties, but none of these appears to
> make any sense.
> 
> I suppose I could just write a bean that is included in my JSP file to query
> the database in its constructor and then to call some function of this bean
> to write out all the  tags, but this was precisely how I used to do
> this sort of thing in Model 1 JSP. How should this problem be approached in
> Model 2?
> 
> Many thanks for any help,
> 
> Joel Baker.


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Problem in configuring struts for Weblogic 5.1 sp7.

2002-06-18 Thread Agrawal, Rajeev

Hi

I was trying to install struts framework on weblogic 5.1sp7. However, I kept
getting an error which I have pasted below. Not sure which component is
trying to go to the internet and because we are behind a firewall it is
failing.
java.net.UnknownHostException: java.sun.com
at java.net.InetAddress.getAllByName0(InetAddress.java:575)
at java.net.InetAddress.getAllByName0(InetAddress.java:544)
at java.net.InetAddress.getAllByName(InetAddress.java:537)
at weblogic.net.http.HttpClient.openServer(HttpClient.java, Compiled
Cod
e)
at weblogic.net.http.HttpClient.openServer(HttpClient.java:221)
at weblogic.net.http.HttpClient.(HttpClient.java:85)
at weblogic.net.http.HttpClient.New(HttpClient.java:117)
at
weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:97
)
at
weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.
java, Compiled Code)
at com.sun.xml.parser.Resolver.createInputSource(Resolver.java:253)
at
com.sun.xml.parser.ExternalEntity.getInputSource(ExternalEntity.java:
49)
at com.sun.xml.parser.Parser.pushReader(Parser.java:2748)
at
com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2500)
at com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1136)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:480)
at com.sun.xml.parser.Parser.parse(Parser.java:283)
at weblogic.xml.dom.SunDOMParser.getDocument(SunDOMParser.java:69)
at weblogic.xml.dom.DOMParser.getDocument(DOMParser.java:81)
at
weblogic.servlet.internal.dd.DescriptorLoader.(DescriptorLoader
.java:214)
at weblogic.t3.srvr.HttpServer.loadWARContext(HttpServer.java:648)
at weblogic.t3.srvr.HttpServer.initServletContexts(HttpServer.java,
Comp
iled Code)
at weblogic.t3.srvr.HttpServer.start(HttpServer.java:442)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java, Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)

Mon Jun 17 17:48:01 EDT 2002:  Error creating servlet context for
Web a
pplication 'c:/weblogic/myserver/struts/'
java.lang.NullPointerException
at weblogic.t3.srvr.HttpServer.initServletContexts(HttpServer.java,
Comp
iled Code)
at weblogic.t3.srvr.HttpServer.start(HttpServer.java:442)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java, Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)

Mon Jun 17 17:48:01 EDT 2002:  ZAC ACLs initialized

Cheers

Rajeev Agrawal
Tel: 212-429-3216



If you have received this e-mail in error or wish to read our e-mail disclaimer 
statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or 
contact the sender.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Forms and editing FormFiles

2002-06-18 Thread John Nicholas

I have a file upload field in a form. I was adapting the form to handle 
editing existing entries and ran into a stumbling block. When bringing 
up a pre-populated form that has a file upload field how should I handle 
it? Do I need to load the formfile in the bean? Then what?

Example:
Let's say I have form to add people and thier pictures to an app
Name: _ <-- reg text input
Picture: _ [Browse] <-- file upload

Now when I bringing this up to edit it and prepopulating from an action
Name: John
Picture: __ <-- what should show here? just the file name?

 It seems wasteful to load the image into  the actionform when usually 
I'm not editing it plus I'm not sure the best way to do that. (Any one 
have sample code for loading a FormFile object from a file?)  Maybe not 
on little web gifs but what about a form where people are uploading 
large pdfs. I don't want to force people to reupload everytime. In my 
real app the people editing it later are not usually going to be the 
people who uploaded the binary files. What is the standard behavior for 
this?

Thanks, John


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >