RE: simple question

2003-09-08 Thread Siggelkow, Bill
What you are doing should be fine (as long as your collection is not too terribly big).
You use an ActionForm when you want to collect input from the user.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, September 08, 2003 9:45 AM
To: [EMAIL PROTECTED]
Subject: simple question


Hi all,

I think I have a relative easy question.

I have a J2EE application which has some entitybeans. I want to display 
the values of these entitybeans in my JSP pages (using Struts).
I have made value objects of the entitybeans. 

In my ListAllCategoriesAction.java, I do something like the following:

Collection allCategories = mySessionFacade.getAllCategories();
DisplayBean displayBean = new DisplayBean();
displayBean.setCategories(allCategories);
request.setAttribute("categories", displayBean);
return mapping.findforward( SUCCESS );

As you can see I'm using a special bean (displayBean) to pass the 
categories to my JSP page. In my JSP page I use the  tags 
to iterate through te collection and display the proper information.

Is this a normal / good approach? Or do I have to use ActionForm classes 
for this purpose?

Thanks a lot,

Harm de Laat
Informatiefabriek
The Netherlands



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

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



RE: Combining struts and JSTL tags...

2003-09-05 Thread Siggelkow, Bill
Basically, any of the struts tags that are "struts-aware" were not eliminated from 
Struts-EL -- specifically, the bean:message tag was not eliminated because it 
specifically looks in the application resources as specified in struts-config.  The 
 can be made to look into that bundle but it
does not by default the way the  tag does.  You might want to take a 
look at the 
my presentation http://www.jadecove.com/articles/jstl-and-struts.pdf to the Atlanta 
Struts User Group.

In addition, be sure and read the readme file in the contrib/struts-el folder.

-Original Message-
From: Jarnot Voytek Contr AU HQ/SC [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 2:08 PM
To: 'Struts Users Mailing List'
Subject: RE: Combining struts and JSTL tags...


fmt:message

> -Original Message-
> From: Paananen, Tero [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2003 1:07 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Combining struts and JSTL tags...
> 
> 
> > > I am using the "html" library from struts, otherwise use JSTL 
> > > libraries for my other requirements. I was curious if anybody 
> > > uses both these tag libraries together ? If so, which ones do 
> > > you use from which library and why ? Also, is there any 
> > > document/article comparing the 2 tag libraries ?  
> > 
> > The Struts web site recommends that you use JSTL instead of 
> > the bean and logic taglibs.
> 
> I don't think there's an equivalent of the bean:message
> tag in JSTL, if you want to continue using the
> MessageResources mechanism.
> 
> So it's JSTL instead of bean and logic, except for
> bean:message?
> 
>   -TPP
> 
> -
> This email may contain confidential and privileged material 
> for the sole use of the intended recipient(s). Any review, 
> use, retention, distribution or disclosure by others is 
> strictly prohibited. If you are not the intended recipient 
> (or authorized to receive for the recipient), please contact 
> the sender by reply email and delete all copies of this 
> message.  Also, email is susceptible to data corruption, 
> interception, tampering, unauthorized amendment and viruses. 
> We only send and receive emails on the basis that we are not 
> liable for any such corruption, interception, tampering, 
> amendment or viruses or any consequence thereof.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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

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



RE: Combining struts and JSTL tags...

2003-09-05 Thread Siggelkow, Bill
Pady -- generally, there is very little overlap between JSTL and the Struts HTML tags.
There are no JSTL tags that do the work that the Struts html tags do ... that being 
said, I 
encourage you to use the html-el library (basically the Struts html tags which support 
EL)
so you have the full power of EL for the HTML tags as well as the JSTL tags.

Good Luck!

-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:58 PM
To: [EMAIL PROTECTED]
Subject: Combining struts and JSTL tags...




I am using the "html" library from struts, otherwise use JSTL libraries for
my other requirements. I was curious if anybody uses both these tag
libraries together ? If so, which ones do you use from which library and why
? Also, is there any document/article comparing the 2 tag libraries ?  



Thanks
 
-- pady
[EMAIL PROTECTED]
 


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

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



RE: How to forward back to including page

2003-09-04 Thread Siggelkow, Bill
FYI -- I figured out what seems to be a decent solution to my problem.  Basically, I 
included two
hidden fields in my login form (that is part of the included page) as follows (I am 
using struts-el)-




Then in my action that processes the login form I do the following:

public ActionForward execute(...
{
  // check credentials ...

  String url = ... /// get the originalUrl from the dyna form
  String query = ... /// get the originalQuery from the dyna form

  StringBuffer redirectUrl = new StringBuffer(url);
  if (query != null && !"".equals(query)) redirectUrl.append('?').append(query);

  response.sendRedirect(redirectUrl);
  return null;
}


-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 9:13 AM
To: 'Struts Users Mailing List'
Subject: RE: How to forward back to including page


Well, the problem is that I am including this fragment in *all* of my pages.  (The 
form allows the user
to login -- otherwise, the user is a "guest").
Basically, I want the "forward" of the action that processes the form to not be 
"hard-coded"
to a specific path but instead to the page that included it (actually to be more 
precise from the current URL).
Here is a visualization of what I want to do:


   importedForm.jsp --submit--> login.do 
--redirect-->ActionA.do
|
ActionA.do --forwards--> PageA.jsp


ActionB.do --forwards--> PageB.jsp
|
  importedForm.jsp --submit--> login.do --redirect-->ActionB.do


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

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

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



RE: How to forward back to including page

2003-09-04 Thread Siggelkow, Bill
Well, the problem is that I am including this fragment in *all* of my pages.  (The 
form allows the user
to login -- otherwise, the user is a "guest").
Basically, I want the "forward" of the action that processes the form to not be 
"hard-coded"
to a specific path but instead to the page that included it (actually to be more 
precise from the current URL).
Here is a visualization of what I want to do:


   importedForm.jsp --submit--> login.do 
--redirect-->ActionA.do
|
ActionA.do --forwards--> PageA.jsp


ActionB.do --forwards--> PageB.jsp
|
  importedForm.jsp --submit--> login.do --redirect-->ActionB.do

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 4:55 PM
To: Struts Users Mailing List
Subject: Re: How to forward back to including page


I'm a little confused, but when you submit the form the target should be an
action and couldnt you just do the processing within that action and if its
successful forward back to the page that includes the form?

- Original Message - 
From: "Siggelkow, Bill" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 03, 2003 2:19 PM
Subject: How to forward back to including page


> I have an included page (included using ) that contains a form.
If the form processes successfully I want to return
> back to the original including page.  Is there a clean way of doing this?
The problem I have is that my action for the included page
> does not know anything about the page that includes it.  Maybe I could use
pass a request attribute that specifies the original URL or action?
> Any ideas?
>
> Bill Siggelkow
> 678.579.6458
> Mirant
> http://www.mirant.com
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

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



RE: Help me get my boss of my back

2003-09-04 Thread Siggelkow, Bill
It has nothing directly to do with Struts, but I have used Analog 
(http://www.analog.cx) with good success.

-Original Message-
From: Carl-Jakob [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 8:31 AM
To: [EMAIL PROTECTED]
Subject: Help me get my boss of my back


Hi,

 

We have put up websites for some customers despite I said no. nooo...
although now he has started bugging me about stats(5 min after they did go
live). Is there any tool for analyzing the accesslogs made in struts. Need
to be a webbased tool or I never be left alone for doing import developing.


 


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



How to forward back to including page

2003-09-03 Thread Siggelkow, Bill
I have an included page (included using ) that contains a form.  If the form 
processes successfully I want to return
back to the original including page.  Is there a clean way of doing this?  The problem 
I have is that my action for the included page
does not know anything about the page that includes it.  Maybe I could use pass a 
request attribute that specifies the original URL or action?
Any ideas?

Bill Siggelkow
678.579.6458
Mirant
http://www.mirant.com


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



RE: [newbie] Connection Pooling

2003-02-13 Thread Siggelkow, Bill
Michael, 
  You certainly can write a connection factory class that provides getConnection type 
methods -- I do this all the time to abstract the different ways of doing connection 
pooling -- sometimes I am using DataSources -- other times not.  However, you should 
just use a regular class for this that is *not* stored in the session -- perhaps even 
a singleton or utility class.  Unless the connection pool configuration is 
user-specific I see no reason to store this object in the session.

Let me know if this makes sense to you or if I do not fully understand your 
circumstances.

-Original Message-
From: Michal Postupalski [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 5:55 PM
To: Struts Users Mailing List
Subject: Re: [newbie] Connection Pooling


On 2/12/2003 11:20 PM, Guido wrote:
> IMHO, storing the connection in the session context is *never* a good
> idea!
> 
> 1. Session timeout uses to be too high if you must wait the session to
> expire to close your connection (the user closes the browser...)
> 2. You can kill your DB or you app server...  And think about how many
> connections would you need if your application has i.e. 3 hits/day?
> You should use a connection pool.
 >
> } Yes, it's a good idea. I use it sometimes but only when I have only one
> } database's user. If You use more database's users to connect to database
> } I wouldn't used connection pooling.
> }
> } plastic

Ups..I didn't express corectly. I mean I keep in the session context 
  not certain connection but object which provides connection pooling. I 
have i.e. static method getConnection() which returns next connection 
from the pool.

plastic


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

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




RE: [newbie] Connection Pooling

2003-02-12 Thread Siggelkow, Bill
Andre ... this is not connection pooling -- but rather keeping a connection open.
Yes it can be done ... however, HTTP is not a reliable connection and there is a good 
chance that your connection will get left open.

However, it is time consuming to always have to open/close connections -- hence, the 
answer is connection pooling.  If you are using a J2EE container that supports 
connection pooling (most do) you can use the connectors mechanisms for defining the 
connection pool.  If not, you can use the Struts data-source elements which use the 
Commons DBCP package.

-Original Message-
From: Andre Michel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 3:53 PM
To: Struts Users Mailing List
Subject: [newbie] Connection Pooling


Folks,

quite new to Struts and it's way to JPS-Action-etc. chaining I'd like to
know the following. Is their a way to keep open a certain connection to
a database between two actions, e.g. I have a EditGetAction where I
prepopulate a form, then show the jsp and make the user work and finally
after validation write the (maybe) changed fields back into the database
???

Hope, this is not a absolutely stupid question ...


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

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




Incorrect assumption with logic:present role attribute

2003-02-12 Thread Siggelkow, Bill
I have an app where I have created my own RequestProcessor to override the 
processRoles functionality.  Specifically, my roles take into account certain session 
information.  This works as expected and properly handles the 'roles' attribute in my 
action mappings.  However, I naievly (sp?) made the assumption that the role attribute 
of the logic:present tag would use this same functionality -- but it doesn't.  It 
seems that the  only does a 
request.isUserInRole("somerole") -- it seems to me that if I override the processing 
of roles it should affect both the action mappings as well as the logic tags (and any 
other Struts tags) that use the 'role' attribute.  Has this been considered?

Bill Siggelkow
678.579.6458
Mirant
http://www.mirant.com


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




RE: Precompiling JSPs

2003-01-13 Thread Siggelkow, Bill
Some containers support a container-specific flag for precompiling.  As I recall you 
can do with this weblogic without having to declare all your JSPs in the web.xml.  Of 
course, I would not do this in development mode as it will take a long time for server 
restarts!

-Original Message-
From: William W [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 3:01 PM
To: [EMAIL PROTECTED]
Subject: Precompiling JSPs



Hi All,

My app has more than 2,000 JSPs. I can precompile my JSP and map it into the 
web.xml file. But I think that it would become a little big.

Sugestions ???

Thanks,

William.






_
The new MSN 8 is here: Try it free* for 2 months 
http://join.msn.com/?page=dept/dialup


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

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




RE: One way of writing BaseAction

2003-01-13 Thread Siggelkow, Bill
Isn't this similar to what the Dispatch action does?

-Original Message-
From: Chan, Charles [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 10:18 AM
To: 'Struts Users Mailing List'
Subject: One way of writing BaseAction


Hi, I just want to share with you my base action class implementation. I use
reflection to avoid putting .. logic in the execute() method. I
am not sure if somone has done this before, so I want to share fragement of
my codes here and ask for opinions.

I have used it to implement a simple site and am quite happy with it.

Let me know what you think or if you find it useful. :)

Cheers
Charles


/**
 * This class is an abstract Struts Action class that all
 * Action  classes should extend. A typical Action class
 * handles multiple actions (requests). For example, a EmailAction class
should
 * be able to handle all actions related to Emails (sending, replying,
viewing,
 * etc.). To avoid cluttering the execute method with
if...
 * else block, this base Action class calls individual
doXXX
 * methods in the derived class to perform the specific action. The exact
name
 * of the method (the XXX) is defined as a parameter in the
Action
 * mapping section of struts- config.xml.
 * 
 * An example of struts-config.xml for a EmailAction:
 * 
 * Calls EmailAction.doNew() when /email/new.do is requested.
 * 
 * 
 *   
 * 
 * 
 * 
 * Calls EmailAction.doView() when /email/view.do is requested.
 * 
 * 
 *   
 * 
 * 
 */

public abstract class BaseAction extends Action
{
/**
 *  Our default implementation. If parameter is specified in
ActionMapping,
 *  we will do the new processing mode and call the method
 *  "String doParameter()", e.g. if parameter is "edit", "String
doEdit()"
 *  is executed. The return String of that method is used to find the
 *  ActionForward from the mapping.
 *
 *  If no such parameter is found, we'll write some debugging
information
 *  to the response to let the programmer know that he forget to
 *  implement the perform() method.
 */
public final ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception
{
boolean hasForm = (form != null);

/* Use our custom Request object to protect access to
HttpServletRequest */
Request req = new Request(request);

String mode = mapping.getParameter();

// invoke "doMode() with custom request object (using MethodUtils)
// based on hasForm, we can either invoke doMode(req) or doMode(req,
form)
}
}

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

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




RE: Where to do the "request.setAttribute"code for iterate, select collection bean

2003-01-10 Thread Siggelkow, Bill
Actually, "request.getSession().setAttribute("intArray",intArray);" will place the 
object in Session scope, not request scope.

As far as where to load the collection into the request scope -- I would say either do 
in in the Action that forwards to the JSP -- if you have one.   Or use a standard 
jsp:useBean tag in the JSP to make the collection available.

-Original Message-
From: Jean-Pierre Romeyer [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 10:58 AM
To: 'Struts Users Mailing List'
Subject: Where to do the "request.setAttribute"code for iterate, select
collection bean


Hello,

To use the iterate, select, ...   I want to put a collection bean in the 
request scope
so the java code is 
"request.getSession().setAttribute("intArray",intArray);"

OK I make it works, but I've got a newbie architecture question


Accordind to struts philosophy but where to put this java code ???

- in the jsp : not really nice , specially if I have to do somme request 
to build the collection
- in the action form reset method : work the first time when the Form bean 
is created but not during folowing jsp  access
- in the action : but must do in every action doing forward to this form
- other 

Thanks

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

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




RE: Getting the full path of the context from within an Action class

2003-01-10 Thread Siggelkow, Bill
In answer to your first question, you do not have to write your own ClassLoader -- the 
Class object will load the resource using its ClassLoader -- in other words in your 
Action you would have ...

InputStream xmlStream = this.getClass().getResourceAsStream("/resources/xyz.xml");

I don't know the answer to the second question -- I guess it depends on how are you 
planning on parsing the XML.  If you are using Digester I suggest starting with 
http://jakarta.apache.org/commons/digester.html - there are links to the API 
documentation as well as a couple of good online articles.

-Original Message-
From: Simon Kelly [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 10:47 AM
To: Struts Users Mailing List
Subject: Re: Getting the full path of the context from within an Action
class


Cool.

Looks like the thing I'm after. But I have a couple of questions.

Will I have to write the ClassLoader for this?  If so, do you know of any
examples I could have a look at?
Will the fact that the .xml file has recursive tags ( ie I can have
) in the structure cause any major headaches in turning this
into a loaded bean?

Cheers

Simon

- Original Message -----
From: "Siggelkow, Bill" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 4:29 PM
Subject: RE: Getting the full path of the context from within an Action
class


> Simon,
>You should load this resource using the Class object.  Take a look at
the following:
>
>
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Class.html#getResourceAsSt
ream(java.lang.String)
>
> -Original Message-
> From: Simon Kelly [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 10:19 AM
> To: Struts Users Mailing List
> Subject: Re: Getting the full path of the context from within an Action
> class
>
>
> Thanks Geir,  that was quite useful to know.
>
> What I am trying to do is read in a .xml file from the classes/resources
> directory in an Action class and then to load a bean with it's contents.
I
> have had a look at the ResourceBundle class, but I can't see if that would
> be of any use to me.
>
> Any thoughts??
>
> Cheers, and thanks again,
>
> Simon.
>
> - Original Message -
> From: "Arnesen, Geir" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, January 10, 2003 3:44 PM
> Subject: SV: Getting the full path of the context from within an Action
> class
>
>
> If you ned the path for the WEB-INF, - use a servlet, - which is loaded
> before the struts, by configuring it in the WEB.XML.
>
> In the servlet you execute...
> public static String directory =
> getServletContext().getRealPath("conf");
>
> This returns the physical location of the WEB-INF. You get the location
> from the action classes by accessing the servlet' static variable.
>
> Geir
>
>
>
> -Opprinnelig melding-
> Fra: Simon Kelly [mailto:[EMAIL PROTECTED]]
> Sendt: 10. januar 2003 15:24
> Til: Struts Users Mailing List
> Emne: Getting the full path of the context from within an Action class
>
>
> Hi,
>
> Which would be the better and more portable solution for getting the
> actual path of the API context from within a
> org.apache.struts.action.Action class?
>
> I am looking at either using
> mapping.getPath()
> or
> request.getContextPath()
>
> Are either of these going to give me an absolute (ie
> C:\xxx\yyy\WEB-INF\) path to the context on the local machine?  Or will
> it be a relative URL?
>
> Cheers
>
> Simon
>
> Institut fuer
> Prozessdatenverarbeitung
> und Elektronik,
> Forschungszentrum Karlsruhe GmbH,
> Postfach 3640,
> D-76021 Karlsruhe,
> Germany.
>
> Tel: (+49)/7247 82-4042
> E-mail : [EMAIL PROTECTED]
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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

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




RE: Getting the full path of the context from within an Action class

2003-01-10 Thread Siggelkow, Bill
Simon,
   You should load this resource using the Class object.  Take a look at the following:

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Class.html#getResourceAsStream(java.lang.String)

-Original Message-
From: Simon Kelly [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 10:19 AM
To: Struts Users Mailing List
Subject: Re: Getting the full path of the context from within an Action
class


Thanks Geir,  that was quite useful to know.

What I am trying to do is read in a .xml file from the classes/resources
directory in an Action class and then to load a bean with it's contents.  I
have had a look at the ResourceBundle class, but I can't see if that would
be of any use to me.

Any thoughts??

Cheers, and thanks again,

Simon.

- Original Message -
From: "Arnesen, Geir" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 3:44 PM
Subject: SV: Getting the full path of the context from within an Action
class


If you ned the path for the WEB-INF, - use a servlet, - which is loaded
before the struts, by configuring it in the WEB.XML.

In the servlet you execute...
public static String directory =
getServletContext().getRealPath("conf");

This returns the physical location of the WEB-INF. You get the location
from the action classes by accessing the servlet' static variable.

Geir



-Opprinnelig melding-
Fra: Simon Kelly [mailto:[EMAIL PROTECTED]]
Sendt: 10. januar 2003 15:24
Til: Struts Users Mailing List
Emne: Getting the full path of the context from within an Action class


Hi,

Which would be the better and more portable solution for getting the
actual path of the API context from within a
org.apache.struts.action.Action class?

I am looking at either using
mapping.getPath()
or
request.getContextPath()

Are either of these going to give me an absolute (ie
C:\xxx\yyy\WEB-INF\) path to the context on the local machine?  Or will
it be a relative URL?

Cheers

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [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: 




RE: Struts application on jboss/jetty

2003-01-10 Thread Siggelkow, Bill
It looks like JBoss has already loaded an old Digester or you have an old copy of 
Commons in your WEB-INF.

-Original Message-
From: Danilo Luiz Rheinheimer [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 10:26 AM
To: Struts Users Mailing List
Subject: Struts application on jboss/jetty


Hello,

  I have a struts working fine on tomcat standalone.
  But when I try to deploy it to JBoss 3.2 with integrated Jetty it
fails.
  This is the error log :

2003-01-10 12:17:43,595 ERROR [org.apache.struts.action.ActionServlet] Parsing error 
processing resource path /WEB-INF/struts-config.xml
java.lang.NoSuchMethodError: org.apache.commons.digester.Rule: method ()V not 
found
at 
org.apache.struts.config.AddDataSourcePropertyRule.(ConfigRuleSet.java:286)
at 
org.apache.struts.config.ConfigRuleSet.addRuleInstances(ConfigRuleSet.java:113)
at org.apache.commons.digester.Digester.addRuleSet(Digester.java:1250)
at 
org.apache.struts.action.ActionServlet.initConfigDigester(ActionServlet.java:1211)
at 
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:923)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219)
at 
org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:422)
at 
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:142)
at 
org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:490)
at 
org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85)
at org.jboss.jetty.Jetty.deploy(Jetty.java:368)
at org.jboss.jetty.JettyService.performDeploy(JettyService.java:243)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:636)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:600)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy7.deploy(Unknown Source)
at 
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:400)
at 
org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:619)
at 
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:472)
at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:195)
at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:206)
at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:185)
2003-01-10 12:17:43,605 INFO  [org.jboss.jbossweb] Stopped 
WebApplicationContext[/SigeaWeb,jar:file:/C:/prg/jboss/server/default/tmp/deploy/server/default/deploy/SigeaWeb.war/46.SigeaWeb.war!/]
2003-01-10 12:17:43,605 INFO  [org.jboss.jbossweb] Deregister 
jboss.web:Jetty=0,JBossWebApplicationContext=2,context=/SigeaWeb
2003-01-10 12:17:43,605 INFO  [org.jboss.jbossweb] Successfully undeployed 
file:/C:/prg/jboss/server/default/tmp/deploy/server/default/deploy/SigeaWeb.war/46.SigeaWeb.war
2003-01-10 12:17:43,605 DEBUG [org.jboss.util.NestedThrowable] 
org.jboss.util.NestedThrowable.parentTraceEnabled=true
2003-01-10 12:17:43,605 DEBUG [org.jboss.util.NestedThrowable] 
org.jboss.util.NestedThrowable.nestedTraceEnabled=false
2003-01-10 12:17:43,605 DEBUG [org.jboss.util.NestedThrowable] 
org.jboss.util.NestedThrowable.detectDuplicateNesting=true
2003-01-10 12:17:43,605 ERROR [org.jboss.deployment.MainDeployer] could not start 
deployment: file:/C:/prg/jboss/server/default/deploy/SigeaWeb.war
org.jboss.deployment.DeploymentException: Parsing error processing resource path 
/WEB-INF/struts-config.xml; - nested throwable: (javax.servlet.UnavailableException: 
Parsing error processing resource path /WEB-INF/struts-config.xml)
at org.jboss.jetty.Jetty.deploy(Jetty.java:390)
at org.jboss.jetty.JettyService.performDeploy(JettyService.java:243)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDepl

RE: Checking for the existence of errors

2003-01-10 Thread Siggelkow, Bill
If you are Struts 1.1 you can use the  tag.

-Original Message-
From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 9:37 AM
To: Struts Users Mailing List
Subject: Checking for the existence of errors


Hi all,

Is there an elegant way using Struts / JSTL tags to tell if any errors are
stored in the ActionErrors object before calling  or even
?  If  is going to display
something, then I want to put a special header on it.  The default
errors.header is insufficient for what I'm doing.

I could write my own tag, but before doing so I just want to make sure I'm
not reinventing the wheel.

Thanks,

Justin


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

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




RE: turning form parameters into queries

2003-01-10 Thread Siggelkow, Bill
Heather,
In my opinion, the approach you are taking is not separating out your logic 
appropriately.  In fact, it sounds like your are binding your persistence layer 
(database columns) all the way up to the presentation layer (your action forms).  A 
better approach is to separate the model (data) from the view (presentation).  Let 
your action classes (controller) marshall data from the database to the action forms.  
The BeanUtils classes can ease this activity.

Typically what I have are the following:

ActionForms (or DynaActionForms) that represent the form fields
Actions that get the forms and then create business objects from these forms.
At this point I may pass that business object to a Service layer (like a Manager 
object)
The manager object interacts with a DAO (data access object) that performs the actual 
JDBC stuff.

It really is a question of appropriate assigment of responsibilities.

I suggest you read throught the Struts User Guide as well as check out some of the new 
Struts books that are available. 

-Original Message-
From: Heather Buch [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 4:24 AM
To: [EMAIL PROTECTED]
Subject: turning form parameters into queries


Hi all,

Finding a good method to create SQL queries out of html form parameters 
is something I've struggled with for some time now. Is there a good or 
recommended way of doing this? For that matter, is there a "best 
practice" for making SQL queries in struts?

I use a mysql database backend for my struts application. In the 
browser, the user selects some choices from an html form. My Action 
classes collect the information that the user has chosen out of my form 
bean, pretty standard.

The Action class then sends that info back to a corresponding 
BusinessLogic class (BusinessLogic classes reside in a package that does 
not know about struts or servlets, but correspond roughly one 
BusinessLogic class to one Action class).

The BusinessLogic class needs to take those form parameters and create a 
list of "QueryParam" objects, which are then sent to a "SQLMaker" class 
where they are used to build constraints (the stuff after "WHERE" in the 
query) for SQL queries.

In my BusinessLogic classes, I have this method which gets called by my 
Action class:

public void setQueryParams(String querytype, String fieldname, List 
parameters)


The "QueryParam" class is basically just a bean that I iterate through 
when I build the constraint part of the query. It contains these fields:

protected List _values = null;
protected int _datatype = -1;
protected String _colname = null;
protected String _tablename = null;
protected String _singlevalue = null;

xThere are a couple of problems with this.

First, every BusinessLogic class (and there are many because they 
correspond to Action classes) has the information about the form fields, 
and the database struture info that maps to it, hard-coded. Instead of 
being able to create this method once and for all in a superclass of my 
BusinessLogic classes, I have to rewrite this method for every 
BusinessLogic class, because the subclassed BusinessLogic class knows 
about the Action class that calls its "setQueryParams", and therefore 
what html form fields that Action class will use and how they will be 
mapped. That also means that every time I change a form field name, I 
have to make the change in my BusinessLogic class as well.

Which classes should know what? It seems that either my form bean needs 
to know enough to be able to name form fields after database columns, or 
my business logic classes need to know the name of the html form fields, 
and how they map to database column information, to make the constraints.

Would it make sense to cache a copy of the database struture in the 
struts application, and add all the form field mappings to that? Or is 
there a rule for writing html form fields to go into a database (like, 
"html form fields must be named after database columns").

Somewhere the mapping from form field to database column name, and then 
the addition of other information needed to make the QueryParam (and 
therefore the query), needs to be done, (and it would be nice if the 
method could only appear once in the application), but I'm not sure I 
know where.


Thanks,

Heather M. Buch




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

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




RE: Accessing .properties resources from within an action class.

2003-01-10 Thread Siggelkow, Bill
Can you give more details on what you are trying to do and why?  Java classes can 
certainly read in property files during runtime.  Read the JavaDocs on the 
java.util.Properties class for details on how to load properties.

-Original Message-
From: Simon Kelly [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:05 AM
To: Struts Users Mailing List
Subject: Accessing .properties resources from within an action class.


Hi,

I have had a look through as much of the examples as I can find on the web
but I have not seen anywhere where the information for a bean is kept in a
resource file and then loaded in using an action class.

Is it possible within struts to do this, or is there another better method,
and does anyone know of an example I could look at?

Regards

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]


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

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




RE: Dynamic Forms Problem

2003-01-10 Thread Siggelkow, Bill
Use square brackets '[' instead of parenthesis when you build the 'name' like:

<% for (int i=0; i<10; i++) {
String name = "value(" + i + ")";
%>

<%
}
%>

-Original Message-
From: ashokd [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 5:37 PM
To: Struts Users Mailing List
Subject: Dynamic Forms Problem


MessageHi,

In my application the form fields are dynamic.
For this functionlity in FormAction class I defined the following code:

private final List values = new ArrayList();

public void setValue(int key, Object value) {
values.set(key, value);
}

public Object getValue(int key) {
return values.get(key);
}


How to define these controls in JSP page?


I defined like below:

<% for (int i=0; i<10; i++) {
String name = "value(" + i + ")";
%>

<%
}
%>


But it is throwing exception:

No getter method for property value(0) of bean 
org.apache.struts.taglib.html.BEAN: javax.servlet.jsp.JspException: No getter method 
for property value(0) of bean org.apache.struts.taglib.html.BEAN

Can any one help on this (How to set in JSP page)

Thanks in Advace,

Ashok.D


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




RE: Validator Question

2003-01-10 Thread Siggelkow, Bill
Doesn't the 'required' validation rule do this?

-Original Message-
From: Suresh Addagalla [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 12:37 AM
To: [EMAIL PROTECTED]
Subject: Validator Question


Hi,
 
I need to validate that the user does not enter only spaces in a particular text 
field. Validator framework doesn't seem to providing any validation directly to 
achieve this. Do I need to write custom JavaScript, or is something already available?
 
Thanks,
Suresh


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




RE: String Array

2003-01-09 Thread Siggelkow, Bill
Try using the indexed attribute of the html:text tag.



-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 10:13 AM
To: Struts Users Mailing List
Subject: String Array


I'm trying to populate a table with some data from a collection and a 
column with a text field do enter data in.
I'm trying to make the field in that column a String array but it does 
not seem to be working?


  

  


  

  
  

it does not like the i inside the array but I don't know any other way 
to do it cause I don't know the size of the array until I get the 
collection?

Any ideas?

-Thanks Gus


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

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




RE: value="" question

2003-01-08 Thread Siggelkow, Bill
Oops!  There I go again showing my lack of knowledge -- one of these days I will learn 
everything there is :^)  I have gotten so used to always using the Struts html tags 
that I thought there was some magic going on that wasn't.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 3:59 PM
To: [EMAIL PROTECTED]
Subject: RE: value="" question


No, it will still be set.

Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] 
Sent: January 8, 2003 3:55 PM
To: 'Struts Users Mailing List'
Subject: RE: value="" question

You are right, Paul -- sorry for the confusion.  Another important point is
if you use the  tag versus the struts
 tag the value will not be set automatically based on
properties of the form bean.

-Original Message-
From: Paul Linden [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 3:01 PM
To: Struts Users Mailing List
Subject: Re: value="" question


" />
is just text with a custom tag in the middle. There's nothing special 
about 

 is a custom tag that has to be evaluated before the 
response is even sent.

It would have been more accurate for Bill to say that you can't have a 
tag as the value of an attribute in a *custom* tag.

Paul

Vijay Balakrishnan wrote:

>Hi,
>
>Thanks for your replies.I looked at an example in the "Struts In action"
>book and so I tried this and it worked:
>
>property="section.name"/>" />
>
>After all,by the time it gets to the browser,its all the same.
>
>
>Vijay
>
>
>
>You could use:
>
>
>
>... value="<%= myId%>" ..
>
>
>-Original Message-
>From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 08, 2003 5:36 AM
>To: 'Struts Users Mailing List'
>Subject: RE: value="" question
>
>
>You cannot use a tag as a value of an attribute in a tag -- you need to use
>a Runtime Expression (or expression language if you are using JSTL) as in
>the following:
>
>
>
>-Original Message-
>From: Vijay Balakrishnan [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 07, 2003 8:15 PM
>To: 'Struts Users Mailing List'
>Subject: value="" question
>
>
>Hi,
>
>This code works:
>
>property="section.name"/>.
>
>But this code doesn't work:
>property="section.name"/>" />
>
>Can someone explain what I need to do ?
>
>Thanks,
>Vijay
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>  
>



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

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

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




RE: value="" question

2003-01-08 Thread Siggelkow, Bill
You are right, Paul -- sorry for the confusion.  Another important point is if you use 
the  tag versus the struts  tag the value will 
not be set automatically based on properties of the form bean.

-Original Message-
From: Paul Linden [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 3:01 PM
To: Struts Users Mailing List
Subject: Re: value="" question


" />
is just text with a custom tag in the middle. There's nothing special 
about 

 is a custom tag that has to be evaluated before the 
response is even sent.

It would have been more accurate for Bill to say that you can't have a 
tag as the value of an attribute in a *custom* tag.

Paul

Vijay Balakrishnan wrote:

>Hi,
>
>Thanks for your replies.I looked at an example in the "Struts In action"
>book and so I tried this and it worked:
>
>property="section.name"/>" />
>
>After all,by the time it gets to the browser,its all the same.
>
>
>Vijay
>
>
>
>You could use:
>
>
>
>... value="<%= myId%>" ..
>
>
>-Original Message-
>From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 08, 2003 5:36 AM
>To: 'Struts Users Mailing List'
>Subject: RE: value="" question
>
>
>You cannot use a tag as a value of an attribute in a tag -- you need to use
>a Runtime Expression (or expression language if you are using JSTL) as in
>the following:
>
>
>
>-Original Message-
>From: Vijay Balakrishnan [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 07, 2003 8:15 PM
>To: 'Struts Users Mailing List'
>Subject: value="" question
>
>
>Hi,
>
>This code works:
>
>property="section.name"/>.
>
>But this code doesn't work:
>property="section.name"/>" />
>
>Can someone explain what I need to do ?
>
>Thanks,
>Vijay
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>  
>



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

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




RE: Adding another servlet into the mix

2003-01-08 Thread Siggelkow, Bill
Should be no problem.  Just make sure it is configured in your web.xml with a 
different name and mapping (if any).

-Original Message-
From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 1:06 PM
To: struts Users
Subject: Adding another servlet into the mix


Hello,
I am playing with inetsoftware's crystalclear servlet. I have it running
in a seperate context than my struts app. I was wondering if editing and 
adding their servlet into my struts context break the "single servlet" 
rule. This servlet only generates reports and would not try to be a 
controller at all. In fact it only does stuff to .rpt files judging by 
it's web.xml. So it's ok right?
-- 
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


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

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




RE: Ask confirmation before to apply action

2003-01-08 Thread Siggelkow, Bill
This is not a Struts question ... however, if you want a modal dialog -- that is, one 
where the user has to respond before continuing -- you need to use JavaScript.

I am not trying to be critical but it sounds like you need to spend a little time 
learning the capabilities of HTML and browsers -- I suggest O'Reilly's "HTML & XHTML - 
The Definitive Guide" -- also, you can find many tutorials of HTML online.  Also, you 
will probably want to take a look at "JavaScript - The Definitive Guide" as well.

-Original Message-
From: Heligon Sandra [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 11:30 AM
To: '[EMAIL PROTECTED]'
Subject: Ask confirmation before to apply action



If we need to ask confirmation to the user before to make an action
when
he click on a button, what solution do we have ?
-display a child window with the corresponding message
and reply buttons (Yes) (No) ? do you have a code example ?
We are forced to use JavaScript, isn't it ?



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

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




RE: Advanced JSP page help.

2003-01-08 Thread Siggelkow, Bill
V,
When you replied "Yes" below you seemed to indicate HTML provided some sort of 
built-in ability for multi-row selection in a table (not in a "select" control) -- I 
do not believe that HTML provides such -- however, you can indicate of rows in a table 
using a variety of input controls (checkbox, select).

In my experience I have used a checkboxes for each row to indicate selection and in 
some cases provide a "Select All" or "Select None" type of control.

-Original Message-
From: V. Cekvenich [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 11:25 AM
To: [EMAIL PROTECTED]
Subject: Re: Advanced JSP page help.


If I understand you, both would work, and very minor load difference.

Yes you can do multirow updates, it is done all the time.

.V

Heligon Sandra wrote:
> To group several actions in order to not overload the server
> is it better 
> (1) to have a check-box column named select in the table
> that allows to identify all the records of the table that will be
> concern by the next action (save, submit or other)  
> 
> or (2) allow the multiple row selection on the table ?
> is it possible to select multiple rows on a HTML page ?
> 
> -Original Message-
> From: V. Cekvenich [mailto:[EMAIL PROTECTED]]
> Sent: 08 January 2003 16:22
> To: [EMAIL PROTECTED]
> Subject: Re: Advanced JSP page help.
> 
> 
> One opinion:
> Use HTML-EL for updateable fields, and JSTL for general processing.
> 
> Use tiles for layout.
> 
> Use special tags for special formats (menu, display, tree, tab, calendar 
> all have JSP tags).
> 
> .V
> 
> Heligon Sandra wrote:
> 
>>Thanks for these links but I have an another question.
>>When one wants to create a page JSP for a Struts application it is very
>>difficult to know which technology used. 
>>The software components are numerous: 
>>
>>- Basic HTML tags (not specific to Struts)
>>- Basic Struts tags
>>(http://jakarta.apache.org/struts/struts-html.html)
>>- Nested tags
>>- Logic tags
>>- Tiles library
>>- The Struts-EL contrib library
>>- Struts-Layout library
>>- The tag library (not specific to struts)
>>- others 
>>
>>All the items listed above are perhaps not in direct competition because
>>they offer not all exactly the same thing but I is not found there more.
>>I would put Basic HTML tags (not specific to Struts),Basic Struts tags and
>>Tiles in one group but for the remainder? nested vs logic:iterate vs
>>Struts-EL tags vs struts-layout list tag what is the best to display a
> 
> list
> 
>>of elements in a table 
>>- where the number the number of recording varies 
>>- with functions of sorting when a column's header is selected 
>>- multiple column types (string, check box)  
>>
>>I would be really interested to know the complete list of tags which exist
>>and especially the advantages and disadvantages of each one to know which
>>choice to make to display a list? 
>>
>>-Original Message-
>>From: Arnaud HERITIER [mailto:[EMAIL PROTECTED]]
>>Sent: 08 January 2003 13:24
>>To: 'Struts Users Mailing List'
>>Subject: RE: Advanced JSP page help.
>>
>>
>>You can look this taglibraries to help you :
>>
>>http://struts.application-servers.com/
>>
>>http://edhill.its.uiowa.edu/display-0.8/
>>
>>Arnaud
>>
>>
>>
>>>-Message d'origine-
>>>De : Heligon Sandra [mailto:[EMAIL PROTECTED]]
>>>EnvoyƩ : mercredi 8 janvier 2003 11:49
>>>ƀ : '[EMAIL PROTECTED]'
>>>Objet : Advanced JSP page help.
>>>
>>>
>>>
>>>
>>> I seek to create a page JSP with the tags Struts/Tiles
>>>and others.
>>>The page which was   specified is a little complex for
>>>somebody like me
>>>which has little experiment with HTML
>>>  this is why I am searching concrete examples in order
>>>to facilitate
>>>this development.
>>> The pagethat I must carry   out contains a
>>>table with
>>>five columns, four stringcolumns and one column with
>>>check box type.I
>>>attached in file joined an image of this list.
>>> A button add in the page allows the user to add new
>>>element to the
>>>list.
>>> So the number of record  varies and a scroll bar must
>>>appear if the
>>>number of records
>>> is superior to four elements. Is it easy to display
>>>scrollbar with
>>>HTML?
>>> Is it another solution if one wishes all to display on a page ?
>>> The view must be customizable and the user can sort the
>>>elements of
>>>the table
>>> by clicking on the header of the column, is it possible ?
>>> I hope that somebody already made a similar
>>>interface and will
>>>be able to   send code.
>>> Thanks a lot in advance.
>>> Sandra
>>> . <>
>>>
>>>
>>>
>>>
>>
>>--
>>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: Call Struts Action from JS

2003-01-08 Thread Siggelkow, Bill
Also, I meant to say that the error from IE is saying that in its DOM it doesn't have 
the property you are referring to.  If the formObject is actually the form itself then 
eliminate the 'form' property ... in other words, you would have:

formObject.action="<%=request.getContextPath()%>/getAccounts.do";
formObject.submit();

-----Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 11:20 AM
To: 'Struts Users Mailing List'
Subject: RE: Call Struts Action from JS


What type of object is formObject?  That is, how are you calling this function (e.g. 
from onclick? or some other event handler).

If 'formObject' is actually the 'document' then you would do something like ...

  formObject.forms[0].action="<%=request.getContextPath()%>/getAccounts.do";
  formObject.forms[0].submit();

or if the form were named 'myForm' you could use ...

  formObject.myForm.action="<%=request.getContextPath()%>/getAccounts.do";
  formObject.myForm.submit();

Also, I am curious as to why you are needing to set the action via JavaScript when it 
doesn't seem like it is dynamic?  Even if you submit using the submit() method of Form 
it will still use the action that is specified for the form tag.

Another thing to keep in mind is that calling 'submit()' will not invoke any onsubmit 
event handlers if you have them.  In general, I don't like using the 'submit()' method 
but sometimes it is unavoidable.

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 10:51 AM
To: Struts Users Mailing List
Subject: Call Struts Action from JS


when I call an action from JavaScript like this, it works fine under 
Mozilla (Netscape) but I get a warning under IE, any ideas how to get 
around that popup.

Error: "Object does not support this property of method" on the line 
that I call the struts action.  

If I select no on the popup it will give me the response but I want the 
popup not to show, any ideas?  Thanks.


function setNav(formObject)
  {
//alert ("FormObject: " + formObject );
formObject.form.action="<%=request.getContextPath()%>/getAccounts.do";
formObject.form.submit();
  }




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

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

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




RE: Call Struts Action from JS

2003-01-08 Thread Siggelkow, Bill
What type of object is formObject?  That is, how are you calling this function (e.g. 
from onclick? or some other event handler).

If 'formObject' is actually the 'document' then you would do something like ...

  formObject.forms[0].action="<%=request.getContextPath()%>/getAccounts.do";
  formObject.forms[0].submit();

or if the form were named 'myForm' you could use ...

  formObject.myForm.action="<%=request.getContextPath()%>/getAccounts.do";
  formObject.myForm.submit();

Also, I am curious as to why you are needing to set the action via JavaScript when it 
doesn't seem like it is dynamic?  Even if you submit using the submit() method of Form 
it will still use the action that is specified for the form tag.

Another thing to keep in mind is that calling 'submit()' will not invoke any onsubmit 
event handlers if you have them.  In general, I don't like using the 'submit()' method 
but sometimes it is unavoidable.

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 10:51 AM
To: Struts Users Mailing List
Subject: Call Struts Action from JS


when I call an action from JavaScript like this, it works fine under 
Mozilla (Netscape) but I get a warning under IE, any ideas how to get 
around that popup.

Error: "Object does not support this property of method" on the line 
that I call the struts action.  

If I select no on the popup it will give me the response but I want the 
popup not to show, any ideas?  Thanks.


function setNav(formObject)
  {
//alert ("FormObject: " + formObject );
formObject.form.action="<%=request.getContextPath()%>/getAccounts.do";
formObject.form.submit();
  }




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

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




RE: value="" question

2003-01-08 Thread Siggelkow, Bill
You cannot use a tag as a value of an attribute in a tag -- you need to use a Runtime 
Expression (or expression language if you are using JSTL) as in the following:



-Original Message-
From: Vijay Balakrishnan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 8:15 PM
To: 'Struts Users Mailing List'
Subject: value="" question


Hi,

This code works:

.

But this code doesn't work:
" />

Can someone explain what I need to do ?

Thanks,
Vijay

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

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




RE: Weblogic problem with Struts V1.1-b2 or 3

2003-01-07 Thread Siggelkow, Bill
I think I had the same problem ... what I did was download and reinstall WLS 6.1 sp4 
-- it was a major pain but I was able to get things working ... honestly, WLS can be a 
frustrating product -- personally, I find JBoss easier to work -- (unfortunately my 
employer has a fear of things that are "free" -- thank god they are letting me use 
Struts :)

-Original Message-
From: Buchwald, Dave (PLC, IT) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 2:53 PM
To: 'Struts Users Mailing List'
Subject: Weblogic problem with Struts V1.1-b2 or 3


I'm currently on a project that has released a production web site using
Struts V1.0.2.
I'm now trying to migrate to V1.1-anything. We're using weblogic V6.1, with
jdk1.3.1, 
and starting the server has never been a problem. 

I downloaded V1.1-b2 and b3, thought I performed all the installation steps,
upgraded our 
struts-config file to the 1.1 dtd, and tried both our application and EVEN
the sample from 
the download (in 'mydomain' in weblogic), and I keep getting the exception
at the bottom 
of this post.

Is this a parser issue? I downloaded and used xerces V2.2.1.   Thanks in
advance for any insight...

Dave

C:\bea\wlserver6.1>"d:\jdk1.3.1_06\bin\java" -hotspot -ms64m -mx64m
-classpath ".\lib\xercesImpl.jar;.\lib
\xmlParserAPIs.jar;;.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar"
-Dweblogic.Domain=mydomain -Dweblogic.Name=myserver "-Dbea.home=C:\\bea"
-Dweblogic.management.password=... -Dweblogic.ProductionModeEnabled=true
"-Djava.security.policy==C:\bea\wlserver6.1/lib/weblogic.policy"
weblogic.Server
Starting WebLogic Server 
   
   
   
   (WebAppServletContext.j
ava:815)
at
weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.addComponent(Application.java:163)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:329)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:144)
at
weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:
76)
at java.lang.reflect.Method.invoke(Native Method)
at
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
at
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:359)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy29.addWebDeployment(Unknown Source)
at
weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeploymen
t(WebServerMBean_CachingStub.java:1121)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:315)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Deployment
Target.java:279)
at
weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(D
eploymentTarget.java:233)
at
weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(Deploym
entTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
at
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:359)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy28.updateDeployments(Unknown Source)
at
weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(
ServerMBean_CachingStub.java:2761)
at
weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(Appl
icationManager.java:370)
at
weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManage
r.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
at
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:359)
at
com.sun

RE: Oracle JDeveloper 9i and Struts Tomcat deployment

2003-01-07 Thread Siggelkow, Bill
If I were you, I would use Ant to compile and deploy to my app server -- You get the 
best of both worlds if your IDE supports Ant :)

-Original Message-
From: PILGRIM, Peter, FM [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 10:15 AM
To: '[EMAIL PROTECTED]'
Subject: Oracle JDeveloper 9i and Struts Tomcat deployment


Hi

I am in fix with a IDE I have never used before in my life,
Oracle JDeveloper 9i. Is there anyone out there who give some pointers
on how to compile and deploy a Struts demo on to an external
running Tomcat 4.1.18 server on Windows NT 4.0? 

MTIA

--
Peter Pilgrim
+44 (0)207-375-5642
"I' m back!"



***
  Visit our Internet site at http://www.rbsmarkets.com

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB 
Regulated by the Financial Services Authority
***

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

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




RE: How to pass control between two struts web apps deployed on the same app server.

2003-01-07 Thread Siggelkow, Bill
The servlet spec disallows forwarding between web applications.  The second app does 
not have access to the session.  If you need a shared session, you might want to 
consider using Struts modules to subdivide your web application.
If you are looking to implement a single-sign-on -- they are ways of doing this but it 
varies by app server.
I know that Tomcat has an approach for this.

-Original Message-
From: Prakash 'pk' Trivedi [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 10:06 AM
To: Struts Users Mailing List
Subject: How to pass control between two struts web apps deployed on the
same app server.


Hello,

We have two struts web application deployed on one app server. One with
context at / and other one with context app2/ . How can I use jsp:forward to
transfer control to second app2 from first app. Also when I do this would I
have access to the session that I create in the first app. And would I be
able to use checkLogon kind of tag in the second app, if not what do I need
to change ?

Thank you,
~
Prakash 'pk' Trivedi
~


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

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




RE: Struts equivalent of if...else (newbie)

2003-01-06 Thread Siggelkow, Bill
The Struts logic tags do not provide if...then...else -- you can certainly simulate 
that by using the "not" versions of the tags -- the if-then-else logic can be 
implemented like the following:


  'if' markup here


  'else' markup here


The decision was made (and I believe the appropriate decision) that the tags should be 
kept as generic and simple as possible ... there are if-then-else tags available from 
other parties but I would stick with the basic struts tags and/or JSTL for this kind 
of stuff.
-Original Message-
From: Suresh Addagalla [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 9:19 AM
To: 'Struts Users Mailing List'
Subject: RE: Struts equivalent of if...else (newbie)


Well, as you guessed, I do have scriptlets. Now my effort is to minimize
or remove them completely.

And I tried to use logic with local variables, it worked. Thanks for
that. And still, logic:equal offers only if..then; is there any way to
simulate if..then..else?

Thanks,
Suresh

>-----Original Message-
>From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] 
>Sent: Monday, January 06, 2003 7:41 PM
>To: 'Struts Users Mailing List'
>Subject: RE: Struts equivalent of if...else (newbie)
>
>
>I believe that the logic tags will work with a local variable 
>-- anyway, if you don't want to use scriptlet, how did you 
>create the local variable in the first place?
>
>-Original Message-
>From: Suresh Addagalla [mailto:[EMAIL PROTECTED]]
>Sent: Monday, January 06, 2003 8:59 AM
>To: [EMAIL PROTECTED]
>Subject: Struts equivalent of if...else (newbie)
>
>
>Hi,
> 
>I would like to know if Struts provides a custom tag for 
>achieving if..then..else functionality.
> 
>I can not use logic:equal because the data for me is NOT 
>coming from either a bean or through the request. I just need 
>to compare a variable. Is there any option apart from writing 
>a cryptic looking scriptlet?
> 
>Thanks,
>Suresh
>
>
>--
>To unsubscribe, e-mail:   
><mailto:struts-user->[EMAIL PROTECTED]>
>For 
>additional commands, 
>e-mail: <mailto:[EMAIL PROTECTED]>
>


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




RE: Date Formats

2003-01-06 Thread Siggelkow, Bill
Struts does not convert Strings to dates -- you neecx to do this in your ActionForm -- 
for example, you can have "Display" methods such as 

getDateDisplay:String
setDateDisplay(String d)

that perform the conversion to the internal Date type.  

-Original Message-
From: usha [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 3:49 AM
To: [EMAIL PROTECTED]
Subject: Date Formats


Hi

i have a form where i am entering the date field in the format 
01-JAN-2003 form the jsp page. my Action form class setter method for 
this field expects java.sql.Date data type. from the UI if i enter in 
the above said format i am getting following error. can anybody help me 
how to convert this to java.sql.Date accepted format.

Thanks
usha

javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980)
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:779)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:536)


root cause

org.apache.commons.beanutils.ConversionException: For input string: "Jan"
at 
org.apache.commons.beanutils.converters.SqlDateConverter.convert(SqlDateConverter.java:162)
at 
org.apache.commons.beanutils.ConvertUtils.convert(ConvertUtils.java:373)
at 
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:903)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978)
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:779)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   

RE: Struts equivalent of if...else (newbie)

2003-01-06 Thread Siggelkow, Bill
I believe that the logic tags will work with a local variable -- anyway, if you don't 
want to use scriptlet, how did you create the local variable in the first place?

-Original Message-
From: Suresh Addagalla [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 8:59 AM
To: [EMAIL PROTECTED]
Subject: Struts equivalent of if...else (newbie)


Hi,
 
I would like to know if Struts provides a custom tag for achieving if..then..else 
functionality.
 
I can not use logic:equal because the data for me is NOT coming from either a bean or 
through the request. I just need to compare a variable. Is there any option apart from 
writing a cryptic looking scriptlet?
 
Thanks,
Suresh


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




RE: Iterate Index Evaluation

2003-01-03 Thread Siggelkow, Bill
Possibly ... I haven't worked with EL yet ... it's on my "to-do" list.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:55 PM
To: [EMAIL PROTECTED]
Subject: RE: Iterate Index Evaluation


Can you use html-el?

Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-----Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] 
Sent: January 3, 2003 3:53 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation

Strike that ... reverse it!  I was able to use the bean:define as follows:


  
  
even markup here
  
  
odd markup here
  


Give it a try!  The expression is still a little wicked but not as evil as
the scriptlet.

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:43 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Er ... I think you may be right ... I know it can be done using scriptlet
for example:


  <% if ((index % 2) == 0) {%>
even row markup here
  <% } else { %>
odd row markup here
  <% } %>


But we all know how evil this is!

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:05 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Thanks, but I think there will be a problem with the bean:define since the
jsp 1.1 spec does not allow you to use the same bean name more than once in
a single page (which is what we would be doing in an iterate tag.)  Unless
I'm misinterpreting.

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:49 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Try something like ...


  
  
markup for even row here
  
  
markup for odd row here
  


-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:40 PM
To: Struts (E-mail)
Subject: Iterate Index Evaluation


I need to iterate over a collection and be able to tell whether the current
index is odd or even.  Any ideas on how I can use the logic tag for this?




Thanks.


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

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

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

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

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

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




RE: Iterate Index Evaluation

2003-01-03 Thread Siggelkow, Bill
Strike that ... reverse it!  I was able to use the bean:define as follows:


  
  
even markup here
  
  
odd markup here
  


Give it a try!  The expression is still a little wicked but not as evil as the 
scriptlet.

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:43 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Er ... I think you may be right ... I know it can be done using scriptlet for example:


  <% if ((index % 2) == 0) {%>
even row markup here
  <% } else { %>
odd row markup here
  <% } %>


But we all know how evil this is!

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:05 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Thanks, but I think there will be a problem with the bean:define since the
jsp 1.1 spec does not allow you to use the same bean name more than once in
a single page (which is what we would be doing in an iterate tag.)  Unless
I'm misinterpreting.

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:49 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Try something like ...


  
  
markup for even row here
  
  
markup for odd row here
  


-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:40 PM
To: Struts (E-mail)
Subject: Iterate Index Evaluation


I need to iterate over a collection and be able to tell whether the current
index is odd or even.  Any ideas on how I can use the logic tag for this?




Thanks.


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

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

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

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

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




RE: Iterate Index Evaluation

2003-01-03 Thread Siggelkow, Bill
Er ... I think you may be right ... I know it can be done using scriptlet for example:


  <% if ((index % 2) == 0) {%>
even row markup here
  <% } else { %>
odd row markup here
  <% } %>


But we all know how evil this is!

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:05 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Thanks, but I think there will be a problem with the bean:define since the
jsp 1.1 spec does not allow you to use the same bean name more than once in
a single page (which is what we would be doing in an iterate tag.)  Unless
I'm misinterpreting.

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:49 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Try something like ...


  
  
markup for even row here
  
  
markup for odd row here
  


-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:40 PM
To: Struts (E-mail)
Subject: Iterate Index Evaluation


I need to iterate over a collection and be able to tell whether the current
index is odd or even.  Any ideas on how I can use the logic tag for this?




Thanks.


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

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

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

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




RE: Iterate Index Evaluation

2003-01-03 Thread Siggelkow, Bill
Try something like ...


  
  
markup for even row here
  
  
markup for odd row here
  


-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:40 PM
To: Struts (E-mail)
Subject: Iterate Index Evaluation


I need to iterate over a collection and be able to tell whether the current
index is odd or even.  Any ideas on how I can use the logic tag for this?




Thanks.


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

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




RE: Re[6]: [OT] some log4j problems using RollingFileAppender not creati ng a backup file

2003-01-03 Thread Siggelkow, Bill
Hmmm ... I was able to get it working on my set-up -- that is, it created the backup 
files when the file reached 2K ...


Struts 1.1b2
WLS 6.1 sp4
Log4J 1.2.6
NT 4


One wierd thing I noticed was that it seemed like WLS only picked up my new 
log4j.properties when I hot deployed my webapp -- but not when I restarted WLS -- WLS 
has always been flakely when it comes to deployment.

I suggest you look at trying Log4j 1.2.6 or see if using the DailyRollingFileAppender 
might work.

BTW, my appender looks like:

log4j.appender.RollingFile=org.apache.log4j.RollingFileAppender
log4j.appender.RollingFile.File=mirage-log-test.txt
log4j.appender.RollingFile.MaxFileSize=2KB
log4j.appender.RollingFile.MaxBackupIndex=5
log4j.appender.RollingFile.layout=org.apache.log4j.PatternLayout
log4j.appender.RollingFile.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:11 PM
To: Struts Users Mailing List
Subject: Re[6]: [OT] some log4j problems using RollingFileAppender not
creati ng a backup file




On Friday, January 3, 2003, 1:56:38 PM, Bill wrote:

SB> Do you have a Windows Explorer window open on that folder?  I have
SB> found that Windows explorer can hold locks this way.

Even with everything closed except the web browser, the archive file
is not being created. It does seem to consistently start over though
with a blank log file when it reaches 2K- so I know it's understanding
it needs to do something when it hits 2K. It's just the archived copy
that is not being created.


-- 

Rick
mailto:[EMAIL PROTECTED]


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

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




RE: Re[4]: [OT] some log4j problems using RollingFileAppender not creati ng a backup file

2003-01-03 Thread Siggelkow, Bill
Do you have a Windows Explorer window open on that folder?  I have found that Windows 
explorer can hold locks this way.

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 1:30 PM
To: Struts Users Mailing List
Subject: Re[4]: [OT] some log4j problems using RollingFileAppender not
creati ng a backup file




On Friday, January 3, 2003, 12:11:48 PM, Bill wrote:

SB> Are you saying that when it reaches 2K it is creating a new
SB> backoffice.log but not creating the archive (backup) copy?

Yes exactly. It doesn't create the archive(backup) copy.

(And actually it doesn't 'always' seem to even create a new
backoffice.log. Hard to explain on this later point as it doesn't seem
consistent. According to that one link on the log4j others seem to
have similar problems on win2k so maybe it's just a windows thing-
although I swear it used to work with the old log4j jar and using
Cateogry as opposed to Logger).


-- 

Rick
mailto:[EMAIL PROTECTED]


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

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




RE: tiles:insert page= question...

2003-01-03 Thread Siggelkow, Bill
It is my understanding that any page that you include cannot be outside of the current 
servlet context root.  In fact, I am surprised that this worked for you on iPlanet -- 
it seems to me to be inviolation of the servlet spec.

-Original Message-
From: ajTreece [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 1:11 PM
To: Struts Users Mailing List
Subject: tiles:insert page= question...


I have a need to display a page via , 
but the trick is the page is NOT contained in the webapp. It is a page 
that is external to the webapp but still on the same server.

I have recently switched from using iPlanet v6 to Tomcat v4.1.18 as my 
web server/container for various reasons, but it worked under iPlanet 
and does not under Tomcat. If I include the external page in my webapp 
it works on Tomcat. Is this the normal feature of tiles? Can tiles only 
work with files that reside in the webapp -or- am I just not calling it 
correctly.

On my server I have two webapps one is called staging. I'm converting an 
existing site to struts with a whole new look and feel and the staging 
area is a place where developers can make some quick changes to an 
existing page without having to reload the main webapp over and over 
again. They will eventually be part of the main webapp, but now they are 
technically external to my main webapp. If I just use the full URL in 
the browser like http://myserver/staging/some-page.html the page views 
as expected, but if I try to display it from my main webapp via 
 I just get a blank screen.


Thanks, ajTreece



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

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




RE: Re[2]: [OT] some log4j problems using RollingFileAppender not creati ng a backup file

2003-01-03 Thread Siggelkow, Bill
Are you saying that when it reaches 2K it is creating a new backoffice.log but not 
creating the archive (backup) copy?

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 11:58 AM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: Re[2]: [OT] some log4j problems using RollingFileAppender not
creati ng a backup file


On Friday, January 3, 2003, 11:27:08 AM, Bill wrote:

SB> Rick,I have had this working with Log4j 1.2.6 on both solaris
SB> and windows.  I saw your post on the struts-atlanta group about
SB> this and noting some possible windows file locking issue.  Have
SB> you tried a different path to see if that makes any difference?
SB> Maybe use a relative file path?

Man, I'm stumped even more by all of this:) ... I tried having a
log file in all different places and with all different path set
ups. Behavior seems to always be the same.

The only small oddity I've found is that if I let the log fill up
on it's own up to capacity (2K) it will just the same log file
over again when it gets too big. However if I manually cut and
past to fill up the file to say 5K and then use the app which will
write to the log file it doesn't start the file over and keeps
writing to it (until I restart the server). Neither scenario
creates a backup though so I'm still stuck there. I'm going nuts
here.

You sure this log4j properties file looks ok? (on this last
attempt I took out all paths and it writes the log file right in
the bin folder).

log4j.rootCategory=ERROR, rolling
log4j.logger.com.adp=DEBUG, rolling
log4j.logger.corporate=DEBUG, rolling
 
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
 
log4j.appender.rolling=org.apache.log4j.RollingFileAppender
log4j.appender.rolling.File=backoffice.log
log4j.appender.rolling.MaxFileSize=2KB
log4j.appender.rolling.MaxBackupIndex=5
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%d{MM/dd/yy hh:mm:ss a } %-5p %c - 
%m%n


Any other ideas? Thanks for the help so far.

-- 

Rick
mailto:[EMAIL PROTECTED]


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

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




RE: [OT] some log4j problems using RollingFileAppender not creating a backup file

2003-01-03 Thread Siggelkow, Bill
Rick, 
  I have had this working with Log4j 1.2.6 on both solaris and windows.  I saw your 
post on the struts-atlanta group about this and noting some possible windows file 
locking issue.  Have you tried a different path to see if that makes any difference?  
Maybe use a relative file path?

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 10:59 AM
To: Struts List
Subject: [OT] some log4j problems using RollingFileAppender not creating
a backup file


I know this isn't a struts question, but the log4j list seems pretty
dead that I posted this to and I've searched and searched for some
answers and I'm desperate now:). Maybe someone else using log4j in
their struts apps has run into this problem...

I'm using log4j 1.2.7jar and Tomcat 4.0.6 on w2K.

I can not seem to successfully get the RollingFileAppender to back up
the file after it gets to a certain size. I saw this post in the
archives but it didn't seem to provide a solution:
http://www.mail-archive.com/log4j-user@jakarta.apache.org/msg06397.html

My properties file looks like:

log4j.rootCategory=ERROR, rolling
log4j.logger.com.adp=DEBUG, rolling
log4j.logger.corporate=DEBUG, rolling

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
 
log4j.appender.rolling=org.apache.log4j.RollingFileAppender
log4j.appender.rolling.File=C:\\jakarta-tomcat-4.0.6\\logs\\backoffice.log
log4j.appender.rolling.MaxFileSize=2KB
log4j.appender.rolling.MaxBackupIndex=5
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%d{MM/dd/yy hh:mm:ss a } %-5p %c - %m%n

I'm using 2KB for max backup size for testing, but it never seems to
create a backup file (backoffice.log.1 etc). It does end up resetting
the  backoffice.log when I restart the server but normally without
bouncing the log just fills up past 2K. I really would love to get
this backup working otherwise I'll probably have to reinvent the wheel
and create my own FileIO stuff to do the logging.

Any help would be greatly appreciated with this.

Thanks,


-- 

Rick
mailto:[EMAIL PROTECTED]


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

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




RE: (http://jakarta.apache.org/struts/tags-tiles-1.1) cannot be resolved

2003-01-03 Thread Siggelkow, Bill
Did you try taking the version off the URI?  In other words, use:
"http://jakarta.apache.org/struts/tags-tiles";

-Original Message-
From: Daniel Grey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 5:21 PM
To: [EMAIL PROTECTED]
Subject: (http://jakarta.apache.org/struts/tags-tiles-1.1) cannot be
resolved 


I am trying to deploy a .ear file to JBOSS and canNot get around this
error:

org.apache.jasper.JasperException: null(-1,-1) This absolute uri
(http://jakarta.apache.org/struts/tags-tiles-1.1) cannot be resolved in
either web.xml or the jar files deployed with this application

There are a bunch of .jsp files that contain this reference:
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles-1.1";
prefix="tiles" %>

The web.xml has this reference:
 
 
http://jakarta.apache.org/struts/tags-tiles-1.1
/WEB-INF/struts-tiles.tld
  

The lib directory has struts.jar and the classes directory has the
classes
Does anyone have a clue on this?
HELP!
Thanks

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

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




RE: Ye olde html:options tag?

2003-01-02 Thread Siggelkow, Bill
Try using the 'collection' attribute instead of 'name' ... otherwise, the tag 
interprets the name/property combination as identifying the collection.



\-Original Message-
From: Michael P [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 4:17 PM
To: [EMAIL PROTECTED]
Subject: Ye olde html:options tag?


I apologize for this basic question, but I'm new to struts and Java web
programming in general, and I really can't get the  tag to
work...

The error I'm getting, specifically, is:
  javax.servlet.jsp.JspException: No getter method available for property
email for bean under name users

My JSP defines a collection like this:
  

Then tries to use it like this:
  

  

My understanding of this is that it will call getUsers() on the
adminLoginForm bean to get a Collection, and then on each item within the
collection, will call getEmail() to retrieve the option property and
label.

Do I need to define a bean somewhere (in some XML file?) for the user
objects contained within the collection or something?  The collection
contains UserView objects that /do/, in fact, have a getEmail() method, so
I can't figure out why this won't work.

I have defined a form-bean for the login form:
  

  

Thanks for any help you can offer...

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

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




RE: defeating caching

2003-01-02 Thread Siggelkow, Bill
Add the following stanza to your struts-config.xml ...

  

-Original Message-
From: Caoilte O'Connor [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 01, 2003 10:36 PM
To: [EMAIL PROTECTED]
Subject: defeating caching


Hi,
Can anyone tell me exactly what options I should set for struts1.1 to
defeat web caching. I found the option in the dtd and a few mentions of it
in the archives, but no information anywhere on how to set it for all
pages the webapp returns.

much appreciated,

caoilte

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

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




RE: struts-config: action's "input" attribute purpose

2002-12-23 Thread Siggelkow, Bill
Following is taken verbatim from the struts-config.dtd

input   Module-relative path of the action or other resource to
 which control should be returned if a validation error is
 encountered. Valid only when "name" is specified. Required
 if "name" is specified and the input bean returns
 validation errors. Optional if "name" is specified and the
 input bean does not return validation errors.

-Original Message-
From: otisg [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 3:33 PM
To: [EMAIL PROTECTED]
Subject: struts-config: action's "input" attribute purpose


Hello,

Warning: new Struts user.  Trying to use it
with Velocity, actually.

I'm writing struts-config.xml for my web app
and I'm wondering about 'input' attribute of
the 'action' element.
What is it for, and how is it used?
I am asking because I see mixed examples -
some using that attribute, some not.  And
that 'input' attribute is not listed at
http://jakarta.apache.org/struts/userGuide/building_controller.html

What happens if I use 'input', and what if I
do not?

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: 

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




RE: How to set formbean properties without asking the user

2002-12-23 Thread Siggelkow, Bill
Can you provide more details?  When you are dealing with forms, the basic types are 
either String or booleans.  Perhaps what you want to do is best handled in your Action 
that processes the form.  It sounds like you need to make an object available in let's 
say the request scope and then have that object be used along with the form in the 
Action.  The thing is forms were meant to work with user input -- it may prove 
difficult to try and use it in a different fashion.

My 2 cents.

-Original Message-
From: Tobias Flohre [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 11:31 AM
To: Struts Users Mailing List
Subject: RE: How to set formbean properties without asking the user



Hi again,
using a hidden field is a good idea, but I just can set a simple java type
into the value. I need to write a complex object into the property of my
bean!
Does anybody know how I can do that without using java?

Thanks,
Tobias

-

You could use a hidden field with the value equal to the value of the
scripting variable ..



-Original Message-
From: Tobias Flohre [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 10:10 AM
To: Struts Users Mailing List
Subject: How to set formbean properties without asking the user



Hello,

I have a probably very simple question:
I have a form like this:





I want to set a property of personalplanungEditForm to a value that is
stored
in a scripting variable. How can I do this without using any java code?
Does a tag exist for doing that?

Thank you in advance!
Tobias



--
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: How to set formbean properties without asking the user

2002-12-23 Thread Siggelkow, Bill
You could use a hidden field with the value equal to the value of the scripting 
variable ..



-Original Message-
From: Tobias Flohre [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 10:10 AM
To: Struts Users Mailing List
Subject: How to set formbean properties without asking the user



Hello,

I have a probably very simple question:
I have a form like this:





I want to set a property of personalplanungEditForm to a value that is
stored
in a scripting variable. How can I do this without using any java code?
Does a tag exist for doing that?

Thank you in advance!
Tobias



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

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




RE: no getter method for property phoneList

2002-12-23 Thread Siggelkow, Bill
Try using --


-Original Message-
From: Jitendra Singh [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 9:32 AM
To: Struts Users Mailing List
Subject: Re: no getter method for property phoneList


I am trying as given on the apache server ... but getting this error..Please
tell me if i am missing something.

com.ibm.servlet.engine.webapp.WebAppErrorReport: No getter method for
property adminRight(2) of bean org.apache.struts.taglib.html.BEAN

my jsp says :


my form class is :

public class MRSecurityForm extends ActionForm {

private ArrayList novelLogins;



private ArrayList adminRights;

public Object getNovelLogin(int index) {

return novelLogins.get(index);

}


public void setNovelLogin(int index, Object lNovelLogin) {

novelLogins.set(index, lNovelLogin);

}


public Object getAdminRight(int index) {

return adminRights.get(index);

}


public void setAdminRight(int index, Object lAdminRights) {

adminRights.set(index, lAdminRights);

}

}



- Original Message -
From: "Richard Yee" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, December 21, 2002 3:24 AM
Subject: RE: no getter method for property phoneList


> Take a look at this page:
>
http://jakarta.apache.org/struts/userGuide/building_controller.html#map_acti
on_form_classes
>
>
> The problem is that you don't have methods to get the
> individual items from your lists. You need methods
> such as
>
> public String getPhoneItem(int index) {
>   return phoneList_.get(index)
> }
>
> public void setPhoneItem(int index, Object obj)
> {
>  phoneList_.set(index,obj);
> }
>
> The actual names of the methods don't really matter.
>
> You will have to add code to the getter method so that
> you won't get an ArrayIndexOutOfBounds exception when
> the getter is called and the list is empty. This topic
> has been discussed on the list a few times over the
> last week or two.
>
> Regards,
>
> Richard
>
> --- [EMAIL PROTECTED] wrote:
> >
> > I tried almost every combination. Reversing the
> > order, doing just the
> > addressList then the just the phoneList. Whatever
> > combination I use, the
> > addressList is always introspected ok while the
> > phoneList isn't. I even
> > tried renaming the getPhoneList() to
> > getTelephoneList() and then tried to
> > invoke that method with the same problem. I even
> > tried copying
> > getAddressList() and renamed to getPhoneList() and
> > that didn't work either.
> > I also tried deleting the pre-compiled jsps to make
> > sure I get fresh ones
> > when I bring up the jsp.
> >
> > The problem, as I observed it, is when
> > PropertyUtils.copyProperty (this is
> > RequestUtils.lookup) is invoked to retrieve the
> > bean's method and it
> > couldn't find it. I traced all variables and objects
> > being passed to it and
> > I didn't see anything peculiar. I don't have the
> > source code for the
> > beanutils package so I can't trace it any farther
> > than the copyProperty
> > method.
> >
> > It may also be how I defined my bean, but I checked
> > it inside/out and
> > compare it with my other classes with similar
> > structure.
> >
> > What I ended up doing, which is not scientific, is
> > to recreate my Party
> > class one attribute/one method at a time. After,
> > say, creating addressList
> > and it's accessors, I tested it to make sure the
> > iterate tag works. Then I
> > added phoneList and to my surprise, it worked. Then
> > I proceeded to add all
> > my other attributes/mtehods/etc. It wasted a day or
> > work and I still wasn't
> > able to figure out why it happened in the first
> > place.
> >
> > Thanks for the responses and if anybody encounters
> > the same problem, which
> > is really sooo weird, I'd like to find out if he/she
> > ever solved it without
> > doing what I did.
> >
> > Thanks again.
> >
> >
> >
> >
> >
> > <[EMAIL PROTECTED]> on 12/20/2002 10:44:44 AM
> >
> > Please respond to "Struts Users Mailing List"
> >   <[EMAIL PROTECTED]>
> >
> > To:   <[EMAIL PROTECTED]>
> > cc:
> > Subject:  RE: no getter method for property
> > phoneList
> >
> >
> > Here's some questions:
> >
> > 1) If you reverse the order of the iterate tags,
> > iterating over phoneList
> > first and addressList second, do you get the same
> > results?
> >
> > 2) Does the address information render correctly if
>
>
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.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: Access external file from web application

2002-12-23 Thread Siggelkow, Bill
I built an application on WLS 6.1 using Struts 1.0 that supported display of 
user-uploaded content.  Several keys to this were:

1) I had to deploy the web app in exploded format
2) If WLS was run in Production Mode I had to call a little runtime script that 
deployed (refreshed) the new content (otherwise, it would not be available)
3) I stored the content in a context-relative folder -- though, I used a database 
table to hold content metadata which included the content mime type, the 
context-relative URL, and user-supplied title and description, and system-generated 
file name.
4) I used the Struts support for upload to perform the upload.

Let me know if this helps -- If you have specific questions e-mail me directly as this 
is a bit OT for Struts.

-Original Message-
From: Amit Badheka [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 4:16 AM
To: Struts Users Mailing List
Subject: Access external file from web application


Hi All,

Is there any way to access a file(image,..etc) from the web application. the path of 
the image is dynamically generated.

The requirement is that we have to upload a image file and store it to somewhere on 
server at dynamically generated path. Now, Problem is how I should refer this file 
from the application, As the application don't know the path at the time of 
implementation(application).

Please help. 

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




RE: Error loading struts-config

2002-12-23 Thread Siggelkow, Bill
The error sounds like the servlet cannot even find struts-config.xml.  Check the war 
to make sure struts-config is really there and in the WEB-INF folder.  You can open 
the war with WinZip.  Also, make sure that the folder WEB-INF is in all caps.

-Original Message-
From: Howard Miller [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 8:59 AM
To: [EMAIL PROTECTED]
Subject: Error loading struts-config


Hi,

I am just setting up a new Struts project. I have the Action servlet set 
up and a struts-config.xml with almost nothing in it. When the war is 
installed the servlet starts and then throws this error...

2002-12-23 13:47:11 StandardContext[/quest]: Servlet /quest threw 
load() exception
javax.servlet.UnavailableException: Parsing error processing 
resource path /WEB-INF/struts-config.xml
at 
org.apache.struts.action.ActionServlet.initApplicationConfig(ActionS
ervlet.java:866)
at 
org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
...lots more

I have no idea what's gone wrong. I seem to get the error regardless 
of what's in the struts-config file or even if I remove it alltogether.

As the error message appears to be no help... has anybody got any 
pointers as to what might be causing this?

I am running on Windows XP. All the example apps work fine.

Many Thanks

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

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




RE: reset doesn't work well

2002-12-20 Thread Siggelkow, Bill
Doug, I think you are misreading or misinformed about both the reset button and the 
reset method.  The "reset" button does a client-side reset of the form -- there is no 
interaction with the server.

The reset method is called by the ActionServlet when a form is reused -- but I do not 
think that it is called on when validate returns false -- in fact, I would think that 
you would not want it called so that the user does not "lose" all of their previous 
input.

-Original Message-
From: Doug Ogateter [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 4:17 PM
To: Struts Users Mailing List
Subject: RE: reset doesn't work well



Hi, Bill:
Thank you for reply.
The ActionForm api says:

   " public void reset(ActionMapping mapping,  
javax.servlet.http.HttpServletRequest request)

   Reset all bean properties to their default state. This method is called before the 
properties are repopulated by the controller servlet. 
The default implementation does nothing. Subclasses should override this method to 
reset all bean properties to default values. "

   
 

   
I have overitten the reset method to reset both amount and password to null. From my 
understanding, whenever user clicks reset button, it will call the reset method, 
therefore, all the fields should be cleared.

   
Please correct me if I am wrong.

   
Thanks

 "Siggelkow, Bill" <[EMAIL PROTECTED]> wrote:The really has nothing to do with 
the reset method of your form ... instead this renders an  [input]  button that will 
reset the form fields to their "default" state as known by the browser. Therefore, in 
the case when you have returned to the form after a validation failure the default 
values are the values in the form bean returned to the input page. I see a couple of 
options ..

1) You could have your validate() method clear out the fields that erroneous (or clear 
them all out if you want) if the validation fails.

2) If you truly want the reset button to erase all fields regardless of the 
pre-populated values you could do this with an onclick event calling JavaScript.

Personally, I would go with option 1 as it will not confuse the user about what the 
Reset button does.

-Original Message-
From: Doug Ogateter [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 3:38 PM
To: Struts Users Mailing List
Subject: reset doesn't work well



Hi:
I have a problem with reset button. In my jsp file, I have . In my form class, I have: 

public void reset(ActionMapping mapping, HttpServletRequest request) {
amount = null;

password = null;
}

in the struts-config.xml file, it has:

type="yyy"
name="myForm"
scope="request"

input="/zzz.jsp">



I filled out the fields, if I click reset button before submit the form, the fields 
are cleared. But if I submit the form first, and it detects some error(for example: 
the password is not correct), the form is showed with error message. In this case, 
when I click reset button, the fields are not cleared. What is wrong with this. I 
really want the fields can be cleared if errors are detected. Could someone help me 
out?

Thanks.

Doug



-
Post your free ad now! Yahoo! Canada Personals

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



-
Post your free ad now! Yahoo! Canada Personals

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




RE: reset doesn't work well

2002-12-20 Thread Siggelkow, Bill
The  really has nothing to do with the reset method of your form ... 
instead this renders an  button that will reset the form fields to 
their "default" state as known by the browser.   Therefore, in the case when you have 
returned to the form after a validation failure the default values are the values in 
the form bean returned to the input page.  I see a couple of options ..

1) You could have your validate() method clear out the fields that erroneous (or clear 
them all out if you want) if the validation fails.

2) If you truly want the reset button to erase all fields regardless of the 
pre-populated values you could do this with an onclick event calling JavaScript.

Personally, I would go with option 1 as it will not confuse the user about what the 
Reset button does.

-Original Message-
From: Doug Ogateter [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 3:38 PM
To: Struts Users Mailing List
Subject: reset doesn't work well



Hi:
I have a problem with reset button. In my jsp file, I have . In my form 
class, I have: 

  public void reset(ActionMapping mapping, HttpServletRequest request) {
amount = null;

password = null;
   }

in the struts-config.xml file, it has:

   
  


I filled out the fields, if I click reset button before submit the form, the fields 
are cleared. But if I submit the form first, and it detects some error(for example: 
the password is not correct), the form is showed  with error message. In this case, 
when I click reset button, the fields are not cleared. What is wrong with this. I 
really want the fields can be cleared if errors are detected. Could someone help me 
out?

Thanks.

Doug



-
Post your free ad now! Yahoo! Canada Personals

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




RE: Cancel & Submit Buttons

2002-12-20 Thread Siggelkow, Bill
You could do it in your action like;

if (isCancelled(request)) return mapping.findForward("mainMenu");

-Original Message-
From: Bradley G Smith [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 2:13 PM
To: [EMAIL PROTECTED]
Subject: Cancel & Submit Buttons


Can someone please describe how to enable an action to respond to submit
and cancel buttons differently? The action is derived from the
scaffold.BaseAction class. I have submit working to generate a response. I
would like cancel to redirect to the main menu of the application.

I suppose one solution is to use a dispatch action first to chain to either
the "submit" action or the "cancel" action. Is this the best way to do
this? Or am I missing something that BaseAction provides out of the box?

Thanks,

Brad




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

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




RE: struts-el:submit question

2002-12-19 Thread Siggelkow, Bill
Are you missing the trailing quote of the el "${action}"

-Original Message-
From: Dan Tran [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 9:11 PM
To: Struts Users Mailing List
Subject: struts-el:submit question


Hi,

I have this code


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

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




RE: Form Errors (Newbie)

2002-12-19 Thread Siggelkow, Bill
Yes -- you will see the fields filled if you specify the jsp page as the "input" 
attribute of the action mapping.  Struts will forward the form and the errors back to 
the input page for rendering.

-Original Message-
From: Suresh Addagalla [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 12:52 AM
To: [EMAIL PROTECTED]
Subject: Form Errors (Newbie)


Hi,

I would like to know whether the following is possible to implement with
Struts.

I display a form for creating, say, a Service. The user fills in a form.
When the form is submitted, the Validator performs the validations with
no errors. Now the control comes to the execute method. In this method,
I find that the Service Name is already present in DB. Now I need to
display the "input form" indicating along side the field that "this
Service already exists, give a different name".

Although it seems possible, the doubt I have is as follows. The input
form might have been generated based on a complex s performed
in the JSP. Now when Action encounters an error, will it be able to
display the input form in "exactly the same" state? Which means that if
the input form contains a lot of fields with specific values, do I see
the same values when it is displayed again with some errors?

Thanks for your time.

Suresh


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




RE: html:rewrite and JavaScript

2002-12-18 Thread Siggelkow, Bill
Iris, if you are wanting to populate options in a select with text entered in an input 
field this is most easily done with JavaScript.

-Original Message-
From: Iris [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 3:38 AM
To: Struts Users Mailing List
Subject: Re: html:rewrite and JavaScript


Todd Pierce wrote:

Thanks Todd,
but my question now is: how can I call this forward in JavaScript ?

>html:rewrite is essentially the same as html:link except that it doesn't
>generate an  element in the HTML, e.g.
>
>paramName="someBean" paramProperty="someProperty" />
>
>will generate something like this:
>
>myUrl.do?key=somePropertyValue
>  
>
>
>-Original Message-
>From: Iris [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, 18 December 2002 4:07 AM
>To: Struts Users Mailing List
>Subject: html:rewrite and JavaScript
>
>
>Hello,
>
>I want to populate an  following the value of an .
>My idea was to reload the same page with the value of the  in 
>parameter.
>I saw there is an  tag that perhaps can help me  but I 
>don't know how
>to use it.
>Someone has an example to show me how to use 
>
>Thanks
>Iris
>
>
>--
>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: mapping to domain objects

2002-12-18 Thread Siggelkow, Bill
One option is to have your form implement an a domain (business) object interface.  
For example, you would have Customer interface that would have the get/setFoo methods 
and the form would implement get/setFoo (for the business interface) and 
get/setFooString (for presentation) -- in this way you can use the form both as a 
translation object as well as a transfer (value) object -- that is, internally, 
setFooString() would translate the string into the business foo type.

-Original Message-
From: Colin Hawkett [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 4:42 AM
To: 'Struts Users Mailing List'
Subject: mapping to domain objects


Hi,

I had previously been using struts 1.0, and have started a project using
1.1 - in 1.0 the method I used to map forms to domain objects (By domain
object I mean value object - representing the problem domain e.g. User,
Account, Bank etc.) was to create an action form with the domain object as
an attribute.  I would then create special setters and getters in the domain
object to handle the different types coming in as Strings - e.g.

public void setDateString(String date);
pubic String getDateString();

and also use the nested library to traverse the domain hierarchy (e.g. loop
through a list of accounts in a bank domain object).

Basically I don't like this method because it corrupts all of the domain
objects with methods that are specifically for the presentation layer, and I
couldn't easily validate the incoming values without creating an ActionError
list in the domain object and pulling this out when I hit the validator.
Never mind - lesson learned.  I really did like the nested tags though.

Now that struts 1.1 is on the table I am wondering what I can do to make
this better.  I like the DynaValidator but this appears to only be useful
for static forms (ones that aren't changing depending on the data).

I've been looking at the decalrative exception structure - but I can't quite
make out whether these exceptions can only be caught from the Action or also
from the form associated with the action.  Thats probably one for me to
check out although I can't see it mentioned anywhere.  I was thinking this
might be a good way to handle the problem of domain validating by doign the
validation in the setters and throwing exceptions rather than doing it in
the validate() method.

The only other method I can really see is to produce a wrapper around my
domain objects specifically for the purpose of providing String
setter/getter interfaces so I don't get number format errors on my setters
trying to convert to the actual attribute types.

I guess the main aim of this post was to see if there is a way of doing this
that anybody has found elegant.  I am probably missing something - but what
I am really looking for is a way to map form strings to domain attribute
types directly trapping any format errors in the process.  Any pointers?
Thanks in advance

Colin

Colin Hawkett
Technical Architect
Morpheus - eBusiness Solutions
Morpheus Limited, Gibbs House, Kennel Ride, Ascot, Berkshire, SL5 7NT
Email: [EMAIL PROTECTED]
Tel: 01344 891621; Fax: 01344 891620
Web: http://www.morpheus.co.uk

*Winner of the IBM Solution Excellence Award for e-Commerce 2001*
*Solution Provider of the Month - Channel 2002 Magazine*
*Investor in People*






This email and any files transmitted with it contain information that may be
confidential or privileged, and are intended solely for the use of the
individual or entity to whom they are addressed. If you are not the intended
recipient any disclosure, copying, distribution or use of the information is
prohibited. If you have received this email in error, please notify me by
return email immediately. Any opinions expressed are those of the author,
not of Morpheus Limited.


This message has been checked for all known viruses by UUNET delivered 
through the MessageLabs Virus Control Centre.



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

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




RE: Struts & Frames

2002-12-18 Thread Siggelkow, Bill
Yes ... that's it  I have my login forward to an index.jsp which is the frameset 
-- the src of the frames in that frameset is dynamically generated based on some user 
profile info.

-Original Message-
From: Savantraj, Chennamakal Subramanian [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 4:51 AM
To: 'Struts Users Mailing List'
Subject: Struts & Frames


Hi ,

I have a Login page which is a single frame and after successfull login
should go to the 
Application home page which is 2 Frame. How to Achieve this ? Would it be
sufficient if I just call
another 2 different actions in src attribute of the frame?

Thanks in advance

Regards
Savant

---
This email is confidential and intended only for the use of the individual
or entity named above and may contain information that is privileged. If you
are not the intended recipient, you are notified that any dissemination,
distribution or copying of this email is strictly prohibited. If you have
received this email in error, please notify us immediately by return email
or telephone and destroy the original message. Thank you. - This mail is
sent via Sony Asia Pacific Mail Gateway. 
---


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

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




RE: Struts and session

2002-12-17 Thread Siggelkow, Bill
Doug, the servlet container is responsible for invalidating the session based on the 
configured timeout.  If you want to take some action when that occurs you should 
register an HttpSessionListener to receive notification of session lifecycle events.  
For complete details you can read the Servlet spec and/or the Servlet 2.3 Javadocs.

-Original Message-
From: Doug Ogateter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 12:33 AM
To: Struts Users Mailing List
Subject: Struts and session


Greetings:

I am using struts1.1b2 to implement a web application. I have a question regarding to 
implementing session timeout. When session is invalidated, user who has logged in the 
system should be forwarded to login page. I am not clear about the followings, and 
hope someone can help me out.

1. Who will invalidate the session when timeout? Servlet container will do it 
automatically?

2. Should I use request.getSession(false) to check if session is timeout? If so, that 
means for every request, it will check if session is invaildate. Will it cause 
performance problem? If not, which methods should I call to check it?

3. If I should use request.getSession(false) to check session timeout, where should I 
write the code? Should I write the code in every action class?

4. There are many methods related to session, such as getCreationTime, 
getLastAccessedTime,..Where and how should I use them in the implementation?

5.From my understanding, I can set timeout in web.xml or use setMaxInactiveIterval(int 
..). Usually which way should be use?

6. After user login, I want to forward the user to the page where he was when session 
timeout. Where should I save the information(with the information, I know where I 
should forward the user to)?

I searched the archive. However, it seems that I can't find the specific info.

Your help is highly appreicated.

Doug


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




RE: Javascript/Taglib usage

2002-12-16 Thread Siggelkow, Bill
Can you be more specific?  Do you mean using Validator?  or just invoking event 
handlers (onclick, etc.)? or dynamically generating JavaScript?

-Original Message-
From: Louis Proyect [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:52 AM
To: Struts Users Mailing List
Subject: Javascript/Taglib usage


Can somebody point me in the right direction for a tutorial or 
documentation on using javascript within a struts jsp? The Taglib HTML API 
is rather sketchy.


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

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




RE: Replacement values

2002-12-16 Thread Siggelkow, Bill
DId you try ...


  


-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 9:19 AM
To: Struts Users Mailing List
Subject: RE: Replacement values


I believe that replacement values are interpreted as Strings.  Also, quoting Craig 
from an earlier post:

...the  tag does not create a scripting variable.  It only stores the 
current element you are iterating over in the attribute defined by "name" 

Given that, a quick solution to what you are attempting isn't obvious.

Sri

-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 16, 2002 5:07 AM
To: Struts Users Mailing List
Subject: Replacement values


Hi,


  I am trying to iterate over values in my form bean.


  


  The above prints the string "item" for the replacement value.

 Shouldn't it print the value iterated over the String[] which is the type of the 
property in my form bean ?

 Even bean:write throws " bean not found in scope null " error.

 "myForm" is in the session scope according the config file.

Thanks,
Mohan

--
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: taglib question

2002-01-04 Thread Siggelkow, Bill

If you are using Weblogic, you would put the jar file containing foo.tld in
the application server's classpath as opposed to the WEB-INF for each of the
web apps.

-Original Message-
From: William Shulman [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 8:11 AM
To: [EMAIL PROTECTED]
Subject: taglib question



Here is something I have been having trouble with:

(1) Imagine I have written the tag library defined in foo.tld
(2) Image I am also developing many webapps that use foo.tld

Question:

when I deploy my webapps, must I have a copy of foo.tld in each and
every webapp that uses it? Thus, if I have 10 webapps,  must I maintain
10 copies of foo.tld?

If this is the case then that seems strange to me. Is there any way to
refer to tld files with absolute URIs (like file: or http:)? What is a
common approach for deling with this?

thanks in advance
-will



--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: How to use an expression in a logic tag?

2001-12-21 Thread Siggelkow, Bill

Add a property on your bean that returns the value of maxRecords +
rowPosition then refer to that property in the tag.

-Original Message-
From: T. Wheeler [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 21, 2001 3:19 PM
To: [EMAIL PROTECTED]
Subject: How to use an expression in a logic tag?


Hello,

I am using logic tags to implement paging through a recordset (like in a
search engine).

In order to determine whether or not to display the "next page" button (i.e.
when the user is nearing the end of the recordset) it seems I need an
expression in my  tag.

I have a bean that contains these properties:

maxRecords: Number of records to display per page
rowPosition:index number of the first row on this page

I also have the value totalRecords, which is passed into the request object
in my action class.  It is not a property of the form bean.

I need to do something like:





Where the property would actually need to be an expression like rowPosition
+ maxRecords

Does anyone know how I could do this?  

Thanks!

Tom

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Problem with bean:define?

2001-12-19 Thread Siggelkow, Bill

Well, I did a test and bean:write displays the date the first time thru, but
then displays nothing when I return to the page to display validation
errors?  Why would this value be getting cleared in my form?  I null out all
my fields in the reset method including this 'postDate' property.  Any
ideas?   

-Original Message-
From: Keith Bacon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 19, 2001 7:15 AM
To: Struts Users Mailing List
Subject: RE: Problem with bean:define?


are you saying your jsp is getting null pointer excp
in setAttribute() in the 


Keith. (not much use I suspect - try my best!).

--- "Siggelkow, Bill" <[EMAIL PROTECTED]>
wrote:
> Specifically, I am trying to use the define tag to
> define a variable based
> on a property of the FormBean as follows: (the
> getLocalDate is my own tag
> for rendering dates.
> 
>  property="postDate"
> type="java.util.Date"/>
>  style="long"/>
> 
> -Original Message-
> From: Siggelkow, Bill
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 18, 2001 11:33 AM
> To: '[EMAIL PROTECTED]'
> Subject: Problem with bean:define?
> 
> 
> I am using the bean:define tag to make a variable
> available ... he's the
> wierd part ... it works the "first time" I enter the
> form ... but if I
> return to the form because of a validation error ...
> it fails with a
> NullPointerException in the pageContext.setAttribute
> method ... it seems to
> me the second time around it is not finding the
> value for some reason ...
> any ideas?
> 
> Bill Siggelkow
> eBusiness Lead Developer
> 678.579.6458
> Mirant
> http://www.mirant.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]>
> 


__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.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]>




Help with understanding validation and reset

2001-12-19 Thread Siggelkow, Bill

Okay, 
I do not think I understand the contract of the ActionForm validate
method.  The problem I am having is that I appear to
lose some a data value when I return to an input page after I return
validation errors.  Specifically, I have a Date property called 'postDate'
... the value of this property is displayed on the page (but NOT in a
form-field).  The date displays the first time I enter the page (after my
action that populates the form) but this property is blank (null) when I
return to the form (set as the 'input' attribute in the struts-config) to
display validation  errors.

BTW, I have set the form in the request scope in the Action mapping ...
should I be using a different scope?

Do I need to represent this date property as a hidden field on my form?  I
think that is my problem.

Ahhh - I grok!  The action servlet creates a new form when I press Submit --
this form does not have the postDate property set.

Bill Siggelkow
eBusiness Lead Developer
678.579.6458
Mirant
http://www.mirant.com


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




RE: Problem with bean:define? Issue with Date fields

2001-12-19 Thread Siggelkow, Bill

Well ... if you have been following this thread I thought I had a problem
with the 'define' tag ... actually my problem was not with the define tag.

The problem was I did not include a 'hidden' field to hold a date property
in my form bean.

Once I did this I was able to use the define as I originally intended.

It was a slight inconvenience to realize that I had to provide a special
'get/setDateAsString' type methods to hold the render/transform the date
value.

It would be nice if in the future, the Struts tags supported some automatic
conversion of Date objects.

-----Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 19, 2001 9:56 AM
To: 'Struts Users Mailing List'
Subject: RE: Problem with bean:define?


Yes that is what I am saying ... I am not sure if the bean:write works ...

(Since I found the problem I was able to find a work-around as noted in a
previous post.)
-Original Message-
From: Keith Bacon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 19, 2001 7:15 AM
To: Struts Users Mailing List
Subject: RE: Problem with bean:define?


are you saying your jsp is getting null pointer excp
in setAttribute() in the 


Keith. (not much use I suspect - try my best!).

--- "Siggelkow, Bill" <[EMAIL PROTECTED]>
wrote:
> Specifically, I am trying to use the define tag to
> define a variable based
> on a property of the FormBean as follows: (the
> getLocalDate is my own tag
> for rendering dates.
> 
>  property="postDate"
> type="java.util.Date"/>
>  style="long"/>
> 
> -Original Message-
> From: Siggelkow, Bill
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 18, 2001 11:33 AM
> To: '[EMAIL PROTECTED]'
> Subject: Problem with bean:define?
> 
> 
> I am using the bean:define tag to make a variable
> available ... he's the
> wierd part ... it works the "first time" I enter the
> form ... but if I
> return to the form because of a validation error ...
> it fails with a
> NullPointerException in the pageContext.setAttribute
> method ... it seems to
> me the second time around it is not finding the
> value for some reason ...
> any ideas?
> 
> Bill Siggelkow
> eBusiness Lead Developer
> 678.579.6458
> Mirant
> http://www.mirant.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]>
> 


__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Problem with bean:define?

2001-12-19 Thread Siggelkow, Bill

Yes that is what I am saying ... I am not sure if the bean:write works ...

(Since I found the problem I was able to find a work-around as noted in a
previous post.)
-Original Message-
From: Keith Bacon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 19, 2001 7:15 AM
To: Struts Users Mailing List
Subject: RE: Problem with bean:define?


are you saying your jsp is getting null pointer excp
in setAttribute() in the 


Keith. (not much use I suspect - try my best!).

--- "Siggelkow, Bill" <[EMAIL PROTECTED]>
wrote:
> Specifically, I am trying to use the define tag to
> define a variable based
> on a property of the FormBean as follows: (the
> getLocalDate is my own tag
> for rendering dates.
> 
>  property="postDate"
> type="java.util.Date"/>
>  style="long"/>
> 
> -Original Message-
> From: Siggelkow, Bill
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 18, 2001 11:33 AM
> To: '[EMAIL PROTECTED]'
> Subject: Problem with bean:define?
> 
> 
> I am using the bean:define tag to make a variable
> available ... he's the
> wierd part ... it works the "first time" I enter the
> form ... but if I
> return to the form because of a validation error ...
> it fails with a
> NullPointerException in the pageContext.setAttribute
> method ... it seems to
> me the second time around it is not finding the
> value for some reason ...
> any ideas?
> 
> Bill Siggelkow
> eBusiness Lead Developer
> 678.579.6458
> Mirant
> http://www.mirant.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]>
> 


__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.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]>




RE: Invalidate and container authentication in multi-app environment

2001-12-18 Thread Siggelkow, Bill

I know in WLS 6, all web apps use the same cookie name, JSESSIONID to hold
the session ID (and thus facilitate single-sign-on). In WLS 6, you can
specify a different cookie name in the weblogic.xml file for that web app if
you don't want the single-sign on behavior (which I think is what you are
seeing).  I suggest you look at the stuff on the edocs.bea.com site or
search the BEA newsgroups if you need further info.

-Original Message-
From: Michelle Popovits [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 18, 2001 4:13 PM
To: [EMAIL PROTECTED]
Subject: Invalidate and container authentication in multi-app
environment


Hi,

I have been researching the archives trying to resolve an issue.
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10294.html
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg14538.html

These threads describe my situation pretty closely (although not exactly) 
and the solutions provided have not worked for me.

I will describe the problem here again and hope that someone out there may 
be able to offer advice.

I am attempting to implement a Logout action which will log out the user and

forward them back to the main page of the application.  The main page action

itself is secure and should prompt for authentication before allowing the 
page to be viewed.
In the logout action:
a) invalidate the session
b) forward to the application's main page (redirect=true)

Now, normally if I just log into this application (let's call it Application

A), do stuff, and then log out, the logout is successful and the login page 
appears as expected.

Now, here's the twist.  If I log into another application (let's call it 
Application B) and just change the url (without logging out) to point to 
Application A, log in and then try to log out of Application A, then it does

not log out.  It behaves as though the user was still authenticated.  If I 
log out of Application B before changing the url to point to Application A 
then I am able to log out successfully.

Let's review the scenarios.

Scenario A
- bring up new browser window
- log into 'Application A'
- do stuff in 'Application A'
- log out
- result:  logs out properly.

Scenario B
- bring up new browser window
- log into 'Application B'
- change url, without logging out of 'Application B', to 'Application A'
- log into 'Application A'
- do stuff in 'Application A'
- log out of 'Application A'
- result:  does not log out properly, it should prompt for authentication 
before showing main page, but does not.

Scenario C
- bring up new browser window
- log into 'Application B'
- log out of 'Application B'
- change url to 'Application A'
- log into 'Application A'
- do stuff (ie. go to add page)
- log out of 'Application A'
- result:  logs out properly.


I guess if the users were properly disciplined to log out of their 
application before moving on to another application then this would never be

a problem...but... the world is not so perfect.

Any ideas?  Has anyone encountered this before.

I am running Weblogic 5.1 sp10 using Struts 1.0 release.


Thanks,
Michelle


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Problem with bean:define?

2001-12-18 Thread Siggelkow, Bill

Well ... I got it to work ... but I am not sure why it did not work before.
BTW, I am using Struts 1.0.

To fix the problem, instead of using the 'define' tag to make the property
available ... I used it to make the whole form bean available as follows:



I do not know why this works but the other way (using the define tag to get
the property) failed.

-Original Message-----
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 18, 2001 11:33 AM
To: '[EMAIL PROTECTED]'
Subject: Problem with bean:define?


I am using the bean:define tag to make a variable available ... he's the
wierd part ... it works the "first time" I enter the form ... but if I
return to the form because of a validation error ... it fails with a
NullPointerException in the pageContext.setAttribute method ... it seems to
me the second time around it is not finding the value for some reason ...
any ideas?

Bill Siggelkow
eBusiness Lead Developer
678.579.6458
Mirant
http://www.mirant.com


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

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




RE: Problem with bean:define?

2001-12-18 Thread Siggelkow, Bill

Specifically, I am trying to use the define tag to define a variable based
on a property of the FormBean as follows: (the getLocalDate is my own tag
for rendering dates.




-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 18, 2001 11:33 AM
To: '[EMAIL PROTECTED]'
Subject: Problem with bean:define?


I am using the bean:define tag to make a variable available ... he's the
wierd part ... it works the "first time" I enter the form ... but if I
return to the form because of a validation error ... it fails with a
NullPointerException in the pageContext.setAttribute method ... it seems to
me the second time around it is not finding the value for some reason ...
any ideas?

Bill Siggelkow
eBusiness Lead Developer
678.579.6458
Mirant
http://www.mirant.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]>




Problem with bean:define?

2001-12-18 Thread Siggelkow, Bill

I am using the bean:define tag to make a variable available ... he's the
wierd part ... it works the "first time" I enter the form ... but if I
return to the form because of a validation error ... it fails with a
NullPointerException in the pageContext.setAttribute method ... it seems to
me the second time around it is not finding the value for some reason ...
any ideas?

Bill Siggelkow
eBusiness Lead Developer
678.579.6458
Mirant
http://www.mirant.com


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




RE: Form Bean with a Mutliselect box - Followup Question

2001-12-17 Thread Siggelkow, Bill

If you want to do something on the same form with the selected IDs without
hitting the Submit button then you can use the IDs with some javascript ... 

However, if you are talking about processing the form after Submit, you can
do anything with the values.

For example, in my case, I have a wizard-style interface where in the first
screen the user picks multiple IDs, then in the second screen, details about
each of the selected IDs is displayed in a table.  To set up the second
screen, I took each ID and used those IDs to access detail data out of a
directory server (of course, this data could come thru JDBC, EJB, anywhere).

-Original Message-
From: Paul [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 12:48 PM
To: Struts Users Mailing List
Subject: RE: Form Bean with a Mutliselect box - Followup Question


Thanks Bill- just a follow up to that- can you use
MergeeIds to then pull a second hashtable/array(from a
form) to list a set of values based on the ID Select
Box? 

I guess I'm a bit confused on the syntax.

Thanks again,
Paul



--- "Siggelkow, Bill" <[EMAIL PROTECTED]>
wrote:
> I have done this by with getter/setter that uses an
> array of Strings as
> follows:
> 
> public String[] getMergeeIds() {
> return mergeeIds;
> }
> 
> public void setMergeeIds(String[] ids) {
> this.mergeeIds = ids;
> }
> 
> Then in my form I use the multiple=true ...
> 
>  multiple="true">
>property="companyIds"
> labelName="activeCompanies"
> labelProperty="companyNames"/>
> 
> 
> -Original Message-
> From: Stiles, Brian
> [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 17, 2001 11:43 AM
> To: '[EMAIL PROTECTED]'
> Subject: Form Bean with a Mutliselect box
> 
> 
> Ahhh!  I have a struts form on a jsp page that uses
> a select box that allows
> multiple selections.  I am wondering how to setup my
> form bean to handle
> this or if struts will even do it.  I have tried
> using an Array getter and
> setter in the form bean, and an Array List, but I
> continue to get a argument
> type mismatch.  
> 
> Has anyone accomplished this, if so how?
> 
> Brian Stiles
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.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]>




RE: Form Bean with a Mutliselect box

2001-12-17 Thread Siggelkow, Bill

I have done this by with getter/setter that uses an array of Strings as
follows:

public String[] getMergeeIds() {
return mergeeIds;
}

public void setMergeeIds(String[] ids) {
this.mergeeIds = ids;
}

Then in my form I use the multiple=true ...


  


-Original Message-
From: Stiles, Brian [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 11:43 AM
To: '[EMAIL PROTECTED]'
Subject: Form Bean with a Mutliselect box


Ahhh!  I have a struts form on a jsp page that uses a select box that allows
multiple selections.  I am wondering how to setup my form bean to handle
this or if struts will even do it.  I have tried using an Array getter and
setter in the form bean, and an Array List, but I continue to get a argument
type mismatch.  

Has anyone accomplished this, if so how?

Brian Stiles




--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: How to list options in order?

2001-12-14 Thread Siggelkow, Bill

I see two primary options ...
(1) use a TreeMap instead of a Hashtable 
However, to me this be unnecessary if the sorting is purely for presentation
purposes, or
(2) Create a JavaBean that holds two lists ... one for the option values and
one for the option labels ... sorted according to the labels.

I have done this on numerous occasions where I have a collection of things
that contain IDs for use as values and then names for use as labels ...
Basically, I first sort the collection according to the field I want
(typically, I do this using a Comparator) then I create two lists one for
the values and one for the labels.

Of course, if you are accessing the data from a database and can do the
sorting there it is preferable then sorting in the middle tier.

BTW, I am using Struts 1.0 -- there may be features in the nightly build
that make this easier.

-Original Message-
From: Sue Deng [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 14, 2001 3:20 PM
To: [EMAIL PROTECTED]
Subject: How to list options in order?


Hi,

I am using html:select and html:options like this:

   
 
   

The organization is a collection of Hashtable.

Is there any way I can list the options in labelProperty order?

Thanks,

-Sue


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Setting content attributes

2001-12-14 Thread Siggelkow, Bill

request.getContext()/stylesheet.css"/>


-Original Message-
From: Luke Studley [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 14, 2001 3:13 PM
To: struts-user
Subject: Setting content attributes



How do you set the values from scripting variables or the results of tag
library elements of attributes for output html tags when you are using XML
version of JSP?

E.g.


Simply puts the above string directly in the output (unsurprisingly - I was
getting desperate trying that). If I try to use  instead the
page doesn't compile as the resulting fragment is not valid XML.

Apologies for the basic question - this is driving me nuts!!

Any pointers appreciated.

Luke





--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: FORM Authentication to Realm

2001-12-12 Thread Siggelkow, Bill

It seems like you are wanting to bypass the authentication check and I don't
that is permitted using form-baased authentication.

-Original Message-
From: David Bolsover [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 11, 2001 5:15 PM
To: Struts User
Subject: FORM Authentication to Realm


Hi all

Can anyone help with these problem?

Problem 1

I would like to be able to use the Tomcat JDBCRealm features in concert with
struts - the problem is this - how can I provide a hypertext link in an
e-mail I send to users that will allow users to log into my struts webapp
without having to manually type the j_username and j_password into the web
browser.  I'm sure that this should be simple but the solution eludes me.  I
would like to use the JDBCRealm features because of the good facilities this
provides for controlled access to privileged data.

Here is the form I'm using:



userID
Password





Problem 2

Once authenticated into the JDBCRealm, how can I then 'automatically' pass
the user into my struts webapp - extracting username (perhaps remoteUser
info) as I go?



David Bolsover
T:+44(0)1614276920
F:+44(0)1614276922
M:07773428118
E:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: File in DB vs. File system part2

2001-12-10 Thread Siggelkow, Bill

You can force a refresh with JavaScript like ...


function _refresh() {
window.location.reload(true);
}


Then you can call this function if the pic has been updated.
I have not actually tested this so YMMV.

-Original Message-
From: Andy Timm [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 08, 2001 5:40 PM
To: Struts Users Mailing List
Subject: File in DB vs. File system part2


Hello.  First, thanks for all of the great advice. 
I've decided to store the files in the file system and
have written a little method that creates a sub-folder
based on the month/year that the user registered.  I'm
storing pictures with the same name as the username in
this directory.  The only thing I'm storing in the
database is the file type (gif, jpg).  Another method
takes the username, looks up the sub path (appends it
to a base path read from a config file), grabs the
file type and returns the HTML  tag that shows
the pic as either a thumbnail or fullsize.  My next
problem is in updating this picture.  I have an update
page that calls the 'showPic' method so users can see
what pic is current, then allows them to enter a path
to a new pic if they want to change their picture. 
Say I enter a new picture and submit.  The new picture
overwrites the old one, and in the next page (which
shows all the users' properties), I'm calling the same
'showPic' method to show the current pic (along with
other properties).  The picure on the file system HAS
been changed - my problem is that the old pic has been
cached somewhere and is displaying on the properties
page.  If I refresh the page, the new pic is
displayed.  Where is this cached?  How can I force a
reload, or force the page to refresh?  
I'm new to all this, so I welcome comments on my
strategy - I'm aware that it probably isn't the best
solution - I'm on a tight deadline and am more
concerned with getting things working.  This project
is a learning experience.  How can I fix my refresh
problem?  Thanks for your time, Andrew Timm

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Tomcat + Struts in Production Environment

2001-12-10 Thread Siggelkow, Bill

You don't have to use EJBs just to take advantage of an app server's
connection pooling.

>I think the advantage of using EJB is that the App
>Server has connection pooling. And AppServers supports
>caches (??)

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




RE: setting a default bean for logic tags

2001-12-05 Thread Siggelkow, Bill

I believe that the name attribute can take a request-time expression that
you could
use for this purpose.

-Original Message-
From: Mike Hoeffner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 2:49 PM
To: [EMAIL PROTECTED]
Subject: setting a default bean for logic tags



Is it possible to set a default bean for logic tags like it is for form tags
so that they don't have to be named in each logic tag?

If I don't specify the "name" in an  tag, the "name" from the
parent form and its corresponding action tag will be used.  For example, in
the below  tag, fooForm will be used as the "name" from the
parent form since the "name" is not specified.

 
 ...
 

 

Is there a way to do this with logic tags?  I have lots of redundant logic
tags that need to use different beans, but since I have to have a different
value for the "name" on all of them, there's no clean way to reuse the JSP.

Thanks,
Mike


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Populating form in the action

2001-12-05 Thread Siggelkow, Bill

It knows because you access the form via the  tag.

-Original Message-
From: John Ng [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 2:25 PM
To: Struts Users Mailing List
Subject: Populating form in the action 


Hi, I have some questions about how to populate the
form in the action.

For instance, I create a ActionForm in the perform
method of the Action class, and then forward the
control to a jsp page.  How does the JSP page know
that the form that it gets is the form that just get
populated in the Action before?  (Provided the form is
the request scope).

Thanks
John


__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: html:link href to external URL in a

2001-12-05 Thread Siggelkow, Bill

You can do this by just coding the link in with an HTML anchor tag as
folows:
">



or use an expression





-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 11:03 AM
To: Struts Users Mailing List
Subject: html:link href to external URL in a 



Hi

This may be in the FAQ/archive but I can't find it!

If I have a dynamically generated external URL available in the
request/session object, e.g. "http://www.banana.com";, how do I write a
 tag such that the link takes the user to that external
URL? (Without using scriptlets?)

I effectively want to do: ">



but can't do nested tags.

How do I dynamically populate the content of the href attribute?

Help please!

Thanks

Rob Breeds




--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Logout Action

2001-11-29 Thread Siggelkow, Bill

I am using form-based authentication on WLS 6.1 sp1 and do not see this
behavior.
-Original Message-
From: Cameron Ingram [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 11:17 AM
To: [EMAIL PROTECTED]
Subject: Logout Action


Hi all and thanks in advance!

I have a link that I map to a logout.do action. In this action it
basically cleans up the resources and so forth.
It clears the objects that I loaded in to the session. It then
invalidates the session and then sends the user to a new page.
So here is the problem. 

The first time the user goes through the application every thing works
as it should.
Then if the user goes back to the login page(with out closing the
browser) and goes through the app again. Then clicks on the logout link
the user is forwarded to the logout page but the log out action does not
seemed to be called. I checked the session objects in login section and
they are definitely present when they shouldn't be.
By the way this does not happen if the user kills the browser and then
re-opens.

Any ideas on what could be causing this???



--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: check for null collection

2001-11-29 Thread Siggelkow, Bill

The way I do it is to create a variable using the bean:size tag that
represents the size of the collection ...
Then I check if that value is 0 as follows ... (in addition you might want
to also check if the collection is present as you are doing)



No reports available.


-Original Message-
From: Thinh Doan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 28, 2001 2:53 PM
To: Struts-User
Subject: check for null collection


I've defined the following collection but don't know how to use the logic
tag to check if it contains no data to display appropriate message:





...



 No members




Thanks in advance,

Thinh


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Inconsistent error uploading PDF

2001-11-21 Thread Siggelkow, Bill

Thanks for the response ... Mike ... I am using Struts 1.0 Final ...
actually,
I just tried out the patch that was part of bug 3702 and it fixed the
problem.

What is the time line for 1.0.1?

-Original Message-
From: SCHACHTER,MICHAEL (HP-NewJersey,ex2) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 11:36 AM
To: 'Struts Users Mailing List'
Subject: RE: Inconsistent error uploading PDF


Bill,

What version of Struts are you using?  This problem
is addressed in the coming 1.0.1 version of Struts and
also should be working fine in the nightly builds.


-Original Message-----
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 11:15 AM
To: '[EMAIL PROTECTED]'
Subject: Inconsistent error uploading PDF


I having inconsistent errors displayed by acrobat after uploading a PDF file
using the Struts (via the FormFile) ...
The file size is the same however, acrobat says "There was a problem
processing the page ..." then something about an error (110) ... or
sometimes error (16) ...

I have been unable to coorelate this problem with anything I am doing in my
code that saves the file ... it is however, consistent with the file ...
that is, the files that fail always fail, and the ones that succeed always
succeed.

Has anyone else encountered this problem ... is this the problem that was
addressed by bug fix #3702?

Bill Siggelkow
eBusiness Lead Developer
678.579.6458
Mirant
http://www.mirant.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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Inconsistent error uploading PDF

2001-11-21 Thread Siggelkow, Bill

I having inconsistent errors displayed by acrobat after uploading a PDF file
using the Struts (via the FormFile) ...
The file size is the same however, acrobat says "There was a problem
processing the page ..." then something about an error (110) ... or
sometimes error (16) ...

I have been unable to coorelate this problem with anything I am doing in my
code that saves the file ... it is however, consistent with the file ...
that is, the files that fail always fail, and the ones that succeed always
succeed.

Has anyone else encountered this problem ... is this the problem that was
addressed by bug fix #3702?

Bill Siggelkow
eBusiness Lead Developer
678.579.6458
Mirant
http://www.mirant.com


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




RE: Logic:empty

2001-11-19 Thread Siggelkow, Bill

Use the logic:notPresent tag

-Original Message-
From: Ines [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 5:30 PM
To: [EMAIL PROTECTED]
Subject: Logic:empty


I canĀ“t find the empty tag. 
The documentation presents it but I could not find the class.

The problem i have is that I want to check if a bean is null. In that case i
have to print some data

Is there any tag that could help me with this problem?

Thanks a lot!

Ines Pederiva.

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




RE: Newbe - problem with Struts-Config.xml

2001-11-02 Thread Siggelkow, Bill

I apologize if I gave out incorrect information.  I did not realize that you
could place the JSPs in the WEB-INF ... learn something new every day.

-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 12:32 PM
To: Struts Users Mailing List
Subject: RE: Newbe - problem with Struts-Config.xml



You can have your JSPs in the WEB-INF directory - I use that and it works
fine.

Are you using a  in your JSP?

Rob Breeds




|+->
||  "Drozdowski, Terry"|
||   |
|| |
||  02/11/2001 16:57   |
||  Please respond to  |
||  "Struts Users  |
||  Mailing List"  |
|| |
|+->
 
>---
|
  |
|
  |  To: "'Struts Users Mailing List'"
<[EMAIL PROTECTED]>   |
  |  cc:
|
  |  Subject: RE: Newbe - problem with Struts-Config.xml
|
  |
|
  |
|
 
>---
|




what if you want to use the JSP in WEB-INF technique so you can rely on
container authentication to protect your JSPs from prying eyes?

--
Terry Drozdowski
Staff, Technology Services
SIM Technology - Phoenix
Charles Schwab & Co.
(602)355-8843

Warning: All e-mail sent to this address will be received by the Charles
Schwab Corporate e-mail system and is subject to archival and review by
someone other than the recipient.


-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 9:41 AM
To: 'Struts Users Mailing List'
Subject: RE: Newbe - problem with Struts-Config.xml


Your JSPs should not be in your WEB-INF folder ... try moving it up.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 10:40 AM
To: [EMAIL PROTECTED]
Subject: Newbe - problem with Struts-Config.xml


Hello,

I am relatively new to Struts and am encountering a problem with the
struts-config.xml file.  I have set up a global-forwards like below:



Then I set up an action like below:




Then I wrote the following index.jsp page:

<%@ page language="java" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


Now when I hit index.jsp, I receive a blank page from Tomcat 4.0.  If I
review the Tomcat logs, I see that it encountered a 404, but why?  I
thought
it should have found the action "/Menu" and forward it to the menu.jsp.

I am sure this is something simple, but I can't seem to see what wrong with
the above.  This is running under Struts 1.0 and Tomcat 4.0.

Any assistance is greatly appreciated.

Regards,

Todd G. Nist
[EMAIL PROTECTED]

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

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

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





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

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




RE: Newbe - problem with Struts-Config.xml

2001-11-02 Thread Siggelkow, Bill

Your JSPs should not be in your WEB-INF folder ... try moving it up.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 10:40 AM
To: [EMAIL PROTECTED]
Subject: Newbe - problem with Struts-Config.xml


Hello,

I am relatively new to Struts and am encountering a problem with the
struts-config.xml file.  I have set up a global-forwards like below:



Then I set up an action like below:




Then I wrote the following index.jsp page:

<%@ page language="java" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


Now when I hit index.jsp, I receive a blank page from Tomcat 4.0.  If I
review the Tomcat logs, I see that it encountered a 404, but why?  I thought
it should have found the action "/Menu" and forward it to the menu.jsp.

I am sure this is something simple, but I can't seem to see what wrong with
the above.  This is running under Struts 1.0 and Tomcat 4.0.

Any assistance is greatly appreciated.

Regards,

Todd G. Nist 
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Weird problem (WAS)

2001-10-25 Thread Siggelkow, Bill

Check your url patterns for the ActionServlet servlet mapping in your
web.xml.

-Original Message-
From: Aapo Laakkonen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 10:12 AM
To: [EMAIL PROTECTED]
Subject: Weird problem (WAS)


Seems like my struts installation doesn't work anymore as expected. All my
forms do not have .do added to the end of action url anymore. It's
interesting because html:links does work. What can cause this behavior? I
did not do anything except updated my own jar-package.



RE: problems mapping multiple ActionServlets

2001-07-23 Thread Siggelkow, Bill

I had the same question last week (and for some reason did not get any
response from
the mailing list?)  ... anyway, it seems to me that Struts really does not
handle multiple
servlet mappings for the ActionServlet.  When using extension mappings,
Struts finds the action mapping to use by stripping off the ".do", or any
other extension, and using that as the path for determining the action
mapping.  I was trying to do a similar thing where *.do was the authorized
stuff, and *.go was to be the anonymous stuff ... it ended up that the
generated URLs always became *.go!  I think it is simply using the "last"
mapping specified.

My plan is to only use one extension mapping for my ActionServlet and come
up with a different mechanism for applying my security constraints.
Possibly by a vitual path where I would have 
*.do -> as my ActionServlet servlet mapping
Then I would use ...
/protected/*.do for restricted pages ...
Then I could set up a security constraint for "/protected/*"

My 2 cents ...

-Original Message-
From: Dave Allen [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 23, 2001 3:12 PM
To: [EMAIL PROTECTED]
Subject: problems mapping multiple ActionServlets


This might be more appropriate for the Tomcat user
list, but I'll try anyway.  I'm using Tomcat 3.2.2
and trying to map multiple ActionServlets in
web.xml.  I have a  for "*.do"
which I execute for the form action "search.do",
and everything works fine when this is the only
 in web.xml.  But as soon as I
add another  for "*.authDo", when
I try to execute "search.do", "search.authDo" is
called (it even appears in the URL), which I don't
understand since I don't call "search.authDo" from
anywhere in my page (or anywhere on the site).  If
I the change to added mapping to any name, like
"*.anything", "search.anything" is called . 

The pertinent code is below.  Many advanced
thanks.

Dave

>From the jsp:


>From web.xml:


Action

org.apache.struts.action.ActionServlet

application
   
com.getcare.servlet.ErrorMessages


config
   
/WEB-INF/struts-config.xml


validate
true

1

 

authAction

com.getcare.servlet.CaretoolActionServlet

application
   
com.getcare.servlet.ErrorMessages


config
   
/WEB-INF/struts-auth-config.xml


validate
true

1



Action
*.do



authAction
*.authDo




multiple servlet mappings for action servlet?

2001-07-19 Thread Siggelkow, Bill

What are the implications if I have multiple URL mappings for my
ActionServlet?  Specifically, say I configure '*.do' and '*.go' as mappings.
I may want to do this for security reasons, let's say, where *.do is for
security-constrained web resources and *.go is for non-security constrained
resources.  Specifically, what should be the behavior if I use the 'link'
tag?   Is there a better way of doing this?  I ran into this situation where
I created a single form for handling user registration as well as user
profile editing.  I pass in a request parameter that identifies if it is
"register" or "edit".  The problem is that I had initially set up *.do as a
security constrained web resource collection.  However, then I couldn't
access the URL for registering, so I created the *.go mapping ... then I
created an Register action that simply included the edit action ... 

Bill Siggelkow
eBusiness Lead Developer
678.579.6458
Mirant
http://www.mirant.com




*Test Only* - Is this message working -- please reply

2001-07-19 Thread Siggelkow, Bill



Bill Siggelkow
eBusiness Lead Developer
678.579.6458
Mirant
http://www.mirant.com




RE: URI is null error on ActionForward

2001-07-19 Thread Siggelkow, Bill

Use 'mapping.findForward("success")' instead of creating a new ActionForward
as the return value of your perform method.
This will use the local forward defined for your action, or if not
specified,
will try and find a global forward named "success".

-Original Message-
From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 11:14 AM
To: '[EMAIL PROTECTED]'
Subject: RE: URI is null error on ActionForward


FYI - I usually get this when I have  a datasource configured in the
struts-config.xml but if for some reason the database cant be accessed 

-Original Message-
From: Jon Brisbin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 7:07 AM
To: Struts List
Subject: URI is null error on ActionForward


I have a really simple action forward just like many I've used in the past.
I am getting this error on JRun 3.1 EE.  I have included an excerpt from my
struts-config.xml and my action class to see if you y'all see something I
just do not...I just added the redirect="true" and it does the same thing.

Thanks for any help you can give me here! :-)

Jon Brisbin
Lamar, MO
[EMAIL PROTECTED]


java.lang.IllegalArgumentException: URI is null
 at
allaire.jrun.servlet.JRunSE.getRequestDispatcher(../servlet/JRunSE.java:1937
)
 at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1750)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
 at
allaire.jrun.session.JRunSessionService.service(../session/JRunSessionServic
e.java:1082)
 at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
 at
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
patcher.java:89)
 at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
 at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
 at allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
 at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
 at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
 at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)


My struts config excerpt follows:

  
  



 


  


My action class forwards like such:

// Set our utility objects
HttpSession session = request.getSession(true);
MessageResources messages = getResources();
CategoryForm form = (CategoryForm)actionForm;

request.setAttribute("formxml", form.getXml());

getServlet().getServletContext().log("Forwarding to success.");
return (new ActionForward("success"));



RE: logic:equal tage's value attribute

2001-07-19 Thread Siggelkow, Bill

I think your getting the error because of the placement of the quotes.
Try using single quoutes around the JSP expression as follows ...




-Original Message-
From: Rachel Warburton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 5:56 AM
To: Struts-User (E-mail)
Subject: logic:equal tage's value attribute


Does anyone know a better to do this?:

I'm comparing the value of a bean property with a parameter from the
request. Therefore I'm expecting to be able to get the value from the
request in the value attribute as follows:

">


However, this gives an error of:  
 Non-matching extension tags
probably occurred due to an error in
/pages/questionnaire/QuestionnaireHome_Body.jsp line 75:
 
However, if I get the value from the request first and use that in the value
attribute, it works.

   <%
String qnrId = request.getParameter("qnrId");
%>




Anyone any ideas?

cheers,
Rachel


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**



RE: disconnect

2001-07-17 Thread Siggelkow, Bill

Your app server should allow you to set a timeout on the HttpSession ...
also, you can invalidate the session yourself by calling
'session.invalidate()'.  I do not know of a way to directly determine if a
user has closed the browser ...

-Original Message-
From: Rakesh [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 9:19 AM
To: [EMAIL PROTECTED]
Subject: disconnect



I am not sure if this question belongs here.
 
I have a web app (in struts). I need to expire the session if the user gets
disconnected (and does not close the browser window). Any hints on how this
is to be done ?
 
 
 
 Rakesh Ayilliath
(Software Engineer)
 
Synergy IT Innovations Pvt Ltd,
#196, 1st Floor, 9th Cross,
HMT Layout, RT Nagar
Bangalore 560032
 
[EMAIL PROTECTED]  
www.ayilliath.8m.com  




RE: indexed property iteration

2001-07-17 Thread Siggelkow, Bill

What you *really* should do is use the Struts "iterate" tag in the logic
TLD. 
Using scriptlet is generally a *bad* thing ... however, if you really wanted
to do this you need to use a JSP expression for the property value like this
...
   Text: 


-Original Message-
From: Ramakrishna Reddy Kandula [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 9:36 PM
To: [EMAIL PROTECTED]
Subject: indexed property iteration



How do I achieve indexed property access dynamically ?

The following doesn't work.


<%
   TestForm testForm = (TestForm) session.getAttribute("testForm");
   int i = 0;
   for (i=0; i < testForm.getNames().length; i++) {
%>
   Text: 
<%
   }
%>
   Go


It says,
javax.servlet.ServletException: Invalid indexed property 'names[i]'

Thanks,
ramky



  1   2   >