Re: Application without cookies and sessions

2002-03-22 Thread Nicolas De Loof

Don't panic about session and cookies !

Session are used to maintain state in your application between 2 request
from user : HTTP is a non connected protocol, so you cannot know where your
user comes from where you perform a request.

Session is just a Collection of objects in memory associated whith an id
that servlet container maintain for you. User browser whith cookies
activated receives a cookie with this id so that the container is able to
link future request to the session collection associated with the user.
Without cookies, URL are expanded to add the id as a parameter of requests.

If you put objets in the request scope, after the JSP has produced the HTML
page the objects are destroyed ! Your user objet that MUST be retrieved in
other requests MUST be in the stored session scope.

 Hi all,

 I'm very newbie with struts and java. I'm developing an application anf I
 don't like to use cookies or session objects.

 Focusing in the struts example, the user is in the session. Why not set
this
 object in the request parameter in all the actions and jsps??

 ActionClass
 //Code
 request.setParameter(user, user);
 //more code

 Jsp
 //Code
 %
 pageContext.setParameter(user, user);
 %
 //more code


 Is this a good practice??

 Is there another ways to do it??

 Regards, Enrique.


 _
 Enrique Rodriguez Lasterra


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


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




Problem with logic:equal and logic:notEqual tags both evaluating to true

2002-03-22 Thread $B%"%s%H%K!<(B $B%9%F%$%9(B

Hi

I have the following code

logic:iterate id=schTag name=scheduleBean property=currentMonth  
logic:equal name=schTag property=status value=true/
H1I am logic:equal/H1
/logic:equal
logic:notEqual name=schTag property=status value=true/
H1I am logic:notEqual/H1
/logic:notEqual
/logic:iterate

For some reason it is printing out both

I am logic:notEqual

and

I am logic:equal

Am I missing the point about the logic:equal and logic:notEqual tags, or
is there a reason this might be happening?




Cheers

Tony





_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




[Newbie] prob with html:options or html:select tag

2002-03-22 Thread Slimane Zouggari

Hi,

I have a weird problem here (as always :).

I have the following code in my *.jsp file:
   form action=handleprojectaddrequest.do method=post
 Select request type
   html:select property=codtyp
 html:options name=projectaddrequestform collection=listTyp 
property=id labelProperty=name/
   /html:select
   /form

so,
 codtyp  is a property of HandleProjectAddRequestAction
 projectaddrequestform   is a session bean (it's actually loaded 
into the session, because I did the check before in the jsp page)
 listTyp is a collection (ArrayList) of 
beans (type is one of mine named ElementSimple)
 id and name are two properties of the class ElementSimple

My session bean is well loaded.
My ArrayList does contain values.

So why do I have an error when I try to execute the preceding code ?

Thanks for having read me so far :)

Friendly Regards,
Slimane

FYI, here's the exception thrown:

javax.servlet.ServletException: Cannot find bean under name 
org.apache.struts.taglib.html.BEAN
 at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457)
 at 
org.apache.jsp.ProjectAddRequest$jsp._jspService(ProjectAddRequest$jsp.java:378)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
 at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
 at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
 at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
 at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:970)
 at 
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:404)
 at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
 at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1099)
 at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:450)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
 at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
 at 

Re: How to display a static file in a body tile

2002-03-22 Thread Cedric Dumoulin


  You can use Struts bean:include href=anUrl / inside your body.
  If you want to use a value coming from a Tile attribute, do something like :

  tiles:useAttribute name=tileAttributeName /
  bean:include href=%=tileAttributeName% /

  Checks documentation for these tags for more :
http://jakarta.apache.org/struts/userGuide/struts-bean.html#include
http://www.lifl.fr/~dumoulin/tiles/doc/tilesTags.html#useAttribute

   Hope this help,

 Cedric

Manuel Riche wrote:

 I use the taglib tiles and i want display a static file (an html file
 with pictures)  with an absolute URL in a body's tile.
 Is it possible and how can i do that ?

 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]




Re: Tiles sub-applications?

2002-03-22 Thread Cedric Dumoulin


  Hello,

  Tiles doesn't support sub applications yet, as defined in struts1.1.
  Actually, there is only one definition factory for all sub application. However, it 
is already possible to have several definitions files, but definitions should have 
different names.

  I will provide sub application support, as well as struts plugin asap (hope in less 
than 2 weeks)

Cedric

Ian Tomey wrote:

 Hi all,

 been reading about tiles in struts 1.1-b1 and just wondering if it supports sub 
applications when using definitions? we would need it to support a number of 
definitons files , one for each sub application

 Cheers
 Ian

 --
 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: 1 tile - 1 controller

2002-03-22 Thread Cedric Dumoulin


  Hello,

  Tiles support controller for each individual Tile.
  This controller's role is to prepare data to be rendered by the tile.
  Syntax is as follow :

 definition name=examples.rssChannel.offline.body
path=/examples/tiles/rssChannels.jsp
 controllerUrl=/examples/controller/rssChannel.do 
  ..
  or

 definition name=examples.rssChannel.offline.body
path=/examples/tiles/rssChannels.jsp
 controllerClass=a.class.Name 

  You can find an example of use in tiles-doc.war or struts-tiles.war :

   *   /examples/rssChannels.jsp
   *   / test/testController.jsp

  More documentation is needed ;-(

  Cedric

Jon Ferguson wrote:

 Hey guys,

 I read in the tiles doc that you can associate a controller with each tile.
 However, I cannot find an example of how this is done.

 Any pointers?

 Thanks in advance,
 Jon

   
 --
 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: Application without cookies and sessions

2002-03-22 Thread Enrique Rodriguez

Hi Nicolas,

First of all, thank you very much for your response.

What about the session timeout??? I don't like websites that if you left it
for ten minutes you have to login again.

Is there any way to do a site without take care of session timeouts??

Regards, and pardon for my english.

Enrique.

_
Enrique Rodriguez Lasterra


 De: Nicolas De Loof


 Don't panic about session and cookies !

 Session are used to maintain state in your application between 2 request
 from user : HTTP is a non connected protocol, so you cannot know
 where your
 user comes from where you perform a request.

 Session is just a Collection of objects in memory associated whith an id
 that servlet container maintain for you. User browser whith cookies
 activated receives a cookie with this id so that the container is able to
 link future request to the session collection associated with the user.
 Without cookies, URL are expanded to add the id as a parameter of
 requests.

 If you put objets in the request scope, after the JSP has
 produced the HTML
 page the objects are destroyed ! Your user objet that MUST be retrieved in
 other requests MUST be in the stored session scope.

  Hi all,
 
  I'm very newbie with struts and java. I'm developing an
 application anf I
  don't like to use cookies or session objects.
 
  Focusing in the struts example, the user is in the session. Why not set
 this
  object in the request parameter in all the actions and jsps??
 
  ActionClass
  //Code
  request.setParameter(user, user);
  //more code
 
  Jsp
  //Code
  %
  pageContext.setParameter(user, user);
  %
  //more code
 
 
  Is this a good practice??
 
  Is there another ways to do it??
 
  Regards, Enrique.
 
 
  _
  Enrique Rodriguez Lasterra
 
 
  --
  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]




WAS 401/OS390 Deployment Problems - Servlet/JSPs not found

2002-03-22 Thread Andre Kreich

Hi there,

we've got a problem Deploying Struts on WebSphere 401 running on OS390. The
ActionServlet seems to be initialized correctly, though it parses the
struts-config.xml and calls actionMapping().

The Problem is, that we can access neither servlets nor JSPs, but simple
HTML-Pages. Attached is an extract from the server-log and the DDs.

TIA, Andre Kreich

(See attached file: StrutsMailingListePostWebSphereLogExtract.txt)(See attached
file: struts-config.xml)(See attached file: web.xml)(See attached file:
ibm-web-ext.xmi)(See attached file: ibm-web-bnd.xmi)
--
Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
dieser E-Mail oder die unbefugte Weitergabe der enthaltenenen Informationen
ist nicht gestattet.

The information contained in this message is confidential or protected by
law. If you are not the intended recipient, please contact the sender and
delete this message. Any unauthorised copying of this message or
unauthorised distribution of the information contained herein is prohibited.



StrutsMailingListePostWebSphereLogExtract.txt
Description: Text - character set unknown


struts-config.xml
Description: Binary data


web.xml
Description: Binary data


ibm-web-ext.xmi
Description: Binary data


ibm-web-bnd.xmi
Description: Binary data

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


Re: Application without cookies and sessions

2002-03-22 Thread Nicolas De Loof

You can configure the session time-out on your servlet container. (refer to
it's documentation). I currently use 30 minutes for web administration
application.

When the time-out occurs, the session collection and it's included objects
are destroyed.

If you configure a very high time-out, be carreful that the memory used by
the session has to be released when the user quits, using a Disconnect URL
that invalidates the session (see javax.servlet.http.HTTPSession javadoc).

There is a mecanism to make the session being persistant: The session
objects and ID are store to a database. This is called persistant session
management. I've never used it, but perhaps you're interested ?



 Hi Nicolas,

 First of all, thank you very much for your response.

 What about the session timeout??? I don't like websites that if you left
it
 for ten minutes you have to login again.

 Is there any way to do a site without take care of session timeouts??

 Regards, and pardon for my english.

 Enrique.

 _
 Enrique Rodriguez Lasterra


  De: Nicolas De Loof
 
 
  Don't panic about session and cookies !
 
  Session are used to maintain state in your application between 2 request
  from user : HTTP is a non connected protocol, so you cannot know
  where your
  user comes from where you perform a request.
 
  Session is just a Collection of objects in memory associated whith an id
  that servlet container maintain for you. User browser whith cookies
  activated receives a cookie with this id so that the container is able
to
  link future request to the session collection associated with the user.
  Without cookies, URL are expanded to add the id as a parameter of
  requests.
 
  If you put objets in the request scope, after the JSP has
  produced the HTML
  page the objects are destroyed ! Your user objet that MUST be retrieved
in
  other requests MUST be in the stored session scope.
 
   Hi all,
  
   I'm very newbie with struts and java. I'm developing an
  application anf I
   don't like to use cookies or session objects.
  
   Focusing in the struts example, the user is in the session. Why not
set
  this
   object in the request parameter in all the actions and jsps??
  
   ActionClass
   //Code
   request.setParameter(user, user);
   //more code
  
   Jsp
   //Code
   %
   pageContext.setParameter(user, user);
   %
   //more code
  
  
   Is this a good practice??
  
   Is there another ways to do it??
  
   Regards, Enrique.
  
  
   _
   Enrique Rodriguez Lasterra
  
  
   --
   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: a NEWBIE question: Cannot Resolve Symbol

2002-03-22 Thread Ted Husted

Gilson Nascimento D Elrei wrote:
 Question 1
 I'm receiving this error when I try to compile my bean source code
 (LoginBean.java).
 Cannot Resolve Symbol - Probably JSDK didn't find the struts.jar to
 complete compilation.
 I tried to upload struts.jar in %JSDK_HOME%/LIB and updated my CLASSPATH,
 but i continue to getting the same error.

If you are using Ant, the best thing is to have it add the struts.jar in
your webapps lib to the patch. 

!-- Build working classpath --
path id=project.class.path
pathelement path =lib/struts.jar/
!-- ... --
pathelement path =${classpath}/
/path


 Question 2
 Once that i have compiled LoginBean.java...
 How to do to compile a servlet that use this the Bean Class previously
 created ?
 I can't simply instance in my servlet program, cos I get the error Cannot
 Resolve... again - What I need for my servlet to find my LoginBean.class
 and compile it ? I need to save my LoginBean.class in CLASSPATH too ?
 
 Thanks in Advance.

Struts is designed to use its own ActionServlet. You instead write
Action classes to do what is usually done in standalone servlets. The
Actions are servlet-delegates. The servlet calls the perform method on
each Action, and passes it the bean specified in the struts
configuration. 

A re-reading of the Struts User Guide from the beginning might help
bring things into focus for you. Be sure to review the list of
pre-requesite materials at the top of the introduction. 

http://jakarta.apache.org/struts/doc-1.0.2/userGuide/introduction.html

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

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




Re: 'dynamic' form elements in a ActionForm

2002-03-22 Thread Ted Husted

It's difficult to do this in the 1.0.x release, but simple as pie in the
1.1 beta and nightly build. 

http://jguru.com/forums/view.jsp?EID=567079

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


Struts Newsgroup (@Basebeans.com) wrote:
 
 Subject: 'dynamic' form elements in a ActionForm
 From: Greg Tillbrook [EMAIL PROTECTED]
  ===
 Hi
 
 Ive been tryig to use an ActionForm bean for a form which can have a
 variable number of form elements (as defined by a 'meta' configuration
 file). Ive hit on the problem though that each parameter in a form bean
 matched to a form element has to declared when implementing the bean. Is it
 possible to specify a list (i.e. vector or hashtable) in the form bean that
 will contain all of these 'dynamic' parameters or is there a better way?
 
 I have looked at the documentation/web/this newsgroup but have found nothing
 that seemed appropriate.
 Apologies if Ive missed something obvious but Im pretty new to struts atm.
 
 cheers
 
 Greg
 
 --
 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: Keep a session in different war

2002-03-22 Thread Ted Husted

It's not permitted. Each web application has its own session for
security reasons. The options are 

* URI's
* Cookies,
* Or a shared database

One popular approach is to use cookies to create a common autologin
procedure that the applications share. Tomcat supports this, and I
believe Expresso is floating a proposal regarding a common convention we
call can use.

http://jcorporate.com

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

Laurent Goncalves wrote:
 
 Hi,
 
 I'm currently using Weblogic 5.1 SP8 with struts 1.0.2 and when I use an
 actionMapping to forward to another Web App, a new session is created into
 the second Web-app.
 How can I do to keep the same session ?
 
 Thanks,
 
 Laurent
 
 --
 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]




HOWTO: Lessons learned from using Struts, Tomcat and Oracle

2002-03-22 Thread Ted Husted

 Original Message 
Subject: Lessons learned from using Struts, Tomcat and Oracle
Date: Thu, 21 Mar 2002 19:43:22 -0800 (PST)
From: Walter S. So [EMAIL PROTECTED]

Hi Ted,

I just want to share this information in case someone else also
goes through the same problems I did.  I was able to come up
with this solution after spending an entire afternoon searching
through the net and archives, so if it saves people a few hours
of debugging, I'll be happy.  I am not sure how to categorize it
or even which mailing list to send this, whether it should go to
Tomcat, Struts, or Tyrex, so I decided to send it to you since
you are active in Jakarta.

My goal was to set up a Connection Pooled DataSource using
Oracle running Struts on Tomcat.  I use Tomcat 4.0.3, Struts
1.1-b1-lib, Oracle 8.1.7 classes12.zip running on Windows 98,
but it should work well on Solaris/Linux.

Initially, I set up the Oracle JDBC drivers under my webapp and
used the datasource in struts-config.xml to access Oracle.  My
application consistently hung after the pool was exhausted. 
(For example, if I set the minCount and maxCount to 10, my
webapp would hang after 10 requests)  The problem of Oracle
connections not being returned properly by the Struts pool was
well documented in the mailing list, so I switched the
datasource from struts-config.xml to tomcat's server.xml.  I
followed the instructions in the Tomcat jndi-resources-howto and
copied the Oracle drivers to common/lib after renaming the
classes12.zip to classes12.jar as suggested by the mailing
list.

I found my webapp wasn't running properly as the servlet would
stop executing after context.lookup().  This bothered me because
Tomcat was not throwing any exceptions. After some more
research, I changed the debug level in server.xml from 0 to
99.  This time, the log generated showed a
java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
when the lookup() is called.  A post in the tomcat-dev mailing
list provided the answer:  There was a conflict in the jars of
tomcat and the webapp.  True enough, I found a
jdbc2_0-stdext.jar (83KB) that came in tomcat\common\lib, and a
jdbc2_0-stdext.jar (7KB) that i had unpacked from Struts to my
web-app.  After deleting the 7KB jar, the lookup() executed
properly.

To sum up, when using a DataSource in Tomcat and Struts in the
webapp, make sure to remove the extraneous jdbc2_0-stdext.jar
that comes with the Struts Lib. :)

Hope that helps,

Walter


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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




Re: Web application with my own authentication process

2002-03-22 Thread Ted Husted

Typically, people will place an object in the session that indicates
that the user is logged in. You can then either subclass the
ActionServlet to check each incoming request for that session object. If
it is absent, you redirect them to a logon page. More often, people
create a base Action that does the same thing. This makes it easier to
have authenticated and unauthenticated requestd, depending on whether
they extend the authenticated Action or not. The simplest thing is to
have create your own doPerform(...) method, and have the developers
extend that instead of process. Perform then calls doPerform

perform
// Obtain logon
Bean account = request.getSession().getAttribute(LOGON_KEY);
if (account==null)
return mapping.findForward(LOGON_FORWARD);
return doPerform( ...


Also, please do not cross-post questions like this to the DEV list.

http://www.tuxedo.org/~esr/faqs/smart-questions.html

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


Fabien Lesire wrote:
 
 Hi,
 
 I want use Struts to develop some web application but i would like used
 Smartcard/Certificate Authentication Web Controller from my previous Web
 Application (developed in my company).
 
 How can i do this ?
 
 thanks
 
 ---
 
 Lesire Fabien
 JAVA developement
 [EMAIL PROTECTED]
 IsaSoftware SA
 13/15 Bd de l'Impératrice
 B - 1000 Bruxelles
 Web : www.isabel.be

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




Newbie Question - Please Helpme (Cannot find ActionMapping or...)

2002-03-22 Thread Gilson Nascimento D Elrei

 I'm receiving this error when I try to execute my application
 (http://localhost:8100/helpdev/jsp/LoginView.jsp) on JRUN.
   javax.servlet.jsp.JspException: Cannot find ActionMappings or
 ActionFormBeans collection 
 I have verified my WEB.XML  and STRUTS-CONFIG.XML files and I didn't find
 error. 
 I think that STRUTS doesn't get to find the path for STRUTS-CONFIG.XML.  
 LoginAction.java  LoginView.jsp 
 Below is my structure directory configuration.
 HelpDev is my WEBAPP container for my application.
 HELPDEV
  |
  +-JSP
  |  |
  |  .-- LoginView.JSP   --  Main Program
  |  .-- MainMenu.JSP   
  |
  +-WEB-INF:.
 |
 +---LIB
 | | 
 | .--structs.jar
 | .--xerces.jar
 | .--jaxp.jar  
 | .--parse.jar
 |
 +---CLASSES
 | |
 | +---TEST
 |   |
 |
 +--STRUTS
 |
 . LoginAction.class
 |
 . LoginBean.class
 |
 . LoginForm.class
 |
 . MessageResources.properties
 
 .-- All Structs TLD Files (*.TLD) 
 .-- structs-config.xml
 .-- web.xml
 
 Below is content from WEB.XML and STRUTS-CONFIG.XML
 !-- WEB.XML Start HERE ---
 
 ?xml version=1.0 encoding=ISO-8859-1?
 !DOCTYPE web-app
   SYSTEM
   http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
 web-app
   !-- Action Servlet Configuration --
   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
   param-nameapplication/param-name
   param-valuetest.struts.MessageResources/param-value
 /init-param
 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
   param-namedebug/param-name
   param-value2/param-value
 /init-param
 init-param
   param-namemapping/param-name
  
 param-valueorg.apache.struts.action.RequestActionMapping/param-value
 /init-param
 load-on-startup2/load-on-startup
   /servlet
   !-- Action Servlet Mapping --
   servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
   /servlet-mapping
 
   !-- Struts Tag Library Descriptors --
   taglib
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
   /taglib
 
   taglib
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 taglib-location/WEB-INF/struts-html.tld/taglib-location
   /taglib
 
   taglib
 taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
 taglib-location/WEB-INF/struts-logic.tld/taglib-location
   /taglib
 
   taglib
 taglib-uri/WEB-INF/struts-template.tld/taglib-uri
 taglib-location/WEB-INF/struts-template.tld/taglib-location
   /taglib
 /web-app
 !-- WEB.XML End HERE ---
 !-- STRUTS-CONFIG.XML Start HERE ---
 ?xml version=1.0 encoding=ISO-8859-1 ?
 !DOCTYPE struts-config SYSTEM
   http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;
 struts-config
!-- = Form Beans Definitions = --
form-beans
 form-bean name=login type=test.struts.LoginForm /   
/form-beans
 !-- = Global Forward Definitions = --
global-forwards
/global-forwards
!-- = Action Mappings  Definitions = --
action-mappings
   action
path=/login
type=test.struts.LoginAction 
name=login
input=/jsp/LoginView.jsp
validate=true
forward name=valid path=/jsp/MainMenu.jsp /
forward name=invalid path=/jsp/LoginView.jsp /
   /action
/action-mappings
 /struts-config
 !-- STRUTS-CONFIG.XML End HERE ---
 I have tried encounter any solution on web but i didn't success.
 Any suggestion ?
 thanks in advance.
 
  



LoginAction.java
Description: Binary data


LoginView.jsp
Description: Binary data

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


Re: Newbie Question - Please Helpme (Cannot find ActionMapping or...)

2002-03-22 Thread Anant Sagar

This usually happens due to improper setting of  Data Source Configuration
(data-sources  /data-sources) in struts-config.xml file.
Check whether driverClass ,url,user,password entered are correctly .
Hope that may help you.

Sagar


- Original Message -
From: Otavio C. Decio [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, March 22, 2002 6:56 PM
Subject: Re: Newbie Question - Please Helpme (Cannot find ActionMapping
or...)


 Just a suggestion, put all the jars that come with struts under your
 web-inf\lib directory, including the commons*.

 Abracos

 Otavio

 - Original Message -
 From: Gilson Nascimento D Elrei [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Friday, March 22, 2002 8:16 AM
 Subject: Newbie Question - Please Helpme (Cannot find ActionMapping or...)


   I'm receiving this error when I try to execute my application
   (http://localhost:8100/helpdev/jsp/LoginView.jsp) on JRUN.
 javax.servlet.jsp.JspException: Cannot find ActionMappings
or
   ActionFormBeans collection
   I have verified my WEB.XML  and STRUTS-CONFIG.XML files and I didn't
 find
   error.
   I think that STRUTS doesn't get to find the path for
STRUTS-CONFIG.XML.
   LoginAction.java  LoginView.jsp
   Below is my structure directory configuration.
   HelpDev is my WEBAPP container for my application.
   HELPDEV
|
+-JSP
|  |
|  .-- LoginView.JSP   --  Main Program
|  .-- MainMenu.JSP
|
+-WEB-INF:.
   |
   +---LIB
   | |
   | .--structs.jar
   | .--xerces.jar
   | .--jaxp.jar
   | .--parse.jar
   |
   +---CLASSES
   | |
   | +---TEST
   |   |
   |
   +--STRUTS
   |
   . LoginAction.class
   |
   . LoginBean.class
   |
   . LoginForm.class
   |
   . MessageResources.properties
  
   .-- All Structs TLD Files (*.TLD)
   .-- structs-config.xml
   .-- web.xml
  
   Below is content from WEB.XML and STRUTS-CONFIG.XML
   !-- WEB.XML Start HERE ---
  
   ?xml version=1.0 encoding=ISO-8859-1?
   !DOCTYPE web-app
 SYSTEM
 http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
   web-app
 !-- Action Servlet Configuration --
 servlet
   servlet-nameaction/servlet-name
  
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   init-param
 param-nameapplication/param-name
 param-valuetest.struts.MessageResources/param-value
   /init-param
   init-param
 param-nameconfig/param-name
 param-value/WEB-INF/struts-config.xml/param-value
   /init-param
   init-param
 param-namedebug/param-name
 param-value2/param-value
   /init-param
   init-param
 param-namemapping/param-name
  
  
param-valueorg.apache.struts.action.RequestActionMapping/param-value
   /init-param
   load-on-startup2/load-on-startup
 /servlet
 !-- Action Servlet Mapping --
 servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern*.do/url-pattern
 /servlet-mapping
  
 !-- Struts Tag Library Descriptors --
 taglib
   taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
   taglib-location/WEB-INF/struts-bean.tld/taglib-location
 /taglib
  
 taglib
   taglib-uri/WEB-INF/struts-html.tld/taglib-uri
   taglib-location/WEB-INF/struts-html.tld/taglib-location
 /taglib
  
 taglib
   taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
   taglib-location/WEB-INF/struts-logic.tld/taglib-location
 /taglib
  
 taglib
   taglib-uri/WEB-INF/struts-template.tld/taglib-uri
   taglib-location/WEB-INF/struts-template.tld/taglib-location
 /taglib
   /web-app
   !-- WEB.XML End HERE ---
   !-- STRUTS-CONFIG.XML Start HERE ---
   ?xml version=1.0 encoding=ISO-8859-1 ?
   !DOCTYPE struts-config SYSTEM
  
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;
   struts-config
  !-- = Form Beans Definitions = --
  form-beans
   form-bean name=login type=test.struts.LoginForm /
  /form-beans
   !-- = Global Forward Definitions
= --
  global-forwards
  /global-forwards
  !-- = Action Mappings  Definitions
= --
  action-mappings
 action
  

[ANN] New ActionForm-to-Value Object (and back) mapper

2002-03-22 Thread Sobkowski, Andrej

Hello,

the new version of the Form-to-VO and VO-to-Form mapper is now available at 

http://www.mycgiserver.com/~andrej/technical/struts/struts.jsp

It allows you to perform in ONE line of code the mapping between

ExampleForm 
+getLastName:String
+setLastName(String)
+getDateOfBirth:String
+setDateOfBirth(String)
+getYearsOfJavaExperience:String
+setYearsOfJavaExperience(String)
+getEmailAddresses:String[]
+setEmailAddresses(String[])
+getChild:ChildForm
+setChild(ChildForm)
+getChildren:ChildForm[]
+setChildren(ChildForm[])

and

ExampleVO 
+getLastName:String
+setLastName(String)
+getDateOfBirth:Date
+setDateOfBirth(Date)
+getYearsOfJavaExperience:Integer
+setYearsOfJavaExperience(Integer)
+getEmailAddresses:String[]
+setEmailAddresses(String[])
+getChild:ChildVO
+setChild(ChildVO) 
+getChildren:ChildVO[]
+setChildren(ChildVO[])

by simply writing FormToVOMapper.map(exampleForm, new ExampleVO()) or
VOToFormMapper.map(exampleVO, new ExampleForm()).

New features/bug fixes:
- Date format is now configurable via System properties
- fixed support for nested elements
- added support for Boolean (any new type can be added in less than 2
minutes)

Future enhancements:
- support for primitive types
- support for nested Collections

Documentation is extensive both on the HTML page and in the code. JUnit
tests are provided with the distribution.

It's still a 0.9beta release because I wanted to get the enhancements in
before the 1.0 but the code has been running with no problems in our project
for 4 months now.

Any feedback is appreciated :)

Andrej



RE: [Newbie] prob with html:options or html:select tag

2002-03-22 Thread Dave J Dandeneau

Make sure that you use the html:form taglib. Currently you are not
using it. It will get the bean for your page...

html:form action=handleprojectaddrequest.do
 Select request type
   html:select property=codtyp
 html:options name=projectaddrequestform collection=listTyp

property=id labelProperty=name/
   /html:select
/html:form

dave

-Original Message-
From: Slimane Zouggari [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 4:09 AM
To: [EMAIL PROTECTED]
Subject: [Newbie] prob with html:options or html:select tag


Hi,

I have a weird problem here (as always :).

I have the following code in my *.jsp file:
   form action=handleprojectaddrequest.do method=post
 Select request type
   html:select property=codtyp
 html:options name=projectaddrequestform collection=listTyp

property=id labelProperty=name/
   /html:select
   /form

so,
 codtyp  is a property of
HandleProjectAddRequestAction
 projectaddrequestform   is a session bean (it's actually loaded

into the session, because I did the check before in the jsp page)
 listTyp is a collection (ArrayList) of 
beans (type is one of mine named ElementSimple)
 id and name are two properties of the class
ElementSimple

My session bean is well loaded.
My ArrayList does contain values.

So why do I have an error when I try to execute the preceding code ?

Thanks for having read me so far :)

Friendly Regards,
Slimane

FYI, here's the exception thrown:

javax.servlet.ServletException: Cannot find bean under name 
org.apache.struts.taglib.html.BEAN
 at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:457)
 at 
org.apache.jsp.ProjectAddRequest$jsp._jspService(ProjectAddRequest$jsp.j
ava:378)
 at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.java:202)
 at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:679)
 at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:431)
 at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:355)
 at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav
a:970)
 at 
org.apache.struts.action.RequestProcessor.processActionForward(RequestPr
ocessor.java:404)
 at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
269)
 at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1099)
 at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:450)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:201)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234
4)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:164)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:170)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
 at 

PropertyUtils and NoClassDefFoundError WLS6.1, struts 1.0

2002-03-22 Thread Jouanny

Hello

I'm working on Weblogic 6.1 using Struts 1.0.

I'm making use of the method getPropertyDescriptor(Object object, String 
name_of_Field) of  the org/apache/struts/util/PropertyUtils class in order 
to get a java.beans.PropertyDescriptor.

This PropertyDescriptor is used in a class which implements Interface 
java.util.Comparator in order to sort a  java.util.ArrayList with 
Collections.sort(List aList, Comparator aComparator);

I get what is folowing :

Servlet failed with Exception
java.lang.NoClassDefFoundError: org/apache/struts/util/PropertyUtils

struts.jar, which contains the org/apache/struts/util/PropertyUtils class, 
is in Web-inf/lib.



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




RE: How to compare a notNull string with the nullString!

2002-03-22 Thread Jennings, Christofer J.

I came across this yesterday. Here's what I found. If a bean exists with a
null field, doing a logic:present on the field return true and comparing it
(e.g., using logic:equals) gets a NullPointerException.

If there is a custom tag to check for null values I'd love to know it.

I think this may be what Pitbull is after too, yes? Or do you really want to
campare with an empty string ?

,boz

-Original Message-
From: Dimitar Stavrakov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 2:52 PM
To: 'Struts Users Mailing List'
Subject: RE: How to compare a notNull string with the nullString!


Try using the present tag ex:

logic:present name=bean Name here  property=property name here
/

Regards, 
Dimitar

-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 9:25 AM
To: [EMAIL PROTECTED]
Subject: How to compare a notNull string with the nullString!

Subject: How to compare a notNull string with the nullString!
From: PitBull [EMAIL PROTECTED]
 ===
Hi all

i'ld like to compare
logic:notEqual name=content value=
and it not work. I tried to use the tag
logic:notEmpty name=content value= but this logic command is for the
struts 1.1 and i did not find the 1.1 version libraries.
Can any one help me?

Thanx

TT





--
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] prob with html:options or html:select tag

2002-03-22 Thread Slimane Zouggari

Hi,

thanks for your answer :)
Unfortunately, it still doesn't work the way I want it to. However I do 
have a more explicit error-message (see below).

So, when I do the following, it doesn't work:

1/
   html:form action=handleprojectaddrequest.do method=post 
scope=session
 Sélectionnez le type de requête
   html:select property=codtyp
 html:options name=projectaddrequestform collection=listTyp 
property=id labelProperty=name/
   /html:select
   /html:form

But when I do the following (however, I'm aware it's not the Struts way), 
it suddenly works:
2/
   html:form action=handleprojectaddrequest.do method=post 
scope=session
  Sélectionnez le type de requête
 html:select property=codtyp
   logic:iterate id=elt name=projectaddrequestform 
scope=session property=listTyp type=be.stluc.info.element.ElementSimple
 option value=bean:write name=elt 
property=id/bean:write name=elt property=name/
   /logic:iterate
 /html:select
   /html:form

What am I missing ? :(

Friendly Regards,
Slimane

PS: here's the error-message throwed using the 1st piece of code:

javax.servlet.ServletException: Cannot find bean under name listTyp
 at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457)
 at 
org.apache.jsp.ProjectAddRequest$jsp._jspService(ProjectAddRequest$jsp.java:631)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
 at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
 at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
 at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
 at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:970)
 at 
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:404)
 at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
 at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1099)
 at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:450)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 

RE: NewBie: How to implement Internationalization using Struts

2002-03-22 Thread Bharat Kundnani

refer the bean tag in the struts documentation, this would explain
internationalization.

-Original Message-
From: Vaddiyar, Raghuramudu [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 9:05 PM
To: Struts (E-mail)
Subject: NewBie: How to implement Internationalization using Struts


Hi All,

Can anybody explain me how to implement Internationalization 
using struts. Or cananybody tell me where i can find the documentation
for this...

thanks in advance..


Raghu
SIS

--
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: [Re: [Re: how to dynamically change form in a tag]]

2002-03-22 Thread Sudipta Sarkar

 No this also does not work.
Nicolas De Loof [EMAIL PROTECTED] wrote:
Does 
   html:form action=%= (String) request.getParameter(id) % 
work ?




The solution you said works.
but 
   html:form action=%= request.getParameter(id) % does not work
although
   % String id = (String)request.getParameter(id); %
   html:form action=%= id %
  works.
Is there anything that I am doing wrong in case 1.

Thanks
Sudipta  




--
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: Validating an ActionForm conditionnally

2002-03-22 Thread David Winterfeldt

If you have a form nested like this, it probably
doesn't have the servlet reference set on it.

ServletContext application =
getServlet().getServletContext();

Otherwise what you are doing should be fine.

David

--- Sobkowski, Andrej [EMAIL PROTECTED]
wrote:
 Hello,
 
 I've been using the Struts Validator (nightly build
 of November) with no
 problems for a few months (great work!).
 
 Now I need to call the validation method of a
 specific nested form based
 on a condition:
 
 ParentForm
 +useChild: boolean
 +getChildForm:ChildForm
 
 If useChild returns true, I want to call the
 validate(mapping, request) of
 ChildForm (ie the nested form).
 
 I thought that the validator only needed the
 mapping.getAttribute() (name
 of the ActionForm) to perform the validation so I
 tried with the following
 (ugly, I know):
 
 if (parentForm.useChild()) {
   ActionMapping newMap = new ActionMapping();
   newMap.setAttribute(childForm); 
   ActionErrors errors =
 parentForm.getChildForm().validate(newMap,
 request);
 }
 
 The configuration is extremely basic:
 - In struts-config.xml:
 form-bean  name=childForm
 type=com.company.ChildForm/
 - In validation.xml:
   form name=childForm
   ...
   /form
 
 I'm getting a NullPointerException in the
 validator's code.
 
 What am I doing wrong? Is this a good way to handle
 the problem (I doubt
 it...)? Any suggestions?
 
 Thanks.
 
 Andrej
 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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




RE: Form Question - Dynamic number of checkboxes

2002-03-22 Thread Gaulin . David

Look at the multibox tag.  Add an attribute to your form called product (I
think it has to be an a String array) and when you read.  It will populate
the array with the product selected.

David



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:32 AM
To: Struts Users Mailing List
Subject: Re: Form Question - Dynamic number of checkboxes




why don't you use indexed=true on the checkboxes and it will create indexed
names for them.  Have to use nightly build or new 1.1 beta.

Cheers,
Dave




Mattos, John [EMAIL PROTECTED] on 03/22/2002
11:13:16 AM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   '[EMAIL PROTECTED]'
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Form Question - Dynamic number of checkboxes



Hi there all

I'm generating a form that can have dynamic checkboxes depending on
information retrieved from my database. I basically retrieve a bunch or rows
and for each one, I want to create a checkbox.

Than, in the Action class handling the form submission, I plan to loop
through the checkboxes, and build an array of those that were selected, and
do something to them.

The problem is that I am tying to name the checkboxes for the ID of the
row... here is a JSP snippet:

logic:iterate id=sb
 type=com.indemand.indab.application.invoice.SuspendsTransaction
 collection=%=collectionName%
  TR
TD%=sb.getProductName()%nbsp;/TD
  TDhtml:checkbox property=%=sb.getCheckBoxName()% //TD
  /TR
/logic:iterate

!-- end of snippet --

the getCheckBoxName() comes from the database, and it correcponds to the
Product in this row, and it's dynamic.

Struts complains with the following error message

 No getter method for property 4363 of bean
org.apache.struts.taglib.html.BEAN

Essentially, I'm trying to create the following
input type=checkbox name=4363 and struts can't find get4363() in the
bean. No surprise there, I can't create getters for all the possibilities. I
just planned to loop through the submitted form fields to get the ids
checked.

Is there any way that Struts can not care that the setters don't exist?

Does this make sense?


John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014


--
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: Validating an ActionForm conditionnally

2002-03-22 Thread Sobkowski, Andrej

Thank you David, that was the problem... it now works just fine.

-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:19 AM
To: Struts Users Mailing List
Subject: Re: Validating an ActionForm conditionnally


If you have a form nested like this, it probably
doesn't have the servlet reference set on it.

ServletContext application =
getServlet().getServletContext();

Otherwise what you are doing should be fine.

David

--- Sobkowski, Andrej [EMAIL PROTECTED]
wrote:
 Hello,
 
 I've been using the Struts Validator (nightly build
 of November) with no
 problems for a few months (great work!).
 
 Now I need to call the validation method of a
 specific nested form based
 on a condition:
 
 ParentForm
 +useChild: boolean
 +getChildForm:ChildForm
 
 If useChild returns true, I want to call the
 validate(mapping, request) of
 ChildForm (ie the nested form).
 
 I thought that the validator only needed the
 mapping.getAttribute() (name
 of the ActionForm) to perform the validation so I
 tried with the following
 (ugly, I know):
 
 if (parentForm.useChild()) {
   ActionMapping newMap = new ActionMapping();
   newMap.setAttribute(childForm); 
   ActionErrors errors =
 parentForm.getChildForm().validate(newMap,
 request);
 }
 
 The configuration is extremely basic:
 - In struts-config.xml:
 form-bean  name=childForm
 type=com.company.ChildForm/
 - In validation.xml:
   form name=childForm
   ...
   /form
 
 I'm getting a NullPointerException in the
 validator's code.
 
 What am I doing wrong? Is this a good way to handle
 the problem (I doubt
 it...)? Any suggestions?
 
 Thanks.
 
 Andrej
 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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



Validating an ActionForm conditionnally

2002-03-22 Thread Sobkowski, Andrej

Hello,

I've been using the Struts Validator (nightly build of November) with no
problems for a few months (great work!).

Now I need to call the validation method of a specific nested form based
on a condition:

ParentForm
+useChild: boolean
+getChildForm:ChildForm

If useChild returns true, I want to call the validate(mapping, request) of
ChildForm (ie the nested form).

I thought that the validator only needed the mapping.getAttribute() (name
of the ActionForm) to perform the validation so I tried with the following
(ugly, I know):

if (parentForm.useChild()) {
ActionMapping newMap = new ActionMapping();
newMap.setAttribute(childForm); 
ActionErrors errors = parentForm.getChildForm().validate(newMap,
request);
}

The configuration is extremely basic:
- In struts-config.xml:
form-bean  name=childForm
type=com.company.ChildForm/
- In validation.xml:
  form name=childForm
...
  /form

I'm getting a NullPointerException in the validator's code.

What am I doing wrong? Is this a good way to handle the problem (I doubt
it...)? Any suggestions?

Thanks.

Andrej



RE [2]: Form Question - Dynamic number of checkboxes - Multibox ?

2002-03-22 Thread Mattos, John

Okay, so now I have the following:

logic:iterate id=sb
type=com.indemand.indab.application.invoice.SuspendsTransaction
collection=%=suspendsByProd%
  TR
TD
%=sb.getProductName()%nbsp;
 /TD
 TD
html:multibox property=assetId
value=%=sb.getCheckBoxName()%/

 /TD
  /TR 
/logic:iterate

and I have an int[] field on my bean called assetId

and it's telling me 

You must specify the value attribute or nested tag content

I thought that's what I was doing when I specified
value=%=sb.getCheckBoxName()% in the multiBox.

the getcheckboxName, by the way, returns the assetId, so I hope to end
upwith an array of these things in the bean

John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:42 AM
To: [EMAIL PROTECTED]
Subject: RE: Form Question - Dynamic number of checkboxes


Look at the multibox tag.  Add an attribute to your form called product (I
think it has to be an a String array) and when you read.  It will populate
the array with the product selected.

David



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:32 AM
To: Struts Users Mailing List
Subject: Re: Form Question - Dynamic number of checkboxes




why don't you use indexed=true on the checkboxes and it will create indexed
names for them.  Have to use nightly build or new 1.1 beta.

Cheers,
Dave




Mattos, John [EMAIL PROTECTED] on 03/22/2002
11:13:16 AM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   '[EMAIL PROTECTED]'
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Form Question - Dynamic number of checkboxes



Hi there all

I'm generating a form that can have dynamic checkboxes depending on
information retrieved from my database. I basically retrieve a bunch or rows
and for each one, I want to create a checkbox.

Than, in the Action class handling the form submission, I plan to loop
through the checkboxes, and build an array of those that were selected, and
do something to them.

The problem is that I am tying to name the checkboxes for the ID of the
row... here is a JSP snippet:

logic:iterate id=sb
 type=com.indemand.indab.application.invoice.SuspendsTransaction
 collection=%=collectionName%
  TR
TD%=sb.getProductName()%nbsp;/TD
  TDhtml:checkbox property=%=sb.getCheckBoxName()% //TD
  /TR
/logic:iterate

!-- end of snippet --

the getCheckBoxName() comes from the database, and it correcponds to the
Product in this row, and it's dynamic.

Struts complains with the following error message

 No getter method for property 4363 of bean
org.apache.struts.taglib.html.BEAN

Essentially, I'm trying to create the following
input type=checkbox name=4363 and struts can't find get4363() in the
bean. No surprise there, I can't create getters for all the possibilities. I
just planned to loop through the submitted form fields to get the ids
checked.

Is there any way that Struts can not care that the setters don't exist?

Does this make sense?


John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014


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




what is html:link equivelant

2002-03-22 Thread theron . kousek


This is tricker than I thought:

What is the equivelant of:

link href=http://localhost:8080/express/billing.css; rel=stylesheet

using the html:link tag?

I see they have the style property and the styleClass property but I am not
sure exactly how they are used.

thanks for any insight...

thanks,
Theron


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




Re: How to display a static file in a body tile

2002-03-22 Thread Cedric Dumoulin


  bean:include ... perform an internal dispatch to the specified application
component (or external URL) and make the response data from that request available as a
bean of type String.  (extract from doc).

  So you need to write the bean once you have got it :
  bean:write name=myHref /

  Hope this help,
 Cedric

Manuel Riche wrote:

 Thanks for your response, but i allways have a problem.
 I work whith the tiles's tutorial :

 myPage.jsp =

 %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %

 tiles:insert page=/themes/myPageLayout.jsp
   tiles:put name=title  value=--TEST-- /
   tiles:put name=header value=/themes/myHeader.jsp /
   tiles:put name=footer value=/themes/myFooter.jsp /
   tiles:put name=menu   value=/basic/menu.jsp /
   tiles:put name=body   value=/basic/myBody.jsp /
 /tiles:insert

 myBody.jsp =

 %@ taglib uri=/WEB-INF/tiles.tld   prefix=tiles %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %

 bean:include id=myHref href=http://localhost:8080/anOtherApp/data/myFic.html;
 /

 the result is

 [ServletException in:/basic/myBody.jsp] Exception reading resource
 http://localhost:8080/anOtherApp/data/myFic.html: java.net.ConnectException:
 Connection refused: no further information'

 I put myFic.html in /tutorial/data and i modify myBody.jsp =

 %@ taglib uri=/WEB-INF/tiles.tld   prefix=tiles %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %

 bean:include id=myPage href=http://localhost:8080/tutorial/data/f_ntcd.html; /

 i haven't error but the page isn't displayed
 i have the same result with
 bean:include id=myPage page=/data/myFic.html /

 I don't understand why ?

 Cedric Dumoulin a écrit :

You can use Struts bean:include href=anUrl / inside your body.
If you want to use a value coming from a Tile attribute, do something like :
 
tiles:useAttribute name=tileAttributeName /
bean:include href=%=tileAttributeName% /
 
Checks documentation for these tags for more :
  http://jakarta.apache.org/struts/userGuide/struts-bean.html#include
  http://www.lifl.fr/~dumoulin/tiles/doc/tilesTags.html#useAttribute
 
 Hope this help,
 
   Cedric
 
  Manuel Riche wrote:
 
   I use the taglib tiles and i want display a static file (an html file
   with pictures)  with an absolute URL in a body's tile.
   Is it possible and how can i do that ?
  
   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]




reg Forward action

2002-03-22 Thread Kumari, Ramana

Hi  

   I am trying to forward request from my Action class to a JSP (which is
configured for forward aciton in struts-config.xml).
   When i submit the page i see the action is fired but it is not forwarding
the request to specified JSP. since i could see no
   output on my browser . When i see my jsp_servlet folder the corresponding
class file for the forwarded JSP is not found.

   My app is running on Weblogic 6.1 server.

   I am wondering if someone could help me in figuring out of what is
happening !

   My Action Class follows

public final class ReferralLoginCompleteAction extends Action {
public ActionForward perform(ActionMapping mapping,
 ReferralForm form,
 HttpServletRequest request,
 HttpServletResponse response)
 throws IOException, ServletException {

System.out.println(in ReferralLoginCompleteAction perform() );
if (form instanceof ReferralForm) { 
  ReferralForm theForm = (ReferralForm) form;
  String dateReceived = theForm.getDateReceived();
  String workerName =  theForm.getWorkerName();
  String referralNumber =  theForm.getReferralNumber();

  HttpSession session = request.getSession();

  System.out.println(before forwarding + dateReceived
+workerName+referralNumber);

request.setAttribute(dateReceived, dateReceived);
request.setAttribute(referralNumber,
referralNumber);
request.setAttribute(workerName, workerName);

  return (mapping.findForward(referral));
}
else
return null;

}
}

  
  My struts-config.xml file is in \web-inf\conf directory.
  My classes are in \web-inf\classes  directory.

  My struts configuration follows

struts-config
  form-beans
form-bean name=referralForm
type=assets.icr.referral.model.ReferralForm/
  /form-beans

  action-mappings
actionpath=/loginComplete
 
type=assets.icr.referral.webController.ReferralLoginCompleteAction
   name=referralForm
   scope=request
forward name=referral path=/result.jsp /
/action
  /action-mappings
/struts-config

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




RE: RE [2]: Form Question - Dynamic number of checkboxes - Multibox ?

2002-03-22 Thread Gaulin . David

As far as I can see your code looks Ok.

From the code of the tag, this exception is throw when the value object is
null.  
Can your sb.getCheckBoxName return null?

That is all I can think of.


-Original Message-
From: Mattos, John [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 12:48 PM
To: 'Struts Users Mailing List'
Subject: RE [2]: Form Question - Dynamic number of checkboxes - Multibox
?


Okay, so now I have the following:

logic:iterate id=sb
type=com.indemand.indab.application.invoice.SuspendsTransaction
collection=%=suspendsByProd%
  TR
TD
%=sb.getProductName()%nbsp;
 /TD
 TD
html:multibox property=assetId
value=%=sb.getCheckBoxName()%/

 /TD
  /TR 
/logic:iterate

and I have an int[] field on my bean called assetId

and it's telling me 

You must specify the value attribute or nested tag content

I thought that's what I was doing when I specified
value=%=sb.getCheckBoxName()% in the multiBox.

the getcheckboxName, by the way, returns the assetId, so I hope to end
upwith an array of these things in the bean

John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:42 AM
To: [EMAIL PROTECTED]
Subject: RE: Form Question - Dynamic number of checkboxes


Look at the multibox tag.  Add an attribute to your form called product (I
think it has to be an a String array) and when you read.  It will populate
the array with the product selected.

David



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:32 AM
To: Struts Users Mailing List
Subject: Re: Form Question - Dynamic number of checkboxes




why don't you use indexed=true on the checkboxes and it will create indexed
names for them.  Have to use nightly build or new 1.1 beta.

Cheers,
Dave




Mattos, John [EMAIL PROTECTED] on 03/22/2002
11:13:16 AM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   '[EMAIL PROTECTED]'
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Form Question - Dynamic number of checkboxes



Hi there all

I'm generating a form that can have dynamic checkboxes depending on
information retrieved from my database. I basically retrieve a bunch or rows
and for each one, I want to create a checkbox.

Than, in the Action class handling the form submission, I plan to loop
through the checkboxes, and build an array of those that were selected, and
do something to them.

The problem is that I am tying to name the checkboxes for the ID of the
row... here is a JSP snippet:

logic:iterate id=sb
 type=com.indemand.indab.application.invoice.SuspendsTransaction
 collection=%=collectionName%
  TR
TD%=sb.getProductName()%nbsp;/TD
  TDhtml:checkbox property=%=sb.getCheckBoxName()% //TD
  /TR
/logic:iterate

!-- end of snippet --

the getCheckBoxName() comes from the database, and it correcponds to the
Product in this row, and it's dynamic.

Struts complains with the following error message

 No getter method for property 4363 of bean
org.apache.struts.taglib.html.BEAN

Essentially, I'm trying to create the following
input type=checkbox name=4363 and struts can't find get4363() in the
bean. No surprise there, I can't create getters for all the possibilities. I
just planned to loop through the submitted form fields to get the ids
checked.

Is there any way that Struts can not care that the setters don't exist?

Does this make sense?


John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014


--
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: what is html:link equivelant

2002-03-22 Thread Gernot Koller

Just leave your link href=http://localhost:8080/express/billing.css; 
rel=stylesheet
tag as it is !
The html:link tag is for generating a href=http://some.url.com;foobar/a  tags...

cheers,

gernot.


22.03.2002 18:56:34, [EMAIL PROTECTED] wrote:


This is tricker than I thought:

What is the equivelant of:

link href=http://localhost:8080/express/billing.css; rel=stylesheet

using the html:link tag?

I see they have the style property and the styleClass property but I am not
sure exactly how they are used.

thanks for any insight...

thanks,
Theron


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




Tiles question: Is it possible to insert a ComponentDefinition into a Tile context dynamically?

2002-03-22 Thread Chris Cool

Hi,

I have a tile that reads items from a PutList list and then inserts each
item into the current page. 

   struts_logic:iterate id=item name=itemList scope=page
type=String
   tiles:insert name='%=item%' flush=true/
   /struts_logic:iterate

When the items in the list are tiles defined in my tileDefinitions.xml file,
the tiles are inserted into my JSP correctly. However, I want to dynamically
create a tile definition and insert it into the page context. 

I am generating the ComponentDefinition in my tile controller and accessing
the itemList where I add the name of the dynamically generated definition:

  /* get the item list and insert new tile def into it */
  ArrayList itemList = (ArrayList)context.getAttribute(itemList);
  if (itemList != null) {

HashMap map = new HashMap();
map.put(name, newtarget);
map.put(link, newtarget.do);

ComponentDefinition newItem = 
new ComponentDefinition(new.item,
  /mytiles/simpleItem.jsp,
map);

DefinitionsUtil.setActionDefinition( request, breadCrumbItem );
itemList.add(new.item);
  }

In my tile, the itemList contains the new.item entry, but it does not
appear to find the ComponentDefinition I created.

Thanks for you help.

Chris

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




Re: what is html:link equivelant

2002-03-22 Thread Eddie Bush

I personally just use the old HTML tag.  I use a relative path though - eg.
/express/billing.css instead of http...billing.css.  ... works fine for me
=)

HTH,

Eddie

- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, March 22, 2002 11:56 AM
Subject: what is html:link equivelant



 This is tricker than I thought:

 What is the equivelant of:

 link href=http://localhost:8080/express/billing.css; rel=stylesheet

 using the html:link tag?

 I see they have the style property and the styleClass property but I am
not
 sure exactly how they are used.

 thanks for any insight...

 thanks,
 Theron


 --
 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: what is html:link equivelant

2002-03-22 Thread theron . kousek


thanks...

But for my next question though:

Why does the documentation:
http://jakarta.apache.org/struts/userGuide/struts-html.html#link

mention the style and styleId and the styleClass properties?

thanks,
Theron



   

Gernot Koller  

liquid@kabsiTo: Struts Users Mailing List 

.at [EMAIL PROTECTED]  

 cc:   

03/22/02 Subject: Re: what is html:link equivelant 

11:43 AM   

Please 

respond to 

Struts Users   

Mailing List   

   

   




Just leave your link href=http://localhost:8080/express/billing.css; rel
=stylesheet
tag as it is !
The html:link tag is for generating a href=http://some.url.com
foobar/a  tags...

cheers,

gernot.


22.03.2002 18:56:34, [EMAIL PROTECTED] wrote:


This is tricker than I thought:

What is the equivelant of:

link href=http://localhost:8080/express/billing.css; rel=stylesheet

using the html:link tag?

I see they have the style property and the styleClass property but I am
not
sure exactly how they are used.

thanks for any insight...

thanks,
Theron


--
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: what is html:link equivelant

2002-03-22 Thread Eddie Bush

Well, inside of your CSS, you make definitions for styles, correct?

If you begin a definition name with #, as in:

#myStyle { text-decoration: none }

then the 'name' (myStyle) is known as an 'Id'.  Therefore, if you wanted to
use this definition with a link, you would specify styleId='myStyle' in your
html:link/ tag.

Similarly, if you define a style as:

.myStyle { text-decoration: none }

then the name (myStyle again) is known as a class.  Therefore, if you wanted
to use this definition with a link, you would specify styleClass='myStyle'
in your html:link/ tag.

And, last but not least, there is the style attribute of the link tag.  This
is where you could hard-code a style for a given link (ie. not place it in
the css file but directly in the code).  By specifying
style='text-decoration: none' as an attribute to your link tag, you would
accomplish the same thing as the above two methods, but without the CSS
file.

HTH,

Eddie


- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, March 22, 2002 2:12 PM
Subject: Re: what is html:link equivelant



 thanks...

 But for my next question though:

 Why does the documentation:
 http://jakarta.apache.org/struts/userGuide/struts-html.html#link

 mention the style and styleId and the styleClass properties?

 thanks,
 Theron




 Gernot Koller
 liquid@kabsiTo: Struts Users Mailing List
 .at [EMAIL PROTECTED]
  cc:
 03/22/02 Subject: Re: what is
html:link equivelant
 11:43 AM
 Please
 respond to
 Struts Users
 Mailing List





 Just leave your link href=http://localhost:8080/express/billing.css; rel
 =stylesheet
 tag as it is !
 The html:link tag is for generating a href=http://some.url.com
 foobar/a  tags...

 cheers,

 gernot.


 22.03.2002 18:56:34, [EMAIL PROTECTED] wrote:

 
 This is tricker than I thought:
 
 What is the equivelant of:
 
 link href=http://localhost:8080/express/billing.css; rel=stylesheet
 
 using the html:link tag?
 
 I see they have the style property and the styleClass property but I am
 not
 sure exactly how they are used.
 
 thanks for any insight...
 
 thanks,
 Theron
 
 
 --
 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: what is html:link equivelant

2002-03-22 Thread Gernot Koller

Well, you can specify the style, id, and class attributes with these properties.

html:link href=http://some.url.com; style=color:green styleId=mylink 
styleClass=myStyle

should result in something like:

a href=http://some.url.com; style=color:green id=mylink class=myStyle

you're welcome,

gernot.

22.03.2002 21:12:21, [EMAIL PROTECTED] wrote:


thanks...

But for my next question though:

Why does the documentation:
http://jakarta.apache.org/struts/userGuide/struts-html.html#link

mention the style and styleId and the styleClass properties?

thanks,
Theron






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




reg Forward action

2002-03-22 Thread Kumari, Ramana


Hi  

   I am trying to forward request from my Action class to a JSP (which is
configured for forward aciton in struts-config.xml).
   When i submit the page i see the action is fired but it is not forwarding
the request to specified JSP. since i could see no
   output on my browser . When i see my jsp_servlet folder the corresponding
class file for the forwarded JSP is not found.

   My app is running on Weblogic 6.1 server.

   I am wondering if someone could help me in figuring out of what is
happening !

   My Action Class follows

public final class ReferralLoginCompleteAction extends Action {
public ActionForward perform(ActionMapping mapping,
 ReferralForm form,
 HttpServletRequest request,
 HttpServletResponse response)
 throws IOException, ServletException {

System.out.println(in ReferralLoginCompleteAction perform() );
if (form instanceof ReferralForm) { 
  ReferralForm theForm = (ReferralForm) form;
  String dateReceived = theForm.getDateReceived();
  String workerName =  theForm.getWorkerName();
  String referralNumber =  theForm.getReferralNumber();

  HttpSession session = request.getSession();

  System.out.println(before forwarding + dateReceived
+workerName+referralNumber);

request.setAttribute(dateReceived, dateReceived);
request.setAttribute(referralNumber,
referralNumber);
request.setAttribute(workerName, workerName);

  return (mapping.findForward(referral));
}
else
return null;

}
}

  
  My struts-config.xml file is in \web-inf\conf directory.
  My classes are in \web-inf\classes  directory.

  My struts configuration follows

struts-config
  form-beans
form-bean name=referralForm
type=assets.icr.referral.model.ReferralForm/
  /form-beans

  action-mappings
actionpath=/loginComplete
 
type=assets.icr.referral.webController.ReferralLoginCompleteAction
   name=referralForm
   scope=request
forward name=referral path=/result.jsp /
/action
  /action-mappings
/struts-config

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




reg Forward action

2002-03-22 Thread Kumari, Ramana


Hi  

   I am trying to forward request from my Action class to a JSP (which is
configured for forward aciton in struts-config.xml).
   When i submit the page i see the action is fired but it is not forwarding
the request to specified JSP. since i could see no
   output on my browser . When i see my jsp_servlet folder the corresponding
class file for the forwarded JSP is not found.

   My app is running on Weblogic 6.1 server.

   I am wondering if someone could help me in figuring out of what is
happening !

   My Action Class follows

public final class ReferralLoginCompleteAction extends Action {
public ActionForward perform(ActionMapping mapping,
 ReferralForm form,
 HttpServletRequest request,
 HttpServletResponse response)
 throws IOException, ServletException {

System.out.println(in ReferralLoginCompleteAction perform() );
if (form instanceof ReferralForm) { 
  ReferralForm theForm = (ReferralForm) form;
  String dateReceived = theForm.getDateReceived();
  String workerName =  theForm.getWorkerName();
  String referralNumber =  theForm.getReferralNumber();

  HttpSession session = request.getSession();

  System.out.println(before forwarding + dateReceived
+workerName+referralNumber);

request.setAttribute(dateReceived, dateReceived);
request.setAttribute(referralNumber,
referralNumber);
request.setAttribute(workerName, workerName);

  return (mapping.findForward(referral));
}
else
return null;

}
}

  
  My struts-config.xml file is in \web-inf\conf directory.
  My classes are in \web-inf\classes  directory.

  My struts configuration follows

struts-config
  form-beans
form-bean name=referralForm
type=assets.icr.referral.model.ReferralForm/
  /form-beans

  action-mappings
actionpath=/loginComplete
 
type=assets.icr.referral.webController.ReferralLoginCompleteAction
   name=referralForm
   scope=request
forward name=referral path=/result.jsp /
/action
  /action-mappings
/struts-config

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




Struts Fast Track: J2EE/JSP Framework: Practical Application with Database Access and Struts Extension

2002-03-22 Thread @Basebeans.com

Subject: Struts Fast Track: J2EE/JSP Framework: Practical Application with Database 
Access and Struts Extension
From: Nav Sandhu [EMAIL PROTECTED]
 ===
This might be of some help.

Struts Fast Track: J2EE/JSP Framework: Practical Application with Database
Access and Struts Extension

http://www.amazon.com/exec/obidos/ASIN/0971661901/qid%3D1016818089/sr%3D1-2/
ref%3Dsr%5F1%5F2/002-8523198-7363226




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




Need some quick help

2002-03-22 Thread Daniel Jaffa

I need a quick question answered.

I have the following code

 logic:iterate id=theLoop name=chargeHistory
  form action=/domesticviolence/charges/ChargeHistory.do name =
form%=i% /
   html:hidden property=chargeID name=theLoop/
   html:hidden property=caseID name=theLoop /
   tr
td width=20% align = centerfont size=-1
COLOR=#663300bean:write name=theLoop property=law //font/td
td width=20% align = centerfont size=-1
COLOR=#663300bean:write name=theLoop property=chargeDescription
//font/td
td width=5% align = centerfont size=-1
COLOR=#663300html:text property=countNumber name=theLoop size=3
//td
td width=5% align = centerfont size=-1
COLOR=#663300html:radio property=topCharge  name=theLoop value=Y
onclick=Javascript: switchAll(); //td
td width=5% align = centerfont size=-1
COLOR=#663300html:checkbox property=activeFlag  name=theLoop /
/font/td
td width=5% align = centerfont size=-1
COLOR=#663300html:submit property=updateInsert
Update/html:submit/font/td

   /tr
  /form
 /logic:iterate

what i would like to do is this


html:radio property=topCharge  name=theLoop value=Y
onclick=Javascript: switchAll(%=i%); /

but i am getting the following error. Any sugestions.


unclosed string literal probably occurred due to an error in
/charges/Chargehistory.jsp line 41:
td width=5% align = centerfont size=-1 COLOR=#663300
html:radio property=topCharge name=theLoop value=Y
onclick=Javascript: switchAll(%=i%); //td



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




Re: Need some quick help

2002-03-22 Thread Daniel Jaffa

Sorry for this message i solved it myself  fixed it using javascript.  Tried 
to do it one way failed and found a nother cool way of doing it ie.

onclick=javascript:showall(this.form.counter.value)

i also added
input type=hidden name=counter value=%=i++%

This did what i wanted to do

Daniel Jaffa.

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


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




Re: Nested tag tutorial

2002-03-22 Thread Perpetua Cysne

Hello,
How do I get this tutorial?
Cheers,
Perpetua
- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, March 19, 2002 5:52 PM
Subject: Nested tag tutorial



 The nested tag tutorial created by Arron Bates simply rocks!I was kind
 of intimidated by nested tags until I took a few hours out of my day to go
 thru parts 1 and 2 of the tutorial.   Thanks to the way it was well laid
 out AND interesting, nested tags are no longer intimidating.Thanks to
 Arron on this one for a job well done.Can't recommend it enough.Is
 his tutorial easy to follow?   I'm a total idiot/moron and his tutorial
 made it easy to learn nested tags.

 Thanks Arron.


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




Form Beans - Vector

2002-03-22 Thread Perpetua Cysne

Could someone please provide me with an example of Form Beans using a Vector
of objects? How do display it in a iterate tag?

The object is Passenger(firstName, lastName).

Thank you!

Perpetua


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




How do you update the database with last user logon information?

2002-03-22 Thread Alex Paransky

I seem to have a small problem.  It's quite simple.  All I want to do is
update the database when a user logs on.  However, with the Servlet
authentication mechanism, there does not appear to be a way to execute a
process or a method after user is authenticated.

I am just wondering if Struts or other libraries have somehow implemented
something that can help me in this area.  Or how do other people do this?

Thanks.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127


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