About Tiles

2004-08-16 Thread Koon Yue Lam
Hi, I want to build a webpage using tiles, the structure is:

Header
Body
Footer

super classic layout but I have one question, if the content in Header
and Footer are read only and will be nearly the same throughout entire
user session. How can I just reload the body part? and keep the Header
and Footer static?
(the content of Body is generated according to the content of Header)

however, each user will have a page to modify their info (name,
age...), and after these changes have made to DB. Both Header and
Footer must force to reload

so how can I trigger reload of Tiles as I wish, but keep those tiles
static for the rest of time??

Best regards

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



RE: Multiple Tiles Definitions Factories in a servlet context?

2004-08-16 Thread Alef Arendsen
Guys,
 
just wanted to pop this one up again. A user on our list has problems applying 
multiple tiles definition factories. Is there any way this is possible??
 
Thanx,
 
Alef Arendsen



From: Alef Arendsen
Sent: Mon 8/2/2004 10:45 AM
To: [EMAIL PROTECTED]
Subject: Multiple Tiles Definitions Factories in a servlet context?



Hi guys,

A user on our list (Spring) has configured two servlets both including a
Tiles Definitions Factory using Spring's integration code. The
TilesUtilsImpl however specifies a static identifier (which we're using
to bind the factory in the servlet context) for the factory, causing the
first Definitions Factory to be overwritten by the second one.

Any idea how to solve this?

Thanx,

Alef Arendsen
(Spring developer)



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








Re: Tiles breaks my page that uses logic:iterate

2004-08-16 Thread Janne Mattila
With Tiles:









without tiles (works fine):









So, three actions. "Init" is called only the first time to give default 
values, after that it is Save => Get => Save => Get and so on as long as 
user keeps submitting the form. Purpose of "Get" (and also "Init") is to 
read the collection of possible choices (allChoices) from database.



From: "Niall Pemberton" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Tiles breaks my page that uses logic:iterate
Date: Mon, 16 Aug 2004 15:36:07 +0100
OK so post the bits of your struts-config which show the forms and action
mappings for
1) The action which renders the page
2) The action the form will post to (i.e. "/TilesSaveInputs")
Niall
- Original Message -
From: "Janne Mattila" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 16, 2004 3:13 PM
Subject: Re: Tiles breaks my page that uses logic:iterate
> Yes. And, (for example)
>
> 
>
> works as long as I take out the multibox part.
>
>
> >From: "Niall Pemberton" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: Tiles breaks my page that uses logic:iterate
> >Date: Mon, 16 Aug 2004 15:09:57 +0100
> >
> >I'm guessing you changed the action your form is pointing to
> >("/TilesSaveInputs") - so is the form name still "inputsForm"?
> >
> >  >  
> >property="allChoices">
> >
> >Niall
> >
> >- Original Message -
> >From: "Janne Mattila" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Monday, August 16, 2004 2:59 PM
> >Subject: Tiles breaks my page that uses logic:iterate
> >
> >
> > > I have a simple page for editing some form properties. It works.
There's
> >a
> > > select box, a multibox, single-select select and a text input field.
Now
> >I
> > > tried to "Tiles-ify" it, just using Tiles to add some silly
decorations
> > > around the actual form. Using tiles seems to break the form, the
> >exception
> >I
> > > get is
> > >
> > > 16:49:43,714 ERROR [Engine] - Root Cause -
> > > javax.servlet.ServletException: Cannot find bean choice in any scope
> > > at
> > >
>
>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
p
> >l.java:533)
> > > at
> > >
>
>org.apache.jsp.inputs_0002dcontent_jsp._jspService(inputs_0002dcontent_jsp.
j
> >ava:103)
> > > at
> > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at
> > >
>
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
2
> >10)
> > > at
> > >
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> > > at
> >org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at
> > >
>
>org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher
.
> >java:684)
> > > at
> > >
>
>org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatc
h
> >er.java:575)
> > > at
> > >
>
>org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatche
r
> >.java:498)
> > > at
> > >
>
>org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:
8
> >22)
> > > at
> > >
>
>org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
> > > at
> > >
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> > > at
> >org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
> > > at
> > > 
org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
> > > at
> > >
>
>org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.j
a
> >va:881)
> > > at
> > > 
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
> > > at
> > >
>
>org.apache.jsp.template_jsp._jspx_meth_tiles_insert_1(template_jsp.java:197
)
> > > at
> > >
> 
>org.apache.jsp.template_jsp._jspx_meth_html_html_0(template_jsp.java:109)
> > > at
org.apache.jsp.template_jsp._jspService(template_jsp.java:63)
> > > at
> > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at
> > >
>
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
2
> >10)
> > > at
> > >
org.apache.jasper.servlet.

RE: Missing message for key

2004-08-16 Thread Kataria, Satish
Hi,
Have you kept the properties file in the classpath.
Can you check this?
Thanks,
Satish


-Original Message-
From: Bibhu Kalyan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 17, 2004 10:59 AM
To: [EMAIL PROTECTED]
Subject: Missing message for key 


Hi All,
I have a typical problem. Recently I developed a new page with struts
1.1. All the labels of the page come from the properties file. I access
these labels with bean:message tag. 

Example :  

This works fine in my local server where struts 1.1 is there. When I
moved this to remote server which has struts 1.0 it gives me error like
following.
javax.servlet.jsp.JspException: Missing message for key
Workqueue.DecisionSummary.MainApplicant

Both these server has Apache webserver and OC4j container.

The key is there in properties file and it is in path as defined in
Web.xml. Most strange is other pages those were developed before are
getting the other keys properly. But all these new keys are not
accessible. Is there a size or number of key limitation  for properties
file?  None of the new pages getting the keys. Apache/OC4j Restated so
many times and I am trying to figure this from last two days without
luck.

Please help.

Thanks in Advance.
Regards,
Bibhu





Information transmitted by this EMAIL is proprietary to iGATE Group of
Companies and is intended for use only by the individual or entity to
whom it is addressed and may contain information that is privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient of this EMAIL immediately notify the sender
at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any
attachments.

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



Missing message for key

2004-08-16 Thread dangmp

Return Receipt
   
Your  Missing message for key  
document   
:  
   
was   Dang Minh Phuong/MIS/MECS/SG 
received   
by:
   
at:   08/17/2004 01:43:48 PM   
   






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



Missing message for key

2004-08-16 Thread Bibhu Kalyan
Hi All,
I have a typical problem. Recently I developed a new page with struts
1.1. All the labels of the page come from the properties file. I access
these labels with bean:message tag. 

Example :  

This works fine in my local server where struts 1.1 is there. When I
moved this to remote server which has struts 1.0 it gives me error like
following.
javax.servlet.jsp.JspException: Missing message for key
Workqueue.DecisionSummary.MainApplicant

Both these server has Apache webserver and OC4j container.

The key is there in properties file and it is in path as defined in
Web.xml. Most strange is other pages those were developed before are
getting the other keys properly. But all these new keys are not
accessible. Is there a size or number of key limitation  for properties
file?  None of the new pages getting the keys. Apache/OC4j Restated so
many times and I am trying to figure this from last two days without
luck.

Please help.

Thanks in Advance.
Regards,
Bibhu





Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and 
is intended for use only by the individual or entity to whom it is addressed and may 
contain information that is privileged, confidential, or exempt from disclosure under 
applicable law. If you are not the intended recipient of this EMAIL immediately notify 
the sender at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any 
attachments.

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



RE: connection pooling

2004-08-16 Thread Jignesh Patel
Suppose I will put following code in my struts-config.xml instead of
tomcat's server.xml will it work as per the expectation for abandoned
connection.


  
 
   
   

   



-Jignesh
On Mon, 2004-08-16 at 18:20, Jim Barrows wrote:
> > -Original Message-
> > From: Saurabh Bhatla [mailto:[EMAIL PROTECTED]
> > Sent: Monday, August 16, 2004 3:16 PM
> > To: Struts Users Mailing List
> > Subject: RE: connection pooling
> > 
> > 
> > Jim,
> >   I understand most part of it now. the only thing that i dont
> > understand is how will the connection pooling be handled. I am using
> > tomcat 5. will the following code(from the link that u sent me) serve
> > the purpose?
> > 
> > 
> > 
> > 
> >  >   property="driverClassName"
> >   value="org.postgresql.Driver" />
> >  >   property="url"
> >   value="jdbc:postgresql://localhost/mydatabase" />
> >  >   property="username"
> >   value="me" />
> 
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
> The short version is that it is handled automagically for you.  No need to borrow or 
> return the connection etc.
> 
> 
> > .
> > .
> > .
> > ..
> > 
> > regards
> > saurabh
> > 
> > 
> > 
> > On Mon, 2004-08-16 at 16:45, Jim Barrows wrote:
> > > > -Original Message-
> > > > From: Saurabh Bhatla [mailto:[EMAIL PROTECTED]
> > > > Sent: Monday, August 16, 2004 2:42 PM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: connection pooling
> > > > 
> > > > 
> > > > Jim,
> > > >I am sorry but I am confused now. Just correct me if I am
> > > > wrong I want to call my DAO from my Action class. So 
> > > > the snippet
> > > > that you sent me would go in my DAO class in the function
> > > > getConnection() (or something like that). 
> > > 
> > > Yes, that is correct.  I acutally implment that in my 
> > DaoFactory class, and put the resultant connection from the 
> > data source in the DaoFactory class.  That allows me to 
> > easily de-couple the dao class for testing.
> > > 
> > > >  And if what I said is correct then does it mean that I 
> > > > dont need to
> > > > have a connection pool class and my webserver would 
> > handle everything
> > > > for me.
> > > 
> > > Depends on the web server... websphere has it's own, tomcat 
> > allows you to have several choices, and I have no idea what BEA does.
> > > 
> > > 
> > > > 
> > > > regards
> > > > saurabh
> > > > 
> > > > On Mon, 2004-08-16 at 16:29, Jim Barrows wrote:
> > > > > > -Original Message-
> > > > > > From: Saurabh Bhatla [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Monday, August 16, 2004 2:24 PM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: Re: connection pooling
> > > > > > 
> > > > > > 
> > > > > > David,
> > > > > >   But i want to make a business layer and call the DAO 
> > > > from there.  I
> > > > > > think that the links that you have sent me couple 
> > > > > > presentation layer and
> > > > > > database tightly. I know i can use EJB for presentation layer 
> > > > > > but I dont
> > > > > > want that as it would be overkill for the small project I am 
> > > > > > working on.
> > > > > > I want to have a connection pool class initialized at 
> > the time the
> > > > > > server starts and then all my DAO  should get the 
> > > > connection from that
> > > > > > pool. Is it possible?
> > > > > >   I am a beginner in this field and I might not understand it
> > > > > > completely. please correct me if i am wrong.
> > > > > 
> > > > > Ah, okay.. I also posted a link to the struts way to do the 
> > > > JNDI data source stuff in that case.. you follow your web 
> > > > app servers guide on how to setup a data source, then you 
> > > > follow the destructions for a normal jndi data source. 
> > Something like:
> > > > > 
> > > > > /**
> > > > >  * 
> > > > >  */
> > > > > public static DataSource getDataSource() throws 
> > > > NamingException {
> > > > > if (ds == null) {
> > > > > Context ctx = (Context) new InitialContext();
> > > > > ds =
> > > > > (DataSource) ctx.lookup(
> > > > > "jdbc/yourDataSource);
> > > > > }
> > > > > return ds;
> > > > > }
> > > > > 
> > > > > > regards
> > > > > > saurabh
> > > > > > 
> > > > > > 
> > > > > > 
> > > > 
> > -
> > > > > > 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: Connection and Tomcat server

2004-08-16 Thread Jignesh Patel
I can say, this is purely a connection closing problem.

That's the reason when you restart the tomcat it works fine till the
time all the connection in the connection pool utilize and then after it
hangs.

Are u closing your connection in finally block?

-Jignesh
On Mon, 2004-08-16 at 02:14, Rajesh wrote:
> Hai guys
> 
> am still fasing same problem with my struts,tomcat with mysql.
> 
> am working in the environment of tomcat,struts,dbcp,JP2, mysql..
> 
> i developed a site of round 20-50 actions which accesses db through DBCP 
> to MySQL
> 
> i completely debugged my site theroughly, there is no but in my code.
> 
> i uploaded the site to net, after a using the site successfully suddenly 
> my connections is not working .
> 
> i found this by my index page where i am using 2 message board which 
> takes top 5 records from db and displays it in text scrolling javascript
> 
> where ever am connection to mysql through getDataSource(request)  am not 
> gettign connection properly.
> 
> i am properly closing connection in my program
> 
> but when i restart my tomcat then my program start working properlty 
> then after a day or so the same problem arrice.
> 
> can anybody help me to overcome this.
> 
> am fasing the same problem for many days.
> 
> thanks  you
> Rajesh
> 
> -
> 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: html:text - want to set disable= to a bean value

2004-08-16 Thread Stuart Guthrie
Thanks Rick.

I need to rely on the backend to decide whether to enable/disable as the
requirement is a 'business rule' not an interface decision. Here are the
factors:

- What 'stage' is this row of the table reached determines if this field
can be changed or not.
- What 'security level' the current session's user has determines
enable/disable.

So unfortunately, putting all this in the view would lead to huge
amounts of choosings. I'd rather the view was really dumb and just
reacted to decisions @ the backend.


> Then you can do:
>  disable="${userFormBean.customerCodeEnabled}"  />

This looks promising. Thanks for your help..



Stuart


On Tue, 2004-08-17 at 01:24, Rick Reumann wrote:
> Stuart Guthrie wrote:
> 
> > Hi there, 
> > 
> > What I'm trying to do is re-use the same jsp for ADD/UPDATE modes. In
> > order to do this, certain field attributes will be different depending
> > on the modes and sometimes even on the user's security credentials or
> > the 'status' of the customer row.
> > 
> > To this end I need to pass in the form bean whether a particular field
> > is disabled or not
> 
> I usually don't like to have my formBean take care of holding this 
> information. Not that it's necessarily bad, I just sort of like having 
> my form beans as dumb as possible and only maintain form captured 
> information.
> 
> What I do in the above is base what to display on a "userAction" which 
> actually ends up corresponding to my dispatch Action method name. This I 
> will sometimes add as an ActionForm property (ie String userAction ).
> 
> I then control the dispaly based on this userAction ( "update", "add"). 
> You'll end up with a bit more verbose code but I find it easier to 
> maintain.. so for example
> 
> You might have a case where if you are doing an update you can't update 
> the User Name but can update other fields:
> 
> Name:
> 
>
>   
>
>
>   
>
> 
> 
> If you really want you can do your approach though but you'll have to 
> use the html-el tags
> 
> Then you can do:
>  disable="${userFormBean.customerCodeEnabled}"  />
> 
> where customerCodeEnabled would correspond to "true" or "false" and be 
> set accordingly. I don't like this approach though because you'll end up 
> having to code a bunch of these for different fields and you've made 
> your backend responsible for figuring out how to display the info on the 
> page ( he he I say I don't like this, and now I'm on a project where the 
> whole application is going to be coded by meta-data to tell the front 
> what to display.. but still in theory I don't like it:)
> 


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



multiselect with a map-backed form property

2004-08-16 Thread Adam Murray
I have a form with a dynamically generated list of constraints that can
be turned on or off, and each constraint has a set of values associated
with it. My form has two relevant fields:

private String[] selectedConstraints;
private Map values;

public String[] getSelectedConstraints() {
return selectedConstraints;
}
public void setSelectedConstraints(String[] selectedConstraints) {
this.selectedConstraints = selectedConstraints;
}

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


To keep track of which values are associated with which constraint, I
use the string from the selectedConstraints array as the key into the
values map. My jsp page looks like this:



  


  



  

 
   
 
...


The above works perfectly fine as long as only want to select a single
item from the select drop-down box. The problem is some of the
constraints can have multiple values, so I changed the select to a
multi-select:

 

But then the form is only ever populated with the *first* string
selected from the multiselect box. Since a map can hold a String[] as
easily as a String, I'm a little confused by this behavior. I tried the
following things with no luck (these changes are in the struts action
that forwards to the jsp above):

1) inserting an empty String array into the values map for each key in
an attempt to coerce the user of String arrays

2) inserting a wrapper class into the map for each key:
public class SelectedValues {
private String[] selectedValues;
public String[] getSelectedValues() {   
return selectedValues;
}
public void setSelectedValues(String[] selectedValues) {
this.selectedValues = selectedValues;
}
}

and I updated my jsp to:
 

but that causes the following exception:
javax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
...
root cause:
java.lang.IllegalArgumentException: No bean specified

org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:837)
...


I can get the multiselect to work if I create a String array for each
constraint, but that defeats the purpose since this is supposed to be
dynamically generated. I'm out of ideas for other things to try with the
map-backed approach. Can someone tell me what I'm doing wrong here?

Thanks,
Adam

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



Re: html:text - want to set disable= to a bean value

2004-08-16 Thread Stuart Guthrie
Thank you Susan, that looks spot on. I'll try it this AM..

ATB

Stuart

On Tue, 2004-08-17 at 01:09, Susan Bradeen wrote:
> Stuart Guthrie <[EMAIL PROTECTED]> wrote on 08/16/2004 10:01:49 AM:
> 
> > Hi there, 
> > 
> > What I'm trying to do is re-use the same jsp for ADD/UPDATE modes. In
> > order to do this, certain field attributes will be different depending
> > on the modes and sometimes even on the user's security credentials or
> > the 'status' of the customer row.
> > 
> > To this end I need to pass in the form bean whether a particular field
> > is disabled or not
> > 
> > I've searched the archives to no avail. I'm trying to set the disable=''
> > attribute on the html:text tag to a value in the form bean I'm passing
> > in.
> > 
> > eg:
> > 
> > formbean.isCustomerCodeEnabled()
> > 
> > returns a boolean true/false
> > 
> > formbean.getCustomerCode()
> > 
> > is the value of customer code.
> > 
> > I'm trying (hoping) to do something like this:
> > 
> >  > disable="!CustomerCodeEnabled"  />
> > 
> > I've tried lots of different approaches, all failing. I've also scanned
> > the examples to no avail.
> > 
> > Latest attempt is:
> > 
> >  > name="CustomerFormWindowMainTabActionForm"
> > property="CustomerCodeEnabled"
> > type="boolean" value="true"/>
> > 
> > <% boolean customerCodeDisabled=(!customerCodeEnabled); %>
> >  > disabled="<%=customerCodeDisabled%>"  />
> 
> Does this work for you?
>  disable="isCustomerCodeEnabled" />
> 
> I had an app with similar requirements. IIRC, I solved it by doing the 
> following.
> 
> In the JSP first define the FormBean that contains the boolean values:
>  type="com.myCompany.MyFormBeanClass" />
> 
> then access the boolean fields for each form field like so:
> 
> 
> Hope that helps.
> Susan Bradeen
> 
> 
> > 
> > Which fails with:
> > 
> > customerCodeEnabled = null; [javac] ^ An error occurred at line: 87 in
> > the jsp file: /CustomerFormWindowMainTabBody.jsp Generated servlet
> > error:
> > [javac]/home/sfg/javadev/jboss-3.2.
> > 
> 3/server/default/work/MainEngine/localhost/pimsweb/CustomerFormWindowMainTabBody_jsp.
> > java:175: inconvertible types 
> > [javac] found : java.lang.Object [javac] required: boolean [javac]
> > customerCodeEnabled = (boolean)
> > pageContext.findAttribute("customerCodeEnabled"); [javac] ^ [javac] 2
> > errors '
> > 
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> _
> > Scanned for SoftLanding Systems, Inc. by IBM Email Security 
> > Management Services powered by MessageLabs. 
> > 
> _
> 
> 
> _
> Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services 
> powered by MessageLabs. 
> _
> 
> -
> 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: connection pooling

2004-08-16 Thread Jim Barrows


> -Original Message-
> From: Saurabh Bhatla [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 16, 2004 3:16 PM
> To: Struts Users Mailing List
> Subject: RE: connection pooling
> 
> 
> Jim,
>   I understand most part of it now. the only thing that i dont
> understand is how will the connection pooling be handled. I am using
> tomcat 5. will the following code(from the link that u sent me) serve
> the purpose?
> 
> 
> 
> 
>property="driverClassName"
>   value="org.postgresql.Driver" />
>property="url"
>   value="jdbc:postgresql://localhost/mydatabase" />
>property="username"
>   value="me" />

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
The short version is that it is handled automagically for you.  No need to borrow or 
return the connection etc.


> .
> .
> .
> ..
> 
> regards
> saurabh
> 
> 
> 
> On Mon, 2004-08-16 at 16:45, Jim Barrows wrote:
> > > -Original Message-
> > > From: Saurabh Bhatla [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, August 16, 2004 2:42 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: connection pooling
> > > 
> > > 
> > > Jim,
> > >I am sorry but I am confused now. Just correct me if I am
> > > wrong I want to call my DAO from my Action class. So 
> > > the snippet
> > > that you sent me would go in my DAO class in the function
> > > getConnection() (or something like that). 
> > 
> > Yes, that is correct.  I acutally implment that in my 
> DaoFactory class, and put the resultant connection from the 
> data source in the DaoFactory class.  That allows me to 
> easily de-couple the dao class for testing.
> > 
> > >  And if what I said is correct then does it mean that I 
> > > dont need to
> > > have a connection pool class and my webserver would 
> handle everything
> > > for me.
> > 
> > Depends on the web server... websphere has it's own, tomcat 
> allows you to have several choices, and I have no idea what BEA does.
> > 
> > 
> > > 
> > > regards
> > > saurabh
> > > 
> > > On Mon, 2004-08-16 at 16:29, Jim Barrows wrote:
> > > > > -Original Message-
> > > > > From: Saurabh Bhatla [mailto:[EMAIL PROTECTED]
> > > > > Sent: Monday, August 16, 2004 2:24 PM
> > > > > To: Struts Users Mailing List
> > > > > Subject: Re: connection pooling
> > > > > 
> > > > > 
> > > > > David,
> > > > >   But i want to make a business layer and call the DAO 
> > > from there.  I
> > > > > think that the links that you have sent me couple 
> > > > > presentation layer and
> > > > > database tightly. I know i can use EJB for presentation layer 
> > > > > but I dont
> > > > > want that as it would be overkill for the small project I am 
> > > > > working on.
> > > > > I want to have a connection pool class initialized at 
> the time the
> > > > > server starts and then all my DAO  should get the 
> > > connection from that
> > > > > pool. Is it possible?
> > > > >   I am a beginner in this field and I might not understand it
> > > > > completely. please correct me if i am wrong.
> > > > 
> > > > Ah, okay.. I also posted a link to the struts way to do the 
> > > JNDI data source stuff in that case.. you follow your web 
> > > app servers guide on how to setup a data source, then you 
> > > follow the destructions for a normal jndi data source. 
> Something like:
> > > > 
> > > > /**
> > > >  * 
> > > >  */
> > > > public static DataSource getDataSource() throws 
> > > NamingException {
> > > > if (ds == null) {
> > > > Context ctx = (Context) new InitialContext();
> > > > ds =
> > > > (DataSource) ctx.lookup(
> > > > "jdbc/yourDataSource);
> > > > }
> > > > return ds;
> > > > }
> > > > 
> > > > > regards
> > > > > saurabh
> > > > > 
> > > > > 
> > > > > 
> > > 
> -
> > > > > 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]
> > > 
> > > 
> > 
> > 
> -
> > 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: connection pooling

2004-08-16 Thread Saurabh Bhatla
Jim,
  I understand most part of it now. the only thing that i dont
understand is how will the connection pooling be handled. I am using
tomcat 5. will the following code(from the link that u sent me) serve
the purpose?







.
.
.
..

regards
saurabh



On Mon, 2004-08-16 at 16:45, Jim Barrows wrote:
> > -Original Message-
> > From: Saurabh Bhatla [mailto:[EMAIL PROTECTED]
> > Sent: Monday, August 16, 2004 2:42 PM
> > To: Struts Users Mailing List
> > Subject: RE: connection pooling
> > 
> > 
> > Jim,
> >I am sorry but I am confused now. Just correct me if I am
> > wrong I want to call my DAO from my Action class. So 
> > the snippet
> > that you sent me would go in my DAO class in the function
> > getConnection() (or something like that). 
> 
> Yes, that is correct.  I acutally implment that in my DaoFactory class, and put the 
> resultant connection from the data source in the DaoFactory class.  That allows me 
> to easily de-couple the dao class for testing.
> 
> >  And if what I said is correct then does it mean that I 
> > dont need to
> > have a connection pool class and my webserver would handle everything
> > for me.
> 
> Depends on the web server... websphere has it's own, tomcat allows you to have 
> several choices, and I have no idea what BEA does.
> 
> 
> > 
> > regards
> > saurabh
> > 
> > On Mon, 2004-08-16 at 16:29, Jim Barrows wrote:
> > > > -Original Message-
> > > > From: Saurabh Bhatla [mailto:[EMAIL PROTECTED]
> > > > Sent: Monday, August 16, 2004 2:24 PM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: connection pooling
> > > > 
> > > > 
> > > > David,
> > > >   But i want to make a business layer and call the DAO 
> > from there.  I
> > > > think that the links that you have sent me couple 
> > > > presentation layer and
> > > > database tightly. I know i can use EJB for presentation layer 
> > > > but I dont
> > > > want that as it would be overkill for the small project I am 
> > > > working on.
> > > > I want to have a connection pool class initialized at the time the
> > > > server starts and then all my DAO  should get the 
> > connection from that
> > > > pool. Is it possible?
> > > >   I am a beginner in this field and I might not understand it
> > > > completely. please correct me if i am wrong.
> > > 
> > > Ah, okay.. I also posted a link to the struts way to do the 
> > JNDI data source stuff in that case.. you follow your web 
> > app servers guide on how to setup a data source, then you 
> > follow the destructions for a normal jndi data source. Something like:
> > > 
> > > /**
> > >  * 
> > >  */
> > > public static DataSource getDataSource() throws 
> > NamingException {
> > > if (ds == null) {
> > > Context ctx = (Context) new InitialContext();
> > > ds =
> > > (DataSource) ctx.lookup(
> > > "jdbc/yourDataSource);
> > > }
> > > return ds;
> > > }
> > > 
> > > > regards
> > > > saurabh
> > > > 
> > > > 
> > > > 
> > -
> > > > 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]
> > 
> > 
> 
> -
> 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: Overwritting RequestProcessor, how to???

2004-08-16 Thread David Durham
Rick Reumann wrote:
This is another reason why I still think calling validate() manually 
from your Action is a much better approach then relying on Struts do it 
for you. If you call form.validate() from your Action you then have 
control over what you want to do. So in your Action you could do...

//in your Action execute or dispatch method:
ActionErrors errors = myForm.validate();
if ( errors != null ) {
   mySpecificMethod();
   return( mapping.findFoward("SUCCESS");
} else {
   saveErrors(request, errors);
   return( mapping.findFoward("SUCCESS");
}
 

On this note, but slightly different, I use something very similar to 
this within all DispatchActions.  My reasoning is that you can only 
configure one input attribute for an Action.  DispatchActions obviously 
open up the possibility for several inputs.  This is something that the 
current configuration doesn't handle very well, IMO.

In particular, I think it would be interesting to see a configuration 
for DispatchActions like so:



 
  

 
  


Obviously you can achieve very similar results by simply creating 
multiple Actions, but perhaps a configuration like this would allow for 
some inheritence (as in, define attributes for the DispatchedAction and 
optionally override them for nested actions, share/override mappings 
within the Dispatch's scope).

Thoughts?  Has this already been mentioned?
- Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: connection pooling

2004-08-16 Thread sridhar ramalingam
Saurabh,
If you want to do some kind of initialization when your server starts
up, you can implement the org.apache.struts.action.PlugIn interface and
override the init() method to do your initialization. Check Logon
example application,
org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn.java for
more details.

Regards,
Sridhar

-Original Message-
From: Saurabh Bhatla [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 2:24 PM
To: Struts Users Mailing List
Subject: Re: connection pooling


David,
  But i want to make a business layer and call the DAO from there.  I
think that the links that you have sent me couple presentation layer and
database tightly. I know i can use EJB for presentation layer but I dont
want that as it would be overkill for the small project I am working on.
I want to have a connection pool class initialized at the time the
server starts and then all my DAO  should get the connection from that
pool. Is it possible?
  I am a beginner in this field and I might not understand it
completely. please correct me if i am wrong. regards saurabh


-
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: connection pooling

2004-08-16 Thread Saurabh Bhatla
yeah, I am planning to use OJB for persistence. Thankx for your advice.

regards
saurabh

On Mon, 2004-08-16 at 16:43, David Durham wrote:
> Jim Barrows wrote:
> 
> > Ah, okay.. I also posted a link to the struts way to do the JNDI data 
> > source stuff in that case.. you follow your web app servers guide 
> > on how to setup a data source, then you follow the destructions for a 
> > normal jndi data source. Something like:
> 
> Additionally, Saurabh, have you considered using something like OJB or 
> Hibernate?
> 
> http://db.apache.org/ojb/
> http://www.hibernate.org/
> 
> I understand that you have limited experience in this area 
> (persistence),  but these tools can greatly simplify storing and 
> retrieving objects from a relational database.
> 
> 
> - Dave
> 
> 
> -
> 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: connection pooling

2004-08-16 Thread Jim Barrows


> -Original Message-
> From: Saurabh Bhatla [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 16, 2004 2:42 PM
> To: Struts Users Mailing List
> Subject: RE: connection pooling
> 
> 
> Jim,
>I am sorry but I am confused now. Just correct me if I am
> wrong I want to call my DAO from my Action class. So 
> the snippet
> that you sent me would go in my DAO class in the function
> getConnection() (or something like that). 

Yes, that is correct.  I acutally implment that in my DaoFactory class, and put the 
resultant connection from the data source in the DaoFactory class.  That allows me to 
easily de-couple the dao class for testing.

>  And if what I said is correct then does it mean that I 
> dont need to
> have a connection pool class and my webserver would handle everything
> for me.

Depends on the web server... websphere has it's own, tomcat allows you to have several 
choices, and I have no idea what BEA does.


> 
> regards
> saurabh
> 
> On Mon, 2004-08-16 at 16:29, Jim Barrows wrote:
> > > -Original Message-
> > > From: Saurabh Bhatla [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, August 16, 2004 2:24 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: connection pooling
> > > 
> > > 
> > > David,
> > >   But i want to make a business layer and call the DAO 
> from there.  I
> > > think that the links that you have sent me couple 
> > > presentation layer and
> > > database tightly. I know i can use EJB for presentation layer 
> > > but I dont
> > > want that as it would be overkill for the small project I am 
> > > working on.
> > > I want to have a connection pool class initialized at the time the
> > > server starts and then all my DAO  should get the 
> connection from that
> > > pool. Is it possible?
> > >   I am a beginner in this field and I might not understand it
> > > completely. please correct me if i am wrong.
> > 
> > Ah, okay.. I also posted a link to the struts way to do the 
> JNDI data source stuff in that case.. you follow your web 
> app servers guide on how to setup a data source, then you 
> follow the destructions for a normal jndi data source. Something like:
> > 
> > /**
> >  * 
> >  */
> > public static DataSource getDataSource() throws 
> NamingException {
> > if (ds == null) {
> > Context ctx = (Context) new InitialContext();
> > ds =
> > (DataSource) ctx.lookup(
> > "jdbc/yourDataSource);
> > }
> > return ds;
> > }
> > 
> > > regards
> > > saurabh
> > > 
> > > 
> > > 
> -
> > > 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]
> 
> 

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



Re: connection pooling

2004-08-16 Thread David Durham
Jim Barrows wrote:
Ah, okay.. I also posted a link to the struts way to do the JNDI data 
source stuff in that case.. you follow your web app servers guide 
on how to setup a data source, then you follow the destructions for a 
normal jndi data source. Something like:
Additionally, Saurabh, have you considered using something like OJB or 
Hibernate?

   http://db.apache.org/ojb/
   http://www.hibernate.org/
I understand that you have limited experience in this area 
(persistence),  but these tools can greatly simplify storing and 
retrieving objects from a relational database.

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


RE: connection pooling

2004-08-16 Thread Saurabh Bhatla
Jim,
   I am sorry but I am confused now. Just correct me if I am
wrong I want to call my DAO from my Action class. So the snippet
that you sent me would go in my DAO class in the function
getConnection() (or something like that). 
 And if what I said is correct then does it mean that I dont need to
have a connection pool class and my webserver would handle everything
for me.

regards
saurabh

On Mon, 2004-08-16 at 16:29, Jim Barrows wrote:
> > -Original Message-
> > From: Saurabh Bhatla [mailto:[EMAIL PROTECTED]
> > Sent: Monday, August 16, 2004 2:24 PM
> > To: Struts Users Mailing List
> > Subject: Re: connection pooling
> > 
> > 
> > David,
> >   But i want to make a business layer and call the DAO from there.  I
> > think that the links that you have sent me couple 
> > presentation layer and
> > database tightly. I know i can use EJB for presentation layer 
> > but I dont
> > want that as it would be overkill for the small project I am 
> > working on.
> > I want to have a connection pool class initialized at the time the
> > server starts and then all my DAO  should get the connection from that
> > pool. Is it possible?
> >   I am a beginner in this field and I might not understand it
> > completely. please correct me if i am wrong.
> 
> Ah, okay.. I also posted a link to the struts way to do the JNDI data source 
> stuff in that case.. you follow your web app servers guide on how to setup a 
> data source, then you follow the destructions for a normal jndi data source. 
> Something like:
> 
> /**
>  * 
>  */
> public static DataSource getDataSource() throws NamingException {
> if (ds == null) {
> Context ctx = (Context) new InitialContext();
> ds =
> (DataSource) ctx.lookup(
> "jdbc/yourDataSource);
> }
> return ds;
> }
> 
> > regards
> > saurabh
> > 
> > 
> > -
> > 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: connection pooling

2004-08-16 Thread Jim Barrows


> -Original Message-
> From: Saurabh Bhatla [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 16, 2004 2:24 PM
> To: Struts Users Mailing List
> Subject: Re: connection pooling
> 
> 
> David,
>   But i want to make a business layer and call the DAO from there.  I
> think that the links that you have sent me couple 
> presentation layer and
> database tightly. I know i can use EJB for presentation layer 
> but I dont
> want that as it would be overkill for the small project I am 
> working on.
> I want to have a connection pool class initialized at the time the
> server starts and then all my DAO  should get the connection from that
> pool. Is it possible?
>   I am a beginner in this field and I might not understand it
> completely. please correct me if i am wrong.

Ah, okay.. I also posted a link to the struts way to do the JNDI data source stuff 
in that case.. you follow your web app servers guide on how to setup a data source, 
then you follow the destructions for a normal jndi data source. Something like:

/**
 * 
 */
public static DataSource getDataSource() throws NamingException {
if (ds == null) {
Context ctx = (Context) new InitialContext();
ds =
(DataSource) ctx.lookup(
"jdbc/yourDataSource);
}
return ds;
}

> regards
> saurabh
> 
> 
> -
> 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: connection pooling

2004-08-16 Thread Saurabh Bhatla
David,
  But i want to make a business layer and call the DAO from there.  I
think that the links that you have sent me couple presentation layer and
database tightly. I know i can use EJB for presentation layer but I dont
want that as it would be overkill for the small project I am working on.
I want to have a connection pool class initialized at the time the
server starts and then all my DAO  should get the connection from that
pool. Is it possible?
  I am a beginner in this field and I might not understand it
completely. please correct me if i am wrong.
regards
saurabh


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



RE: Overwritting RequestProcessor, how to???

2004-08-16 Thread Jim Barrows


> -Original Message-
> From: Michael Finger [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 16, 2004 2:22 PM
> To: Struts Users Mailing List
> Subject: RE: Overwritting RequestProcessor, how to???
> 
> 
> Or you look at this as a opportunity to take aspectj for a spin :)

*LOL* now thats an idea... better... and probably less complex...
the input param takes a uri which could be 
/whoopsValidationError.do?actualyPage=page.jsp


> 
> Mike
> 
> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 16, 2004 2:17 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Overwritting RequestProcessor, how to???
> 
> Frankly, that's a pretty trivial change to make to all your 
> ActionForms, I 
> would in all probability, were it me, just add that code to 
> all of them.  
> Either that or do the base class approach, but that still 
> requires you to 
> touch all the classes.  I wouldn't override RequestProcessor 
> for something 
> like this, it's really overkill and questionable architecturally.
> 
> Sometimes the "manual labor" approach really IS the right choice :)
> 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> www.omnytex.com
> 
> 
> 
> 
> 
> >From: Leandro Melo <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: Struts Users Mailing List <[EMAIL PROTECTED]>
> >Subject: RE: Overwritting RequestProcessor, how to???
> >Date: Mon, 16 Aug 2004 17:58:55 -0300 (ART)
> >
> >Frank, as i said, i only want to call another method
> >everytime validate() fails. That's the only thing i
> >wanna do.
> >
> >If i only overwritte ActionForm and create a
> >MyBaseActionForm, in my specific forms i'd have to do
> >something like this inside validate() method.
> >
> >if (errors != null){
> >   mySpecificMethod();
> >}
> >
> >What will cause me to modify all action forms i got.
> >I thought i'd be simpler if i just overwritte the
> >request processor and put the above code inside it.
> >
> >What do you thing now? Is still not the better idea?
> >
> >I ask because i'm really a beginner, so i don't know
> >if it would be the best architecture.
> >
> >
> >
> >
> >
> >
> >  --- Frank Zammetti <[EMAIL PROTECTED]> escreveu:
> > > Maybe it would be enough to just write your own base
> > > class that extends
> > > ActionForm, have your "common" code in it, and then
> > > extend your ActionForms
> > > from that class?
> > >
> > > If not, take a look at my code from
> > > http://www.omnytex.com/strutsws for an
> > > example of writing your own command processor.  I
> > > get the feeling it's not
> > > the right approach, but I could be wrong.
> > >
> > > Frank W. Zammetti
> > > Founder and Chief Software Architect
> > > Omnytex Technologies
> > > www.omnytex.com
> > >
> > >
> > >
> > >
> > >
> > > >From: Leandro Melo <[EMAIL PROTECTED]>
> > > >Reply-To: "Struts Users Mailing List"
> > > <[EMAIL PROTECTED]>
> > > >To: struts jakarta <[EMAIL PROTECTED]>
> > > >Subject: Overwritting RequestProcessor, how to???
> > > >Date: Sun, 15 Aug 2004 14:06:34 -0300 (ART)
> > > >
> > > >Hi,
> > > >i'd like to overwirte RequestProcessor, but
> > > actually i
> > > >don't really know if it's a good idea.
> > > >
> > > >Here's the point:
> > > >I'd like to have one more action if my
> > > form.validate()
> > > >method fails on ActionForm. I'd like to do some
> > > >specific stuff everytime the validate method fails.
> > > >Then, i thought of overwritting the
> > > RequestProcessor.
> > > >
> > > >Is that a good idea, or there's another way to
> > > >accomplish what i want???
> > > >
> > > >Regards,
> > > >ltcmelo
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >___
> > > >Yahoo! Acesso Grátis - navegue de graça com conexão
> > > de qualidade! Acesse:
> > > >http://br.acesso.yahoo.com/
> > > >
> > >
> > 
> >-
> > > >To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > >For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > >
> > >
> > >
> >_
> > > Get ready for school! Find articles, homework help
> > > and more in the Back to
> > > School Guide!
> > > http://special.msn.com/network/04backtoschool.armx
> > >
> > >
> > >
> >-
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > >
> > >
> >
> >__
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam protection around
> >http://mail.yahoo.com
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> _
> On the road to reti

RE: Overwritting RequestProcessor, how to???

2004-08-16 Thread Michael Finger
Or you look at this as a opportunity to take aspectj for a spin :)

Mike

-Original Message-
From: Frank Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 2:17 PM
To: [EMAIL PROTECTED]
Subject: RE: Overwritting RequestProcessor, how to???

Frankly, that's a pretty trivial change to make to all your ActionForms, I 
would in all probability, were it me, just add that code to all of them.  
Either that or do the base class approach, but that still requires you to 
touch all the classes.  I wouldn't override RequestProcessor for something 
like this, it's really overkill and questionable architecturally.

Sometimes the "manual labor" approach really IS the right choice :)

Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
www.omnytex.com





>From: Leandro Melo <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: Struts Users Mailing List <[EMAIL PROTECTED]>
>Subject: RE: Overwritting RequestProcessor, how to???
>Date: Mon, 16 Aug 2004 17:58:55 -0300 (ART)
>
>Frank, as i said, i only want to call another method
>everytime validate() fails. That's the only thing i
>wanna do.
>
>If i only overwritte ActionForm and create a
>MyBaseActionForm, in my specific forms i'd have to do
>something like this inside validate() method.
>
>if (errors != null){
>   mySpecificMethod();
>}
>
>What will cause me to modify all action forms i got.
>I thought i'd be simpler if i just overwritte the
>request processor and put the above code inside it.
>
>What do you thing now? Is still not the better idea?
>
>I ask because i'm really a beginner, so i don't know
>if it would be the best architecture.
>
>
>
>
>
>
>  --- Frank Zammetti <[EMAIL PROTECTED]> escreveu:
> > Maybe it would be enough to just write your own base
> > class that extends
> > ActionForm, have your "common" code in it, and then
> > extend your ActionForms
> > from that class?
> >
> > If not, take a look at my code from
> > http://www.omnytex.com/strutsws for an
> > example of writing your own command processor.  I
> > get the feeling it's not
> > the right approach, but I could be wrong.
> >
> > Frank W. Zammetti
> > Founder and Chief Software Architect
> > Omnytex Technologies
> > www.omnytex.com
> >
> >
> >
> >
> >
> > >From: Leandro Melo <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List"
> > <[EMAIL PROTECTED]>
> > >To: struts jakarta <[EMAIL PROTECTED]>
> > >Subject: Overwritting RequestProcessor, how to???
> > >Date: Sun, 15 Aug 2004 14:06:34 -0300 (ART)
> > >
> > >Hi,
> > >i'd like to overwirte RequestProcessor, but
> > actually i
> > >don't really know if it's a good idea.
> > >
> > >Here's the point:
> > >I'd like to have one more action if my
> > form.validate()
> > >method fails on ActionForm. I'd like to do some
> > >specific stuff everytime the validate method fails.
> > >Then, i thought of overwritting the
> > RequestProcessor.
> > >
> > >Is that a good idea, or there's another way to
> > >accomplish what i want???
> > >
> > >Regards,
> > >ltcmelo
> > >
> > >
> > >
> > >
> > >
> >
> >___
> > >Yahoo! Acesso Grátis - navegue de graça com conexão
> > de qualidade! Acesse:
> > >http://br.acesso.yahoo.com/
> > >
> >
> >-
> > >To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > >For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >
> >
> >
>_
> > Get ready for school! Find articles, homework help
> > and more in the Back to
> > School Guide!
> > http://special.msn.com/network/04backtoschool.armx
> >
> >
> >
>-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>__
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement


-
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: Overwritting RequestProcessor, how to???

2004-08-16 Thread Joe Hertz
>
> Another option is that you can still have your forms over-ride a base
> ActionForm and then at the end of the validate method, if you get
> errors, you can then call super.validate() which will call your
> mySpecificMethod(); of your Super class.

I was about to say something like this, but I don't think it works.

validate() *returns* an instance of ActionErrors. So how does the base
class' validate() method know the subclass' validate() method found any
errors? Yeah, you can call super.validate(), but how do you check for that
condition inside of the base class? There's no .saveErrors() method inside
of the ActionForm classes




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



RE: Overwritting RequestProcessor, how to???

2004-08-16 Thread Frank Zammetti
Frankly, that's a pretty trivial change to make to all your ActionForms, I 
would in all probability, were it me, just add that code to all of them.  
Either that or do the base class approach, but that still requires you to 
touch all the classes.  I wouldn't override RequestProcessor for something 
like this, it's really overkill and questionable architecturally.

Sometimes the "manual labor" approach really IS the right choice :)
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
www.omnytex.com


From: Leandro Melo <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: RE: Overwritting RequestProcessor, how to???
Date: Mon, 16 Aug 2004 17:58:55 -0300 (ART)
Frank, as i said, i only want to call another method
everytime validate() fails. That's the only thing i
wanna do.
If i only overwritte ActionForm and create a
MyBaseActionForm, in my specific forms i'd have to do
something like this inside validate() method.
if (errors != null){
  mySpecificMethod();
}
What will cause me to modify all action forms i got.
I thought i'd be simpler if i just overwritte the
request processor and put the above code inside it.
What do you thing now? Is still not the better idea?
I ask because i'm really a beginner, so i don't know
if it would be the best architecture.


 --- Frank Zammetti <[EMAIL PROTECTED]> escreveu:
> Maybe it would be enough to just write your own base
> class that extends
> ActionForm, have your "common" code in it, and then
> extend your ActionForms
> from that class?
>
> If not, take a look at my code from
> http://www.omnytex.com/strutsws for an
> example of writing your own command processor.  I
> get the feeling it's not
> the right approach, but I could be wrong.
>
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> www.omnytex.com
>
>
>
>
>
> >From: Leandro Melo <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> >To: struts jakarta <[EMAIL PROTECTED]>
> >Subject: Overwritting RequestProcessor, how to???
> >Date: Sun, 15 Aug 2004 14:06:34 -0300 (ART)
> >
> >Hi,
> >i'd like to overwirte RequestProcessor, but
> actually i
> >don't really know if it's a good idea.
> >
> >Here's the point:
> >I'd like to have one more action if my
> form.validate()
> >method fails on ActionForm. I'd like to do some
> >specific stuff everytime the validate method fails.
> >Then, i thought of overwritting the
> RequestProcessor.
> >
> >Is that a good idea, or there's another way to
> >accomplish what i want???
> >
> >Regards,
> >ltcmelo
> >
> >
> >
> >
> >
>
>___
> >Yahoo! Acesso Grátis - navegue de graça com conexão
> de qualidade! Acesse:
> >http://br.acesso.yahoo.com/
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
>
>
_
> Get ready for school! Find articles, homework help
> and more in the Back to
> School Guide!
> http://special.msn.com/network/04backtoschool.armx
>
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement

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


Re: Overwritting RequestProcessor, how to???

2004-08-16 Thread Rick Reumann
Leandro Melo wrote:
Frank, as i said, i only want to call another method
everytime validate() fails. That's the only thing i
wanna do.
If i only overwritte ActionForm and create a
MyBaseActionForm, in my specific forms i'd have to do
something like this inside validate() method.
if (errors != null){
  mySpecificMethod();
}
What will cause me to modify all action forms i got.
I thought i'd be simpler if i just overwritte the
request processor and put the above code inside it.
What do you thing now? Is still not the better idea?
I ask because i'm really a beginner, so i don't know
if it would be the best architecture.
This is another reason why I still think calling validate() manually 
from your Action is a much better approach then relying on Struts do it 
for you. If you call form.validate() from your Action you then have 
control over what you want to do. So in your Action you could do...

//in your Action execute or dispatch method:
ActionErrors errors = myForm.validate();
if ( errors != null ) {
   mySpecificMethod();
   return( mapping.findFoward("SUCCESS");
} else {
   saveErrors(request, errors);
   return( mapping.findFoward("SUCCESS");
}
Another option is that you can still have your forms over-ride a base 
ActionForm and then at the end of the validate method, if you get 
errors, you can then call super.validate() which will call your 
mySpecificMethod(); of your Super class.

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


RE: connection pooling

2004-08-16 Thread Jim Barrows


> -Original Message-
> From: David Durham [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 16, 2004 2:01 PM
> To: Struts Users Mailing List
> Subject: Re: connection pooling
> 
> 
> Saurabh Bhatla wrote:
> 
> > Now i want to
> > know how to initialize the connection pool object and how 
> to pass that
> > object to all Action classes.
> 
> I think you want to look at a piece of technology called JNDI.
> 
> Here's a link to Tomcat's JNDI Datasource How-To:
> 
> 
>http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

And doing that with struts:
http://struts.apache.org/userGuide/configuration.html#data-source_config
Alhtough, I would suggest maybe using a DAO layer for convienence later on down the 
road when things change :)

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



Re: connection pooling

2004-08-16 Thread David Durham
David Durham wrote:
I think you want to look at a piece of technology called JNDI.
Here's a link to Tomcat's JNDI Datasource How-To:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

Considering the list topic, I guess I should post this link instead:
   http://struts.apache.org/faqs/database.html
- Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: connection pooling

2004-08-16 Thread David Durham
Saurabh Bhatla wrote:
Now i want to
know how to initialize the connection pool object and how to pass that
object to all Action classes.
I think you want to look at a piece of technology called JNDI.
Here's a link to Tomcat's JNDI Datasource How-To:
   http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
- Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Overwritting RequestProcessor, how to???

2004-08-16 Thread Leandro Melo
Frank, as i said, i only want to call another method
everytime validate() fails. That's the only thing i
wanna do.

If i only overwritte ActionForm and create a
MyBaseActionForm, in my specific forms i'd have to do
something like this inside validate() method.

if (errors != null){
  mySpecificMethod();
}

What will cause me to modify all action forms i got.
I thought i'd be simpler if i just overwritte the
request processor and put the above code inside it.

What do you thing now? Is still not the better idea?

I ask because i'm really a beginner, so i don't know
if it would be the best architecture.






 --- Frank Zammetti <[EMAIL PROTECTED]> escreveu: 
> Maybe it would be enough to just write your own base
> class that extends 
> ActionForm, have your "common" code in it, and then
> extend your ActionForms 
> from that class?
> 
> If not, take a look at my code from
> http://www.omnytex.com/strutsws for an 
> example of writing your own command processor.  I
> get the feeling it's not 
> the right approach, but I could be wrong.
> 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> www.omnytex.com
> 
> 
> 
> 
> 
> >From: Leandro Melo <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> >To: struts jakarta <[EMAIL PROTECTED]>
> >Subject: Overwritting RequestProcessor, how to???
> >Date: Sun, 15 Aug 2004 14:06:34 -0300 (ART)
> >
> >Hi,
> >i'd like to overwirte RequestProcessor, but
> actually i
> >don't really know if it's a good idea.
> >
> >Here's the point:
> >I'd like to have one more action if my
> form.validate()
> >method fails on ActionForm. I'd like to do some
> >specific stuff everytime the validate method fails.
> >Then, i thought of overwritting the
> RequestProcessor.
> >
> >Is that a good idea, or there's another way to
> >accomplish what i want???
> >
> >Regards,
> >ltcmelo
> >
> >
> >
> >
> >
>
>___
> >Yahoo! Acesso Grátis - navegue de graça com conexão
> de qualidade! Acesse: 
> >http://br.acesso.yahoo.com/
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> 
>
_
> Get ready for school! Find articles, homework help
> and more in the Back to 
> School Guide!
> http://special.msn.com/network/04backtoschool.armx
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>  

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



connection pooling

2004-08-16 Thread Saurabh Bhatla
Hi all, 
   I have just started working with struts a few days ago, and I
understand most of it. The only thing that i dont understand is, if i
make a connection pool then where will it be initialized. In servlets I
know that it can be done in the init() method but in struts framework
there is nothing like an init() method. I have the connection pool class
that i have written and i was using in one of my servlets. Now i want to
know how to initialize the connection pool object and how to pass that
object to all Action classes.

Any suggestion would be greatly appreciated.

regards
saurabh


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



RE: Overwritting RequestProcessor, how to???

2004-08-16 Thread Jim Barrows


> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 16, 2004 1:15 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Overwritting RequestProcessor, how to???
> 
> 
> Maybe it would be enough to just write your own base class 
> that extends 
> ActionForm, have your "common" code in it, and then extend 
> your ActionForms 
> from that class?

I agree overload validate(), call super and if you get any errors back, then do 
your custom stuff.  Provided that your custom stuff your running after validation 
doesn't break the one method, one function rule.  If that's what you want, then I'd 
look to see if there's another way of triggering whatever it is you want... say with a 
tag or something.


> 
> If not, take a look at my code from 
> http://www.omnytex.com/strutsws for an 
> example of writing your own command processor.  I get the 
> feeling it's not 
> the right approach, but I could be wrong.
> 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> www.omnytex.com
> 
> 
> 
> 
> 
> >From: Leandro Melo <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: struts jakarta <[EMAIL PROTECTED]>
> >Subject: Overwritting RequestProcessor, how to???
> >Date: Sun, 15 Aug 2004 14:06:34 -0300 (ART)
> >
> >Hi,
> >i'd like to overwirte RequestProcessor, but actually i
> >don't really know if it's a good idea.
> >
> >Here's the point:
> >I'd like to have one more action if my form.validate()
> >method fails on ActionForm. I'd like to do some
> >specific stuff everytime the validate method fails.
> >Then, i thought of overwritting the RequestProcessor.
> >
> >Is that a good idea, or there's another way to
> >accomplish what i want???
> >
> >Regards,
> >ltcmelo
> >
> >
> >
> >
> >
> >___
> >Yahoo! Acesso Grátis - navegue de graça com conexão de 
> qualidade! Acesse: 
> >http://br.acesso.yahoo.com/
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> _
> Get ready for school! Find articles, homework help and more 
> in the Back to 
> School Guide! http://special.msn.com/network/04backtoschool.armx
> 
> 
> -
> 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: Overwritting RequestProcessor, how to???

2004-08-16 Thread Frank Zammetti
Maybe it would be enough to just write your own base class that extends 
ActionForm, have your "common" code in it, and then extend your ActionForms 
from that class?

If not, take a look at my code from http://www.omnytex.com/strutsws for an 
example of writing your own command processor.  I get the feeling it's not 
the right approach, but I could be wrong.

Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
www.omnytex.com


From: Leandro Melo <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: struts jakarta <[EMAIL PROTECTED]>
Subject: Overwritting RequestProcessor, how to???
Date: Sun, 15 Aug 2004 14:06:34 -0300 (ART)
Hi,
i'd like to overwirte RequestProcessor, but actually i
don't really know if it's a good idea.
Here's the point:
I'd like to have one more action if my form.validate()
method fails on ActionForm. I'd like to do some
specific stuff everytime the validate method fails.
Then, i thought of overwritting the RequestProcessor.
Is that a good idea, or there's another way to
accomplish what i want???
Regards,
ltcmelo


___
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: 
http://br.acesso.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Get ready for school! Find articles, homework help and more in the Back to 
School Guide! http://special.msn.com/network/04backtoschool.armx

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


Re: How to call multiple submits in a jsp form(in STRUTS other than using javascript)

2004-08-16 Thread Frank Zammetti
Alternatively, don't forget that Actions are just classes, and as such you 
can always instantiate an instance of an Action from within another and call 
it's execute() method yourself.  Your app has to be designed to allow for 
this, but it's fairly trivial to do so.  LookupDispatchAction is I think the 
better way though, but sometimes the simpler approach is sufficient.

Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
www.omnytex.com


From: "Jeffrey Stairs" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: How to call multiple submits in a jsp form(in STRUTS other 
than  using javascript)
Date: Sat, 14 Aug 2004 10:43:34 +0200

Hi Manjo,
Have a look at the documentation for the LookupDispatchAction.  This should
do what you want.
Regards,
Jeff
- Original Message -
From: "jacob skariah" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 14, 2004 8:07 AM
Subject: How to call multiple submits in a jsp form(in STRUTS other than
using javascript)
> Hi,
>
>Is there any better way to call multiple submits in
> a jsp form using Struts without using javascripts.
>
> I have to call diffrent actions on each submit,(say
> listing , deleting and adding) , this can be easily
> done through scripts , but what if scripts is
> disabled.
>
> Does Struts have any better solution.
>
> Thanx in Advance
>
> Regards
>
> manoj
>
>
>
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail
>
> -
> 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]
_
Check out Election 2004 for up-to-date election news, plus voter tools and 
more! http://special.msn.com/msn/election2004.armx

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


RE: Caching Framework

2004-08-16 Thread sridhar ramalingam
Ravi,
Take a look at the logon example again,
org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn.java.

Regards,
Sridhar


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 13, 2004 6:54 AM
To: [EMAIL PROTECTED]
Subject: RE: Caching Framework



That's really a great idea Erik.

Can you please point me to some example.

Thanks Erik,

Regds
Ravi

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]

Sent: Friday, August 13, 2004 7:21 PM
To: Struts Users Mailing List
Subject: Re: Caching Framework


Ravi, without getting real complicated, I use PlugIns to do this!

Implement org.apache.struts.action.PlugIn. You only need to write two

methods -- init and destroy. In your init method, gather some data store

it as application scope attributes (you get a reference to the

controller Servlet in the init method). Finally, register your PlugIn

with struts-config.xml. When your Struts app initializes, your PlugIn's

init method is invoked. Your JSPs now have easy access to the cached

data, as do your Actions.

Erik



[EMAIL PROTECTED] wrote:

>Hi,
>
>Is there any Caching framework available for struts ?
>
>For eg: I need to cache some list of objects ...etc.,
>
>Ravi
>
>
>
>
>
>Confidentiality Notice
>
>The information contained in this electronic message and any

>attachments to this message are intended for the exclusive use of the

>addressee(s) and may contain confidential or privileged information. If

>you are not the intended recipient, please notify the sender at Wipro

>or [EMAIL PROTECTED] immediately and destroy all copies of this 
>message and any attachments.
> 

>

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




Confidentiality Notice


The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain confidential or privileged information. If you are not
the intended recipient, please notify the sender at Wipro or
[EMAIL PROTECTED] immediately and destroy all copies of this message
and any attachments.

-
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: Read only iterate?

2004-08-16 Thread dhay

Mike,

The indexed tags do make the code much cleaner.  And they are definitely
not read-only (as you've discovered, you don't need them if you want things
read only!!).

There are lots of posts in the archives about it, and I posted working code
here:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg12084.html

cheers,

David



|-+>
| |   Mike Elliott |
| |   <[EMAIL PROTECTED]|
| |   9.net>   |
| ||
| |   08/15/2004 04:44 |
| |   PM   |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
| ||
|-+>
  
>|
  |
|
  |   To:   "Struts Users Mailing List" <[EMAIL PROTECTED]>
   |
  |   cc:  
|
  |   Subject:  Re: Read only iterate? 
|
  
>|




On Saturday 14 August 2004 17:52, Kishore Senji wrote:
> Refer:
> http://struts.apache.org/faqs/indexedprops.html
>
> >  
> >
> >  Problematic input
> >  
> > >  property="integer_value" indexed="true"/>
> >  
> >
> >  
>
> Try the one below:
>
>  indexId="ctr"> 
>  Problematic input
>  
>  property='<%="items["+ctr+"].integer_value"%>'/>
>  
>
> 

Yes, that works.  Thank you.  However, I would put that in the general
category of a workaround rather than the correct solution.  I read the
reference you mentioned before making my original attempt.

In that reference, the authors themselves feel there is a better solution:

  " The JSP expression syntax for the property attribute is somewhat
messy and easy to get wrong so it's something we want to avoid.
One way to make this a little cleaner is to use "indexed tags"'

and then go on to talk about "indexed tags" as being superior.  I took from
that the notion that I should avoid the first solution; that indexed tags
would do the same thing.

If that's actually true then I'd be delighted to see how to make it work.
Nowhere in the discussion do the authors drop the bomb that using indexed
tags makes the whole situation read-only and I still think that there must
be
some way to make it work using indexed tags -- I just haven't yet found it.

However, thanks for pointing me at the earlier solution -- it does work,
awkward as it is, and that's really important when one has a product to
deliver.

--
Mike Elliott

-
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: error code 404 not used in IE

2004-08-16 Thread Martin Gainty
Did you look at Ted Husted's article on implementing ActionError class?
http://www.mail-archive.com/[EMAIL PROTECTED]/msg18580.html
HTH,
Martin Gainty



From: lixin chu <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: error code 404 not used in IE
Date: Mon, 16 Aug 2004 07:21:40 -0700 (PDT)
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by mc3-f7.hotmail.com 
with Microsoft SMTPSVC(5.0.2195.6824); Mon, 16 Aug 2004 07:22:09 -0700
Received: (qmail 82938 invoked by uid 500); 16 Aug 2004 14:21:44 -
Received: (qmail 82923 invoked by uid 500); 16 Aug 2004 14:21:44 -
Received: (qmail 82918 invoked by uid 99); 16 Aug 2004 14:21:44 -
Received: from [206.190.38.197] (HELO web51505.mail.yahoo.com) 
(206.190.38.197)  by apache.org (qpsmtpd/0.27.1) with SMTP; Mon, 16 Aug 
2004 07:21:42 -0700
Received: from [203.103.5.112] by web51505.mail.yahoo.com via HTTP; Mon, 16 
Aug 2004 07:21:40 PDT
X-Message-Info: JGTYoYF78jGy224PT0O8B9vtujP4nNpG
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: 
List-Subscribe: 
List-Help: 
List-Post: 
List-Id: "Struts Users Mailing List" 
Delivered-To: mailing list [EMAIL PROTECTED]
X-ASF-Spam-Status: No, hits=0.5 
required=10.0tests=DNS_FROM_RFC_ABUSE,TO_ADDRESS_EQ_REAL
X-Spam-Check-By: apache.org
Message-ID: <[EMAIL PROTECTED]>
X-Virus-Checked: Checked
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 16 Aug 2004 14:22:10.0265 (UTC) 
FILETIME=[6AC50490:01C4839C]

Hi,
MS IE has default setting:
 Tools->Options->Advanced->Browsing->"Show friendly
HTTP error message"
When it is checked, the IE default error page is used
not your own 404 error page.
How can I change the http status code in Struts
application so that my own 404 page is used ?
thanks
li xin

__
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Check out Election 2004 for up-to-date election news, plus voter tools and 
more! http://special.msn.com/msn/election2004.armx

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


Re: Difficult index properties problem

2004-08-16 Thread Nathan Maves
or jsp 2.0!
On Aug 16, 2004, at 9:55 AM, Rick Reumann wrote:
Rick Reumann wrote:
Of course this assumes using html el tags.



   



--
Rick
-
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: [OT] Open/free SQL Query Wizard

2004-08-16 Thread Nathan Maves
Not web based but i think AquaStudio rocks!
Auto-completion of sql!
http://www.aquafold.com/
On Aug 16, 2004, at 9:16 AM, [EMAIL PROTECTED] wrote:
Anybody aware of any open/free packages that contain a web-based SQL  
query wizard/editor?

Thanks,
Dennis- 

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


RE: JSTL duplication of tag content

2004-08-16 Thread Karr, David
What container are you using?

> -Original Message-
> From: Johan Wasserman - BCX - Infrastructure Services 
> 
> Anyone else experiencing duplication of tag contents with JSTL?
>  
> e.g.
> 
> 
>   
> 
>   
> 
> 
>  
>  where:
>  
> form.title=Log new {0}
> person.form.name=Person
>  
> Results in "Log new Person" the first time you open the form 
> and "Log new PersonPerson" the second time and "Log new 
> PersonPersonPersonPersonPerson" the n'th time.
>  
> Any suggestions?
> 

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



RE: Simple design question

2004-08-16 Thread Jim Barrows


> -Original Message-
> From: Kenneth Litwak [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 13, 2004 3:54 PM
> To: Struts Users Mailing List
> Subject: Simple design question
> 
> 
> I'm trying to teach myself Struts while writing an actual
> application . I need to go from an index.jsp, with variable request
> parameter values (depending upon the specific user choice of what to
> do).  For this should I code one Action that then forwards to separate
> things depending upon request parameters or put multiple forms on the
> index.jsp, each of which invokes a different Action?  Never 
> done any of
> this before, so I don't have a feel for what's better.  Thanks.

You don't have to have a form for every action.  You can use 

Re: Difficult index properties problem

2004-08-16 Thread Rick Reumann
Rick Reumann wrote:
Of course this assumes using html el tags.



   




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


Re: Difficult index properties problem

2004-08-16 Thread Rick Reumann
Nathan Maves wrote:
I have a 2 layered nested bean.
ie
Bean1 has n number of associated Bean2
Bean2 has n number of associated Bean3
I want to have a form that has an Array of Bean3's
Probem is that while iterating though Bean2's the count for the indexed 
property gets reset.  Any clever ideas to get around this.
I usually use the nested tag although JSTL works also but is a bit more 
verbose.
(could be some typos below .. this not tested)

Assume an ActionForm with a propety
Collection or List called listOf_A_Beans
<%-- Nested tag way --%>



   





   



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


Difficult index properties problem

2004-08-16 Thread Nathan Maves
Here is the setup...
I have a 2 layered nested bean.
ie
Bean1 has n number of associated Bean2
Bean2 has n number of associated Bean3
I want to have a form that has an Array of Bean3's
Probem is that while iterating though Bean2's the count for the indexed 
property gets reset.  Any clever ideas to get around this.

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


Re: [OT] DAO ... where to draw the line?

2004-08-16 Thread Rick Reumann
Matthew J. Vincent wrote:
Hi all,
Thanks for the info.  Here's another issue.
What if I have an employee search screen that wants to show only some of 
the information of an employee (not all).  What do you do then?
1. Instanatiate an Employee object and only fill in the relative 
information?  Keep in mind that this could be just employee name and 
location on the search results screen and then when the user chooses 
which employee to view I need to get all of the employee information.

2.  Instantiate an Employee object and fill out all the information even 
though you won't be needing most of it on the search results screen?

3.  Create 2 DTOs, one called Employee and one called EmployeeSearch 
DTO.  The EmployeeSearch DTO only stores what needs to be shown on the 
search results screen and the EmployeeDTO holds all the information for 
what needs to be shown on the detail screen?

4.  Something else...
I wouldn't make new DTOs/Value Objects. I'd just do number 1 above: 
"Instanatiate an Employee object and only fill in the relative
information?" OR sometimes 2 is ok if it's not a big query, that way 
could reuse your query. BUT, you also mention that are doing this based 
on a "search," often for that what you search on won't necessarily even 
be in the EmployeeDTO so I often DO make a SearchDTO to pass to my 
service layer. For example maybe you want to search on employees who 
have been hired before a certain date and after a date. You then would 
have a startDate and endDate in your searchDTO. I susually always end up 
with a searchDTO for when I need to capture criteria to search on. But 
if say for displaying a list of Employees that the user can pickf from.. 
I'd simply reuse the basic Employee object, even if it's only populated 
with a name and ID.

By the way, I recommend you look at iBATIS for this stuff. It really 
makes this stuff pretty easy http://www.ibatis.com/. I even have a small 
example lesson showing it in use (although it needs to be updated) 
http://www.reumann.net/do/struts/ibatisLesson1

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


Re: [OT] Open/free SQL Query Wizard

2004-08-16 Thread James Mitchell

May not be what you are looking for, but I use DbVisualizer.it simply
rocks!!

Is there a reason it needs to be web-based?  Remote access??

If DbVis doesn't work for you, I can give you a copy of a little jsp that I
put together that works with DB2.  It displays 3 text area inputs, 1 for
straight sql (select), 1 for straight sql (update), and one that you can use
hql (Hibernate SQL).  Below that it lists, and links the meta info for the
specified database.  As you click, it drills down.  Click a schema, it shows
the tables.  Click a table, it shows the rows.  A little crude, but
functional.

Anyway, just thought I'd offer.


--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx

- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List
Sent: Monday, August 16, 2004 11:16 AM
Subject: [OT] Open/free SQL Query Wizard



Anybody aware of any open/free packages that contain a web-based SQL query
wizard/editor?

Thanks,
Dennis



-
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: [OT] DAO ... where to draw the line?

2004-08-16 Thread Robert Taylor
Strategy 3.

I would basically have a DAO that handles the search query
and returns a collection of value objects for the related use case.
When the user clicks on a specific employee, then render the
details using your employee DTO.

As far as patterns are concerned you may want to take a look
as the ValueObjectAssembler pattern or the TransferObjectFactory 
patterns. 

hth,

robert

> -Original Message-
> From: Matthew J. Vincent [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 16, 2004 10:09 AM
> To: Struts Users Mailing List
> Subject: Re: [OT] DAO ... where to draw the line?
> 
> 
> LAST .  I promise!
> 
> Thanks!
> 
> >> Hi all,
> >>
> >> Thanks for the info.  Here's another issue.
> >>
> >> What if I have an employee search screen that wants to show only some 
> >> of the information of an employee (not all).  What do you do then?
> >> 1. Instanatiate an Employee object and only fill in the relative 
> >> information?  Keep in mind that this could be just employee name and 
> >> location on the search results screen and then when the user chooses 
> >> which employee to view I need to get all of the employee information.
> >>
> >> 2.  Instantiate an Employee object and fill out all the information 
> >> even though you won't be needing most of it on the search results 
> >> screen?
> >>
> >> 3.  Create 2 DTOs, one called Employee and one called EmployeeSearch 
> >> DTO.  The EmployeeSearch DTO only stores what needs to be shown on 
> >> the search results screen and the EmployeeDTO holds all the 
> >> information for what needs to be shown on the detail screen?
> >>
> >> 4.  Something else... Another pattern, etc?
> >>
> >> Thanks!
> >>
> >> Matt
> >>
> >>
> >>
> >> Navjot Singh wrote:
> >>
> >>> hi matthew,
> >>>
> >>> I wont say that you go with one or other of your approaches.
> >>>
> >>> It depends upon type of assosciation that 2 entities may share. They 
> >>> may have aggregation or composition relationship. Depending on that 
> >>> your DAO implementation will decide that you need to get ONLY id or 
> >>> the composite objects.
> >>>
> >>> Let me explain.
> >>>
> >>> Say you have class named ORDER ad ORDER_DETAILS. (consists-of 
> >>> relationship) Order without order details is nothing. So you may get 
> >>> the OrderDetails object as well when you get Order.
> >>>
> >>> Now say you have EMPLOYEE and DEPARTMENT. (has-a relationship) 
> >>> EMPLOYEE *may* still exists with or without department. So you may 
> >>> get only id of department and later fetch the department.
> >>>
> >>> Think in employee table, you have relationship (reports-to). If you 
> >>> specify this relation as composition, you may go on fetching the 
> >>> objects all the way up to the organization chart ;-)
> >>>
> >>> Do i make sense?
> >>> Navjot Singh
> >>>
>  -Original Message-
>  From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] Sent: 
>  Wednesday, August 11, 2004 8:21 AM
>  To: Struts Users Mailing List
>  Subject: [OT] DAO ... where to draw the line?
> 
>  [OFF TOPIC]
> 
>  I know this is a struts forum, but as struts developers using DAOs, 
>  where do your DAO implementation draw the line?
>  For example:
> 
>  Let''s say I have three tables:
> 
>  Employee (contains employee_id, employee_name,  and dept_id)
>  Department (contains dept_id, dept_name, loc_id)
>  Location (contains loc_id, location_name)
> 
>  How deep do your classes go to replicate the data?
>  Do you do this...
> 
>  public class Employee {
> private int id;
> private String name;
> private int deptId;   // just the id
> 
> // .. implementation details
>  }
> 
>  or do you do this
> 
>  public class Employee {
> private int id;
> private String name;
> private Department dept;  // all of the data
> 
> // .. implementation details
>  }
> 
>  and so on and so on.   Class Department has the same type of 
>  problem.  Does it hold just the id for location or a variable class 
>  Location?
> 
>  Should DAOs just fill in the id (keys) so it is up to the 
>  application using the DAOs to get the Employee class, then the 
>  Department class, and the the Location class like:
> 
>  Employee emp = EmployeDAO.getEmployee(1);
>  Department dept = DepartmentDAO.getDepartment(emp.getDeptId());
>  Location loc = LocationDAO.getLocation(dept.getLocId());
>  System.out.println(emp.getEmpName() + " works in " + 
>  loc.getLocationName());
> 
>  or
> 
>  Employee emp = EmployeDAO.getEmployee(1);
>  System.out.println(emp.getEmpName() + " works in " + 
>  emp.getDept().getLoc().getLocationName());
> 
>  Now this is just a simple example, but where do you draw the line?  
>  It's possible to go on and on and on and cycle back to employee...
> 
>  Any thoughts, links, 

Re: html:text - want to set disable= to a bean value

2004-08-16 Thread Rick Reumann
Stuart Guthrie wrote:
Hi there, 

What I'm trying to do is re-use the same jsp for ADD/UPDATE modes. In
order to do this, certain field attributes will be different depending
on the modes and sometimes even on the user's security credentials or
the 'status' of the customer row.
To this end I need to pass in the form bean whether a particular field
is disabled or not
I usually don't like to have my formBean take care of holding this 
information. Not that it's necessarily bad, I just sort of like having 
my form beans as dumb as possible and only maintain form captured 
information.

What I do in the above is base what to display on a "userAction" which 
actually ends up corresponding to my dispatch Action method name. This I 
will sometimes add as an ActionForm property (ie String userAction ).

I then control the dispaly based on this userAction ( "update", "add"). 
You'll end up with a bit more verbose code but I find it easier to 
maintain.. so for example

You might have a case where if you are doing an update you can't update 
the User Name but can update other fields:

Name:

  
 
  
  
 
  

If you really want you can do your approach though but you'll have to 
use the html-el tags

Then you can do:

where customerCodeEnabled would correspond to "true" or "false" and be 
set accordingly. I don't like this approach though because you'll end up 
having to code a bunch of these for different fields and you've made 
your backend responsible for figuring out how to display the info on the 
page ( he he I say I don't like this, and now I'm on a project where the 
whole application is going to be coded by meta-data to tell the front 
what to display.. but still in theory I don't like it:)

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


[OT] Open/free SQL Query Wizard

2004-08-16 Thread DGraham

Anybody aware of any open/free packages
that contain a web-based SQL query wizard/editor?

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

Re: html:text - want to set disable= to a bean value

2004-08-16 Thread Susan Bradeen
Stuart Guthrie <[EMAIL PROTECTED]> wrote on 08/16/2004 10:01:49 AM:

> Hi there, 
> 
> What I'm trying to do is re-use the same jsp for ADD/UPDATE modes. In
> order to do this, certain field attributes will be different depending
> on the modes and sometimes even on the user's security credentials or
> the 'status' of the customer row.
> 
> To this end I need to pass in the form bean whether a particular field
> is disabled or not
> 
> I've searched the archives to no avail. I'm trying to set the disable=''
> attribute on the html:text tag to a value in the form bean I'm passing
> in.
> 
> eg:
> 
> formbean.isCustomerCodeEnabled()
> 
> returns a boolean true/false
> 
> formbean.getCustomerCode()
> 
> is the value of customer code.
> 
> I'm trying (hoping) to do something like this:
> 
>  disable="!CustomerCodeEnabled"  />
> 
> I've tried lots of different approaches, all failing. I've also scanned
> the examples to no avail.
> 
> Latest attempt is:
> 
>  name="CustomerFormWindowMainTabActionForm"
> property="CustomerCodeEnabled"
> type="boolean" value="true"/>
> 
> <% boolean customerCodeDisabled=(!customerCodeEnabled); %>
>  disabled="<%=customerCodeDisabled%>"  />

Does this work for you?


I had an app with similar requirements. IIRC, I solved it by doing the 
following.

In the JSP first define the FormBean that contains the boolean values:


then access the boolean fields for each form field like so:


Hope that helps.
Susan Bradeen


> 
> Which fails with:
> 
> customerCodeEnabled = null; [javac] ^ An error occurred at line: 87 in
> the jsp file: /CustomerFormWindowMainTabBody.jsp Generated servlet
> error:
> [javac]/home/sfg/javadev/jboss-3.2.
> 
3/server/default/work/MainEngine/localhost/pimsweb/CustomerFormWindowMainTabBody_jsp.
> java:175: inconvertible types 
> [javac] found : java.lang.Object [javac] required: boolean [javac]
> customerCodeEnabled = (boolean)
> pageContext.findAttribute("customerCodeEnabled"); [javac] ^ [javac] 2
> errors '
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
_
> Scanned for SoftLanding Systems, Inc. by IBM Email Security 
> Management Services powered by MessageLabs. 
> 
_


_
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services 
powered by MessageLabs. 
_

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



Re: JSTL duplication of tag content

2004-08-16 Thread Kris Schneider
Sure, but then he'd probably be seeing a translation error instead, right? Note
that the inner  isn't closed either. Seems to work fine for me
(using proper syntax) on TC 5.0.27 with Standard 1.0.6 (JSTL 1.0):

<%@ page contentType="text/plain" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"; %>







Quoting Niall Pemberton <[EMAIL PROTECTED]>:

> Looks like you're not closing thetag:
> 
> Instead of ...
>   
> 
>   
> 
> Shouldn't it be:
> 
>   
> 
>   
> 
> Niall
> 
> - Original Message - 
> From: "Johan Wasserman - BCX - Infrastructure Services"
> <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, August 16, 2004 3:20 PM
> Subject: JSTL duplication of tag content
> 
> 
> Anyone else experiencing duplication of tag contents with JSTL?
> 
> e.g.
> 
> 
>   
> 
>   
> 
> 
> 
>  where:
> 
> form.title=Log new {0}
> person.form.name=Person
> 
> Results in "Log new Person" the first time you open the form and "Log
> new PersonPerson" the second time and "Log new
> PersonPersonPersonPersonPerson" the n'th time.
> 
> Any suggestions?

-- 
Kris Schneider 
D.O.Tech   

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



Re: JSTL duplication of tag content

2004-08-16 Thread Niall Pemberton
Looks like you're not closing thetag:

Instead of ...
  

  

Shouldn't it be:

  

  

Niall

- Original Message - 
From: "Johan Wasserman - BCX - Infrastructure Services"
<[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 16, 2004 3:20 PM
Subject: JSTL duplication of tag content


Anyone else experiencing duplication of tag contents with JSTL?

e.g.


  

  



 where:

form.title=Log new {0}
person.form.name=Person

Results in "Log new Person" the first time you open the form and "Log
new PersonPerson" the second time and "Log new
PersonPersonPersonPersonPerson" the n'th time.

Any suggestions?



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



Re: AW: error code 404 not used in IE

2004-08-16 Thread lixin chu
this url explains this:

http://www.404-error-page.com/404-error-page-too-short-problem-microsoft-ie.shtml


--- lixin chu <[EMAIL PROTECTED]> wrote:

> sorry, i am new to this, what message ? 
> 
> --- "Rosenberg, Leon"
> <[EMAIL PROTECTED]> wrote:
> 
> > Send a message with more then 1024 bytes. 
> > (resin does it)
> > 
> > > -Ursprüngliche Nachricht-
> > > Von: lixin chu [mailto:[EMAIL PROTECTED]
> > > Gesendet: Montag, 16. August 2004 16:22
> > > An: [EMAIL PROTECTED]
> > > Betreff: error code 404 not used in IE
> > > 
> > > Hi,
> > > MS IE has default setting:
> > >  Tools->Options->Advanced->Browsing->"Show
> > friendly
> > > HTTP error message"
> > > 
> > > When it is checked, the IE default error page is
> > used
> > > not your own 404 error page.
> > > 
> > > How can I change the http status code in Struts
> > > application so that my own 404 page is used ?
> > > 
> > > thanks
> > > li xin
> > > 
> > > 
> > > 
> > > __
> > > Do you Yahoo!?
> > > Read only the mail you want - Yahoo! Mail
> > SpamGuard.
> > > http://promotions.yahoo.com/new_mail
> > > 
> > >
> >
>
-
> > > 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]
> > 
> > 
> 
> 
> 
>   
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: Tiles breaks my page that uses logic:iterate

2004-08-16 Thread Niall Pemberton
OK so post the bits of your struts-config which show the forms and action
mappings for

1) The action which renders the page
2) The action the form will post to (i.e. "/TilesSaveInputs")

Niall

- Original Message - 
From: "Janne Mattila" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 16, 2004 3:13 PM
Subject: Re: Tiles breaks my page that uses logic:iterate


> Yes. And, (for example)
>
> 
>
> works as long as I take out the multibox part.
>
>
> >From: "Niall Pemberton" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: Tiles breaks my page that uses logic:iterate
> >Date: Mon, 16 Aug 2004 15:09:57 +0100
> >
> >I'm guessing you changed the action your form is pointing to
> >("/TilesSaveInputs") - so is the form name still "inputsForm"?
> >
> >  >   >property="allChoices">
> >
> >Niall
> >
> >- Original Message -
> >From: "Janne Mattila" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Monday, August 16, 2004 2:59 PM
> >Subject: Tiles breaks my page that uses logic:iterate
> >
> >
> > > I have a simple page for editing some form properties. It works.
There's
> >a
> > > select box, a multibox, single-select select and a text input field.
Now
> >I
> > > tried to "Tiles-ify" it, just using Tiles to add some silly
decorations
> > > around the actual form. Using tiles seems to break the form, the
> >exception
> >I
> > > get is
> > >
> > > 16:49:43,714 ERROR [Engine] - Root Cause -
> > > javax.servlet.ServletException: Cannot find bean choice in any scope
> > > at
> > >
>
>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
p
> >l.java:533)
> > > at
> > >
>
>org.apache.jsp.inputs_0002dcontent_jsp._jspService(inputs_0002dcontent_jsp.
j
> >ava:103)
> > > at
> > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at
> > >
>
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
2
> >10)
> > > at
> > >
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> > > at
> >org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at
> > >
>
>org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher
.
> >java:684)
> > > at
> > >
>
>org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatc
h
> >er.java:575)
> > > at
> > >
>
>org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatche
r
> >.java:498)
> > > at
> > >
>
>org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:
8
> >22)
> > > at
> > >
>
>org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
> > > at
> > >
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> > > at
> >org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
> > > at
> > > org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
> > > at
> > >
>
>org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.j
a
> >va:881)
> > > at
> > > org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
> > > at
> > >
>
>org.apache.jsp.template_jsp._jspx_meth_tiles_insert_1(template_jsp.java:197
)
> > > at
> > >
> >org.apache.jsp.template_jsp._jspx_meth_html_html_0(template_jsp.java:109)
> > > at
org.apache.jsp.template_jsp._jspService(template_jsp.java:63)
> > > at
> > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at
> > >
>
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
2
> >10)
> > > at
> > >
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> > > at
> >org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at
> > >
>
>org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher
.
> >java:684)
> > > at
> > >
>
>org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatc
h
> >er.java:575)
> > > at
> > >
>
>org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatche
r
> >.java:498)
> > > at
> > >
>
>org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:
8
> >22)
> > > at
> > >
>
>org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
> > > at
> > >
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> > > at
> >org.apache.struts.tiles.TilesUtil.doInclu

Re: AW: error code 404 not used in IE

2004-08-16 Thread lixin chu
sorry, i am new to this, what message ? 

--- "Rosenberg, Leon"
<[EMAIL PROTECTED]> wrote:

> Send a message with more then 1024 bytes. 
> (resin does it)
> 
> > -Ursprüngliche Nachricht-
> > Von: lixin chu [mailto:[EMAIL PROTECTED]
> > Gesendet: Montag, 16. August 2004 16:22
> > An: [EMAIL PROTECTED]
> > Betreff: error code 404 not used in IE
> > 
> > Hi,
> > MS IE has default setting:
> >  Tools->Options->Advanced->Browsing->"Show
> friendly
> > HTTP error message"
> > 
> > When it is checked, the IE default error page is
> used
> > not your own 404 error page.
> > 
> > How can I change the http status code in Struts
> > application so that my own 404 page is used ?
> > 
> > thanks
> > li xin
> > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Read only the mail you want - Yahoo! Mail
> SpamGuard.
> > http://promotions.yahoo.com/new_mail
> > 
> >
>
-
> > 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]
> 
> 




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



AW: error code 404 not used in IE

2004-08-16 Thread Rosenberg, Leon
Send a message with more then 1024 bytes. 
(resin does it)

> -Ursprüngliche Nachricht-
> Von: lixin chu [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 16. August 2004 16:22
> An: [EMAIL PROTECTED]
> Betreff: error code 404 not used in IE
> 
> Hi,
> MS IE has default setting:
>  Tools->Options->Advanced->Browsing->"Show friendly
> HTTP error message"
> 
> When it is checked, the IE default error page is used
> not your own 404 error page.
> 
> How can I change the http status code in Struts
> application so that my own 404 page is used ?
> 
> thanks
> li xin
> 
> 
> 
> __
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
> http://promotions.yahoo.com/new_mail
> 
> -
> 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]



error code 404 not used in IE

2004-08-16 Thread lixin chu
Hi,
MS IE has default setting:
 Tools->Options->Advanced->Browsing->"Show friendly
HTTP error message"

When it is checked, the IE default error page is used
not your own 404 error page.

How can I change the http status code in Struts
application so that my own 404 page is used ?

thanks
li xin



__
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 

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



JSTL duplication of tag content

2004-08-16 Thread Johan Wasserman - BCX - Infrastructure Services
Anyone else experiencing duplication of tag contents with JSTL?
 
e.g.


  

  


 
 where:
 
form.title=Log new {0}
person.form.name=Person
 
Results in "Log new Person" the first time you open the form and "Log
new PersonPerson" the second time and "Log new
PersonPersonPersonPersonPerson" the n'th time.
 
Any suggestions?


Re: Tiles breaks my page that uses logic:iterate

2004-08-16 Thread Janne Mattila
Yes. And, (for example)

works as long as I take out the multibox part.

From: "Niall Pemberton" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Tiles breaks my page that uses logic:iterate
Date: Mon, 16 Aug 2004 15:09:57 +0100
I'm guessing you changed the action your form is pointing to
("/TilesSaveInputs") - so is the form name still "inputsForm"?
 >  

Niall
- Original Message -
From: "Janne Mattila" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 16, 2004 2:59 PM
Subject: Tiles breaks my page that uses logic:iterate
> I have a simple page for editing some form properties. It works. There's 
a
> select box, a multibox, single-select select and a text input field. Now 
I
> tried to "Tiles-ify" it, just using Tiles to add some silly decorations
> around the actual form. Using tiles seems to break the form, the 
exception
I
> get is
>
> 16:49:43,714 ERROR [Engine] - Root Cause -
> javax.servlet.ServletException: Cannot find bean choice in any scope
> at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:533)
> at
>
org.apache.jsp.inputs_0002dcontent_jsp._jspService(inputs_0002dcontent_jsp.j
ava:103)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
> at
>
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:575)
> at
>
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:498)
> at
>
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
22)
> at
>
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
> at
> org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> at 
org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
> at
> org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
> at
>
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:881)
> at
> org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
> at
>
org.apache.jsp.template_jsp._jspx_meth_tiles_insert_1(template_jsp.java:197)
> at
> 
org.apache.jsp.template_jsp._jspx_meth_html_html_0(template_jsp.java:109)
> at org.apache.jsp.template_jsp._jspService(template_jsp.java:63)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
> at
>
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:575)
> at
>
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:498)
> at
>
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
22)
> at
>
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
> at
> org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> at 
org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
> at
> org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
> at
>
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:881)
> at
> org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
> at
> org.apache.jsp.inputs_jsp._jspx_meth_tiles_insert_0(inputs_jsp.java:99)
> at org.apache.jsp.inputs_jsp._jspService(inputs_jsp.java:57)
>
> the JSP page for the form looks like:
>
> 
>
>   
>   
>
>   Select + optionsCollection:
>
>   
size="5">
>   
>   
>
>   Multibox:
>   
>
>   
> 
>   
> 
> 
>   
>
>   Single select + optionsCollection:
>
>   
>   
>   
>
>   Plain text field, validated using validator
>   e-mail:
>
>   
>   Back
>
>   
>   
> 
>
> The part which breaks the page is the multibox, it's iterator and use of
> iterator's choice

Re: [OT] DAO ... where to draw the line?

2004-08-16 Thread Matthew J. Vincent
LAST .  I promise!
Thanks!
Hi all,
Thanks for the info.  Here's another issue.
What if I have an employee search screen that wants to show only some 
of the information of an employee (not all).  What do you do then?
1. Instanatiate an Employee object and only fill in the relative 
information?  Keep in mind that this could be just employee name and 
location on the search results screen and then when the user chooses 
which employee to view I need to get all of the employee information.

2.  Instantiate an Employee object and fill out all the information 
even though you won't be needing most of it on the search results 
screen?

3.  Create 2 DTOs, one called Employee and one called EmployeeSearch 
DTO.  The EmployeeSearch DTO only stores what needs to be shown on 
the search results screen and the EmployeeDTO holds all the 
information for what needs to be shown on the detail screen?

4.  Something else... Another pattern, etc?
Thanks!
Matt

Navjot Singh wrote:
hi matthew,
I wont say that you go with one or other of your approaches.
It depends upon type of assosciation that 2 entities may share. They 
may have aggregation or composition relationship. Depending on that 
your DAO implementation will decide that you need to get ONLY id or 
the composite objects.

Let me explain.
Say you have class named ORDER ad ORDER_DETAILS. (consists-of 
relationship) Order without order details is nothing. So you may get 
the OrderDetails object as well when you get Order.

Now say you have EMPLOYEE and DEPARTMENT. (has-a relationship) 
EMPLOYEE *may* still exists with or without department. So you may 
get only id of department and later fetch the department.

Think in employee table, you have relationship (reports-to). If you 
specify this relation as composition, you may go on fetching the 
objects all the way up to the organization chart ;-)

Do i make sense?
Navjot Singh
-Original Message-
From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] Sent: 
Wednesday, August 11, 2004 8:21 AM
To: Struts Users Mailing List
Subject: [OT] DAO ... where to draw the line?

[OFF TOPIC]
I know this is a struts forum, but as struts developers using DAOs, 
where do your DAO implementation draw the line?
For example:

Let''s say I have three tables:
Employee (contains employee_id, employee_name,  and dept_id)
Department (contains dept_id, dept_name, loc_id)
Location (contains loc_id, location_name)
How deep do your classes go to replicate the data?
Do you do this...
public class Employee {
   private int id;
   private String name;
   private int deptId;   // just the id
   // .. implementation details
}
or do you do this
public class Employee {
   private int id;
   private String name;
   private Department dept;  // all of the data
   // .. implementation details
}
and so on and so on.   Class Department has the same type of 
problem.  Does it hold just the id for location or a variable class 
Location?

Should DAOs just fill in the id (keys) so it is up to the 
application using the DAOs to get the Employee class, then the 
Department class, and the the Location class like:

Employee emp = EmployeDAO.getEmployee(1);
Department dept = DepartmentDAO.getDepartment(emp.getDeptId());
Location loc = LocationDAO.getLocation(dept.getLocId());
System.out.println(emp.getEmpName() + " works in " + 
loc.getLocationName());

or
Employee emp = EmployeDAO.getEmployee(1);
System.out.println(emp.getEmpName() + " works in " + 
emp.getDept().getLoc().getLocationName());

Now this is just a simple example, but where do you draw the line?  
It's possible to go on and on and on and cycle back to employee...

Any thoughts, links, tips, best practices, whatvere would be helpful!
Thanks!
Matt


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


Re: Tiles breaks my page that uses logic:iterate

2004-08-16 Thread Niall Pemberton
I'm guessing you changed the action your form is pointing to
("/TilesSaveInputs") - so is the form name still "inputsForm"?

 >  

Niall

- Original Message - 
From: "Janne Mattila" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 16, 2004 2:59 PM
Subject: Tiles breaks my page that uses logic:iterate


> I have a simple page for editing some form properties. It works. There's a
> select box, a multibox, single-select select and a text input field. Now I
> tried to "Tiles-ify" it, just using Tiles to add some silly decorations
> around the actual form. Using tiles seems to break the form, the exception
I
> get is
>
> 16:49:43,714 ERROR [Engine] - Root Cause -
> javax.servlet.ServletException: Cannot find bean choice in any scope
> at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:533)
> at
>
org.apache.jsp.inputs_0002dcontent_jsp._jspService(inputs_0002dcontent_jsp.j
ava:103)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
> at
>
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:575)
> at
>
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:498)
> at
>
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
22)
> at
>
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
> at
> org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
> at
> org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
> at
>
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:881)
> at
> org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
> at
>
org.apache.jsp.template_jsp._jspx_meth_tiles_insert_1(template_jsp.java:197)
> at
> org.apache.jsp.template_jsp._jspx_meth_html_html_0(template_jsp.java:109)
> at org.apache.jsp.template_jsp._jspService(template_jsp.java:63)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
> at
>
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:575)
> at
>
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:498)
> at
>
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
22)
> at
>
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
> at
> org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
> at
> org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
> at
>
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:881)
> at
> org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
> at
> org.apache.jsp.inputs_jsp._jspx_meth_tiles_insert_0(inputs_jsp.java:99)
> at org.apache.jsp.inputs_jsp._jspService(inputs_jsp.java:57)
>
> the JSP page for the form looks like:
>
> 
>
>   
>   
>
>   Select + optionsCollection:
>
>   
>   
>   
>
>   Multibox:
>   
>
>   
> 
>   
> 
> 
>   
>
>   Single select + optionsCollection:
>
>   
>   
>   
>
>   Plain text field, validated using validator
>   e-mail:
>
>   
>   Back
>
>   
>   
> 
>
> The part which breaks the page is the multibox, it's iterator and use of
> iterator's choice object. If I take that part out the page works fine with
> Tiles, I can make the selections etc.
>
> The page works fine also with the multibox as long as I do not use Tiles.
> With tiles I use the same Actions, JSP code for forming the output is
> straight copy-paste, there's no difference with the action definitions in
> struts-c

html:text - want to set disable= to a bean value

2004-08-16 Thread Stuart Guthrie
Hi there, 

What I'm trying to do is re-use the same jsp for ADD/UPDATE modes. In
order to do this, certain field attributes will be different depending
on the modes and sometimes even on the user's security credentials or
the 'status' of the customer row.

To this end I need to pass in the form bean whether a particular field
is disabled or not

I've searched the archives to no avail. I'm trying to set the disable=''
attribute on the html:text tag to a value in the form bean I'm passing
in.

eg:

formbean.isCustomerCodeEnabled()

returns a boolean true/false

formbean.getCustomerCode()

is the value of customer code.

I'm trying (hoping) to do something like this:



I've tried lots of different approaches, all failing. I've also scanned
the examples to no avail.

Latest attempt is:



<% boolean customerCodeDisabled=(!customerCodeEnabled); %>


Which fails with:

customerCodeEnabled = null; [javac] ^ An error occurred at line: 87 in
the jsp file: /CustomerFormWindowMainTabBody.jsp Generated servlet
error:
[javac]/home/sfg/javadev/jboss-3.2.3/server/default/work/MainEngine/localhost/pimsweb/CustomerFormWindowMainTabBody_jsp.java:175:
 inconvertible types 
[javac] found : java.lang.Object [javac] required: boolean [javac]
customerCodeEnabled = (boolean)
pageContext.findAttribute("customerCodeEnabled"); [javac] ^ [javac] 2
errors '



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



Tiles breaks my page that uses logic:iterate

2004-08-16 Thread Janne Mattila
I have a simple page for editing some form properties. It works. There's a 
select box, a multibox, single-select select and a text input field. Now I 
tried to "Tiles-ify" it, just using Tiles to add some silly decorations 
around the actual form. Using tiles seems to break the form, the exception I 
get is

16:49:43,714 ERROR [Engine] - Root Cause -
javax.servlet.ServletException: Cannot find bean choice in any scope
   at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
   at 
org.apache.jsp.inputs_0002dcontent_jsp._jspService(inputs_0002dcontent_jsp.java:103)
   at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
   at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
   at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
   at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
   at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:822)
   at 
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
   at 
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
   at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
   at 
org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
   at 
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
   at 
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
   at 
org.apache.jsp.template_jsp._jspx_meth_tiles_insert_1(template_jsp.java:197)
   at 
org.apache.jsp.template_jsp._jspx_meth_html_html_0(template_jsp.java:109)
   at org.apache.jsp.template_jsp._jspService(template_jsp.java:63)
   at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
   at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
   at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
   at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
   at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:822)
   at 
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
   at 
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
   at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
   at 
org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
   at 
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
   at 
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
   at 
org.apache.jsp.inputs_jsp._jspx_meth_tiles_insert_0(inputs_jsp.java:99)
   at org.apache.jsp.inputs_jsp._jspService(inputs_jsp.java:57)

the JSP page for the form looks like:


 
 
 Select + optionsCollection:
 

 
 Multibox:
 
 
   
 
   
   
 
 Single select + optionsCollection:
 

 
 Plain text field, validated using validator
 e-mail:
 
 Back
 
 

The part which breaks the page is the multibox, it's iterator and use of 
iterator's choice object. If I take that part out the page works fine with 
Tiles, I can make the selections etc.

The page works fine also with the multibox as long as I do not use Tiles. 
With tiles I use the same Actions, JSP code for forming the output is 
straight copy-paste, there's no difference with the action definitions in 
struts-config.xml. The only difference is the use of Tiles. I wonder what 
about Tiles causes this to break?

_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

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


Re: OC4J and struts issue

2004-08-16 Thread simarjit singh
Kindly have a look
at my struts-config.xml , i have reduced it almost nothing
*** struts-config.xml**

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

 


ApplicationResources.properties is under WEB-INF/classes
**  jsp page **
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>




test

***
So there is not much space to make a mistake , but i am still able to do 
that :-)

Can there be any issue with classpaths? .I have everything in WEB-INF/lib
error is
javax.servlet.jsp.JspException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE
at org.apache.struts.util.RequestUtils.message(RequestUtils.java:793)
at org.apache.struts.util.RequestUtils.message(RequestUtils.java:755)
at 
org.apache.struts.taglib.html.BaseHandlerTag.message(BaseHandlerTag.java:568)
at 
org.apache.struts.taglib.html.BaseHandlerTag.prepareStyles(BaseHandlerTag.java:623)
at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:355)
at _adhoc._selection._jspService(_selection.java:64)
[SRC:/adhoc/selection.jsp:10]
.
.


thanks,simar
here is the test jsp content
Vic Cekvenich wrote:
It's usualy a case issues in some xml, since windows is not case 
sensetive.
Look for that.

Next time, if you deploy to unix, develop in unix.
.V
I am able to run it in windows environment but when i move it to 
solaris, it is failing.:-(


-
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: OC4J and struts issue

2004-08-16 Thread Vic Cekvenich
It's usualy a case issues in some xml, since windows is not case sensetive.
Look for that.
Next time, if you deploy to unix, develop in unix.
.V
I am able to run it in windows environment but when i move it to 
solaris, it is failing.:-(


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


Re: If not logged in, login and redirect do requested page scenario.

2004-08-16 Thread Oli Kessler
Pavel Kolesnikov wrote:
On Mon, 16 Aug 2004 [EMAIL PROTECTED] wrote:

I'm trying to implement a scenario in which if the user who has not
logged in clicks on a link to a page "for logged in users only"  should
be redirected to "login page", and then if the login operation succeeds
another redirection takes the user, to the page that was originally
requested.
Are there any "commonly known" techniques to do this smoothly with
Struts??

What about Container Managed Authentication? 
It's part of J2EEs standard (so it's not Struts specific)
and it allows you to configure server to protect your pages
as you've described above.

See http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html
for Tomcat5 configuration.
Or use securityfilter on http://securityfilter.sf.net, a servlet filter 
which mimics container managed security in case you do not want to 
change your container's settings.

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


Re: OC4J and struts issue

2004-08-16 Thread simarjit singh
it is like
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
so uri is different .
Thanks simar
Veerabhadra Rao R wrote:
In jsp page if you are including the tag lib files like this
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
your taglib code in web.xml file should be like this

 
   /tags/struts-bean
   /WEB-INF/struts-bean.tld
 
 
   /tags/struts-html
   /WEB-INF/struts-html.tld
 
 
   /tags/struts-logic
   /WEB-INF/struts-logic.tld
 
 
   /tags/struts-nested
   /WEB-INF/struts-nested.tld
 
 
   /tags/struts-tiles
   /WEB-INF/struts-tiles.tld
 


Thanks
Veera
-Original Message-
From: simarjit singh [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 5:51 PM
To: Struts Users Mailing List
Subject: Re: OC4J and struts issue

Thanks for quick reply,
here is my web.xml entry. it is generated by jdeveloper.it is not
manual.
I am able to run it in windows environment but when i move it to 
solaris, it is failing.:-(


   /WEB-INF/struts-bean.tld
   /WEB-INF/struts-bean.tld
 
 
   /WEB-INF/struts-html.tld
   /WEB-INF/struts-html.tld
 
 
   /WEB-INF/struts-logic.tld
   /WEB-INF/struts-logic.tld
 
Thanks,simar
Veerabhadra Rao R wrote:
 

Hi,
Can you verify the tag lib directives in web.xml.  you will get such
type of error messages only when there is mismatching in tag lib
directives.


  /tags/struts-bean
  /WEB-INF/struts-bean.tld


  /tags/struts-html
  /WEB-INF/struts-html.tld


  /tags/struts-logic
  /WEB-INF/struts-logic.tld


  /tags/struts-nested
  /WEB-INF/struts-nested.tld


  /tags/struts-tiles
  /WEB-INF/struts-tiles.tld


Thanks
Veera
-Original Message-
From: simarjit singh [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 5:37 PM
To: Struts Users Mailing List
Subject: OC4J and struts issue

Hi,
I am getting th following error mesage in OC4J for 9i.
javax.servlet.jsp.JspException: Cannot find message resources under key
   

 

org.apache.struts.action.MESSAGE
at org.apache.struts.util.RequestUtils.message(RequestUtils.java:793)
at org.apache.struts.util.RequestUtils.message(RequestUtils.java:755)
at 
org.apache.struts.taglib.html.BaseHandlerTag.message(BaseHandlerTag.jav
   

a
 

:568)
at 
org.apache.struts.taglib.html.BaseHandlerTag.prepareStyles(BaseHandlerT
   

a
 

g.java:623)
at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:355)
at _adhoc._selection._jspService(_selection.java:64)
[SRC:/adhoc/selection.jsp:10]
at com.orionserver[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at
oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:508
   

)
 

at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:255)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatc
   

h
 

er.java:696)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletReque
   

s
 

tDispatcher.java:281)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.
   

j
 

ava:766)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecut
   

o
 

r.java:802)
at java.lang.Thread.run(Thread.java:479)


Can any body help.
Thanks in advance,
Simar
Information transmitted by this EMAIL is proprietary to iGATE Group of
   

Companies and is intended for use only by the individual or entity to
whom it is addressed and may contain information that is privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient of this EMAIL immediately notify the sender
at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any
attachments.
 

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

Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and 
is intended for use only by the individual or entity to whom it is addressed and may 
contain information that is privileged, confidential, or exempt from disclosure under 
applicable law. If you are not the intended recipient of this EMAIL imm

Re: Modifying Tiles definitions dinamically

2004-08-16 Thread Leandro Melo
I'm not sure if i get it right, i still have a couple
doubts.
Take this definition:


...

  

...




Naturally i got a login page, would i have to redirect
the login (or just forward the login) to  this
"TilesAction" and then manipulate my definition and
insert the real jsp page i want???

I have never heard of this "TilesAction" (haven`t been
dealling with struts for long time), but is it
possible to some post some bib reference (or web
reference) where i can learn how to work with it???

If it`s easy, maybe a little piece of code would also
work.

Thanks,
Leandro









 --- [EMAIL PROTECTED] escreveu: 
> think the best (and the most elegant) way to make
> dynamic tiles is by
> using TilesAction. This because this class has
> knowledge of the use of
> Tiles.
> So write your TilesAction (it is similar to a plain
> Action, except of some
> more parameters in the "execute" method). In the
> "execute" method put your
> code that can distinguish between different users
> and for each one forward
> to a different JSP page, that will be your "real"
> tile.
> Obviously map your actions in struts-config.xml just
> the same way as
> normal actions.
> Then put a definition like this (I am using your
> example):
> 
>  path="/layouts/layout.jsp">
>   
>   
>   
>value="/functionalBlocks/errorHTMLcomponent.jsp"/>
>value="/choosePageComment.do"/>
>   
>   
> 
> 
> Hope it helps.
> Ciao
> Antonio
> 
> P.S. In fact in this example a normal Action can be
> used, but I suggest to
> use TilesAction because that class can manipulate
> the definition itself
> (please people working on Struts, correct me if I am
> wrong).
> 
> Leandro Melo wrote:
> 
> >Hi,
> >i got a very ordinary problem.
> >I need to provide diferent menus for diferent
> people
> >that are logged in the application.
> >I don't know what i should do exactly to provide
> this
> >funcionality, because i don't really know what
> Tiles
> >allow me to do (i don't know it's potencial).
> >
> >I got the following base tiles definition in my
> app.
> > >path="/layouts/layout.jsp">
> >  
> >  
> >  
> >   >value="/functionalBlocks/errorHTMLcomponent.jsp"/>
> >  
> >  
> >  
> >
> >
> >One thing i thought is to verify the user
> permissions
> >at log time, then, depending on the user i'd change
> >the attribute "menu" of my definition to the page
> >menu2.jsp or menu3.jsp, for example. Can (how) i do
> >that???
> >
> >I also thought on bulding 2 (or 3 or 4) BASE
> >deifinitions and at log time i'd decide which base
> >definition to use. Can i do that (how??)??
> >
> >I'd appreciate if some show me some reference or
> just
> >some sample code on how to do that.
> >
> >Thansk,
> >ltcmelo
> >
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>  





___
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: 
http://br.acesso.yahoo.com/

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



RE: OC4J and struts issue

2004-08-16 Thread Veerabhadra Rao R
In jsp page if you are including the tag lib files like this

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

your taglib code in web.xml file should be like this


  
/tags/struts-bean
/WEB-INF/struts-bean.tld
  

  
/tags/struts-html
/WEB-INF/struts-html.tld
  

  
/tags/struts-logic
/WEB-INF/struts-logic.tld
  

  
/tags/struts-nested
/WEB-INF/struts-nested.tld
  

  
/tags/struts-tiles
/WEB-INF/struts-tiles.tld
  




Thanks
Veera
-Original Message-
From: simarjit singh [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 5:51 PM
To: Struts Users Mailing List
Subject: Re: OC4J and struts issue

Thanks for quick reply,
here is my web.xml entry. it is generated by jdeveloper.it is not
manual.

I am able to run it in windows environment but when i move it to 
solaris, it is failing.:-(



/WEB-INF/struts-bean.tld

/WEB-INF/struts-bean.tld

  

  

/WEB-INF/struts-html.tld

/WEB-INF/struts-html.tld

  

  

/WEB-INF/struts-logic.tld

/WEB-INF/struts-logic.tld

  


Thanks,simar

Veerabhadra Rao R wrote:

>Hi,
>
>Can you verify the tag lib directives in web.xml.  you will get such
>type of error messages only when there is mismatching in tag lib
>directives.
>
>
>  
>/tags/struts-bean
>/WEB-INF/struts-bean.tld
>  
>
>  
>/tags/struts-html
>/WEB-INF/struts-html.tld
>  
>
>  
>/tags/struts-logic
>/WEB-INF/struts-logic.tld
>  
>
>  
>/tags/struts-nested
>/WEB-INF/struts-nested.tld
>  
>
>  
>/tags/struts-tiles
>/WEB-INF/struts-tiles.tld
>  
>
>
>
>Thanks
>Veera
>-Original Message-
>From: simarjit singh [mailto:[EMAIL PROTECTED] 
>Sent: Monday, August 16, 2004 5:37 PM
>To: Struts Users Mailing List
>Subject: OC4J and struts issue
>
>Hi,
>I am getting th following error mesage in OC4J for 9i.
>
>javax.servlet.jsp.JspException: Cannot find message resources under key

>org.apache.struts.action.MESSAGE
>at org.apache.struts.util.RequestUtils.message(RequestUtils.java:793)
>at org.apache.struts.util.RequestUtils.message(RequestUtils.java:755)
>at 
>org.apache.struts.taglib.html.BaseHandlerTag.message(BaseHandlerTag.jav
a
>:568)
>at 
>org.apache.struts.taglib.html.BaseHandlerTag.prepareStyles(BaseHandlerT
a
>g.java:623)
>at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:355)
>at _adhoc._selection._jspService(_selection.java:64)
>[SRC:/adhoc/selection.jsp:10]
>at com.orionserver[Oracle9iAS (9.0.2.1.0) Containers for 
>J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
>at
>oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:508
)
>at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:255)
>at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)
>at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
>at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
>J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatc
h
>er.java:696)
>at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
>J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletReque
s
>tDispatcher.java:281)
>at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
>J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.
j
>ava:766)
>at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
>J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
>at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
>J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
>at 
>EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecut
o
>r.java:802)
>at java.lang.Thread.run(Thread.java:479)
>
>
>
>
>
>Can any body help.
>
>Thanks in advance,
>Simar
>
>
>Information transmitted by this EMAIL is proprietary to iGATE Group of
Companies and is intended for use only by the individual or entity to
whom it is addressed and may contain information that is privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient of this EMAIL immediately notify the sender
at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any
attachments.
>
>-
>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]



Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and 
is intended for use only by the individual or entity to whom it is addressed and may 
contain information that is privileged, confidential, or exempt from disclosure under 
applicable law. If you are not the intended recipient of

Re: OC4J and struts issue

2004-08-16 Thread simarjit singh
Thanks for quick reply,
here is my web.xml entry. it is generated by jdeveloper.it is not manual.
I am able to run it in windows environment but when i move it to 
solaris, it is failing.:-(


   /WEB-INF/struts-bean.tld
   /WEB-INF/struts-bean.tld
 
 
   /WEB-INF/struts-html.tld
   /WEB-INF/struts-html.tld
 
 
   /WEB-INF/struts-logic.tld
   /WEB-INF/struts-logic.tld
 
Thanks,simar
Veerabhadra Rao R wrote:
Hi,
Can you verify the tag lib directives in web.xml.  you will get such
type of error messages only when there is mismatching in tag lib
directives.

 
   /tags/struts-bean
   /WEB-INF/struts-bean.tld
 
 
   /tags/struts-html
   /WEB-INF/struts-html.tld
 
 
   /tags/struts-logic
   /WEB-INF/struts-logic.tld
 
 
   /tags/struts-nested
   /WEB-INF/struts-nested.tld
 
 
   /tags/struts-tiles
   /WEB-INF/struts-tiles.tld
 

Thanks
Veera
-Original Message-
From: simarjit singh [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 5:37 PM
To: Struts Users Mailing List
Subject: OC4J and struts issue

Hi,
I am getting th following error mesage in OC4J for 9i.
javax.servlet.jsp.JspException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE
at org.apache.struts.util.RequestUtils.message(RequestUtils.java:793)
at org.apache.struts.util.RequestUtils.message(RequestUtils.java:755)
at 
org.apache.struts.taglib.html.BaseHandlerTag.message(BaseHandlerTag.java
:568)
at 
org.apache.struts.taglib.html.BaseHandlerTag.prepareStyles(BaseHandlerTa
g.java:623)
at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:355)
at _adhoc._selection._jspService(_selection.java:64)
[SRC:/adhoc/selection.jsp:10]
at com.orionserver[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at
oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:508)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:255)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatch
er.java:696)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletReques
tDispatcher.java:281)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.j
ava:766)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto
r.java:802)
at java.lang.Thread.run(Thread.java:479)



Can any body help.
Thanks in advance,
Simar
Information transmitted by this EMAIL is proprietary to iGATE Group of Companies 
and is intended for use only by the individual or entity to whom it is addressed and 
may contain information that is privileged, confidential, or exempt from disclosure 
under applicable law. If you are not the intended recipient of this EMAIL immediately 
notify the sender at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any 
attachments.
-
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: Still need help with layered Map iteration in JSP

2004-08-16 Thread Kris Schneider
It's certainly not a bad idea to grab a JSTL book, but the spec itself is quite
readable and full of good information:

http://jcp.org/aboutJava/communityprocess/final/jsr052/

The only JSTL book I've even partially read is "JSTL in Action" by Shawn Bayern
and I have no reservations recommending it. There are also plenty of web
resources available:

http://www.javaworld.com/javaworld/jw-02-2003/jw-0228-jstl.html
http://www.onjava.com/pub/a/onjava/2002/08/14/jstl1.html
http://www.onjava.com/pub/a/onjava/2002/09/11/jstl2.html
http://www.onjava.com/pub/a/onjava/2002/03/13/jsp.html
http://www.onjava.com/pub/a/pub/a/onjava/2002/05/08/jstl.html
http://java.sun.com/developer/technicalArticles/javaserverpages/faster/
http://java.sun.com/developer/technicalArticles/Intl/MultilingualJSP/

etc.

Quoting Erik Weber <[EMAIL PROTECTED]>:

> Kris, once again you have helped me get my work done. bean:size did the 
> trick. I was looking over and over again for a JSTL tag or expression to 
> do this; I probably never would have thought of bean:size.
> 
> To complete the post for any other reader who is as suicidal as I am 
> after trying to figure this out:
> 
> 
>   
>   . . .
>   
>   . . .
>varStatus="iteratorStatus">
>   . . .
>   
>   . . .
>   
>  
> and so on . . .
> 
> 
> Thank you,
> Erik
> 
> P.S. I would love to know how you learned all this (I suppose I must buy 
> a JSTL book).
> 
> Erik

-- 
Kris Schneider 
D.O.Tech   

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



RE: OC4J and struts issue

2004-08-16 Thread Veerabhadra Rao R
Hi,

Can you verify the tag lib directives in web.xml.  you will get such
type of error messages only when there is mismatching in tag lib
directives.


  
/tags/struts-bean
/WEB-INF/struts-bean.tld
  

  
/tags/struts-html
/WEB-INF/struts-html.tld
  

  
/tags/struts-logic
/WEB-INF/struts-logic.tld
  

  
/tags/struts-nested
/WEB-INF/struts-nested.tld
  

  
/tags/struts-tiles
/WEB-INF/struts-tiles.tld
  



Thanks
Veera
-Original Message-
From: simarjit singh [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 5:37 PM
To: Struts Users Mailing List
Subject: OC4J and struts issue

Hi,
I am getting th following error mesage in OC4J for 9i.

javax.servlet.jsp.JspException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE
at org.apache.struts.util.RequestUtils.message(RequestUtils.java:793)
at org.apache.struts.util.RequestUtils.message(RequestUtils.java:755)
at 
org.apache.struts.taglib.html.BaseHandlerTag.message(BaseHandlerTag.java
:568)
at 
org.apache.struts.taglib.html.BaseHandlerTag.prepareStyles(BaseHandlerTa
g.java:623)
at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:355)
at _adhoc._selection._jspService(_selection.java:64)
[SRC:/adhoc/selection.jsp:10]
at com.orionserver[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at
oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:508)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:255)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatch
er.java:696)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletReques
tDispatcher.java:281)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.j
ava:766)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto
r.java:802)
at java.lang.Thread.run(Thread.java:479)





Can any body help.

Thanks in advance,
Simar


Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and 
is intended for use only by the individual or entity to whom it is addressed and may 
contain information that is privileged, confidential, or exempt from disclosure under 
applicable law. If you are not the intended recipient of this EMAIL immediately notify 
the sender at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any 
attachments.

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



OC4J and struts issue

2004-08-16 Thread simarjit singh
Hi,
I am getting th following error mesage in OC4J for 9i.
javax.servlet.jsp.JspException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE
at org.apache.struts.util.RequestUtils.message(RequestUtils.java:793)
at org.apache.struts.util.RequestUtils.message(RequestUtils.java:755)
at 
org.apache.struts.taglib.html.BaseHandlerTag.message(BaseHandlerTag.java:568)
at 
org.apache.struts.taglib.html.BaseHandlerTag.prepareStyles(BaseHandlerTag.java:623)
at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:355)
at _adhoc._selection._jspService(_selection.java:64)
[SRC:/adhoc/selection.jsp:10]
at com.orionserver[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:508)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:255)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:696)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:281)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:766)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind[Oracle9iAS (9.0.2.1.0) Containers for 
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:802)
at java.lang.Thread.run(Thread.java:479)



Can any body help.
Thanks in advance,
Simar


Re: Still need help with layered Map iteration in JSP

2004-08-16 Thread Erik Weber
Kris, once again you have helped me get my work done. bean:size did the 
trick. I was looking over and over again for a JSTL tag or expression to 
do this; I probably never would have thought of bean:size.

To complete the post for any other reader who is as suicidal as I am 
after trying to figure this out:


 
 . . .
 
 . . .
 
 . . .
 
 . . .
 

and so on . . .
Thank you,
Erik
P.S. I would love to know how you learned all this (I suppose I must buy 
a JSTL book).

Erik
Kris Schneider wrote:
I guess the first thing to make sure you understand is that, when iterating over
a Map, the object exposed by JSTL via the var attribute is of type Map.Entry.
It's equivalent to doing a map.entrySet().iterator(). As for getting the size
of an array, Collection, or Map, use the  tag.
Quoting Erik Weber <[EMAIL PROTECTED]>:
 

OK, I'll take ANY WAY TO DO THIS AT ALL.
I have a c:forEach over a Map. The value for each key in the Map can be 
an array of objects, or I can make it a List. I don't care at this point.

All I want to do is get the length of this array or List, before I start 
iterating over *it*, during the current iteration of the Map. I am told 
that I access the array or List like this:

1) Given this Map iteration:


2) access the value of the current Map entry (which will be either an 
array or a List) like this:
${currentMapEntryWhichIsBothAKeyAndAValueTogether.value}

But I have tried all of these, none of them work:






Not that they would have worked, because I was merely guessing in every 
case.

This is the type of thing that makes me sorry I ever got involved with 
tag libraries.

I have a Map of Lists. I didn't invent this. This is a common structure 
to use in Java. So someone please show me a single document that tells 
you how to work with JSTL tags (or any other tags) to do such a simple 
thing as to do a nested iteration of a Map of Lists or a Map of arrays!

Here is the Java equivalent of what I need to do:
//Map, stored as request attribute, has String keys, MyClass[] values
Map map = getMapWhichIsARequestAttribute();
Iterator i = map.keySet().iterator();
while (i.hasNext()) {
   String key = (String) i.next();
   MyClass[] values = (MyClass[]) map.get(key);
   int size = values.length; // *HOW DO I GET THIS VALUE USING TAGS?*
   if (size > 0) { // *HOW DO I IMPLEMENT THIS TEST USING TAGS?*
if (size > 5) {
//do setup for a big array
for (int x = 0; x < size; x++) {
//do output for each item in array
}
}
<>else {
<>//do setup for a small array
for (int x = 0; x < size; x++) {
//do output for each item in array
}
}
   }
   else {
   //no records found for this key
   }
}

Failing that, I would appreciate it if someone could show me how to do 
this using Struts tags. If I had used scriptlets, I would have been done 
hours ago.

Thanks,
Erik

Erik Weber wrote:
   

I have a c:forEach where "items" refers to a Map, and "var" refers to 
the current Map entry.


The value for each Map entry is an array. How do I switch on the 
length of this array? I tried this:


But I get a syntax error; it says I supplied the "." operator with an 
index value of type "java.lang.String" to be applied to an array, but 
that the value cannot be converted to an integer.

Is there some sort of way I can use "items.length" or "items.size" or 
something similar? More importantly, WHERE IS THIS DOCUMENTED?

I have searched the Internet for decent documents on JSTL and cannot 
find a simple complete guide to tag usage -- something similar to what 
Struts has for its tags. For example, where is a document that 
explains what you can do with "var", "varStatus", "items", etc. on a 
c:forEach tag, and covers all the tags? The Sun web services tutorial 
does not do this, it only gives examples.

Thank you,
Erik

Erik Weber wrote:
 

Thanks again.
Erik
Kris Schneider wrote:
   

 supports a "varStatus" attribute. The value of that 
atrribute is a
String that names an instance of 
javax.servlet.jsp.jstl.core.LoopTagStatus. The
LoopTagStatus instance has nested visibility so that it's only 
available within
the enclosing  tag. LoopTagStatus exposes a number of 
properties,
but the one you're probably interested in is "index":

..

<%-- ${status.index} is the current index --%>
...

..
Quoting Erik Weber <[EMAIL PROTECTED]>:

 

How can I refer to the index of the current iteration with 
c:forEach (analogous to the indexId attribute to logic:iterate)?

Thanks,
Erik
Kris Schneider wrote:
   

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>

<%-- ${entry.key} is the current key --%>
<%-- ${entry.value} is the associated bean array --%>

...


Quoting Erik Weber <[EMAIL PROTECTED]>:

 

I could use some Struts-EL/JSTL tag help, please.
I have a Map with each entry having a String as the key and a 
bean a

Re: HTTP Compression

2004-08-16 Thread Navjot Singh
Upload file thru activex or applet. Can't see anything to happen from 
browser(currently) otherwise.

- Navjot Singh
Shailender Jain wrote:
Hi,
Using the servlet 2.3 specification one can compress the data (gzip)
while sending from server and uncompress
on the client (Browser).
Has anybody tried,  if  the reverse can be achieved i.e. the browser
always sends a compressed data  and webserver decompress it.
This can be important when the user submit a form which has got huge
data or uploads a text file.
Can anything be done in the Action class while using
request.getParameter("parameter_name")
Regards
Shailender Jain
-
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]


HTTP Compression

2004-08-16 Thread Shailender Jain
Hi,

Using the servlet 2.3 specification one can compress the data (gzip)
while sending from server and uncompress
on the client (Browser).

Has anybody tried,  if  the reverse can be achieved i.e. the browser
always sends a compressed data  and webserver decompress it.
This can be important when the user submit a form which has got huge
data or uploads a text file.
Can anything be done in the Action class while using
request.getParameter("parameter_name")


Regards
Shailender Jain


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



Re: Still need help with layered Map iteration in JSP

2004-08-16 Thread Kris Schneider
I guess the first thing to make sure you understand is that, when iterating over
a Map, the object exposed by JSTL via the var attribute is of type Map.Entry.
It's equivalent to doing a map.entrySet().iterator(). As for getting the size
of an array, Collection, or Map, use the  tag.

Quoting Erik Weber <[EMAIL PROTECTED]>:

> OK, I'll take ANY WAY TO DO THIS AT ALL.
> 
> I have a c:forEach over a Map. The value for each key in the Map can be 
> an array of objects, or I can make it a List. I don't care at this point.
> 
> All I want to do is get the length of this array or List, before I start 
> iterating over *it*, during the current iteration of the Map. I am told 
> that I access the array or List like this:
> 
> 1) Given this Map iteration:
>  var="currentMapEntryWhichIsBothAKeyAndAValueTogether">
> 
> 2) access the value of the current Map entry (which will be either an 
> array or a List) like this:
> ${currentMapEntryWhichIsBothAKeyAndAValueTogether.value}
> 
> But I have tried all of these, none of them work:
> 
>  test="${currentMapEntryWhichIsBothAKeyAndAValueTogether.value.length > 
> 0}">
> 
>  test="${currentMapEntryWhichIsBothAKeyAndAValueTogether.value.size > 
> 0}">
> 
>  test="${fn:length(currentMapEntryWhichIsBothAKeyAndAValueTogether.value) 
>  > 0}">
> 
> Not that they would have worked, because I was merely guessing in every 
> case.
> 
> This is the type of thing that makes me sorry I ever got involved with 
> tag libraries.
> 
> I have a Map of Lists. I didn't invent this. This is a common structure 
> to use in Java. So someone please show me a single document that tells 
> you how to work with JSTL tags (or any other tags) to do such a simple 
> thing as to do a nested iteration of a Map of Lists or a Map of arrays!
> 
> Here is the Java equivalent of what I need to do:
> 
> //Map, stored as request attribute, has String keys, MyClass[] values
> 
> Map map = getMapWhichIsARequestAttribute();
> 
> Iterator i = map.keySet().iterator();
> 
> while (i.hasNext()) {
> 
> String key = (String) i.next();
> 
> MyClass[] values = (MyClass[]) map.get(key);
> 
> int size = values.length; // *HOW DO I GET THIS VALUE USING TAGS?*
> 
> if (size > 0) { // *HOW DO I IMPLEMENT THIS TEST USING TAGS?*
> 
>   if (size > 5) {
> 
>   //do setup for a big array
> 
>   for (int x = 0; x < size; x++) {
> 
>   //do output for each item in array
> 
>   }
> 
>   }
> 
> <>else {
> 
> <>//do setup for a small array
> 
>   for (int x = 0; x < size; x++) {
> 
>   //do output for each item in array
> 
>   }
>   }
> 
> }
> 
> else {
> 
> //no records found for this key
> 
> }
> 
> }
> 
> 
> 
> Failing that, I would appreciate it if someone could show me how to do 
> this using Struts tags. If I had used scriptlets, I would have been done 
> hours ago.
> 
> Thanks,
> Erik
> 
> 
> 
> Erik Weber wrote:
> 
> > I have a c:forEach where "items" refers to a Map, and "var" refers to 
> > the current Map entry.
> >
> > 
> >
> > The value for each Map entry is an array. How do I switch on the 
> > length of this array? I tried this:
> >
> > 
> >
> > But I get a syntax error; it says I supplied the "." operator with an 
> > index value of type "java.lang.String" to be applied to an array, but 
> > that the value cannot be converted to an integer.
> >
> > Is there some sort of way I can use "items.length" or "items.size" or 
> > something similar? More importantly, WHERE IS THIS DOCUMENTED?
> >
> > I have searched the Internet for decent documents on JSTL and cannot 
> > find a simple complete guide to tag usage -- something similar to what 
> > Struts has for its tags. For example, where is a document that 
> > explains what you can do with "var", "varStatus", "items", etc. on a 
> > c:forEach tag, and covers all the tags? The Sun web services tutorial 
> > does not do this, it only gives examples.
> >
> > Thank you,
> > Erik
> >
> >
> >
> > Erik Weber wrote:
> >
> >> Thanks again.
> >> Erik
> >>
> >> Kris Schneider wrote:
> >>
> >>>  supports a "varStatus" attribute. The value of that 
> >>> atrribute is a
> >>> String that names an instance of 
> >>> javax.servlet.jsp.jstl.core.LoopTagStatus. The
> >>> LoopTagStatus instance has nested visibility so that it's only 
> >>> available within
> >>> the enclosing  tag. LoopTagStatus exposes a number of 
> >>> properties,
> >>> but the one you're probably interested in is "index":
> >>>
> >>> ..
> >>> 
> >>> <%-- ${status.index} is the current index --%>
> >>> ...
> >>> 
> >>> ..
> >>>
> >>> Quoting Erik Weber <[EMAIL PROTECTED]>:
> >>>
> >>>
> >>>
>  How can I refer to the index of the current iteration with 
>  c:forEach (analogous to the indexId attribute to logic:iterate)?
> 
>  Thanks,
>  Erik
> 
> 
>  Kris Schneider wrote:
> 
> 
> > <%@ taglib prefix="c" uri="http://

Re: Accessing bean properties problem

2004-08-16 Thread Janne Mattila
Janne Mattila wrote:
OK, Cap't of the Eh Team!
Maybe you should go and add "Note: this is a clear, extensible, light, 
fast, loosely coupled, solution compared to a messy, solution specific, 
heavy, slow, tightly coupled version!" to the Wiki page? After all, you 
have invented an elegant solution with low cost and with great flexibility 
and freedom!

Janne,
You too can be sardonic.  LOL  I guess we are just going to have to 
disagree on this one.  Enjoy coding and have a great day!  I was way ahead 
of you on the Wiki page suggestion though.  LOL

Michael
Agreed to disagreecheers and thanks for the opinions!
_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

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


Re: Dynamic add an action mapping ??

2004-08-16 Thread Niall Pemberton
http://struts.apache.org/faqs/newbie.html#reload

Why would you want to?

Niall

- Original Message - 
From: "Eric Chow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 16, 2004 11:28 AM
Subject: Dynamic add an action mapping ??


> Hello,
> 
> Is it possible to add an action mapping in run-time ?
> Or is it possible to reload the struts-config.xml in run-time ???
> 
> 
> Eric
> 
> ==
> If you know what you are doing, 
> it is not called RESEARCH!
> ==
> 
> -
> 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]



Dynamic add an action mapping ??

2004-08-16 Thread Eric Chow
Hello,

Is it possible to add an action mapping in run-time ?
Or is it possible to reload the struts-config.xml in run-time ???


Eric

==
If you know what you are doing, 
it is not called RESEARCH!
==

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



RE: Indexed properties and DynaActionForm

2004-08-16 Thread Jaakko Rytinki


-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED] 
Sent: 12. elokuuta 2004 18:48
To: Struts Users Mailing List
Subject: RE: Indexed properties and DynaActionForm



> -Original Message-
> From: Jaakko Rytinki [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 12, 2004 3:05 AM
> To: 'Struts Users Mailing List'
> Subject: Indexed properties and DynaActionForm
> 
> 
> Could someone explain why the following does not work:
> 
> - - - - Form bean:
>  type="org.apache.struts.validator.DynaActionForm">
> 
> 
> 

Small typo there, I tried to use ArrayList instead of List.


> - - - - Action Mapping:
>type="test.populateFormAction" 
>   scope="request">
>   
> 

If you are populating here, and do not have the form specified, then how
is the form getting sent to the page?
I typically set the name parameter, and validate=false when going
through my populate actions.

- - 

By using HttpServletRequest.setAttribute("myStringList",
dataObjectArray); name-attribute, as far as I know, defines the form
where we want to read the data, it's not necessary in actions where you
just throw some stuff to request.


> 
>type="test.editFormAction" 
>   scope="request"
>   name="forms.myForm"
>   
> 
> 
> - - - - Prepopulated form:
> 
>   
> 
> 
> - - - - Action:
> DynaActionForm dynaForm = (DynaActionForm) myForm;
> List myList = (List) dynaForm.get("values");
> 
> The form shows up fine, but somehow the List I retrieve 
> doesn't contain
> any elements. ( If the text field is empty, List should still 
> contain at
> least one element )
> 
> Only workaround I've found so far is to set size-parameter to 
> form-bean
> definition ( and because the form can contain 0 to n items, it is kind
> of a nasty way to do it, setting the size parameter high 
> enough so that
> overflow wont happen )
> 
> So.. how to use DynaActionForm to retrieve indexed properties from
> dynamically created form?
> 
> 
> 
> 
> -
> 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: Accessing Session attribute from action

2004-08-16 Thread Rajesh
Hai
use request.getSession();
u can access from request object.
vineesh . kumar wrote:
 
Hi all,
 I wanna do store two values in the session when one logs in and i have to access the two values throughout the pages.also i have to access these two variables from some action classes. How can i do this
 thanks,
 vinu
 


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


Re: HTML Filtering?

2004-08-16 Thread Niall Pemberton
org.apache.struts.taglib.TagUtils.filter(String)

Niall

- Original Message - 
From: "Mike Elliott" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 16, 2004 10:44 AM
Subject: HTML Filtering?


> I have a situation where I need to populate a table with values.
Sometimes
> those values are empty.  Mozilla, for reasons outside of this discussion
will
> not fully render a table datum that is empty; that is, it will render
nothing
> (correctly) but also not render the border of the table datum either, if
the
> content is empty.
>
> Normally the workaround for this is to put a non breakable space ( )
in
> the table datum to get Mozilla (or Netscape, for that matter) to render
the
> table datum with all surrounding borders.  However, Struts makes that
> difficult.
>
> If I use a  tag, I can specify filtering off to allow the
 
> non breakable space to appear.  That will, however, prevent the filtering
of
> non-empty items as well -- which might not be such a good idea.  Or, I can
> turn on filtering which will cause oddball elements to be rendered
correctly,
> but will prevent the   from being a non-breakable space.
>
> So . . . what I need to do is perform the filtering beforehand, then set
the
> bean to render the property with no filtering (filtering="false").  That
> means I need to do my own filtering.  Yes, I can write my own HTML
filtering
> routine, but . . . there must be something already out there - probably
part
> of the commons-beanutils jar file - that already does such filtering.  I'd
> much rather use that than roll my own.
>
> Anyone know of such a routine?  That is, a routine invokable from within
an
> arbitrary class, that takes a chunk of text and renders ampersands as
&,
> left angle brackets as < etc.?
>
> --
> Mike Elliott
>
> -
> 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: Accessing Session attribute from action

2004-08-16 Thread Erik Weber
Implement a checkLogin method in a base Action class that returns a User 
object or similar, whatever you need. This method takes an argument of 
type HttpServletRequest and looks for the User object in the request's 
HttpSession. Your Login Action would set this attribute, and your Logout 
Action would remove it.

Make all your actions extend the base Action class, then you can 
retrieve your User object (if there is one) from any Action. You can 
also access the objects in JSPs since they are just Session attributes. 
For example:


 

Hope that helps,
Erik
vineesh . kumar wrote:
 
Hi all,
 I wanna do store two values in the session when one logs in and i have to access the two values throughout the pages.also i have to access these two variables from some action classes. How can i do this
 thanks,
 vinu
 

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


RE: handling multiple independent window

2004-08-16 Thread Kailash Vasani
Thanks Antonio,

this seems to be simpler solution.

for benefit of all, we have opted to update RequestUtil class of struts so
that all the JSPs would now
be passing one parameter always. Hence we r doing the same thing, but in
slightly differnt way.

I wonder whether struts ppl had considered similar requirement or not. I
guess they might have knocked
it off the list of requirement.

Thanks & Regards,
Kailash Vasani

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, August 16, 2004 12:24 PM
To: [EMAIL PROTECTED]
Subject: Re: handling multiple independent window


I think you could use a request-scope bean that contains an ID referring
to one item in a session-scope collection (here I mean an array, a Map, a
List...).
Then expose your item in a page-context bean (using bean:define) and use
it in the rest of the JSP page.
Ciao
Antonio

Kailash Vasani wrote:

>Hi,
>
>Is it possible to have 2 windows showing same JSP page, but different
data,
>using struts?
>The data to be displayed is populated in form bean, in action class.
>
>Both the JSP pages would be performing same set of operations, but not
>necessarily in same order.
>Operations are Save, Update etc. When operation is performed, data from
form
>bean would be used
>to perform database operation.
>
>To best of my knowledge, form beans with session scope will fail to
achieve
>this, as both the windows
>would be sharing the same instance of form bean. Request scoped form
beans
>are not feasible due to size
>and complexity (nesting mainly) of data structure.
>
>There is restriction that there may be only one user session in
application.
>
>Did any one faced similar situation? Do anyone have any suggestion?
>
>Kailash
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Quinnox - Global Leadership in eBusiness and IT services, vertically aligned
for clients in the automotive/discrete manufacturing, SAP , ERP , and
powered by an offshore-based global delivery model.

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



Accessing Session attribute from action

2004-08-16 Thread vineesh . kumar
  
Hi all,
  I wanna do store two values in the session when one logs in and i have to access the 
two values throughout the pages.also i have to access these two variables from some 
action classes. How can i do this
  thanks,
  vinu

Still need help with layered Map iteration in JSP

2004-08-16 Thread Erik Weber
OK, I'll take ANY WAY TO DO THIS AT ALL.
I have a c:forEach over a Map. The value for each key in the Map can be 
an array of objects, or I can make it a List. I don't care at this point.

All I want to do is get the length of this array or List, before I start 
iterating over *it*, during the current iteration of the Map. I am told 
that I access the array or List like this:

1) Given this Map iteration:


2) access the value of the current Map entry (which will be either an 
array or a List) like this:
${currentMapEntryWhichIsBothAKeyAndAValueTogether.value}

But I have tried all of these, none of them work:






Not that they would have worked, because I was merely guessing in every 
case.

This is the type of thing that makes me sorry I ever got involved with 
tag libraries.

I have a Map of Lists. I didn't invent this. This is a common structure 
to use in Java. So someone please show me a single document that tells 
you how to work with JSTL tags (or any other tags) to do such a simple 
thing as to do a nested iteration of a Map of Lists or a Map of arrays!

Here is the Java equivalent of what I need to do:
//Map, stored as request attribute, has String keys, MyClass[] values
Map map = getMapWhichIsARequestAttribute();
Iterator i = map.keySet().iterator();
while (i.hasNext()) {
   String key = (String) i.next();
   MyClass[] values = (MyClass[]) map.get(key);
   int size = values.length; // *HOW DO I GET THIS VALUE USING TAGS?*
   if (size > 0) { // *HOW DO I IMPLEMENT THIS TEST USING TAGS?*
if (size > 5) {
//do setup for a big array
for (int x = 0; x < size; x++) {
//do output for each item in array
}
}
<>else {
<>//do setup for a small array
for (int x = 0; x < size; x++) {
//do output for each item in array
}
}
   }
   else {
   //no records found for this key
   }
}

Failing that, I would appreciate it if someone could show me how to do 
this using Struts tags. If I had used scriptlets, I would have been done 
hours ago.

Thanks,
Erik

Erik Weber wrote:
I have a c:forEach where "items" refers to a Map, and "var" refers to 
the current Map entry.


The value for each Map entry is an array. How do I switch on the 
length of this array? I tried this:


But I get a syntax error; it says I supplied the "." operator with an 
index value of type "java.lang.String" to be applied to an array, but 
that the value cannot be converted to an integer.

Is there some sort of way I can use "items.length" or "items.size" or 
something similar? More importantly, WHERE IS THIS DOCUMENTED?

I have searched the Internet for decent documents on JSTL and cannot 
find a simple complete guide to tag usage -- something similar to what 
Struts has for its tags. For example, where is a document that 
explains what you can do with "var", "varStatus", "items", etc. on a 
c:forEach tag, and covers all the tags? The Sun web services tutorial 
does not do this, it only gives examples.

Thank you,
Erik

Erik Weber wrote:
Thanks again.
Erik
Kris Schneider wrote:
 supports a "varStatus" attribute. The value of that 
atrribute is a
String that names an instance of 
javax.servlet.jsp.jstl.core.LoopTagStatus. The
LoopTagStatus instance has nested visibility so that it's only 
available within
the enclosing  tag. LoopTagStatus exposes a number of 
properties,
but the one you're probably interested in is "index":

..

<%-- ${status.index} is the current index --%>
...

..
Quoting Erik Weber <[EMAIL PROTECTED]>:

How can I refer to the index of the current iteration with 
c:forEach (analogous to the indexId attribute to logic:iterate)?

Thanks,
Erik
Kris Schneider wrote:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>

<%-- ${entry.key} is the current key --%>
<%-- ${entry.value} is the associated bean array --%>

...


Quoting Erik Weber <[EMAIL PROTECTED]>:


I could use some Struts-EL/JSTL tag help, please.
I have a Map with each entry having a String as the key and a 
bean array as the value.

I need two iterations, one nested inside the other.
For the outer iteration, I want to iterate the keySet of the Map. 
I don't know what the keys are going to be or how many there will 
be.

Within that iteration, for each key in the keySet, I need to 
iterate over the buckets of the array that is the value for that 
key.

To make this more clear, let's say I will produce a table of 
tables, somewhat like this:
















































Could someone show me some skeleton JSTL or Struts-el code?
I would appreciate it very much,
Erik


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

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

HTML Filtering?

2004-08-16 Thread Mike Elliott
I have a situation where I need to populate a table with values.  Sometimes 
those values are empty.  Mozilla, for reasons outside of this discussion will 
not fully render a table datum that is empty; that is, it will render nothing 
(correctly) but also not render the border of the table datum either, if the 
content is empty.

Normally the workaround for this is to put a non breakable space ( ) in 
the table datum to get Mozilla (or Netscape, for that matter) to render the 
table datum with all surrounding borders.  However, Struts makes that 
difficult.

If I use a  tag, I can specify filtering off to allow the   
non breakable space to appear.  That will, however, prevent the filtering of 
non-empty items as well -- which might not be such a good idea.  Or, I can 
turn on filtering which will cause oddball elements to be rendered correctly, 
but will prevent the   from being a non-breakable space.

So . . . what I need to do is perform the filtering beforehand, then set the 
bean to render the property with no filtering (filtering="false").  That 
means I need to do my own filtering.  Yes, I can write my own HTML filtering 
routine, but . . . there must be something already out there - probably part 
of the commons-beanutils jar file - that already does such filtering.  I'd 
much rather use that than roll my own.

Anyone know of such a routine?  That is, a routine invokable from within an 
arbitrary class, that takes a chunk of text and renders ampersands as &, 
left angle brackets as < etc.?

--
Mike Elliott

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



Re: Overwritting RequestProcessor, how to???

2004-08-16 Thread Niall Pemberton
Although you haven't specified the TilesRequestProcessor in the 
element the TilesPlugin automatically changes it to TilesRequestProcessor.

If you do however specify your own custom RequestProcessor in the
 element and you use tiles then if it doesn't extend
TilesRequestProcessor then the TilesPlugin will throw an exception.

So, in short,  you are using TilesRequestProcessor and your custom version
needs to extend that one.

Niall

- Original Message - 
From: "Leandro Melo" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, August 16, 2004 3:38 AM
Subject: Re: Overwritting RequestProcessor, how to???


> Niall,
> i actually use tiles, but does it mean that the
> requestProcessor i'm using is the Tiles one.
> In my struts-config.xml i got this for the
> configuration part.
>
>  
>
> So, i guess i'm using default's RequestProcessor, wich
> is struts RequestProcessor, am i right?
>
>
>  --- Niall Pemberton
> <[EMAIL PROTECTED]> escreveu:
> > All you have to do is extend the RequestProcessor
> > (or TilesRequestProcessor
> > if you use tiles) and then specify it in the
> >  element of the
> > struts-config.xml
> >
> > > processorClass="myPackage.MyRequestProcessor"/>
> >
> >
> http://struts.apache.org/userGuide/configuration.html#controller_config
> >
> > I guess whether its a good idea or not depends on
> > what you're doing.
> >
> > Niall
> >
> > - Original Message - 
> > From: "Leandro Melo" <[EMAIL PROTECTED]>
> > To: "struts jakarta" <[EMAIL PROTECTED]>
> > Sent: Sunday, August 15, 2004 6:06 PM
> > Subject: Overwritting RequestProcessor, how to???
> >
> >
> > > Hi,
> > > i'd like to overwirte RequestProcessor, but
> > actually i
> > > don't really know if it's a good idea.
> > >
> > > Here's the point:
> > > I'd like to have one more action if my
> > form.validate()
> > > method fails on ActionForm. I'd like to do some
> > > specific stuff everytime the validate method
> > fails.
> > > Then, i thought of overwritting the
> > RequestProcessor.
> > >
> > > Is that a good idea, or there's another way to
> > > accomplish what i want???
> > >
> > > Regards,
> > > ltcmelo
> > >
> > >
> > >
> > >
> > >
> > >
> >
> ___
> > > Yahoo! Acesso Grátis - navegue de graça com
> > conexão de qualidade! Acesse:
> > http://br.acesso.yahoo.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]
> >
> >
>
> =
>
>
>
>
>
>
> ___
> Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse:
http://br.acesso.yahoo.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]



RE: Mapping ActionPath to a method in DispatchAction

2004-08-16 Thread Amit Kumar Sharma
Try lookupDispatchAction instead of DispatchAction and have a message
resources(applicationresource.properties) for the mappings...that you
way you can achieve multiple submits as well as no need to check for the
method parameter.
You need to check for the html:submit code for that.

Regards
Amit

-Original Message-
From: Kunal Parikh [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 11:28 AM
To: Struts Users Mailing List
Subject: Re: Mapping ActionPath to a method in DispatchAction

That is EXACTLY what I've done:

Changed the last line of the execute method of dispatch action FROM

return dispatchMethod(mapping, form, request, response, name);
 
TO

return dispatchMethod(mapping, form, request, response, parameter);
 ^
But, is there a more "standard" way of achieving the same functionality
?


TIA,

Kunal


On Mon, 16 Aug 2004 11:22:11 +0530, Navjot Singh
<[EMAIL PROTECTED]>  
wrote:

> 110% POSSIBLE.
>
> retreiving the paramter name and method calls using reflection and are

> already done.
> all you need to do is override the implementation and rather than  
> checking for *method* value , check for last part of URI and call the

> respective method.
>
> just change execute() method in DispatchAction. you dont have to do  
> much. just a few lines.
>
> regards
> Navjot Singh
>
> Kunal Parikh wrote:
>
>> Hi!
>>
>> I was wondering if it were possible to drop the parameter attribute
in  
>> a  dispatch action and map an actionPath to a method/methodName ?
>>
>> E.g
>>
>> /createUser -> public ActionForward createUser(ActionMapping  
>> m,ActionForm  f,HttpServletRequest req,HttpServletResponse res )
>>
>> /editUser -> public ActionForward createUser(ActionMapping  
>> m,ActionForm  f,HttpServletRequest req,HttpServletResponse res )
>>
>> /deleteUser -> public ActionForward deleteUser(ActionMapping  
>> m,ActionForm  f,HttpServletRequest req,HttpServletResponse res )
>>
>> instead of
>>
>> /userAction?method=createUser -> public ActionForward   
>> createUser(ActionMapping m,ActionForm f,HttpServletRequest   
>> req,HttpServletResponse res )
>>
>> /userAction?method=editUserUser -> public ActionForward   
>> editUser(ActionMapping m,ActionForm f,HttpServletRequest   
>> req,HttpServletResponse res )
>>
>> /userAction?method=deleteUser -> public ActionForward   
>> deleteUser(ActionMapping m,ActionForm f,HttpServletRequest   
>> req,HttpServletResponse res )
>>
>> TIA,
>>
>> Kunal
>>
>>
>> -
>> 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]


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



Re: If not logged in, login and redirect do requested page scenario.

2004-08-16 Thread Pavel Kolesnikov
On Mon, 16 Aug 2004 [EMAIL PROTECTED] wrote:

> I'm trying to implement a scenario in which if the user who has not
> logged in clicks on a link to a page "for logged in users only"  should
> be redirected to "login page", and then if the login operation succeeds
> another redirection takes the user, to the page that was originally
> requested.
> 
> Are there any "commonly known" techniques to do this smoothly with
> Struts??

What about Container Managed Authentication? 
It's part of J2EEs standard (so it's not Struts specific)
and it allows you to configure server to protect your pages
as you've described above.

See http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html
for Tomcat5 configuration.

Pavel


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



Re: Modifying Tiles definitions dinamically

2004-08-16 Thread brenmcguire
think the best (and the most elegant) way to make dynamic tiles is by
using TilesAction. This because this class has knowledge of the use of
Tiles.
So write your TilesAction (it is similar to a plain Action, except of some
more parameters in the "execute" method). In the "execute" method put your
code that can distinguish between different users and for each one forward
to a different JSP page, that will be your "real" tile.
Obviously map your actions in struts-config.xml just the same way as
normal actions.
Then put a definition like this (I am using your example):


  
  
  
  
  
  
  


Hope it helps.
Ciao
Antonio

P.S. In fact in this example a normal Action can be used, but I suggest to
use TilesAction because that class can manipulate the definition itself
(please people working on Struts, correct me if I am wrong).

Leandro Melo wrote:

>Hi,
>i got a very ordinary problem.
>I need to provide diferent menus for diferent people
>that are logged in the application.
>I don't know what i should do exactly to provide this
>funcionality, because i don't really know what Tiles
>allow me to do (i don't know it's potencial).
>
>I got the following base tiles definition in my app.
>path="/layouts/layout.jsp">
>  
>  
>  
>  value="/functionalBlocks/errorHTMLcomponent.jsp"/>
>  
>  
>  
>
>
>One thing i thought is to verify the user permissions
>at log time, then, depending on the user i'd change
>the attribute "menu" of my definition to the page
>menu2.jsp or menu3.jsp, for example. Can (how) i do
>that???
>
>I also thought on bulding 2 (or 3 or 4) BASE
>deifinitions and at log time i'd decide which base
>definition to use. Can i do that (how??)??
>
>I'd appreciate if some show me some reference or just
>some sample code on how to do that.
>
>Thansk,
>ltcmelo
>


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



RE: Action Servlet not getting called.

2004-08-16 Thread Jitender K Chukkavenkata
Hi Veera,
You have used an identifier called employees for logic:iterate name 
attribute.   The name should be a valid bean name defined in any scope.  I 
guess you are giving a wrong reference.  Try giving a valid bean reference 
that exist in any scope.

Regards,
Jitender Kumar C.V.


Re: Need help with layered Map iteration in JSP

2004-08-16 Thread Erik Weber
I have a c:forEach where "items" refers to a Map, and "var" refers to 
the current Map entry.


The value for each Map entry is an array. How do I switch on the length 
of this array? I tried this:


But I get a syntax error; it says I supplied the "." operator with an 
index value of type "java.lang.String" to be applied to an array, but 
that the value cannot be converted to an integer.

Is there some sort of way I can use "items.length" or "items.size" or 
something similar? More importantly, WHERE IS THIS DOCUMENTED?

I have searched the Internet for decent documents on JSTL and cannot 
find a simple complete guide to tag usage -- something similar to what 
Struts has for its tags. For example, where is a document that explains 
what you can do with "var", "varStatus", "items", etc. on a c:forEach 
tag, and covers all the tags? The Sun web services tutorial does not do 
this, it only gives examples.

Thank you,
Erik

Erik Weber wrote:
Thanks again.
Erik
Kris Schneider wrote:
 supports a "varStatus" attribute. The value of that 
atrribute is a
String that names an instance of 
javax.servlet.jsp.jstl.core.LoopTagStatus. The
LoopTagStatus instance has nested visibility so that it's only 
available within
the enclosing  tag. LoopTagStatus exposes a number of 
properties,
but the one you're probably interested in is "index":

..

<%-- ${status.index} is the current index --%>
...

..
Quoting Erik Weber <[EMAIL PROTECTED]>:

How can I refer to the index of the current iteration with c:forEach 
(analogous to the indexId attribute to logic:iterate)?

Thanks,
Erik
Kris Schneider wrote:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>

<%-- ${entry.key} is the current key --%>
<%-- ${entry.value} is the associated bean array --%>

...


Quoting Erik Weber <[EMAIL PROTECTED]>:


I could use some Struts-EL/JSTL tag help, please.
I have a Map with each entry having a String as the key and a bean 
array as the value.

I need two iterations, one nested inside the other.
For the outer iteration, I want to iterate the keySet of the Map. 
I don't know what the keys are going to be or how many there will be.

Within that iteration, for each key in the keySet, I need to 
iterate over the buckets of the array that is the value for that key.

To make this more clear, let's say I will produce a table of 
tables, somewhat like this:
















































Could someone show me some skeleton JSTL or Struts-el code?
I would appreciate it very much,
Erik


-
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: If not logged in, login and redirect do requested page scenario.

2004-08-16 Thread Aru
Dei..
Kaelvi ium kaettuttu Pathilum neeyae solluriyaa?
:)
Uthai vilum :))


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, August 16, 2004 3:22 PM
To: [EMAIL PROTECTED]
Subject: If not logged in, login and redirect do requested page scenario.

Hi,

Some pages in the site I'm working on should be available only for users who
have previously logged in, but links to them may appear on pages that area
accessible for anybody.

I'm trying to implement a scenario in which if the user who has not logged
in clicks on a link to a page "for logged in users only"  should be
redirected to "login page", and then if the login operation succeeds another
redirection takes the user, to the page that was originally requested.

Are there any "commonly known" techniques to do this smoothly with Struts??

I did it as follows...

All links to pages "for logged in users only" go throuth one action say
"LoginAndRedirect" so in JSP they look like



The LoginAndRedirect action first checks if there is an instance of
OnlineUser (which is a simple JavaBean) in the session (its presence
indicates that the user has already logged in) If the OnlineUser is not
found, the value of the FORWARD_TO parameter is stored in session and the
LoginAndRedirect action forwards to login.jsp (global forward) where the
user gets his chance to authenticate. If the attempt to login succeeds, the
OnlineUser is placed in the session and the request is forwarded back (again
through the global forward) to the LoginAndRedirect action which this time
finds the OnlineUser in the session as well as the FORWARD_TO param. All
"for logged in users only" pages are defined as forwards of LoginAndRedirect
so its final action is sth like...

return forward.findForward(session.getAttribute("FORWARD_TO"));

I'm aware that with this approach I must also prevent somehow "not logged
in" users from accessing the "forbiden pages" directly - thay can just type
the URL in the browser and get where they should not :)

Any suggestions of making this in a better way will be appreciated!! :)

Regards
Chris


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



If not logged in, login and redirect do requested page scenario.

2004-08-16 Thread hicnar_struts_list
Hi,

Some pages in the site I'm working on should be available only for users who have 
previously logged in, but links to them may appear on pages that area accessible for 
anybody.

I'm trying to implement a scenario in which if the user who has not logged in clicks 
on a link to a page "for logged in users only"  should be redirected to "login page", 
and then if the login operation succeeds another redirection takes the user, to the 
page that was originally requested.

Are there any "commonly known" techniques to do this smoothly with Struts??

I did it as follows...

All links to pages "for logged in users only" go throuth one action say 
"LoginAndRedirect" so in JSP they look like



The LoginAndRedirect action first checks if there is an instance of OnlineUser (which 
is a simple JavaBean) in the session (its presence indicates that the user has already 
logged in) If the OnlineUser is not found, the value of the FORWARD_TO parameter is 
stored in session and the LoginAndRedirect action forwards to login.jsp (global 
forward) where the user gets his chance to authenticate. If the attempt to login 
succeeds, the OnlineUser is placed in the session and the request is forwarded back 
(again through the global forward) to the LoginAndRedirect action which this time 
finds the OnlineUser in the session as well as the FORWARD_TO param. All "for logged 
in users only" pages are defined as forwards of LoginAndRedirect so its final action 
is sth like...

return forward.findForward(session.getAttribute("FORWARD_TO"));

I'm aware that with this approach I must also prevent somehow "not logged in" users 
from accessing the "forbiden pages" directly - thay can just type the URL in the 
browser and get where they should not :)

Any suggestions of making this in a better way will be appreciated!! :)

Regards
Chris


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



RE: Action Servlet not getting called.

2004-08-16 Thread Veerabhadra Rao R
Hi,

I am getting the following error while running a sample struts
application from MasteringJakartaStruts pdf file.

javax.servlet.ServletException: Cannot find bean employees in any scope
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:478)
at
_jasper._pages._employeelist_jsp._jspService(_employeelist_jsp.java:604)

The Employee bean is calling in Action class, on success that action
class is forwarding to employeelist.jsp page.

In jsp page I am using iterator to display the results.




I have added following action mapping to struts-config.xml for a page.


















Thanks & Regards
 
Veera bhadra rao

-Original Message-
From: Divakar Satyanarayan 
Sent: Monday, August 16, 2004 12:22 PM
To: Struts Users Mailing List
Subject: RE: Action Servlet not getting called.

Space is not there 

We use Apache web server & it displays a blank page.

Regards,
Divakar

-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 12:08 PM
To: Struts Users Mailing List
Subject: Re: Action Servlet not getting called.

what does tomcat log returned?
does it throw error or a blank page?

is it because of space after this dot?

  type="mascot.workqueue.action. SummaryAction"

regards
Navjot Singh



Divakar Satyanarayan wrote:

>Hi All,
>I have added following action mapping to struts-config.xml for a page.
> 
>In 
>---
>  type="mascot.workqueue.action. SummaryAction"
>  name="SummaryForm" 
>  scope="request">
>  path="/jsp/Summary.jsp"/>
>
> 
>In 
>
>
> 
>The file SummaryAction.java is available in a jar that is in the
>classpath before and from this jar other pages are working. The jsp
path
>is OK and form bean is also in classpath.
> 
> 
>When form a link I am calling Summary.do it works fine in my local
>server.
> 
>I uploaded all codes to other server with same application config. The
>above link does not call SummaryAction.java . There is some sop inside
>this java file at the beginning, that too not getting called . I tried
>whole two days but not getting a clue.
> 
>The Apache log is getting the request. Log message is below
> 
>172.21.4.101 - - [16/Aug/2004:00:42:40 -0400] "GET
>/credit/oc4j/CalmsWebApp/Summary.do?iAppId=172199 HTTP/1.1" 200 0 "-"
>"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)"
> 
> 
>But it never calls the action file . what can go wrong ?
> 
>Will be great to hear from you.
> 
>Thanks in Advance.
> 
>Divakar Satyanarayan  
> 
>
>
>Information transmitted by this EMAIL is proprietary to iGATE Group of
Companies and is intended for use only by the individual or entity to
whom it is addressed and may contain information that is privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient of this EMAIL immediately notify the sender
at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any
attachments.
>
>  
>

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



Information transmitted by this EMAIL is proprietary to iGATE Group of
Companies and is intended for use only by the individual or entity to
whom it is addressed and may contain information that is privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient of this EMAIL immediately notify the sender
at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any
attachments.

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



Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and 
is intended for use only by the individual or entity to whom it is addressed and may 
contain information that is privileged, confidential, or exempt from disclosure under 
applicable law. If you are not the intended recipient of this EMAIL immediately notify 
the sender at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any 
attachments.

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