RE: Downloaded struts1.0.2 does not contain commons*.jar

2002-12-04 Thread Miguel Angel Mulero Martinez
Look at jakarta.apache.org, under commons.


 -Mensaje original-
 De: vaibhavi [mailto:[EMAIL PROTECTED]]
 Enviado el: miercoles, 04 de diciembre de 2002 10:26
 Para: [EMAIL PROTECTED]
 Asunto: Downloaded struts1.0.2 does not contain commons*.jar
 
 
 Hello,
 I have downloaded struts latest version. I could not find commons-*.jar
 files in the lib directory. Now I have to carry out database
 connectivity. I don't have the access to the
 org.apache.commons.sql.util.* classes due to unavailability of the above
 jar files. How could I manage to get this. or there is some other way to
 database connectivity. Can anyone help me out in this?
  
  
 Regards,
 Vaibhavi Shah
   _  
 
 Sr. Software Engg.
 Elitecore Technologies Ltd.
 9th Floor,Silicon Tower
 Off C.G. Road
 Ahmedabad
 Ph: 6405600 ext-360
  
 

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




RE: Downloaded struts1.0.2 does not contain commons*.jar

2002-12-04 Thread Miguel Angel Mulero Martinez
I user (for the connection pool):

commons-collections.jar
commons-dbcp.jar
commons-pool.jar

included all in tomcat.

 -Mensaje original-
 De: vaibhavi [mailto:[EMAIL PROTECTED]]
 Enviado el: miercoles, 04 de diciembre de 2002 10:58
 Para: 'Struts Users Mailing List'
 Asunto: RE: Downloaded struts1.0.2 does not contain commons*.jar


 Hi,
 Thanks for reply but the thing is that there are lot many jars under
 common list which should I go for.Here is the error list which I am
 getting if u can come to know about my exact problem.

 D:\strutstest\WEB-INF\srcjavac org/apache/struts/webapp/example/l*.java
 org/apache/struts/webapp/example/LoginServelt.java:19: package
 org.apache.common
 s.sql.util does not exist
 import org.apache.commons.sql.util.*;
 ^
 org/apache/struts/webapp/example/LoginServelt.java:48: cannot resolve
 symbol
 symbol  : method getDataSource  (javax.servlet.http.HttpServletRequest)
 location: class org.apache.struts.webapp.example.LoginServelt
  dataSource = getDataSource(request);
   ^
 org/apache/struts/webapp/example/LoginServelt.java:51: cannot resolve
 symbol
 symbol  : variable conn
 location: class org.apache.struts.webapp.example.LoginServelt
  pstmt = conn.prepareStatement(selquery);
  ^
 3 errors




 Regards,
 Vaibhavi Shah

 Sr. Software Engg.
 Elitecore Technologies Ltd.
 9th Floor,Silicon Tower
 Off C.G. Road
 Ahmedabad
 Ph: 6405600 ext-360


 -Original Message-
 From: Miguel Angel Mulero Martinez
 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 04, 2002 3:11 PM
 To: Struts Users Mailing List
 Subject: RE: Downloaded struts1.0.2 does not contain commons*.jar

 Look at jakarta.apache.org, under commons.


  -Mensaje original-
  De: vaibhavi [mailto:[EMAIL PROTECTED]]
  Enviado el: miercoles, 04 de diciembre de 2002 10:26
  Para: [EMAIL PROTECTED]
  Asunto: Downloaded struts1.0.2 does not contain commons*.jar
 
 
  Hello,
  I have downloaded struts latest version. I could not find
 commons-*.jar
  files in the lib directory. Now I have to carry out database
  connectivity. I don't have the access to the
  org.apache.commons.sql.util.* classes due to unavailability of the
 above
  jar files. How could I manage to get this. or there is some other way
 to
  database connectivity. Can anyone help me out in this?
 
 
  Regards,
  Vaibhavi Shah
_
 
  Sr. Software Engg.
  Elitecore Technologies Ltd.
  9th Floor,Silicon Tower
  Off C.G. Road
  Ahmedabad
  Ph: 6405600 ext-360
 
 

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


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


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




RE: Include an Action in a page

2002-11-26 Thread Miguel Angel Mulero Martinez
Hi,
I've got a page wich must execute 3 actions and print the page result of it:


 ACTION1

 AC2 | AC3


I wan't to make the three action independent, so I want to include them in
the principal with some include (template:insert or jsp:include ...)

Some idea??

Thanks!!
Miguel

 -Mensaje original-
 De: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Enviado el: martes, 26 de noviembre de 2002 16:27
 Para: [EMAIL PROTECTED]
 Asunto: RE: Include an Action in a page


 Can u specify u r requirement please?
 Because if U need to show the output of 2 actions on the screen ,
 still they
 can use the forwards and use request as a shared container to
 pass along any
 data beans.

 but hwy a template needs to include action?

 -Original Message-
 From: miguel-angel.mulero [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 26, 2002 4:10 PM
 To: struts-user
 Subject: Include an Action in a page


 Hi all, I've got a little problem.

 I'm using Struts 1.0.2, and I'm using Templates (not Tiles). I use
 template:insert to include a little page inside my page. This work great
 with HTML and JSP, but not with actions. How can I do it for:

 template:insert template=action.do /

 Is there other way to do this?

 Thanks to all!!
 Miguel


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



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


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




RE: Tomcat 4.1 and indexId

2002-11-21 Thread Miguel Angel Mulero Martinez
What version of tomcat 4.1? Is the 4.12 version or earlier?

Regards

 -Mensaje original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Enviado el: jueves, 21 de noviembre de 2002 9:57
 Para: Struts Users Mailing List
 Asunto: Tomcat 4.1 and indexId


 Hello!

 In my application I am using the  indexId  attribute in the
 nested:iterate  tag. During
 development under NetBeans/Tomcat 4.0 all is ok.

 When I deploye my application with a Tomcat 4.0 server, all is ok too. But
 when I use a
 Tomcat 4.1 version, this error occures:

 Error compiling file:  editWeekDistribution_jsp.java [javac]
 Compiling 1 source file
 ...editWeekDistribution_jsp.java:271: _jspx_weekNumber_1 is
 already defined
 in
 _jspService(javax.servlet.http.HttpServletRequest,javax.servlet.ht
 tp.HttpServletResponse)
   java.lang.Integer _jspx_weekNumber_1 = weekNumber;
 ^
 ...editWeekDistribution_jsp.java:271: cannot resolve symbol
 symbol  : variable weekNumber
 location: class org.apache.jsp.editWeekDistribution_jsp
   java.lang.Integer _jspx_weekNumber_1 = weekNumber;


 Thanks for your help,
 Arno



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


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




RE: enter disable

2002-11-15 Thread Miguel Angel Mulero Martinez
This is JavaScript code. I don't know how, but search information about it.

Regards,
Miguel

-Mensaje original-
De: Gus Delgado [mailto:gdelgado;oceanobjects.com]
Enviado el: viernes, 15 de noviembre de 2002 13:06
Para: Struts Users Mailing List
Asunto: enter disable


How can I disable the htm:text tag so that nothing will happen when the
use hits the enter key. The way it works right now everytime you hit the
enter key in a text field it tries to submit the request.  any flags
that need to be turn off?

thanks
gus


--
To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: Multiple struts

2002-10-09 Thread Miguel Angel Mulero Martinez

I think you must use different name files for struts-config.xml. In the
configuration of the action servlet in web.xml, you can define the name of
the struts-config file.

Try it.


-Mensaje original-
De: Shay Cohen [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 09 de octubre de 2002 10:54
Para: '[EMAIL PROTECTED]'
Asunto: Multiple struts

Hi,

Are there any limitations in deploying two or more struts application on
the
same web server ?

I tried this with the following configuration:

1.   added another servlet and servletmapping to the web.xml ( on
respond to *.do files and the other to *.do2 )
2.   used the same struts-config.xml for both
3.   used the same contrainer for both ( WAR file ).
4.   using struts 1.1 beta 1.


And as you can guest , without any luck, all redirection went to the
first
servlet/servletmapping regardless to the differentiations in
The url's extensions.
Thanks in advance
Shay


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




RE: Submit form

2002-10-09 Thread Miguel Angel Mulero Martinez

Put the image in a link, and use the onclik  javascript function to do a
real submit of the form.

-Mensaje original-
De: kiuma [mailto:[EMAIL PROTECTED]]
Enviado el: miercoles, 09 de octubre de 2002 16:02
Para: Struts Users Mailing List
Asunto: Submit form

Hi all,
I was wondering how to submit to a form using an image instead of a abutton.
Do you have the answer ?


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


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




RE: Populate form with ActionForm

2002-10-03 Thread Miguel Angel Mulero Martinez

Put a action in the middle. The action puts the bean in the request of the
second jsp. If the second jsp populates a form with this bean, you can pass
the actionform to the request instead of the bean and struts will populate
the form for you. The only requisite is that the action associated with the
form uses the actionform that you put in the request.

Regards.

-Mensaje original-
De: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 03 de octubre de 2002 13:53
Para: Struts Users Mailing List
Asunto: Populate form with ActionForm

Hi all:

I have an action that populate an ActionForm, when finish it forward to a
page that have a html form. Now I want to populate the input fields with the
value of the ActionForm. I have tried with different approaches but neither
works. Somebody have a solution?

Thank You in advance.

MAML


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


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




RE: Populate form with ActionForm

2002-10-03 Thread Miguel Angel Mulero Martinez

You must use a:
req.setAttribute(formname,form) in the middle action. Formname is the name
you give to the form in the struts-config.xml file, and form is the
ActionForm you will use to populate the jsp.

If this don't work, put here the struts-config.xml and the middle action.

Regards.

Miguel

-Mensaje original-
De: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 03 de octubre de 2002 14:36
Para: Miguel Angel Mulero Martinez; Struts Users Mailing List
Asunto: Re: Populate form with ActionForm

Thanks, but I thisk I'm doing that. My Action populate the actionForm and
put it in the request, then forward to a JSP that must use the actionForm to
populate the html form. That is the definition of the actions of this
scenario:

action path=/detallesEntidad
   parameter=detalles
   type=com.action.VehiculoAction
   scope=request
   attribute=entidadForm
   forward name=siguiente path=/formularioDetalles.jsp
redirect=false /
/action
 action path=/modificarEntidad
 parameter=modificar
 type=com.action.VehiculoAction
 name=vehiculoForm
 scope=request
 input=/formularioDetalles.jsp/

And the JSP form tag is:

html:form enctype=multipart/form-data method=post
action=/modificarEntidad.do

I have followed the struts example, but the html form isn't populate. What's
the matter?

Thank You


- Original Message -
From: Miguel Angel Mulero Martinez [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]; Miguel
Angel Medina Lopez [EMAIL PROTECTED]
Sent: Thursday, October 03, 2002 1:51 PM
Subject: RE: Populate form with ActionForm


 Put a action in the middle. The action puts the bean in the request of the
 second jsp. If the second jsp populates a form with this bean, you can
pass
 the actionform to the request instead of the bean and struts will populate
 the form for you. The only requisite is that the action associated with
the
 form uses the actionform that you put in the request.

 Regards.

 -Mensaje original-
 De: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]]
 Enviado el: jueves, 03 de octubre de 2002 13:53
 Para: Struts Users Mailing List
 Asunto: Populate form with ActionForm

 Hi all:

 I have an action that populate an ActionForm, when finish it forward to a
 page that have a html form. Now I want to populate the input fields with
the
 value of the ActionForm. I have tried with different approaches but
neither
 works. Somebody have a solution?

 Thank You in advance.

 MAML


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


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




RE: How to map the jsp files in different folder with the ActionServlet!!

2002-10-02 Thread Miguel Angel Mulero Martinez

The action is allway mapped to /XXX.do, so you must call it like this,
not like /JSP/.do.

If you want the second way, you can do:

  actionpath=/JSP/searchContacts

type=org.apache.struts.webapp.example.SearchContactsAction
name=SearchContactsForm
scope=request
validate=false
  input=/searchContacts.jsp
   forward name=List
path=/ListContacts.jsp/
/action

Regards,
Miguel

-Mensaje original-
De: Naveen Gaurav [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 02 de octubre de 2002 10:19
Para: [EMAIL PROTECTED]
Asunto: How to map the jsp files in different folder with the
ActionServlet!!


On Wed, 02 Oct 2002 Naveen  Gaurav wrote :

Hi everyone,

When i am putting my .jsp file in the root directory and setting
the struts-config.xml file for the same... everything seems to be
fine..(the root directory is as
C:\jakarta-tomcat-3.2.3\webapps\struts) and the server.xml shows
the entry as

   Context path=/struts
  docBase=webapps/struts
  crossContext=false
  debug=0
  reloadable=true 
 /Context

So far so good.

But this is not the way i will manage my files.. so i created
another folder in the root directory (JSP) as
C:\jakarta-tomcat-3.2.3\webapps\struts\JSP and placed all my jsp
files there.

The first page is being shown perfectly but the forward is not
working.. actually it is not able to find the .do mapping..
Error message is The page cannot be displayed. 
http://localhost:8080/struts/JSP/searchContacts.do 

The various settings are as under.
The server.xml is as above.
The struts-config.xml is as under

   actionpath=/searchContacts

type=org.apache.struts.webapp.example.SearchContactsAction
name=SearchContactsForm
scope=request
validate=false
  input=/searchContacts.jsp
   forward name=List
path=/ListContacts.jsp/
/action

   form-bean  name=SearchContactsForm

type=org.apache.struts.webapp.example.SearchContactsForm/

And in the First Jsp from where i am calling another jsp this is
the desc.

   form name = foMessagePage action=searchContacts.do
focus=companyName METHOD=post

Please help me.

Thanks in advance.

regards,
Naveen






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


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




RE: jsp tomcat and struts

2002-10-01 Thread Miguel Angel Mulero Martinez

I use frames and I have a login page, and all works perfectly. What's your
problem?

-Mensaje original-
De: Frederic Barozzi [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 01 de octubre de 2002 14:49
Para: Struts Users Mailing List
Asunto: jsp tomcat and struts

Hi,

I've got a forward in my struts-config.xml to a /form/main.jsp.

My main.jsp calls tree frames. It works fine when i call
http://localhost:8080/myApp/form/main.jsp
but not after a login jsp page with the forward condition explained in the
struts-config.xml.

I read there are problems with frame but i don't really understant which
ones
any idea, or help ?

regards

Fred



Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92 euros
d'économies !
Et pour 1 euro de plus, reçois le CD-ROM du jeu Dark Age of Camelot
+ 1 mois de jeu en réseau offert !
Clique ici : http://www.ifrance.com/_reloc/mail.etudiant


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


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




RE: Struts ActionMapping / OC4J problem

2002-09-30 Thread Miguel Angel Mulero Martinez

Execute is the new versión (1.1b2). Perform is the old metod (1.0.2).

Regads.

-Mensaje original-
De: Thomas Delnoij [mailto:[EMAIL PROTECTED]]
Enviado el: lunes, 30 de septiembre de 2002 12:33
Para: [EMAIL PROTECTED]
Asunto: Struts ActionMapping / OC4J problem

Hi.

Several days ago, I posted a message relating to configuring Struts to run
properly on OC4J.

The actual problem was that JDeveloper's wizard for creating Action classes,
does not create a perform(), but an execute() method, which I beleive is the
old version (?).

The Action class that worked properly was hand-coded by me.

Kind regards.

Thomas Delnoij



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


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




RE: SURVEY: Proper Way To Pre-populate ActionForms

2002-09-30 Thread Miguel Angel Mulero Martinez

Me too.

-Mensaje original-
De: David Graham [mailto:[EMAIL PROTECTED]]
Enviado el: lunes, 30 de septiembre de 2002 15:34
Para: [EMAIL PROTECTED]
Asunto: Re: SURVEY: Proper Way To Pre-populate ActionForms

I do the same as Eddie.  Put an action in front of the form that sets its
initial values.

Dave


From: Hohlen, John [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts-Help (E-mail) [EMAIL PROTECTED]
CC: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: SURVEY: Proper Way To Pre-populate ActionForms
Date: Mon, 30 Sep 2002 08:22:29 -0500

I was wondering what the overall philosophy is in the Struts Users
community
in regards to pre-populating action forms?  I sent a message out late last
week asking for help on how to manually instantiate and pre-populate an
action form (prior to forwarding to a JS) in Struts 1.1.  That's when I
realized this may be considered bad practice.  Here are some comments I
received:

Eddie Bush:
No, no.  Actions/Forms have a contract -- the form 'will' be created.
You should not take this upon yourself.  What you need to do is pre-face
the page with a 'populate' action. Expect it to be there

James Turner:
I can still point to cases where you need to manually pre-populate.
For example, if you have multiple forms on a single JSP page, you either
need to pre-populate the forms manually, or you'd have to daisy-chain a
bunch of actions together, each one of which was responsible for
pre-populating a single form. This seems clumsy to me. Maybe what we need
is an authoritative way (i.e., an API) to instantiate DynaForms.

What are others doing here?  BTW, if manually pre-populating an action form
is acceptable, does it make sense to create a method in the RequestUtils
package making this
easy to do for a DynaForm (Struts 1.1).  For example (code provided by
James
Turner):

ApplicationConfig appConfig =
  (ApplicationConfig)request.getAttribute(Action.APPLICATION_KEY);
FormBeanConfig formBeanConfig =
   appConfig.findFormBeanConfig(myDynaActionForm);
String beanType = formBeanConfig.getType();
DynaActionForm bean;
DynaActionFormClass formClass =

DynaActionFormClass.createDynaActionFormClass(formBeanConfig);
return (DynaActionForm) formClass.newInstance();

Thanks! JOHN


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




_
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx


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


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




RE: initilaizing form bean values

2002-09-26 Thread Miguel Angel Mulero Martinez

You must call an Action before, this action will put the bean in the request
scope with the name you defined for it in struts-config.xml.

req.setAttribute(name,bean);

Regards.

-Mensaje original-
De: deepank [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 26 de septiembre de 2002 15:16
Para: Struts Users Mailing List
Asunto: initilaizing form bean values

hi,

i have form bean for which i would like to initialize some fields with
values before displaying the jsp.

for example if i have something like this in my jsp, how can i
initialize this input field from my Action class with a value that i get
from the database


html:text property=mail_id /, this should display some initial data

any help will be apprecaited

Deepank


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




RE: form submission problem

2002-09-25 Thread Miguel Angel Mulero Martinez

You're using windows? There's a bug in 4.1.10. Update to 4.1.12 (there is a
security bug in earlier versions too).



-Mensaje original-
De: Steve Vanspall [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 25 de septiembre de 2002 7:35
Para: Struts User Mailing List
Asunto: form submission problem

Hi,

I have a fairly new problem with one of my JSP's.

I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
doesn't work properly.

I try, using Javacript to set the value of a hidden input type=hidden
name=action field when an input type=image button is pushed, this
part works fine, have checked the value after it is set.

However it is not passing the value through to the request. Instead when
I do a request.getParameter(action) all I get is a blank String.

All my other pages that do this, are working fine. The tags are placed
properly withink the form tags.

Has anyone else has a similar problem with just one page.

Any help would be appreciated

Regards

Steve


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




RE: How can I implement session time out control in struts

2002-09-18 Thread Miguel Angel Mulero Martinez

Make a petition to server (use an empty servlet o similar). You can call
this servlet using javascript if the user press yes in a hiden frame (or
using the window with the message). The server will give another 30 min.
because it has received a petition.


-Mensaje original-
De: Khan, Manuchehar A (ACF) [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 18 de septiembre de 2002 16:28
Para: 'Struts Users Mailing List'
Asunto: RE: How can I implement session time out control in struts

I will try to explain again.
Application session time out is 40 mins. Every page we load on client has to
notify client after 30 mins that session will time out in 10 mins...This can
be achieved easily by starting a timer at client browser and pop up once
timer ran out of time. Now user will be given choice to increase their
session time without reloading thier page. This can be achieved by popping
up another window asking to click ok if they want to increase their session
time. On clicking ok the browser will send request to server and will close
itself.
My q is what do we need to do on server to increase the session time to
another 30 mins ?

-Original Message-
From: Jan Fetyko [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 9:17 AM
To: Struts Users Mailing List
Subject: Re: How can I implement session time out control in struts


Another possible question is : What about multiple windows open within
the same session ?
This kind of functionality is calling for Java applets. I guess. :(



Khan, Manuchehar A (ACF) wrote:

I saw bank of america site. They start timer once the page is loaded and
before session timeout they notify user of extending the time by popping up
a small browser window...When the user click ok or close window it is tied
up to form that sends command to server to increase the session time...but
how do we do that on server side to increase session time?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 10:11 AM
To: [EMAIL PROTECTED]
Subject: RE: How can I implement session time out control in struts



I am not sure about some of this, but one problem is going to be
actually notifying the user.

Basically I think that unless the user actually is using the pages
during the last five minutes - how are they going to be notified?  That
and you can't reload the page?  Frames maybe?  One frame on the screen,
another that refreshes every minute or something.

Applet maybe?



-Original Message-
From: mkhan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 10:05 AM
To: struts-user
Subject: How can I implement session time out control in struts


Our application requires to notify 5 mins before the session time out
and
give an option to client to increase their session time out for another
increment of 30 mins without reloading their page ...Any suggestions?
Thanks

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



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

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






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

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


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




RE: Newbie to struts

2002-09-17 Thread Miguel Angel Mulero Martinez

It's a silly answer, but, have you compiled Book before BookAction?

-Mensaje original-
De: angela mcgrenra [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 17 de septiembre de 2002 12:11
Para: [EMAIL PROTECTED]
Asunto: RE: Newbie to struts

OKAY

I have a dir structure as follows

C:\java\jakarta-tomcat-3.3.1\webapps\strutsShop\BookView.jsp
C:\java\jakarta-tomcat-3.3.1\webapps\strutsShop\CreateBook.jsp
C:\java\jakarta-tomcat-3.3.1\webapps\strutsShop\WEB-INF\classes\Book.java
C:\java\jakarta-tomcat-3.3.1\webapps\strutsShop\WEB-INF\classes\BookActoin.j
ava

Code for BookView.jsp is:

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld  prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld  prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %

html:html locale=true
head
html:base/
title
bean:message key=index.title/
/title
/head

bodyAngela's test page/body
  html:form action=createBook method=GET
Title:html:text property=title / br/
html:submit property=submit/
/html:form
/html:html


Code for CreateBook.jsp is:

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld  prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld  prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %

html:html locale=true
head
   html:base/
   titlebean:message key=index.title//title
/head
body bgcolor=white
h2Create a book/h2
html:errors/
html:form action=createBook.do method=GET
Title:html:text property=title / br/
html:submit property=submit/
/html:form
/body
/html:html

IN C:\java\jakarta-tomcat-3.3.1\webapps\strutsShop\WEB-INF\classes
I have Book.java (compiles into class file fine)
Code is :

import java.util.Vector;

public class Book
{

private String title = ;
private Vector authors = new Vector();
private int pages = 0;

/** Standard constructor. */
public Book()
{ }

/** @param title The new Title   */
public void setTitle(String title)
{  this.title = title;   }

/** @return The title. */
public String getTitle()
{ return this.title; }

/** @param pages The new number of pages. */
public void setPages(int pages)
{ this.pages = pages; }

/** @return The number of pages. */
public int getPages()
{ return this.pages; }

/**
We don't want to work with the Vector here, as it is
only a reference we would get!
@param author Add another author
*/
public void addAuthor(String author)
{ this.authors.add(author); }


/**
Pay attention not to use the wrong number.
@param position The number of the author to remove.
*/
public void removeAuthor(int position)
{ this.authors.remove(position); }

/** @return The number of authors the book has. */
public int getNumberOfAuthors()
{ return this.authors.size(); }
}

Code for BookAction.java is:

import javax.servlet.http.*;
import org.apache.struts.action.*;


/*
The action for the creation of a book.
@author [EMAIL PROTECTED]
*/
public final class BookAction extends Action
{

/**
  @param mapping The ActionMapping used to select this instance
  @param form The optional ActionForm bean for this request (if any)
  @param req The non-HTTP request we are processing
  @param res The non-HTTP response we are creating
  @return Return an ActionForward instance describing where and how
  control should be forwarded, or null if the response has
already
  been completed.
*/
public ActionForward perform(ActionMapping mapping,
ActionForm form,  HttpServletRequest req,
HttpServletResponse res)
{
System.out.println(Start perform( + form + ) . . . );
String title = req.getParameter(title);
Book book = new Book();
book.setTitle( title );
System.out.println(After creation of book:  + book.getTitle()
);

req.setAttribute(BOOK, book);
return mapping.findForward(bookCreated);
}
}

When I try to compile BookAction.java I get my error

BookAction.java:27: cannot resolve symbol
symbol   : class Book
location : class BookAction
  Book book = new Book();

The problem seems to be that BookAction.java cant find struts.jar that I
have saved locally in my classes directory...

I have saved this path into my CLASSPATH variable but to no avail...




From: Howard Miller [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Newbie to struts
Date: Tue, 17 Sep 2002 10:12:39 +0100

Hi,

I've read this about 5 times now and still can't get my head aroud what you
are doing.

Can you draw us a picture of what directories hold what, what your
classpath is, and what your javac command is.

Personally I 

RE: Scripting variables outside iterate tag

2002-09-17 Thread Miguel Angel Mulero Martinez

Use the request.getParameter(element) or something similar.


-Mensaje original-
De: Luca Zago [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 17 de septiembre de 2002 12:55
Para: Struts Users Mailing List
Asunto: Scripting variables outside iterate tag

Hi,
probably it's a not so hard question, but really I cannot find a
solution to this simple problem.
This is the example of struts documentation:

| logic:iterate id=element name=myhashtable
Next element is bean:write name=element property=value/
/logic:iterate

everything works fine. But I want to use the bean |with the key
'element', inside a scriptlet to do something like this:

html:select property='userUri'
| logic:iterate id=element name=myhashtable|
  html:option value='%= |element|.getName()%'bean:write
name='|element|' property='name'//html:option
/|logic:iterate
/html:select|

but I got obviously an exception becaus java.lang.Object doesn't contain
getName(). The problem is that even the explicit conversion to my bean,
doesn't work..
Somebody has some ideas?

Thank you in advance.

Luca


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


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




RE: [STRUTS] help with relative path!

2002-09-13 Thread Miguel Angel Mulero Martinez

You must define the action in the struts-config.xml, in this definition you
put the ActionForm that is needed with this Action. Is all ok in this file?

-Mensaje original-
De: kiuma [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 13 de septiembre de 2002 8:52
Para: Struts Users Mailing List
Asunto: [STRUTS] help with relative path!

First I'd like to thanks all people who helped me for previos posts and
links.

I'm currently trying to implement a jboss application with struts.
The problem I had before was relative to path.
Infact when I called /userlist I should call /web-client/userlist

Now if I use the standard tag form all works well

FORM action='/my-application/listedUser.do' method=POST

but if I try to use html:form tag or if I directly try to access for
the first time:

http://localhost:8080/web-client/listedUser.do
  or
html:form action=/listedUser

I have this message from server

Cannot retrieve definition for form bean null
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:471)
 at org.apache.jsp.userlist$jsp._jspService(userlist$jsp.java:410)



if I use FORM action='/my-application/listedUser.do' method=POST

no errors given when submit and I can also access
http://localhost:8080/web-client/listedUser.do directly.

What's the problem?

Thanks,
kiuma


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


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




RE: set a value from a form to a form

2002-09-11 Thread Miguel Angel Mulero Martinez

If you put that after the submit that you loose the data, is because in the
reset() you erase it. Don't erase the data in the reset() and all will be
OK. You can too make a set() that don't make anything, so the value will
be unchanged.



-Mensaje original-
De: Michael C. Lee Jr. [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 11 de septiembre de 2002 8:16
Para: Struts Users Mailing List
Asunto: Re: set a value from a form to a form

You do understand me! :)
I use a hidden field now. I was trying to get away from that though so the
user will not see it. I may have to put it in the session.
Any ideas?
thanks,
Mike

- Original Message -
From: John Yu [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, September 10, 2002 10:09 PM
Subject: Re: set a value from a form to a form


 Mike,

 If I understand you correctly, you want to retain the value when the form
 is submitted. One option is to use bean:message to display the value and
 use html:hidden to retain the value for form submission.

 html:form ...
Prop1: bean:message name=myForm property=prop1/
html:hidden name=myForm property=prop1/
...
 /html:form

 The value is *not* retained in a bean. It's just resubmitted as an URI
 parameter. If you let Struts do the auto formbean population, you will get
 it in the actionform object.

 Bean created by bean:define in the request scope will disappear
because
 whenever you submit the form, that's a complete new request.


 At 06:36 am 11-09-2002, you wrote:
 I have a form object that populates html fields. The problem is, I want
to
 display some of the form data and have it uneditable. When I submit the
 form loses all the data that is not in an html:.. tag.
 I've tried...
  bean:define id=userRole name=userForm property=userRole
  scope=request toScope=request/
 but this doesnt seem to work
 thanks,
 Mike

 --
 John Yu   Scioworks Technologies
 e: [EMAIL PROTECTED] w: +(65) 873 5989
 w: http://www.scioworks.com   m: +(65) 9782 9610

 Scioworks Camino - Don't develop Struts Apps without it!
 Copyright (c) 2002 John Yu/Scioworks Technologies. All rights reserved.


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


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


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




RE: Exception when addForwardConfig

2002-09-06 Thread Miguel Angel Mulero Martinez

Ok! Thanks! You have all the reason. I don't need to put the ActionForward
in the config, only return it.
Now I have another problem:

I use a non relative URI: http://localhost:8081/ultimasNoticias.do

But my browser tries to go to:
http://localhost:8081/http:/localhost:8081/ultimasNoticias.do

I tried both forms (my Action is http://localhost:8081/login.do)

return new
ActionForward(dirTo,http://localhost:8081/ultimasNoticias.do,true,false)
;

and

return new
ActionForward(dirTo,http://localhost:8081/ultimasNoticias.do,true,true);

both with the same result.

What's the correct? What's the mistake?

Thanks!!




-Mensaje original-
De: Christopher Seekamp [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 05 de septiembre de 2002 15:42
Para: Struts Users Mailing List
Asunto: RE: Exception when addForwardConfig






Miguel:

Well, I don't fully understand what you are trying to do.  You are trying
to add another forward to one of your mappings, which is frozen.  Usually
it would seem within an Action you would return an ActionForward
indicating where to go next, such as new ActionForward( http://someurl.com
,true).  I guess you are trying to update your configuration dynamically
to allow later executions of one or more of your Actions to look up this
new forward by name?

I was not aware that the frozen configuration was new to Struts 1.1 but I
guess it is.  For a little more information on the frozen configuration
issue perhaps see
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg30718.html


Chris Seekamp




|-+-
| |   Miguel Angel Mulero   |
| |   Martinez  |
| |   [EMAIL PROTECTED]|
| |   ecsidel.es   |
| | |
| |   09/05/2002 08:58 AM   |
| |   Please respond to Struts |
| |   Users Mailing List   |
| | |
|-+-

---
--|
  |
|
  |   To:   Struts Users Mailing List
[EMAIL PROTECTED]
|
  |   cc:
|
  |   Subject:  RE: Exception when addForwardConfig
|
  |
|
  |
|

---
--|



Hi Chris,

In Struts 1.0.2, I used the ActionMapping.addForward() to create a new
forward and it worked. In Struts 1.1b2 this function doesn't exist, and I
thinked that addForwardConfig() was the substitute.

What function must I use to create a forward dinamically? I don't want to
write it to the configuration of my application, only want to use it to
make
a findForward().

Thanks!!!


-Mensaje original-
De: Christopher Seekamp [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 05 de septiembre de 2002 14:49
Para: Struts Users Mailing List
Asunto: RE: Exception when addForwardConfig






Miguel:

Most configuration objects can only be created when the struts-config.xml
is being created.  I assume that this is due to the fact that in many cases
(for example Action objects) are single instances used in multiple threads
so that they must be frozen (no updates allowed) after initialization so
that there are no multi-threaded issues.  The ActionMapping, via the
ActionConfig from which it inherits, is one of those configuration objects
that gets frozen. So basically, after the struts-config.xml is read and
processed at initialization time, such objects cannot be updated.

Chris Seekamp



|-+-
| |   Miguel Angel Mulero   |
| |   Martinez  |
| |   [EMAIL PROTECTED]|
| |   ecsidel.es   |
| | |
| |   09/05/2002 08:00 AM   |
| |   Please respond to Struts |
| |   Users Mailing List   |
| | |
|-+-

---

--|
  |
|
  |   To:   Struts Users Mailing List
[EMAIL PROTECTED]
|
  |   cc:
|
  |   Subject:  RE: Exception when addForwardConfig
|
  |
|
  |
|

---

--|



More data to my previous message:

In the javadoc, I've found that findForward:

Throws:
java.lang.IllegalStateException - if this module configuration has been
frozen

I don't know what that means. Someone could tell me how to unfroze the
module?

Thanks

RE: [IFRAMES] Changing target on forward.

2002-09-06 Thread Miguel Angel Mulero Martinez

In the HTML page, in the form tag you can put the target, so you must select
before the action the target:

form  target=_top 

the target can be always the same or change with JavaScript, scriptlets,
etc.



-Mensaje original-
De: Joe Latty [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 06 de septiembre de 2002 10:03
Para: Struts Users Mailing List
Asunto: [IFRAMES] Changing target on forward.

I am using a master detail setup where there is a selection grid on the
page
with an IFrame loaded with the details of the selected grid record.

This all works fine, however if I add a new record I need to update the
grid
on the (_top) window. This can be achieved by all sorts of JavaScript
hocus
pocus, but what would be neat would be the ability to change the target
of
the form e.g.

return mapping.findForward(success, target now =_top);

Has anyone come up against this using frames/iframes?

Joe



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




RE: ClassCastException:java.lang.Integer

2002-09-06 Thread Miguel Angel Mulero Martinez

You can show me the part of your JSP when you use the values?


-Mensaje original-
De: Vijeth R Naik [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 06 de septiembre de 2002 12:59
Para: 'Strut User'
Asunto: ClassCastException:java.lang.Integer

Hi
I am a newbie using struts.
I have a simple jsp which has 2 fields, a String and a Number(eg: Name and
Age)br
When I try displaying the jsp, I get this exception,
ClassCastException:java.lang.Integer

I am using Tomcat-3.3.1 and Struts-1.0.2

I have a form bean, where Name is a String and Age is an int.

In my ActionClass, I  set the bean values..

String age_str=request.getParameter(age);
int age_int=(new Integer(age_str)).intValue();

beanClass.setAge(age_int);

Kindly let me know what is the error..


TIA

Vijeth



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


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




RE: ClassCastException:java.lang.Integer

2002-09-06 Thread Miguel Angel Mulero Martinez

With this code, Struts try to initialize the values to getName() and
getAge() of the bean that you have chosed in your struts-config.xml file, in
the definition of the action test.do

I think that getAge() must return a String, not a number, but I'm not sure.
Make a toString() to the value in the getAge().


-Mensaje original-
De: Vijeth R Naik [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 06 de septiembre de 2002 13:13
Para: 'Struts Users Mailing List'
Asunto: RE: ClassCastException:java.lang.Integer


This is my jsp...

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld  prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld  prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %

html:html locale=true
head
   html:base/
   titlebean:message key=index.title//title
/head
body bgcolor=white
h2Test/h2

html:errors/

html:form action=test.do method=GET
Name:html:text property=name / br/
Age:html:text property=age / br/

html:submit property=submit/
/html:form

/body
/html:html




-Original Message-
From: Miguel Angel Mulero Martinez
[mailto:[EMAIL PROTECTED]]
Sent: Friday, September 06, 2002 4:29 PM
To: Struts Users Mailing List
Subject: RE: ClassCastException:java.lang.Integer


You can show me the part of your JSP when you use the values?


-Mensaje original-
De: Vijeth R Naik [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 06 de septiembre de 2002 12:59
Para: 'Strut User'
Asunto: ClassCastException:java.lang.Integer

Hi
I am a newbie using struts.
I have a simple jsp which has 2 fields, a String and a Number(eg: Name and
Age)br
When I try displaying the jsp, I get this exception,
ClassCastException:java.lang.Integer

I am using Tomcat-3.3.1 and Struts-1.0.2

I have a form bean, where Name is a String and Age is an int.

In my ActionClass, I  set the bean values..

String age_str=request.getParameter(age);
int age_int=(new Integer(age_str)).intValue();

beanClass.setAge(age_int);

Kindly let me know what is the error..


TIA

Vijeth



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


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


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


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




RE: Dynamically generated forms and Struts

2002-09-05 Thread Miguel Angel Mulero Martinez

I think your ActionForm must have one property: it will be called for all
the options. This property will save the answer in a HashTable, Vector o
similar.



-Mensaje original-
De: Steve McLeod [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 05 de septiembre de 2002 8:49
Para: '[EMAIL PROTECTED]'
Asunto: Dynamically generated forms and Struts

In building a questionnaire, we use a database to retrieve the
questions
that a particular user should be asked. The form is built on the fly
based on data. All questions are multiple-choice style, some using radio

buttons, some using check boxes.

Can anyone point me towards some advice on how best to implement this
with Struts? The standard approach of writing a Form bean with a
property for each field in the form doesn't work, because we don't know
until run-time the structure of the form.

What are your thoughts?

Steve McLeod



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




Action-Controller difference

2002-09-05 Thread Miguel Angel Mulero Martinez

I don't understand the difference betwen an Action and a Controller
(¿TilesAction?).

Someone can explain it?

Thanks!!


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




CheckLoginTag

2002-09-05 Thread Miguel Angel Mulero Martinez

I use the CheckLogonTag in all jsp (but login.jsp). The tag works well if I
use frames, but if I use tiles I get this exception:

java.lang.IllegalStateException: Cannot forward after response has been
committed'

I think if I put the CheckLogonTag in the template and not in the JSP the
think will work well, but the template calls too the login jsp, so I cannot
put the tag in the template.

Must I use two templates (one for the login and other for the rest of pages)
or there is another solution?

Thanks!!


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




Exception when addForwardConfig

2002-09-05 Thread Miguel Angel Mulero Martinez


I have an Action that creates a dinamic forward (Struts 1.1b2). I use:

mapping.addForwardConfig(new
ForwardConfig(dirTo,http://someurl.com,true));

but when my Action executes this line I have the exception:

javax.servlet.ServletException: Configuration is frozen

before I can made:

return mapping.findForward(dirTo);

¿Someone can help me?

Thanks in advance!!


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




RE: Exception when addForwardConfig

2002-09-05 Thread Miguel Angel Mulero Martinez

More data to my previous message:

In the javadoc, I've found that findForward:

Throws:
java.lang.IllegalStateException - if this module configuration has been
frozen

I don't know what that means. Someone could tell me how to unfroze the
module?

Thanks!!

-Mensaje original-
De: Miguel Angel Mulero Martinez
[mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 05 de septiembre de 2002 13:25
Para: Lista de correo Struts
Asunto: Exception when addForwardConfig


I have an Action that creates a dinamic forward (Struts 1.1b2). I use:

mapping.addForwardConfig(new
ForwardConfig(dirTo,http://someurl.com,true));

but when my Action executes this line I have the exception:

javax.servlet.ServletException: Configuration is frozen

before I can made:

return mapping.findForward(dirTo);

¿Someone can help me?

Thanks in advance!!


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


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




RE: EasyStruts Documentation

2002-09-05 Thread Miguel Angel Mulero Martinez

All this parameters are from Struts. In the Struts documentation you will
find this.
- type: class of the Action to execute
- include: I don't remember
- forward: element to bypass the control of the application (defined in a
forward or tile definition)



-Mensaje original-
De: Heligon Sandra [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 05 de septiembre de 2002 14:14
Para: '[EMAIL PROTECTED]'
Asunto: EasyStruts Documentation


Where can I find some documentation about EasyStruts wizard ?
I installed EasyStruts but I don't know the parameter to enter,
for example in for an Action what's the parameter ActionType ? three
types are available type, include, forward.


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


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




RE: Exception when addForwardConfig

2002-09-05 Thread Miguel Angel Mulero Martinez

Hi Chris,

In Struts 1.0.2, I used the ActionMapping.addForward() to create a new
forward and it worked. In Struts 1.1b2 this function doesn't exist, and I
thinked that addForwardConfig() was the substitute.

What function must I use to create a forward dinamically? I don't want to
write it to the configuration of my application, only want to use it to make
a findForward().

Thanks!!!


-Mensaje original-
De: Christopher Seekamp [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 05 de septiembre de 2002 14:49
Para: Struts Users Mailing List
Asunto: RE: Exception when addForwardConfig






Miguel:

Most configuration objects can only be created when the struts-config.xml
is being created.  I assume that this is due to the fact that in many cases
(for example Action objects) are single instances used in multiple threads
so that they must be frozen (no updates allowed) after initialization so
that there are no multi-threaded issues.  The ActionMapping, via the
ActionConfig from which it inherits, is one of those configuration objects
that gets frozen. So basically, after the struts-config.xml is read and
processed at initialization time, such objects cannot be updated.

Chris Seekamp



|-+-
| |   Miguel Angel Mulero   |
| |   Martinez  |
| |   [EMAIL PROTECTED]|
| |   ecsidel.es   |
| | |
| |   09/05/2002 08:00 AM   |
| |   Please respond to Struts |
| |   Users Mailing List   |
| | |
|-+-

---
--|
  |
|
  |   To:   Struts Users Mailing List
[EMAIL PROTECTED]
|
  |   cc:
|
  |   Subject:  RE: Exception when addForwardConfig
|
  |
|
  |
|

---
--|



More data to my previous message:

In the javadoc, I've found that findForward:

Throws:
java.lang.IllegalStateException - if this module configuration has been
frozen

I don't know what that means. Someone could tell me how to unfroze the
module?

Thanks!!

-Mensaje original-
De: Miguel Angel Mulero Martinez
[mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 05 de septiembre de 2002 13:25
Para: Lista de correo Struts
Asunto: Exception when addForwardConfig


I have an Action that creates a dinamic forward (Struts 1.1b2). I use:

mapping.addForwardConfig(new
ForwardConfig(dirTo,http://someurl.com,true));

but when my Action executes this line I have the exception:

javax.servlet.ServletException: Configuration is frozen

before I can made:

return mapping.findForward(dirTo);

¿Someone can help me?

Thanks in advance!!


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


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





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


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




Exception when I use the tiles Action

2002-09-04 Thread Miguel Angel Mulero Martinez

I have changed the servlet action in my web.xml file to:

org.apache.struts.tiles.ActionComponentServlet

Now, when I start the server and go to the initial page, I have the
exception:

java.lang.NullPointerException
at
org.apache.struts.tiles.xmlDefinition.I18nFactorySet.toString(I18nFactorySet
.java:577)


Someone can tell me what is wrong?

Thanks!!!


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




RE: Exception when I use the tiles Action

2002-09-04 Thread Miguel Angel Mulero Martinez

I'm using version 1.1b2. I have the tiles advanced features tutorial draft
version 0.5, and in the installing chapter tell me to install this
ActionComponentServlet.

Seeing the link you send me, I see the tiles plugin. Must I use only the
plugin and not the ActionComponentServlet?

Thanks!!

-Mensaje original-
De: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
Enviado el: miercoles, 04 de septiembre de 2002 10:24
Para: Struts Users Mailing List
Asunto: Re: Exception when I use the tiles Action


  Hi,

  You have a Tiles configuration problem.
  What struts version do you use ? Tiles setup is not the same in
struts1.0.x and 1.1b2. In this later, you don't need
ActionComponentServlet anymore.
  Refer to:
http://jakarta.apache.org/struts/userGuide/dev_tiles.html

  If you use struts1.0.x, check the documentation coming with tiles
distribution on:
http://www.lifl.fr/~dumoulin/tiles/

  Cedric

Miguel Angel Mulero Martinez wrote:

I have changed the servlet action in my web.xml file to:

org.apache.struts.tiles.ActionComponentServlet

Now, when I start the server and go to the initial page, I have the
exception:

java.lang.NullPointerException
   at
org.apache.struts.tiles.xmlDefinition.I18nFactorySet.toString(I18nFactorySe
t
.java:577)


Someone can tell me what is wrong?

Thanks!!!


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







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


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




RE: Exception when I use the tiles Action

2002-09-04 Thread Miguel Angel Mulero Martinez

Don't worry! And thanks for your tutorial. Great job!

-Mensaje original-
De: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
Enviado el: miercoles, 04 de septiembre de 2002 10:49
Para: Struts Users Mailing List; Cedric Dumoulin
Asunto: Re: Exception when I use the tiles Action


  You must use the Tilesplugin as describe in struts pages. The tiles
advanced features is not up to date regarding the installation. I am
sorry for the problems you have encountered because of that. I will
update it asap.

   Cedric

Miguel Angel Mulero Martinez wrote:

I'm using version 1.1b2. I have the tiles advanced features tutorial
draft
version 0.5, and in the installing chapter tell me to install this
ActionComponentServlet.

Seeing the link you send me, I see the tiles plugin. Must I use only the
plugin and not the ActionComponentServlet?

Thanks!!

-Mensaje original-
De: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
Enviado el: miercoles, 04 de septiembre de 2002 10:24
Para: Struts Users Mailing List
Asunto: Re: Exception when I use the tiles Action


  Hi,

  You have a Tiles configuration problem.
  What struts version do you use ? Tiles setup is not the same in
struts1.0.x and 1.1b2. In this later, you don't need
ActionComponentServlet anymore.
  Refer to:
http://jakarta.apache.org/struts/userGuide/dev_tiles.html

  If you use struts1.0.x, check the documentation coming with tiles
distribution on:
http://www.lifl.fr/~dumoulin/tiles/

  Cedric

Miguel Angel Mulero Martinez wrote:



I have changed the servlet action in my web.xml file to:

org.apache.struts.tiles.ActionComponentServlet

Now, when I start the server and go to the initial page, I have the
exception:

java.lang.NullPointerException
  at
org.apache.struts.tiles.xmlDefinition.I18nFactorySet.toString(I18nFactoryS
e


t


.java:577)


Someone can tell me what is wrong?

Thanks!!!


--
To unsubscribe, e-mail:


mailto:[EMAIL PROTECTED]


For additional commands, e-mail:


mailto:[EMAIL PROTECTED]









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


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







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


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




Change only some tile

2002-09-04 Thread Miguel Angel Mulero Martinez

I've got a page with four tiles. I want that when the user press a link, the
new page appears only in one of the tiles, and the other remain unchanged. I
have searched but I didn't found how to do this. Someone could tell me
what's the correct example or how to do this?

Thanks!!


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




RE: Returning Action Errors in the Action Class.

2002-09-04 Thread Miguel Angel Mulero Martinez

Create de ActionErrors in the same way, then use the function
saveErrors(req,errors) of the action, and use the mapping.forward() to go to
the input jsp.





-Mensaje original-
De: Sudhir S. Shetty [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 04 de septiembre de 2002 13:02
Para: Struts Users Mailing List
Asunto: Returning Action Errors in the Action Class.

Hi Everybody,
  I have an application in which I enter data on to a
JSP form, after which the Form Bean is activated.
After this in the Action class , in the perform method I do some processing,
here is it possible for some condition to return an
Action Errors object?
So that the user is restricted to the input JSP?
TIA,
regards,
Suydhir



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


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




RE: Change only some tile

2002-09-04 Thread Miguel Angel Mulero Martinez

Ok! I think I understand your code: in the link, you execute a forward to a
new template (extended from the template base) with the tile changed. One
question more: do you know if I can, in the Action class, redirect to a
template but changing some attribute (like tiles:insert attribute=menu
/).

Thanks

-Mensaje original-
De: James Mitchell [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 04 de septiembre de 2002 13:23
Para: Struts Users Mailing List
Asunto: RE: Change only some tile

Example:
(Using the Struts-Atlanta site)
http://www.open-tools.org/struts-atlanta


From my struts-config.xml
-
...
...
  action-mappings
action path=/index forward=index.view unknown=true /
action path=/meetings forward=meetings.view /
action path=/sponsors forward=sponsors.view /
...
...


From my tiles-defs.xml
--
...
...
  !-- Doc index page description  --
definition name=index.view
path=/WEB-INF/layout/classicLayout.jsp
put name=logo.tile   value=/WEB-INF/jsp/logo.jsp /
put name=nav.tilevalue=/WEB-INF/jsp/nav.jsp /
put name=main.tile   value=/get-main.do /
put name=modules.tilevalue=/WEB-INF/jsp/modules.jsp /
put name=legal.tile  value=/WEB-INF/jsp/legal.jsp /
put name=powered.tilevalue=/WEB-INF/jsp/powered.jsp /
/definition

definition name=meetings.view extends=index.view 
put name=main.tile   value=/get-meetings.do /
/definition

definition name=sponsors.view extends=index.view 
put name=main.tile   value=/get-sponsors.do /
/definition
...
...


Can you see what's happening?

So my nav.jsp looks like this:
--
%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=/WEB-INF/tld/struts-html.tldprefix=html %
%@ taglib uri=/WEB-INF/tld/tiles.tld  prefix=tiles %
%@ taglib uri=/WEB-INF/tld/struts-bean.tldprefix=bean %
%@ taglib uri=/WEB-INF/tld/struts-atlanta.tld prefix=util %

  html:link page=/index.do
bean:message key=global.nav.main/
  /html:link
  nbsp;#149;nbsp;
  html:link page=/meetings.do
bean:message key=global.nav.meetings/
  /html:link
  nbsp;#149;nbsp;
  html:link page=/sponsors.do
bean:message key=global.nav.sponsors/
  /html:link




So, in the end, it looks like the only thing changing is the main area of
my pages (called by main.tile)

I can send you the complete source code for the project if you like.

Hope that helps.


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




 -Original Message-
 From: Miguel Angel Mulero Martinez
 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 04, 2002 7:05 AM
 To: Lista de correo Struts
 Subject: Change only some tile


 I've got a page with four tiles. I want that when the user press
 a link, the
 new page appears only in one of the tiles, and the other remain
 unchanged. I
 have searched but I didn't found how to do this. Someone could tell me
 what's the correct example or how to do this?

 Thanks!!


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




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


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




A silly question...

2002-09-03 Thread Miguel Angel Mulero Martinez

I have read a lot about tiles in this list, but I don't have tiles library
in Struts. Where can I download tiles? Is the same that templates?

Thanks!!


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




RE: A silly question...

2002-09-03 Thread Miguel Angel Mulero Martinez

Yes! It is, my versión is older. Thanks for all!!



-Mensaje original-
De: Michael [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 03 de septiembre de 2002 13:26
Para: 'Struts Users Mailing List'
Asunto: RE: A silly question...

I'm using struts 1.1b2 and it's there.  Are you using an older version?
I think they integrated it with 1.1.


 -Original Message-
 From: Miguel Angel Mulero Martinez
 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 1:12 PM
 To: Lista de correo Struts
 Subject: A silly question...


 I have read a lot about tiles in this list, but I don't have
 tiles library in Struts. Where can I download tiles? Is the
 same that templates?

 Thanks!!


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



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


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




RE: Database Connection in Logic Beans - pooling?

2002-09-02 Thread Miguel Angel Mulero Martinez

You can too use the DBCP from jakarta, I'm using it and works perfectly:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html



-Mensaje original-
De: Steve McLeod [mailto:[EMAIL PROTECTED]]
Enviado el: lunes, 02 de septiembre de 2002 2:10
Para: '[EMAIL PROTECTED]'
Asunto: Database Connection in Logic Beans - pooling?

I am using:
Tomcat 4.0
Struts 1.0.2

The problem


I have successfully used the Struts database connection pooling in a
trial
web app, but as far as I can tell, a reference to the datasource can
only be
obtained from within an Action class (or directly within a JSP page but
let's not think about that today).

However I would like to have logic beans which handle database access,
rather than have this in the Action class. But I can't get a reference
to
the datasource from the logic bean because it doesn't have a
ServletContext
to which I can get a handle.

I have toyed with various ideas:
- Initialise a logic bean by passing it a reference to the Servlet
- Acquire a connection in the Action class and pass that to the bean

But really, I would rather the logic bean know inherently how to acquire
a
database connection.

My current workaround is to not use the Struts connection pooling, and
rather to manually create a connection each time database access needs
to be
done, then destroy it. But this is clearly not suitable for our
production
environment.


The context of my problem
==

I want to use some code like this in a JSP:

jsp:useBean id=abean scope=page
class=au.com.sunesis.timesheets.ClientManager /
table border=1
tr
th#/th
thClient/th
thActive/th
/tr
logic:iterate id=clientList name=abean property=clients
type=au.com.sunesis.timesheets.Client
tr
tdbean:write name=clientList property=clientID//td
tdbean:write name=clientList property=clientName//td
tdbean:write name=clientList property=active//td
/tr
/logic:iterate


The idea is that ClientManager is used to handle all general database
tasks
for the Client bean (which maps to a Client entity in the database).
ClientManager.getClients() connects to the database, creates an
ArrayList of
Client objects, one for each row in the database, and returns the
ArrayList.

ClientManager has other methods, such as:
- ClientManager.delete(Client c), which deletes the row in the
database entity corresponding to the specified client.
- ClientManager.findByPrimaryKey(int ID) which returns the
Client
which matches the specified ID
- ClientManager.save(Client c), which stores the client in the
database, creating or updating as necessary

So an Action class can also call any of these directly, and it really
shouldn't care about how these work and how they store to/retrieve from
the
database. But I can't think of the elegant way to do this and still be
able
to use the Struts connection pooling.

Any thoughts?

Thanks

Steve McLeod




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




RE: [Core] Setup globals per new session

2002-08-30 Thread Miguel Angel Mulero Martinez

About the first type, there is an example of tag in the struts example. It's
named:

CheckLogonTag /

and I think it's useful.


-Mensaje original-
De: Mark Kaye [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 30 de agosto de 2002 13:36
Para: Struts Users Mailing List
Asunto: RE: [Core] Setup globals per new session

OK, I've decided to create an IndexAction and bind it to /index, then
add welcome-fileindex.do/welcome-file to my web.xml.  This appears
to work and will allow me to set up all the session state I need
dependant upon the hostname.  I now have to figure out a clean mechanism
to ensure that the client redirects to the index page if a session does
not already exist.  I am using Velocity/velstruts as my template engine
to make content maintenance easy until we go to completely db driven
content (whereupon I will still use Velocity but the content management
is then taken away from the filesystem and so becomes a completely
different problem).  I can see two options and was wondering if you guys
had a take on it:

1.  Test for a token in every page and redirect to /index if the token
is null.
2.  Make all my content calls a *.do so that I can precede them all with
an Action.

I don't particularly like 1. as it contravenes MVC.  I don't like 2
because it sounds like a lot of work :(.  Anyone got any other
suggestions?

Cheers,

M

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


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




RE: java.lang.IllegalStateException: Already called getOutputStream()FINAL

2002-08-29 Thread Miguel Angel Mulero Martinez

It's really strange. I've found the problem. If the redirect page is a JSP
or Servlet (Action included) the tag works well, but if the redirect page is
a HTML, then I've the problem described here.

Someone know the reason? I will change any html to jsp, but I'm interested
in the cause of the problem.

Thanks to all!!

-Mensaje original-
De: Miguel Angel Mulero Martinez
[mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 28 de agosto de 2002 10:33
Para: Struts Users Mailing List
Asunto: RE: java.lang.IllegalStateException: Already called
getOutputStream()

Yes, its really strange. Do you use Tomcat 4.0.3 whith jdk 1.4?

Thanks!!

-Mensaje original-
De: Rosdi bin Kasim [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 28 de agosto de 2002 10:18
Para: Struts Users Mailing List
Asunto: Re: java.lang.IllegalStateException: Already called
getOutputStream()

I use CheckLogonTag which was copy-pasted from struts-example.

The code returns SKIP_PAGE when authentication failed instead of SKIP_BODY
like yours..

It works fine for me.



- Original Message -
From: Miguel Angel Mulero Martinez [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, August 28, 2002 2:41 PM
Subject: java.lang.IllegalStateException: Already called getOutputStream()


 I'm using the CheckLogonTag with my application. The tag works perfectly.
If
 it returns SKIP_BODY (that happens when the user is not authenticated) I
 receive an java.lang.IllegalStateException: Already called
 getOutputStream().

 If the user is authenticated, then the tag returns an EVAL_PAGE and the
page
 loads perfectly.

 Someone can help me?

 Thanks in advance!!



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



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


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


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




RE: html:image Problem

2002-08-29 Thread Miguel Angel Mulero Martinez

Try to see the source generated by struts in the second example.

-Mensaje original-
De: BAYSSE Vincent (EURIWARE) [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 29 de agosto de 2002 10:42
Para: 'Struts Users Mailing List'
Asunto: html:image Problem

I want to use a rollover action on a submit image button

The first example works fine with HTML attributes.
But the second one doesn't work with Struts tags.
Any idea ?

Thanks.



First example:

A
onmouseover=MM_swapImage('accueil_over','','/siquael/images/eqfccpressed.gi
f',1)
onmouseout=MM_swapImgRestore()
href=/acas/vacances/control/accueil
IMG  src=/siquael/images/eqfcc.gif border=0 name=accueil_over
/A

Second example:

html:image property=dispatch srcKey=image.eqfcc
onclick=set('createEQF');
onmouseover=MM_swapImage('accueil_over','','/siquael/images/eqfccpressed.gi
f',1)
onmouseout=MM_swapImgRestore()
/html:image

and
image.eqfcc=/siquael/images/eqfccpressed.gif defined in my
applicationressource OK


Javascript :

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments;
document.MM_sr=new Array;
for(i=0;i(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null) {
document.MM_sr[j++]=x;
if(!x.oSrc) x.oSrc=x.src;
x.src=a[i+2];
}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){
if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; ia.length;
i++)
if (a[i].indexOf(#)!=0){
d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}
}
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr;
for(i=0;aia.length(x=a[i])x.oSrc;i++)
x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document;
if((p=n.indexOf(?))0parent.frames.length) {
  d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])d.all) x=d.all[n];
for (i=0;!xid.forms.length;i++)  x=d.forms[i][n];
  for(i=0;!xd.layersid.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
  if(!x  d.getElementById)  x=d.getElementById(n); return x;
}


ATTENTION : Si vous n'êtes pas destinataire de ce message, vous n'êtes pas
autorisé à copier, retransmettre, distribuer, révéler ou conserver le
contenu de ce message.
WARNING : If you are not the intended recipient, you are not authorised to
copy, disclose, distribute or retain in this e-mail.



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


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




java.lang.IllegalStateException: Already called getOutputStream()

2002-08-28 Thread Miguel Angel Mulero Martinez

I'm using the CheckLogonTag with my application. The tag works perfectly. If
it returns SKIP_BODY (that happens when the user is not authenticated) I
receive an java.lang.IllegalStateException: Already called
getOutputStream().

If the user is authenticated, then the tag returns an EVAL_PAGE and the page
loads perfectly.

Someone can help me?

Thanks in advance!!



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




RE: java.lang.IllegalStateException: Already called getOutputStream()

2002-08-28 Thread Miguel Angel Mulero Martinez

I think I haven't any PrintWriter open. The first lines of my JSP are:

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-html.tld  prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld  prefix=logic %
%@ taglib uri=/WEB-INF/struts-bean.tld  prefix=bean %
%@ taglib uri=/WEB-INF/log.tld  prefix=log %
%@ taglib uri=/WEB-INF/login.tld  prefix=login %

login:checkLogon /

log:debug category=jsp.noticias.busquedaNoticias
message=busquedaNoticiasJSP iniciado /
html:html
head
...

Some idea?

-Mensaje original-
De: Adolfo Miguelez [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 28 de agosto de 2002 10:09
Para: [EMAIL PROTECTED]
Asunto: Re: java.lang.IllegalStateException: Already called
getOutputStream()


Just a place where to look for,

you can not get more than one outputStream (PrintWritter) from a servlet,
i.e. as a JSP has its own OutputStream you can not create a new one. Use the
PrintWritter already iun the JSP and do not create a new one.

Adolfo.

From: Miguel Angel Mulero Martinez [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: java.lang.IllegalStateException: Already called getOutputStream()
Date: Wed, 28 Aug 2002 08:41:48 +0200

I'm using the CheckLogonTag with my application. The tag works perfectly.
If
it returns SKIP_BODY (that happens when the user is not authenticated) I
receive an java.lang.IllegalStateException: Already called
getOutputStream().

If the user is authenticated, then the tag returns an EVAL_PAGE and the
page
loads perfectly.

Someone can help me?

Thanks in advance!!



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



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


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


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




RE: java.lang.IllegalStateException: Already called getOutputStream()

2002-08-28 Thread Miguel Angel Mulero Martinez

Yes, its really strange. Do you use Tomcat 4.0.3 whith jdk 1.4?

Thanks!!

-Mensaje original-
De: Rosdi bin Kasim [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 28 de agosto de 2002 10:18
Para: Struts Users Mailing List
Asunto: Re: java.lang.IllegalStateException: Already called
getOutputStream()

I use CheckLogonTag which was copy-pasted from struts-example.

The code returns SKIP_PAGE when authentication failed instead of SKIP_BODY
like yours..

It works fine for me.



- Original Message -
From: Miguel Angel Mulero Martinez [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, August 28, 2002 2:41 PM
Subject: java.lang.IllegalStateException: Already called getOutputStream()


 I'm using the CheckLogonTag with my application. The tag works perfectly.
If
 it returns SKIP_BODY (that happens when the user is not authenticated) I
 receive an java.lang.IllegalStateException: Already called
 getOutputStream().

 If the user is authenticated, then the tag returns an EVAL_PAGE and the
page
 loads perfectly.

 Someone can help me?

 Thanks in advance!!



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



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


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




RE: Session form resetted after each post (struts 1.0.2)

2002-08-28 Thread Miguel Angel Mulero Martinez

It's a feature. You should use reset() to prepare the ActionForm to get the
HTML form values. If the form has multiple steps you don't have to erase the
contents of the bean in the reset() function. You can use an input
type=hidden ...  to know in wich step are you, and actuate in concordance.



-Mensaje original-
De: Eelco Klaver [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 28 de agosto de 2002 12:59
Para: 'Struts Users Mailing List'
Asunto: Session form resetted after each post (struts 1.0.2)

Hi,

I have a session scope action form to enable filling in the form in multiple
steps. I noticed that the reset method is called everytime the html form is
posted, while I would expect that this method is only called the first time.
I this a bug or a feature?

Regards, Eelco


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


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




RE: Session form resetted after each post (struts 1.0.2)

2002-08-28 Thread Miguel Angel Mulero Martinez

The simple way to do this, is put the bean in session request, and in each
stage make a submit to an Action that forwards the control to the next stage
(JSP). The Action can be the same in all stages (final too), but with an
attribute you can indicate to the Action wich is the next step to forward.


-Mensaje original-
De: Eelco Klaver [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 28 de agosto de 2002 13:34
Para: 'Struts Users Mailing List'
Asunto: RE: Session form resetted after each post (struts 1.0.2)

Thanks for the reply. I guess I misused the reset method to initialize all
values to their default value, which is ok for request scope forms but
doesn't work for session scope forms. I'll find another way to do this.

 -Original Message-
 From: Miguel Angel Mulero Martinez
 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 28, 2002 1:21 PM
 To: Struts Users Mailing List
 Subject: RE: Session form resetted after each post (struts 1.0.2)


 It's a feature. You should use reset() to prepare the
 ActionForm to get the
 HTML form values. If the form has multiple steps you don't
 have to erase the
 contents of the bean in the reset() function. You can use an input
 type=hidden ...  to know in wich step are you, and actuate
 in concordance.



 -Mensaje original-
 De: Eelco Klaver [mailto:[EMAIL PROTECTED]]
 Enviado el: miércoles, 28 de agosto de 2002 12:59
 Para: 'Struts Users Mailing List'
 Asunto: Session form resetted after each post (struts 1.0.2)

 Hi,

 I have a session scope action form to enable filling in the
 form in multiple
 steps. I noticed that the reset method is called everytime
 the html form is
 posted, while I would expect that this method is only called
 the first time.
 I this a bug or a feature?

 Regards, Eelco


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


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



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


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




onclick on img, or cancel submit on image

2002-08-27 Thread Miguel Angel Mulero Martinez

I wan't to open a new window with the event onClick over an image. The
html:img tag don't have onclick because netscape don't support it. The
html:image has onclick but it makes a submit too.

How can I do it? Is there a way to cancel the submit action in the image?

Thanks!!


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




RE: Bean of scope request missing in link

2002-08-22 Thread Miguel Angel Mulero Martinez

I know HTML can't save beans (ActionForm in this case). I have see that
Struts don't reuse my ActionForm, it creates a new ActionForm, puts the
values of the HTML form, and deletes the old. My problem in this case is
that if I put a link, it can't put any values in the ActionForm, so it
erases it.

I have make it work with some JavaScript and a hidden form, but, Is there a
way to say Struts don't erase the ActionForm if I press the link, only if I
make a submit?

Thanks!!

Sorry for my english!! :(

-Mensaje original-
De: Adolfo Miguelez [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 22 de agosto de 2002 10:36
Para: [EMAIL PROTECTED]
Asunto: Re: Bean of scope request missing in link


Hi Miguel Angel,

I response you in English to share the answer with anyone. After JSP
compilation it becomes in an HTML which is sent to the browser client.
Once in the client, how can the HTML hold a bean? The bean is supposed in
the JSP compilation by the JSP engine but produced HTML cannot hold the
bean, AFAIK.

Can you further explain your question or answer directly, in Spanish if you
want to [EMAIL PROTECTED]?

To pursue the behaviour that you are looking for, why do not you place the
bean in session scope and invoke it from the sucesive JSPs? Take in mind
that JSP compilation produces in server and the page that you see in browser
IN THE CLIENT MACHINE is the HTML after JSP compilation.

Am I missing something? Regards,

Adolfo.

From: Miguel Angel Mulero Martinez [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Bean of scope request missing in link
Date: Thu, 22 Aug 2002 08:03:42 +0200

I've got a JSP page with a html:form. This form is complete with the
contents of a java bean. I've got a link to a Action (that redirects to
another JSP). Mi problem is that when I press the link, the Action (and, of
course, after the JSP) don't receive the java bean, so in the JSP I can't
print the contents. The bean have scope request, so I think it would have
to
work.

Is this normal? Some idea?

Thanks!!


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




HTML
  HEAD
 TITLEAdolfo's signature/TITLE
  /HEAD
  BODY
 centerbemAdolfo Rodriguez Miguelez/emb/center

  /BODY
  /HTML





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


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


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




RE: Bean of scope request missing in link

2002-08-22 Thread Miguel Angel Mulero Martinez

Yes, this works more or less well. The bean is still alive but I had have to
duplicate the Action definition in the struts-config.xml, to indicate that
these Action don't have any ActionForm associated. In this way works well,
Struts don't delete the old bean.

Thanks!!

-Mensaje original-
De: Adolfo Miguelez [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 22 de agosto de 2002 12:14
Para: [EMAIL PROTECTED]
Asunto: RE: Bean of scope request missing in link


I guess your are using a request scoped ActionForm. Try with a session one.
If I understand you, that is the expected behaviour for a request
ActionForm. It is correct.

Regards,

Adolfo.

From: Miguel Angel Mulero Martinez [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: Bean of scope request missing in link
Date: Thu, 22 Aug 2002 10:54:53 +0200

I know HTML can't save beans (ActionForm in this case). I have see that
Struts don't reuse my ActionForm, it creates a new ActionForm, puts the
values of the HTML form, and deletes the old. My problem in this case is
that if I put a link, it can't put any values in the ActionForm, so it
erases it.

I have make it work with some JavaScript and a hidden form, but, Is there a
way to say Struts don't erase the ActionForm if I press the link, only if I
make a submit?

Thanks!!

Sorry for my english!! :(

-Mensaje original-
De: Adolfo Miguelez [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 22 de agosto de 2002 10:36
Para: [EMAIL PROTECTED]
Asunto: Re: Bean of scope request missing in link


Hi Miguel Angel,

I response you in English to share the answer with anyone. After JSP
compilation it becomes in an HTML which is sent to the browser client.
Once in the client, how can the HTML hold a bean? The bean is supposed in
the JSP compilation by the JSP engine but produced HTML cannot hold the
bean, AFAIK.

Can you further explain your question or answer directly, in Spanish if you
want to [EMAIL PROTECTED]?

To pursue the behaviour that you are looking for, why do not you place the
bean in session scope and invoke it from the sucesive JSPs? Take in mind
that JSP compilation produces in server and the page that you see in
browser
IN THE CLIENT MACHINE is the HTML after JSP compilation.

Am I missing something? Regards,

Adolfo.

 From: Miguel Angel Mulero Martinez [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Bean of scope request missing in link
 Date: Thu, 22 Aug 2002 08:03:42 +0200
 
 I've got a JSP page with a html:form. This form is complete with the
 contents of a java bean. I've got a link to a Action (that redirects to
 another JSP). Mi problem is that when I press the link, the Action (and,
of
 course, after the JSP) don't receive the java bean, so in the JSP I can't
 print the contents. The bean have scope request, so I think it would have
 to
 work.
 
 Is this normal? Some idea?
 
 Thanks!!
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]




HTML
   HEAD
  TITLEAdolfo's signature/TITLE
   /HEAD
   BODY
  centerbemAdolfo Rodriguez Miguelez/emb/center

   /BODY
   /HTML





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


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


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




HTML
  HEAD
 TITLEAdolfo's signature/TITLE
  /HEAD
  BODY
 centerbemAdolfo Rodriguez Miguelez/emb/center

  /BODY
  /HTML





_
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx


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


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




Bean of scope request missing in link

2002-08-21 Thread Miguel Angel Mulero Martinez

I've got a JSP page with a html:form. This form is complete with the
contents of a java bean. I've got a link to a Action (that redirects to
another JSP). Mi problem is that when I press the link, the Action (and, of
course, after the JSP) don't receive the java bean, so in the JSP I can't
print the contents. The bean have scope request, so I think it would have to
work.

Is this normal? Some idea?

Thanks!!


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