Re: bean:struts problem

2001-10-18 Thread Christophe Marchand

It seems your mapping is not correct. It tries to look for an acteur
property in class org.apache.struts.action.ActionFormBean.
Check your struts-config.xml...

Je savais pas qu'il y avait un Jasper qui sortait des messages d'erreur en
français. T'as piqué ça où ?
- Original Message -
From: "ALAMI Ahmed - BOR" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 18, 2001 3:41 PM
Subject: bean:struts problem


>
> Hello everybody
> When i do  formBean="suppressionForm"/>
>
> that means that i copy a struts configuration object wich is fom the form
> bean suppression bean
> .
> When i want to return the value of a field in this form it returns an
error
> like
> org.apache.jasper.JasperException: Impossible de compiler la classe pour
>
JSPC:\jakarta-tomcat-3.2.3\work\localhost_8080%2FBalTest\_0002fWEB_0002fJSP_
> 0002facteurs_00031_0002ejspacteurs1_jsp_135.java:497: No variable acteur
> defined in class org.apache.struts.action.ActionFormBean.
>   out.print( form.acteur[0] );
>
> That means that i can't have access to the fields of thios form although
the
> fact taht i verified that the name and the type of the copied form is
good.
>
>
> Thanks for help
> Ahmed ALAMI
> Stagiaire
>
>
> 8, rue Gustave Hertz - 33600 Pessac
> * 05.57.89.00.36 *06.17.23.26.61 * 05.56.36.64.71
> * [EMAIL PROTECTED]
>
>
>




Re: How to customize the way Validation Error is display

2001-10-05 Thread Christophe Marchand

I think you can use a factory for this. Have a look in
ActionServlet.initApplication() for more detail... And do not forget to have
a good WE ;-))

- Original Message -
From: "McClung, Brian" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 05, 2001 5:52 PM
Subject: RE: How to customize the way Validation Error is display


> Where do I get hold of the messages tag?  I've looked in my
struts-html.tld
> file but it isn't there?  Which version is it located in?
>
> Thanks
> Brian McClung
>
> -Original Message-
> From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 04, 2001 1:01 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to customize the way Validation Error is display
>
>
> I'm not sure if this is what you were asking about,
> but you can use html:messages instead of html:errors
> to give a little more control over displaying errors.
> The html:messages tag iterates over the errors so you
> can insert markup around an individual message.  You
> can also use the property attribute to retrieve a
> message for an individual property (html:errors and
> html:messages) so you could display an error message
> next to each field.
>
> 
>
>   
>
> 
>
> David
>
> --- Adam Grohs <[EMAIL PROTECTED]> wrote:
> > Have a look at an implimentation description and
> > sample that I've put
> > together at www.leanonme.org.  Hope this helps.
> > Thanks,
> > Adam S. Grohs
> > [EMAIL PROTECTED]
> >
> > - Original Message -
> > From: "Minh Tran" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, October 03, 2001 3:40 PM
> > Subject: How to customize the way Validation Error
> > is display
> >
> >
> > > Does anyone know how to control and customize the
> > way the validation error
> > > is display when when fills out incorrect form
> > information?
> > >
> > > Thanks,
> > > Minh
> > >
> >
>
>
> __
> Do You Yahoo!?
> NEW from Yahoo! GeoCities - quick and easy web site hosting, just
> $8.95/month.
> http://geocities.yahoo.com/ps/info1
>
>




Re: Adding Xml Tag in "Struts-Config.xml" file

2001-10-04 Thread Christophe Marchand

An  entry in your web.xml should be the solution.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 04, 2001 2:55 PM
Subject: RE: Adding Xml Tag in "Struts-Config.xml" file


I have an application-config.xml.
But how my application could know the name of the file without using a
constants file ?


-Message d'origine-
De: Gregor Rayman [mailto:[EMAIL PROTECTED]]
Date: jeudi 4 octobre 2001 15:41
À: [EMAIL PROTECTED]
Objet: Re: Adding Xml Tag in "Struts-Config.xml" file


<[EMAIL PROTECTED]> wrote:

> I need to configure my application by Xml.
>
> Is it possible to add personnal XmlTags in the "Struts-Config.xml file
> and manipulate them in a "Action" class with the Digester ?
>
> Thxs.
>
> Bruno


Why in strus-config.xml, why don't you create your own
application-config.xml?

--
gR







Re: messages resource-file

2001-10-03 Thread Christophe Marchand



It does. The problem is that 
getServletConfig().getInitParameter(...) always return null.
In JRun managment console, I can see 
init-parameters for my servlet, but in code, I can't retreive 
them...
I do not understand what happens...
Any Idea ?

  - Original Message - 
  From: 
  Dragomir Nikolov 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, October 03, 2001 7:43 
  PM
  Subject: Re: messages resource-file
  Hello Christophe,     Check if you have put 
  portal-messages.properties into 
  WEB-INF/classes/com/oxiasoft.portal.presentation/ directory 
      Or this propertie is in some other direcotry in the 
  CLASSPATH variable. 
  Greetings Dragomir 
  Christophe Marchand wrote: 
  

Hi all ! I've deployed a struts-based application under JRun 
3.1.I have some problems in 
loading messages resource-file. After having investigate, it appears that 
getServletConfig().getInitParameter("application") returns null. Here is my 
web.xml :...     
portal     
com.oxiasoft.portal.presentation.PortalServlet 
    
   
debug   
100     
        
application   
com.oxiasoft.portal.resources.portal-messages 
    
        
config   
/WEB-INF/struts-config.xml 
    
     
1   
...Does someone 
could help me ? Thanks a 
lot in advance  ****=== Christophe Marchand Mail prof : [EMAIL PROTECTED] 
Mail perso : [EMAIL PROTECTED]


messages resource-file

2001-10-03 Thread Christophe Marchand



Hi all !
 
I've deployed a struts-based application under JRun 
3.1.
I have some problems in loading messages 
resource-file. After having investigate, it appears that 
getServletConfig().getInitParameter("application") returns null. Here is my 
web.xml :
...    
portal    
com.oxiasoft.portal.presentation.PortalServlet    
  
debug  
100    
    
  
application  
com.oxiasoft.portal.resources.portal-messages    
    
  
config  
/WEB-INF/struts-config.xml    
    
1  
...
Does someone could help me 
?
 
Thanks a lot in advance
===Christophe 
MarchandMail prof : [EMAIL PROTECTED]Mail perso : [EMAIL PROTECTED]


Where is the most recent Struts.jar

2001-10-03 Thread Christophe Marchand

Hi all !

Where could I find the most recently full built struts.jar ?
I have some troubles with message resource files...

Thanks a lot

===
Christophe Marchand
Mail prof : [EMAIL PROTECTED]
Mail perso : [EMAIL PROTECTED]




Re: Struts action populate a list then display the jsp

2001-10-01 Thread Christophe Marchand



I think a browser can only store the requested URL, 
not the redirect-to one... So you can only bookmark the requested URL, which is 
your action...
 
Linking to an action mapping is something like 

    
    
forward="/tour.jsp">    
 
- Original Message - 
From: "Peter Pilgrim" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 01, 2001 6:43 PM
Subject: Re: Struts action populate a list then 
display the jsp
> > > Ah! but what if 
your action redirects to a view JSP, and then they book mark that?> Are 
we talking the same lingo here. What do you mean by link to action mappings 
?> --> Peter 
Pilgrim  |  
|    ++44 (0)207-545-9923> 
     \  
\  ___   /  / ... .> 
    -   
  ( * )  ---   --> 
_Cafe_Savannah,_San Antonio,Ibiza__> > 
> >  Message History 
> > > From: Ted 
Husted <[EMAIL PROTECTED]> on 01/10/2001 
12:20 AST> > Please respond to [EMAIL PROTECTED]> 
> To:   [EMAIL PROTECTED]> 
cc:> Subject:  Re: Struts action populate a list then display the 
jsp> > > The best thing is to link only to ActionMappings 
and never to JSPs. Then> they can only bookmark the mapping. If anything 
is missing, it is much> easier to handle that from an Action than from a 
JSP.> > -- Ted Husted, Husted dot Com, Fairport NY USA.> -- 
Custom Software ~ Technical Services.> -- Tel +1 716 737-3463> -- 
http://www.husted.com/about/struts/> > > Peter Pilgrim wrote:> >> > 
Chicken and the egg> >> > I have a data source and bean with 
a list of items> > One JSP view that list the content of the data 
source.> > I have one action.> >> > I want to 
allow the user to choose an element from the data source.> > My action 
populates the bean with the items, then go to the view.> > The problem 
is that the user bookmarks the view and of course> > there is no data 
in the bean. How do you populate the bean> > without going into the 
action first?> >> > What is the best practice of populating 
an a bean from the data> > source?> >> > Can you 
inside a JSP get a reference to an action or ask> > Struts to create 
it if it has not done it yet? If you can do> > that then you could 
call the action by pseudo action> > to populate the bean?> 
>> > Can you call an action without an action form?> 
> > > --> > This e-mail may contain 
confidential and/or privileged information. If you are not the intended 
recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.> 
> > 


Re: Dreamweaver Custom Tag Support

2001-10-01 Thread Christophe Marchand



Yes it does ! I've spend all the night on this 
problem. Try to print your classpath and check it.

  - Original Message - 
  From: 
  Frédéric 
  Houbie - ABSIS-GROUP 
  To: Struts-User 
  Sent: Monday, October 01, 2001 4:05 
  PM
  Subject: Dreamweaver Custom Tag 
  Support
  
  Hi, 
  
   
  I'm trying to use 
  this feature but when I had a  tag for exemple, I get this 
  error
   
  javax.servlet.ServletException :Cannot find 
  ActionMappings or ActionFormBeans Collections. 
   
  Is there something 
  missing in my classpath ?
   
  Thanks
   
  Frederic


Re: ejb design

2001-10-01 Thread Christophe Marchand

Wrong idea ! EJB entity are made to "store" one and only one record or
ValueObject. findByPrimaryKey entity method is designed to retrieve one
record, depending on a primary key object. If you use only one entity class
with a hashtable, you'll have a lot of problem to solve :
1 - your primary key object will be udge to store all data from all primary
key from all value objects,
2 - your value objects wouldn't able to extend a primary key object (are be
composed with)
3 - you will be obliged to use BMP (Bean managed persistance) entity beans,
with many sql statements in, and it we'll be very difficult to maintain when
you change your data model.
4 - if you decide in the future to split your database in two ones, and then
to deploy on two different servers, you'll keep a lot of unused code in your
classes (or you'll be obliged to re-write everything, both entity beans and
client-side jndi calls...)

Your solution is technically possible, but you are goi ng to spend a lot of
nights to maintain this, for no gain...

Have a look at "Mastering EJB's" book, which is very interesting on ejb's
design considerations...

Hope this helps.

Regards

- Original Message -
From: "Ali Ozoren" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 01, 2001 4:52 AM
Subject: ejb design


> hi all-
> i am pretty new at ejb and that might be a little off topic but here i go.
> instead of creating entity beans the conventional way, according to spec,
> would it be desirable to have one type of entity bean with a hashtable
> member to manipulate all the values and fields dynamically, accessing
fields
> by their string names.
>
> class ValueObject
> {
>  String name;
>  Object value;
> }
>
> class BaseEntityBean
> {
>  String id;
>  Hashtable fields; file://collection of ValueObjects, one row of data
becomes
> "columncount" times ValueObjects.
>
>  setField(String name, Object value);
>  Object getField(String name);
>  String getAsXML();
>  BaseEntityBean findByPrimaryKey; file://finds record, fills the "fields"
> variable using ResultSetMetaData
> }
>
> so for each different type of entity beans, we can inherit from
> BaseEntityBean, to create for instance AccountEntityBean that knows from
> which table it's going to get values.
>
> one obvious advantage is simplicity. one doesn't have to code setters and
> getters for all fields. another one would be addition of "custom" fields
by
> the user later on. when he does that custom fields would be equal to
what's
> already defined in the bean. hence no different way to handle custom
fields.
>
> then again, obvious disadvantage is speed. instantiating the ValueObjects
> and filling the hashtable takes more time. also, we are no longer using
the
> simple types for the sake of genericity which doesn't help the speed issue
> either.
>
> question is whether the benefits outweigh the speed disadvantage or not.
>
> also, is there anything against exposing a ResultSet type from an entity
> bean?
>
> i appreciate any input, thanks.
>
> --a
>
>
>