Re: Log4j with Struts

2003-12-05 Thread Rahul Mohan
hi nick,

thanks for responding...its the logger class thats missing ithink...
this is the exception i get when i try to view the page:

java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at app.LogonAction.perform(Unknown Source)


what could be the problem? please excuse my novice level...

thanks again..


- Original Message -
From: Nick Faiz [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, December 05, 2003 12:22 PM
Subject: RE: Log4j with Struts


 Well, what class can't it find, the Logger or the LogonAction.class ?

 I use it with Struts, without a hassle, on WebLogic 7.2.

 Nick

 -Original Message-
 From: Rahul Mohan [mailto:[EMAIL PROTECTED]
 Sent: Friday, 5 December 2003 5:46 PM
 To: struts
 Subject: Log4j with Struts

 Hi,

 has anybody tried using Log4j with struts? I tried the following code
 and its giving a ClassDefNotFoundException during runtime..

 this is inside the perform method:
  String str = new String(LogonAction.class.getName()); //LogonAction
is
 an Action Class
  logger = Logger.getLogger(str); //this line is throwing the
exception -
 apparently str is not having a classdef

 somebody please help me with this.or is there any other method to
 perform logging?

 i am using tomcat4.1 ...

 Thanks in advance.

 Rahul Mohan
 ~~~
 MasterCraft Group
 Tata Consultancy Services
 Tata Research Development and Design Center
 54B, Hadapsar Industrial Estate
 Pune - 411 013
 Phone: +91 4042333 or 4031122 Extn 2556
 +91 20 31544082 ( Mobile )
 Fax: +91 20 4042399
 email : [EMAIL PROTECTED]
 ~~~

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



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



RE: Log4j with Struts

2003-12-05 Thread Nick Faiz
Hey Rahul,
Ensure that log4j is included on the classpath of your server. 
If you get stuck, simply punch ` java.lang.NoClassDefFoundError:
org/apache/log4j/Logger' into a google search or read through the doc.s. 

Nick.

-Original Message-
From: Rahul Mohan [mailto:[EMAIL PROTECTED] 
Sent: Friday, 5 December 2003 5:57 PM
To: Struts Users Mailing List
Subject: Re: Log4j with Struts

hi nick,

thanks for responding...its the logger class thats missing ithink...
this is the exception i get when i try to view the page:

java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at app.LogonAction.perform(Unknown Source)


what could be the problem? please excuse my novice level...

thanks again..


- Original Message -
From: Nick Faiz [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, December 05, 2003 12:22 PM
Subject: RE: Log4j with Struts


 Well, what class can't it find, the Logger or the LogonAction.class ?

 I use it with Struts, without a hassle, on WebLogic 7.2.

 Nick

 -Original Message-
 From: Rahul Mohan [mailto:[EMAIL PROTECTED]
 Sent: Friday, 5 December 2003 5:46 PM
 To: struts
 Subject: Log4j with Struts

 Hi,

 has anybody tried using Log4j with struts? I tried the following code
 and its giving a ClassDefNotFoundException during runtime..

 this is inside the perform method:
  String str = new String(LogonAction.class.getName()); //LogonAction
is
 an Action Class
  logger = Logger.getLogger(str); //this line is throwing the
exception -
 apparently str is not having a classdef

 somebody please help me with this.or is there any other method to
 perform logging?

 i am using tomcat4.1 ...

 Thanks in advance.

 Rahul Mohan
 ~~~
 MasterCraft Group
 Tata Consultancy Services
 Tata Research Development and Design Center
 54B, Hadapsar Industrial Estate
 Pune - 411 013
 Phone: +91 4042333 or 4031122 Extn 2556
 +91 20 31544082 ( Mobile )
 Fax: +91 20 4042399
 email : [EMAIL PROTECTED]
 ~~~

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



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

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



tags for Map creation for the html:link tag

2003-12-05 Thread Jesse Alexander (KADA 11)
I have created two tga-prototypes that permit to construct a Map-object
that can be used to pass multiple link-parameters to the html:link tag.
Instead of having to use scriptlets to build the Map like:

. . .
% 
  java.util.HashMap linkParmMap = new java.util.HashMap();
linkParmMap.put(someName1, someValue1);
  pageContext.setAttribute(linkParmMap, linkParmMap);
%
. . .
logic:iterate name=records id=recordId
  % 
linkParmMap.put(someName2, recordsId);
  %
  html:link action=/drillDown name=linkParmMap. . .
/logic:iterate
. . .

I use this:

. . .
fjsstruts:linkMap id=myLinkMap
  fjsstruts:linkMapEntry name=myLinkMap entryKey=someName
bean:write name=someValue /
  /fjsstruts:linkMapEntry

  logic:iterate name=records id=recordId
fjsstruts:linkMapEntry name=myLinkMap entryKey=someName2
  bean:write name=recordId /
/fjsstruts:linkMapEntry
html:link action=/drillDown name=myLinkMap
  bean:write name=recordId /
/html:link
  /logic:iterate
/fjsstruts:linkMap
. . .

If there is interest I will finylize those tags and make them 
available.
I think I would slightly remodel them to make them similar to the 
JSTL tags...

regards
Alexander

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



from sathish

2003-12-05 Thread Sathish Babu K R
hi david

i get session using request.getSession()?y whats  in
it?tell me.

sathish

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



Re: FormBean error using Struts 1.1 and Tomcat 5

2003-12-05 Thread John Ferguson Smart
Forget it, guys, I called an exorsist and a vodoo-specialist, who told 
me to install Tomcat 5.0.16, and now it works.

John Ferguson Smart wrote:

Anyone got any ideas ?

John Ferguson Smart wrote:

Hi,
   I've run into a strange problem using Struts 1.1 with Tomcat 
5.0.14 . In a page that previously worked fine (of course...), I now 
get a JSP page displays the following message :
   [ServletException in:/admin/tiles/welcomeBody.jsp] Exception 
creating bean of class com.wakaleo.webcat.auth.LogonForm: {1}

The strange thing is, I'm not working on the user interface at the 
moment, so I don't see what could have changed. From what I can 
gather from the source code, Struts calls the 
RequestUtils.applicationInstance() method to instanciate an instance 
of the form bean, and then exploses (see the stack dump below). 
Tomcat (?) doesn't seem to be able to find some of the Struts classes 
(ActionForm, ActionErrors,...). I get the same thing with any other 
Struts forms, but, strangely enough, the bits of the site that don't 
use the html:form tag seem to work as excepted (they do use Tiles 
and JSTL, though). I also have no idea what on earth Tomcat is trying 
to compile

This one's got me stumped. Any ideas ?

STACK DUMP :

GRAVE: Error creating form bean of class 
com.wakaleo.webcat.auth.LogonForm
java.lang.Error: Unresolved compilation problems:
   The import org.apache.struts cannot be resolved
   The import org.apache.struts cannot be resolved
   The import org.apache.struts cannot be resolved
   The import org.apache.struts cannot be resolved
   ActionForm cannot be resolved or is not a valid superclass
   ActionErrors cannot be resolved (or is not a valid return 
type) for the
method validate
   ActionMapping cannot be resolved (or is not a valid type) for 
the argume
nt mapping of the method validate
   ActionErrors cannot be resolved or is not a type
   ActionErrors cannot be resolved or is not a type
   ActionError cannot be resolved or is not a type
   ActionError cannot be resolved or is not a type
   ActionError cannot be resolved or is not a type

   at com.wakaleo.webcat.auth.LogonForm.init(LogonForm.java:14)
   at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

   at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
   at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
   at 
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
   at java.lang.Class.newInstance0(Class.java:308)
   at java.lang.Class.newInstance(Class.java:261)
   at 
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.
java:231)
   at 
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.jav
a:837)
   at 
org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:552)
   at 
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:520)
   ...

TAGLIB WHICH EXPLOSES (works fine if I replace all this with 'HELLO 
WORLD') :

%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt %
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %
%@ taglib uri=http://jakarta.apache.org/taglibs/log-1.0; 
prefix=log %
%@ taglib tagdir=/WEB-INF/tags/util prefix=util %

%-- Login form --%
table class=infoFrame cellpadding=0 cellspacing=0 width=100%
%-- Box Heading --%
util:boxed_heading titleKey=admin.home.login.title /
tr class=infoList
 td colspan=3 align=center colspan=3
   table class=infoListFrame cellpadding=0 cellspacing=5 
width=100%
html:form action=/admin/LogonSubmit
 tr class=infoList
   td class=newsDetails
 fmt:message key=admin.home.login.description /
   /td
 /tr
 tr class=infoListth align=leftfmt:message 
key=admin.home.login.login //th/tr
 tr class=infoListtdhtml:text property=username 
//td/tr
 html:errors property=username /
 tr class=infoListth align=leftfmt:message 
key=admin.home.login.account //th/tr
 tr class=infoListtdhtml:text property=account //td/tr
 html:errors property=account /
 tr class=infoListth align=leftfmt:message 
key=admin.home.login.password //th/tr
 tr class=infoListtdhtml:password property=password 
//td/tr
 html:errors property=password /
 tr class=infoList
  td align=left width=116 height=23
  input value='submit'
border='0'
src='html:rewrite page=/admin/images/btn_ok.gif/'
name='submit'
type='image'
  /td
 /tr
 html:errors property=org.apache.struts.action.GLOBAL_MESSAGE /
/html:form
   /table
 /td
/tr
/table
%-- End Login form --%

FORM-BEAN in struts-config.xml :
   form-bean name=logonForm 

Server and Client side Validation at only once

2003-12-05 Thread VENKATESH GANGAL
Hi ,

I have requirement where I want to validate the form using javascript ( using Struts 
Validator Framework) . The form is like this.

Basically the view has two panes, left hand side a tabs A,B,C,D,E and right hand side 
will display the current page.say if you click tab A, you will see A.jsp.When I try to 
shift tab A to tab B , it has to validate both on the server side and client side 
befor going to tab B. 


Can anyone know how to about this ??

Thanks in advance...

Cheers...
Venkatesh Gangal

 



Re: Log4j with Struts

2003-12-05 Thread Pedro Salgado

Do you have the log4j jar on the WEB-INF/lib?
Do you have the log4j.properties on the WEB-INF/classes?

You have:
String str = new String(LogonAction.class.getName());
Logger logger = Logger.getLogger(str);

Shouldn't it be:
Logger logger = Logger.getLogger(LogonAction.class);


Pedro Salgado

On 05/12/2003 06:56, Rahul Mohan [EMAIL PROTECTED] wrote:

 hi nick,
 
 thanks for responding...its the logger class thats missing ithink...
 this is the exception i get when i try to view the page:
 
   java.lang.NoClassDefFoundError: org/apache/log4j/Logger
   at app.LogonAction.perform(Unknown Source)
   
 
 what could be the problem? please excuse my novice level...
 
 thanks again..
 
 
 - Original Message -
 From: Nick Faiz [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 12:22 PM
 Subject: RE: Log4j with Struts
 
 
 Well, what class can't it find, the Logger or the LogonAction.class ?
 
 I use it with Struts, without a hassle, on WebLogic 7.2.
 
 Nick
 
 -Original Message-
 From: Rahul Mohan [mailto:[EMAIL PROTECTED]
 Sent: Friday, 5 December 2003 5:46 PM
 To: struts
 Subject: Log4j with Struts
 
 Hi,
 
 has anybody tried using Log4j with struts? I tried the following code
 and its giving a ClassDefNotFoundException during runtime..
 
 this is inside the perform method:
  String str = new String(LogonAction.class.getName()); //LogonAction
 is
 an Action Class
  logger = Logger.getLogger(str); //this line is throwing the
 exception -
 apparently str is not having a classdef
 
 somebody please help me with this.or is there any other method to
 perform logging?
 
 i am using tomcat4.1 ...
 
 Thanks in advance.
 
 Rahul Mohan
 ~~~
 MasterCraft Group
 Tata Consultancy Services
 Tata Research Development and Design Center
 54B, Hadapsar Industrial Estate
 Pune - 411 013
 Phone: +91 4042333 or 4031122 Extn 2556
 +91 20 31544082 ( Mobile )
 Fax: +91 20 4042399
 email : [EMAIL PROTECTED]
 ~~~
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


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



JspParseException !!

2003-12-05 Thread EL AKARI Mehdi
Hi,
I recieve the following error and i don't know how to manage with it.
I'm actually using Oracle Jdevelopper 9.0.3.3


The error :

OracleJSP: oracle.jsp.parse.JspParseException: Ligne n° 2, %@ taglib 
uri=/WEB-INF/struts-bean-el.tld prefix=bean % 
Erreur : oracle.xml.parser.v2.XMLParseException ( /WEB-INF/jsp/Login.jsp ):
line #:10 column #:10 : Element taglib not complete, expected elements '[validator, 
listener, tag]'.


This is my JSP page : 

%@ page contentType=text/html;charset=windows-1252 %
%@ taglib uri=/WEB-INF/struts-bean-el.tld prefix=bean %
%@ taglib uri=/WEB-INF/login.tld prefix=login %
head
 link rel=stylesheet type=text/css media=screen href=styles/monitoring.css 
/link
 titlebean:message key=login.title //title
/head
body
 h1 align=center bean:message key=login.title //h1
 brbr
 table align=center  
 tr
 td
 div align=center 
 login:LoginComponent /
 /div
 /td
 /tr
 /table
/body


can anybody help?
thanks
Mehdi

Problems with modules

2003-12-05 Thread Lawrence Williams
Hi,

In my web.xml I have defined a default and named module as follows:


init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
/init-param

init-param
param-nameconfig/admin/param-name
param-value/WEB-INF/struts-config-admin.xml/param-value
/init-param

And

  welcome-file-list
welcome-fileindex.jsp/welcome-file
  /welcome-file-list

Where index.jsp is simply:

%@ taglib uri=/tags/struts-logic prefix=logic %
logic:forward name=logon/


However, it seems that when I request the absolute URL:

http://localhost/myApp/admin/ (i.e. index.jsp)

Struts seems to look in my default struts-config.xml rather than in the module 
specific struts-config-admin.xml

i.e. I get 

javax.servlet.jsp.JspException: Cannot find global ActionForward for name logon

The global-forward

global-forwards
forward
name=logon
path=/Logon.do/

Is defined in struts-config-admin.xml 

I can tell struts is looking in the wrong place because if a make a forward in thew 
default config struts resolves the forward

Any suggestions?

TIA 
Lawrence

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003
 

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



Re: Problems with modules

2003-12-05 Thread amans
Hi,
Make the following changes in ur web.xml to ur specific 
configuration file

  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameapplication/param-name
 
param-valuefr.improve.struts.webapp.layout.example.ApplicationResources/param-value
/init-param
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param



Thanks  Regards,

Aman Sheriff

---
MoTech Software Pvt. Ltd.
56, Mogra Village Lane,
Andheri East
Mumbai - 400 069

ph : 91 -22 - 821 4541 x 1412
fax :  91 -22 - 820 8757
---

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



[OT] Athentication filter doesn't filter actions

2003-12-05 Thread Arne Brutschy
Hi all,

I'm using an authentication filter to control the access to several .jsp 
pages. At the moment, I'm using the mapping

  filter-mapping
filter-nameauthenticationFilter/filter-name
url-pattern/*/url-pattern
  /filter-mapping
to do this. But this doesn't filter any access to the actions itself, 
like something.do. Do I have to include my filter manually in all 
actions (i.e. calling the doFilter method)?

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


Re: dynaActionForm,JSTL, and indexed properties

2003-12-05 Thread Charles GAY
my Arraylist has got a variable size.
so, i've put in the required action declarations(in struts-config.xml), the 
DynaActionForm in session scope, and it works!
thanks a lot richard for your help!
best regards,
charles.


 Message original  Sujet:  Re: dynaActionForm,JSTL, and indexed 
properties 
Date:  Thu, 4 Dec 2003 15:51:25 -0800 (PST) 
De:  Richard Yee [EMAIL PROTECTED] 
Pour:  Struts Users Mailing List [EMAIL PROTECTED], [EMAIL PROTECTED] 



Charles,
If you the size of the ArrayList is constant, you can
specify the form-property 'size' attribute and this
will fix your problem. Otherwise, you need to use
session scope to store the FormBean. The reason is
that Struts will not size the colRequetes ArrayList
when the form is submitted. If the form is in request
scope, it will already be sized for you.

-Richard

--- Charles GAY [EMAIL PROTECTED] wrote:
 hi all.
 i have in my DynaValidatorForm called entrantesForm,
 declared an ArrayList (called colRequetes) of 

 RequeteTO objects.
 form-property name=colRequetes
 type=java.util.ArrayList //form-bean
 
 in my jsp, i want to update some properties of
 RequeteTO, like 'typeRequete' with the
 html-tag(html-el taglib declared above) with the
 html:select tag.
 
   c:forEach 
 items=${entrantesForm.map.colRequetes}
 var=enregistrement varStatus=status
   c:set var=numero value=${status.index}
 scope=page /  
   tr
   tdhtml:radio property=id
 value=${enregistrement.id}  //td
 tdc:out value=${enregistrement.nomRequete}
 //td
 tdc:out value=${enregistrement.typeObjet}
 //td
   tdhtml:select size=1  name=colRequetes
 property=typeRequete indexed=true
 value=${enregistrement.typeRequete} 
 html:option value=Publique 
   c:if test=${enregistrement.typeRequete ==
 'Publique'}c:out 
 value=${enregistrement.typeRequete} //c:if
 /html:option
 html:option value=Privée 
   c:if test=${enregistrement.typeRequete ==
 'Privée'}c:out 
 value=${enregistrement.typeRequete} //c:if
 /html:option
   /html:select 
   /td
   /tr
   /c:forEach
 
 the jsp result is good.
 
 an extract of the html source producted by the jsp:
 form name=entrantesForm method=POST
 action=/comsis/entrantes/EntrantesRequete.do
 
 table
  tr
th/th
thNom de la requete/th
thType dossier/th  
thType requete/th
  /tr
  

  tr
 tdinput type=radio name=id value=13
 checked=checked //td
tds/td
tdentrante/td
 tdselect name=colRequetes[0].typeRequete
 size=1option value=Publique
 selected=selectedPublique/option
  option value=PrivéePrivée/option/select
 /td
  /tr
  

  tr
 tdinput type=radio name=id value=15 //td
tdgbgh,gh/td
tdentrante/td
 tdselect name=colRequetes[1].typeRequete
 size=1option value=PubliquePublique/option
  option value=Privée
 selected=selectedPrivée/option/select
 /td
  /tr
  
 /table
 
 
 but, when i submit the form,
 the server says that:
 StandardWrapperValve[action]: Servlet.service()
 pour la servlet action a généré une exception
 javax.servlet.ServletException: BeanUtils.populate
   at

org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
   at

org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
   at

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
   at

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
   at

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
   at

javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
   at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 
 
 - Root Cause -
 java.lang.IndexOutOfBoundsException: Index: 0, Size:
 0
   at
 java.util.ArrayList.RangeCheck(ArrayList.java:507)
   at java.util.ArrayList.get(ArrayList.java:324)
   at

org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:298)
   at

org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:474)
   at

org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:428)
   at

org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:770)
   at

org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
   at

org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
   at

org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
   at

org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
   at

org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
   at


iterate over one collection two times in a jsp

2003-12-05 Thread Ralf Rapude
Hi,
with a logic:iterate tag I run over a Collection:

logic:present name=%=Constants.SUBJECTS % scope=session 
  logic:iterate id=subjects name=%=Constants.SUBJECTS %
...output
  /logic:iterate
/logic:present

It works well but if I try to iterate over the same collection after
changing the id (but still in the same jsp):

logic:present name=%=Constants.SUBJECTS % scope=session 
  logic:iterate id=subjectsmain name=%=Constants.SUBJECTS %
... output
  /logic:iterate
/logic:present

I got this Exception - Cannot create iterator for this collection

It works if I put my collection under a different name in the
session-scope, but in my Opinion there must be a more proper way to
handle the problem.

Thanks a lot
Ralf




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



Stupid Bean tricks

2003-12-05 Thread Joe Hertz
Probably a very basic question, and infinitely dealableI hope.

I have a User object, which itself contains a Set of UserData objects
(the UserData is stuff that needs to be multilingual. Each instance has
the part of the user's data that would vary when presented in each
language).

So, in my JSP, how do I get to a specific instance of UserData? I can
write a getter than could take a locale or even just a language code,
but since it's not a numeric, the taglib chokes on it, or at least it
appears to



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



Re: [OT] Athentication filter doesn't filter actions

2003-12-05 Thread Ralf Rapude
Hi,
just repeat the filter-mapping tag like:

   filter-mapping
  filter-nameauthenticationFilter/filter-name
  url-pattern/*/url-pattern
/filter-mapping
 filter-mapping
  filter-nameauthenticationFilter/filter-name
  url-pattern/*.do/url-pattern
/filter-mapping

Ralf Rapude

__
WEB.DE FreeMail wird 5 Jahre jung! Feiern Sie mit uns und
nutzen Sie die neuen Funktionen http://f.web.de/features/?mc=021130


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



RE: [OT] Athentication filter doesn't filter actions

2003-12-05 Thread Joe Hertz
Why is this necessary?

Isn't /*.do a subset of /* ???

 -Original Message-
 From: Ralf Rapude [mailto:[EMAIL PROTECTED] 
 Sent: Friday, December 05, 2003 6:28 AM
 To: Struts Users Mailing List
 Subject: Re: [OT] Athentication filter doesn't filter actions
 
 
 Hi,
 just repeat the filter-mapping tag like:
 
filter-mapping
   filter-nameauthenticationFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping
  filter-mapping
   filter-nameauthenticationFilter/filter-name
   url-pattern/*.do/url-pattern
 /filter-mapping
 
 Ralf Rapude
 
 __
 
 WEB.DE FreeMail wird 5 Jahre jung! Feiern Sie mit uns und 
 nutzen Sie die neuen Funktionen http://f.web.de/features/?mc=021130
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 



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



RES: Subclassing ActionServlet

2003-12-05 Thread Felipe Nascimento
A simple way that I use do go:

Super Action class, like:
UserMustBeLoggedAction{
execute(attribs){
verify session stuff
if ok - myExecute(attribs);
else return ActionForward;
}

abstract myExecute(attribs);
}

NewAction extends UserMustBeLoggedAction{
myExecute(){
..
}
}

What do experts recommend??

Regards
Felipe

-Mensagem original-
De: Gopal Venkata Achi [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 4 de dezembro de 2003 18:55
Para: Struts Users Mailing List
Assunto: RE: Subclassing ActionServlet


Hi
I have come across a plug-in for Struts, that is called as SAIF (Struts
Action Invocation Framework), which enables us to write a pre-action and
post action methods.  You can use PreAction method for doing all the
session authentication, etc., I did not really use this, but the
features are available at : http://struts.sourceforge.net/saif/
http://struts.sourceforge.net/saif/ 
Any thoughts on this.
Regards,
Gopal
 
 
 
 

-Original Message- 
From: Fullam, Jonathan [mailto:[EMAIL PROTECTED] 
Sent: Thu 12/4/2003 1:07 PM 
To: 'Struts Users Mailing List' 
Cc: 
Subject: Subclassing ActionServlet



All,

I need to check the Session for an authenticated user before
most requests.
To do this I subclassed ActionServlet and only call
super(request, response)
upon verification that authenticated user is in the Session.

if (request.getRequestURI().endsWith(welcome.do) |
request.getRequestURI().endsWith(logon.do) |
request.getRequestURI().endsWith(html))
{
super.process(request, response);
}
   
   
else if (request.getSession().getAttribute(USER) == null)
{
//Forward to login page
response.sendRedirect(/welcome.do);
}

 I also know about the ability to subclass the RequestProcessor
and
providing my own implementation of the processPreprocess method
to
accomplish the same thing.

Does anybody know of any serious disadvantages or side effects
of
subclassing the ActionServlet class rather than the
RequestProcessor class.



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/2003
 


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



Re: Positional problem?

2003-12-05 Thread Bjørn T Johansen
Well, it kind of works... The focus is being set on the correct field,
but the browser doesn't scroll the page down to that field.
Is it something I am missing?


BTJ

On Thu, 2003-12-04 at 08:01, John Ferguson Smart wrote:
 When we submit the form, we call a Javascript function to set a hidden 
 field ('target_field'), which is where we want to go on the updated page :
 
 function submitForm(theForm, actionChoice, targetFieldName) {
 setValue(theForm.query, actionChoice);
 setValue(theForm.target_field, targetFieldName);
 theForm.submit();
 }
 
 
 Then, when we display the page, we use  another Javascript function to 
 scroll to the right place :
 
 function jumpField(oForm,ofield) {
 var i=0;
 var elementsLength = oForm.elements.length;
 
 for ( i=0 ; i = elementsLength-1 ; i++ ) {
 var fName = oForm.elements[i].name;
 if ( fName == ofield.name ) {
 oForm.elements[i+1].focus();
 break;
 } else {
 continue;
 }
 }
 }
 
 Cheers,
 
 Bjørn T Johansen wrote:
 
 Does anyone have any examples? My javascript knowledge isn't where it
 should be yet
 
 
 BTJ
 
 On Wed, 2003-12-03 at 14:49, John Smart wrote:
   
 
 We did something like that using an extra field (focus) to know where 
 you are and some javascript to place the focus at the right place when 
 the page is redisplayed.
 
 Bjørn T Johansen wrote:
 
 
 
 I have a number of jsp pages that are longer than one page and if I am
 at the bottom of a page and submit the page, I get back at the top of
 the page. Is there a way to get back, after the submit, to the place you
 were before the submit?
 
 
 Regards,
 
 BTJ
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
  
 
   
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
   
 


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



Re: RES: Subclassing ActionServlet

2003-12-05 Thread Guido Garca Bernardo
This way you can't extend other 'struts core actions' (Dispatch, Lookup...).

I think a better way may be:
- Using a filter (servlet 2.3) in order to pre and post process the request
- Extending RequestDispatcher
Regards,
Guido.
PD. I am not sure, but i think you can find a discussion about that in 
Struts in Action.

Felipe Nascimento wrote:

A simple way that I use do go:

Super Action class, like:
UserMustBeLoggedAction{
   execute(attribs){
   verify session stuff
   if ok - myExecute(attribs);
   else return ActionForward;
   }
   abstract myExecute(attribs);
}
NewAction extends UserMustBeLoggedAction{
   myExecute(){
   ..
   }
}
What do experts recommend??

Regards
Felipe
-Mensagem original-
De: Gopal Venkata Achi [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 4 de dezembro de 2003 18:55
Para: Struts Users Mailing List
Assunto: RE: Subclassing ActionServlet

Hi
I have come across a plug-in for Struts, that is called as SAIF (Struts
Action Invocation Framework), which enables us to write a pre-action and
post action methods.  You can use PreAction method for doing all the
session authentication, etc., I did not really use this, but the
features are available at : http://struts.sourceforge.net/saif/
http://struts.sourceforge.net/saif/ 
Any thoughts on this.
Regards,
Gopal





	-Original Message- 
	From: Fullam, Jonathan [mailto:[EMAIL PROTECTED] 
	Sent: Thu 12/4/2003 1:07 PM 
	To: 'Struts Users Mailing List' 
	Cc: 
	Subject: Subclassing ActionServlet
	
	

	All,
	
	I need to check the Session for an authenticated user before
most requests.
	To do this I subclassed ActionServlet and only call
super(request, response)
	upon verification that authenticated user is in the Session.
	
	if (request.getRequestURI().endsWith(welcome.do) |
	request.getRequestURI().endsWith(logon.do) |
	request.getRequestURI().endsWith(html))
	{
	super.process(request, response);
	}
	   
	   
	else if (request.getSession().getAttribute(USER) == null)
	{
	//Forward to login page
	response.sendRedirect(/welcome.do);
	}
	
	 I also know about the ability to subclass the RequestProcessor
and
	providing my own implementation of the processPreprocess method
to
	accomplish the same thing.
	
	Does anybody know of any serious disadvantages or side effects
of
	subclassing the ActionServlet class rather than the
RequestProcessor class.
	

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/2003


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

--
Guido Garca Bernardo - [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]
Tfn. +34 983 54 89 08
IT DEUSTO http://www.itdeusto.com

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


Re: [OT] Athentication filter doesn't filter actions

2003-12-05 Thread Arne Brutschy
Ralf Rapude wrote:
  url-pattern/*/url-pattern

I already tried that, but this doesn't work, it's not even a valid 
filter mapping (Tomcat gets an Parse Error exception on this mapping).

Any ideas?

Arne

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


Logic:iterateTag

2003-12-05 Thread Tommy Holm - TELMORE
Hi.
I have created a html td tr tag which can used neted inside the
struts iterate tag. The idea is that the tag will generate the
surrounding TR and TD tags, so that the data exposed from the iterate
tag can be properly displayed in several columns for each row. Now the
problem is that my tag requires to know the size of the collection which
the iterate tag is iterating over. What I have done in the doStartTag is
this: 
IterateTag parent = (IterateTag)findAncestorWithClass(this,
IterateTag.class);
if (parent == null) {
throw new JspTagException(This tag must run inside  +
org.apache.struts.taglib.logic.IterateTag);


}
else{
Collection temp = (Collection)parent.getCollection();
if(temp != null){
logger.debug(YEAH parent collection was not null and size is 
+
temp.size());
logger.debug(Lets check the ofset );
String offset = parent.getOffset();
if(offset != null){
logger.debug(Ofset is not null  +
value is  + offset);
logger.debug(So the actual size should be  + 
(temp.size()- Integer.parseInt(offset)));

}
}
else
logger.debug(Collection from parent tag was null);

No matter what the collection from the struts iterate tag is alway null,
which means it's a non initialized collection. What am I doing wrong ?
How do I gain acces to the size of the collection that the iterate tag
is iteration over ?
Any help is greatly appreciated.
Thanks
Cheers
Tommy Holm, System Developer
TELMORE A/S


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



RE: Problems with modules

2003-12-05 Thread Lawrence Williams
Aman,

Thanks for your reply,

However I cant see what you are suggesting here? Can you describe what you are 
meaning? - 

btw I dont use the application param because as far as im aware it is deprecated in 
favour of the message-resources element.

The crux of my problem is that my index.jsp (Welcome file) cant seem to resolve any of 
my module's global-forwards. However if I type a direct url to 
http://host/app/module/logon.do the module works fine.

Regards
Lawrence



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 05 December 2003 10:51
To: Struts Users Mailing List
Subject: Re: Problems with modules

Hi,
Make the following changes in ur web.xml to ur specific configuration file

  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameapplication/param-name
 
param-valuefr.improve.struts.webapp.layout.example.ApplicationResources/param-value
/init-param
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param



Thanks  Regards,

Aman Sheriff

---
MoTech Software Pvt. Ltd.
56, Mogra Village Lane,
Andheri East
Mumbai - 400 069

ph : 91 -22 - 821 4541 x 1412
fax :  91 -22 - 820 8757
---

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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003
 

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



Re: iterate over one collection two times in a jsp

2003-12-05 Thread Gurpreet Dhanoa
hi Ralf

I am facing the same trouble. If u come to know the answer Please let me
know as well
Thanks in Advance
Gary
- Original Message -
From: Ralf Rapude [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 05, 2003 4:49 PM
Subject: iterate over one collection two times in a jsp


 Hi,
 with a logic:iterate tag I run over a Collection:

 logic:present name=%=Constants.SUBJECTS % scope=session 
   logic:iterate id=subjects name=%=Constants.SUBJECTS %
 ...output
   /logic:iterate
 /logic:present

 It works well but if I try to iterate over the same collection after
 changing the id (but still in the same jsp):

 logic:present name=%=Constants.SUBJECTS % scope=session 
   logic:iterate id=subjectsmain name=%=Constants.SUBJECTS %
 ... output
   /logic:iterate
 /logic:present

 I got this Exception - Cannot create iterator for this collection

 It works if I put my collection under a different name in the
 session-scope, but in my Opinion there must be a more proper way to
 handle the problem.

 Thanks a lot
 Ralf




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



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



dynamic number of lines - Indexed properties ?

2003-12-05 Thread Caroline Lauferon

Hello! 
up to now I had used quite simple forms... and now I need some more complicated 
fields, and don't know where to start from

Here is what I want to do, with a simple example: I want to describe a family, with 
all its members: 
- to describe the family common properties: 
Last name: _ 
Address: ___

- to describe a member: (corresponding to an object FamilyMember having name and age 
properties, getters and setters)
Name: _   
Age: __

But i don't want to decide of the max number of the family. 
I see 2 options: 
* at first, display just one member's description fields. the user clicks on a button 
in order display a second member's description fields. (in javascript, it would be 
quicker, but it will work only if the actionform needn't be changed)
* have the two description fields and some kind of multiple select in which th 
description values are put using a button (like the swap tag of struts layout, but 
with no select on the left).
is it feasible with indexed properties (this model would be great, bu i don't what 
view to use to populate it :-( )

I hope what i need is clear ;-). Ask me if something is not.
Thanks
Caroline


RE: [OT] Athentication filter doesn't filter actions

2003-12-05 Thread Ralf Rapude
Why is this necessary?
Isn't /*.do a subset of /* ???

Oops. I'm sorry because it is the same (it might be better to think
before writing).

So you should better try this:

 filter-mapping
filter-nameCheckUser Authentication Filter/filter-name
!-- If Auth. is not required pages will be found in open --
url-pattern/jsps/closed/*/url-pattern 
  /filter-mapping
   filter-mapping
filter-nameCheckUser Authentication Filter/filter-name
!-- If Auth. is not required pages will be found in open --
servlet-nameaction/servlet-name
  ^^
  /filter-mapping


Regards
Ralf Rapude


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



Re: [OT] Athentication filter doesn't filter actions

2003-12-05 Thread Arne Brutschy
Ralf Rapude wrote:
So you should better try this:

 [..]

I tried this:
  filter-mapping
filter-nameauthenticationFilter/filter-name
url-pattern/*/url-pattern
  /filter-mapping
  filter-mapping
filter-nameauthenticationFilter/filter-name
servlet-nameaction/servlet-name
  /filter-mapping
But I still can access my actions without authenticating. I'm out of 
ideas. BTW, I'm using Tomcat 5 and 2.4 servlets..

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


RES: RES: Subclassing ActionServlet

2003-12-05 Thread Felipe Nascimento
Ok. Nice to know about filters.
I have found this SecurityFilter Projetct at sourceforge.
http://securityfilter.sourceforge.net/

Has anyone used it?

Tks 
Felipe

-Mensagem original-
De: Guido García Bernardo [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 5 de dezembro de 2003 08:42
Para: Struts Users Mailing List
Assunto: Re: RES: Subclassing ActionServlet


This way you can't extend other 'struts core actions' (Dispatch,
Lookup...).

I think a better way may be:
- Using a filter (servlet 2.3) in order to pre and post process the
request
- Extending RequestDispatcher

Regards,
Guido.

PD. I am not sure, but i think you can find a discussion about that in 
Struts in Action.

Felipe Nascimento wrote:

A simple way that I use do go:

Super Action class, like:
UserMustBeLoggedAction{
execute(attribs){
verify session stuff
if ok - myExecute(attribs);
else return ActionForward;
}

abstract myExecute(attribs);
}

NewAction extends UserMustBeLoggedAction{
myExecute(){
..
}
}

What do experts recommend??

Regards
Felipe

-Mensagem original-
De: Gopal Venkata Achi [mailto:[EMAIL PROTECTED]
Enviada em: quinta-feira, 4 de dezembro de 2003 18:55
Para: Struts Users Mailing List
Assunto: RE: Subclassing ActionServlet


Hi
I have come across a plug-in for Struts, that is called as SAIF (Struts

Action Invocation Framework), which enables us to write a pre-action 
and post action methods.  You can use PreAction method for doing all 
the session authentication, etc., I did not really use this, but the 
features are available at : http://struts.sourceforge.net/saif/
http://struts.sourceforge.net/saif/
Any thoughts on this.
Regards,
Gopal
 
 
 
 

   -Original Message- 
   From: Fullam, Jonathan [mailto:[EMAIL PROTECTED] 
   Sent: Thu 12/4/2003 1:07 PM 
   To: 'Struts Users Mailing List' 
   Cc: 
   Subject: Subclassing ActionServlet
   
   

   All,
   
   I need to check the Session for an authenticated user before
most 
requests.
   To do this I subclassed ActionServlet and only call
super(request, 
response)
   upon verification that authenticated user is in the Session.
   
   if (request.getRequestURI().endsWith(welcome.do) |
   request.getRequestURI().endsWith(logon.do) |
   request.getRequestURI().endsWith(html))
   {
   super.process(request, response);
   }
  
  
   else if (request.getSession().getAttribute(USER) == null)
   {
   //Forward to login page
   response.sendRedirect(/welcome.do);
   }
   
I also know about the ability to subclass the RequestProcessor
and
   providing my own implementation of the processPreprocess method
to
   accomplish the same thing.
   
   Does anybody know of any serious disadvantages or side effects
of
   subclassing the ActionServlet class rather than the
RequestProcessor class.
   


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/2003
 


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

  


-- 
Guido García Bernardo - [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]
Tfn. +34 983 54 89 08
IT DEUSTO http://www.itdeusto.com

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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/2003
 


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



Re: [OT] Athentication filter doesn't filter actions

2003-12-05 Thread Ralf Rapude
Hello Arne,

ABfilter-mapping
AB  filter-nameauthenticationFilter/filter-name
AB  url-pattern/*/url-pattern
AB/filter-mapping
ABfilter-mapping
AB  filter-nameauthenticationFilter/filter-name
AB  servlet-nameaction/servlet-name
AB/filter-mapping

I've checked it out before I post the solution and it works fine here.
(Tomcat 4.1.27).

AB ideas. BTW, I'm using Tomcat 5 and 2.4 servlets..
So maybe it is a problem of using Tomcat 5 (isn't it still beta?).
Maybe you should download a stable version for another attempt.

Regards
Ralf Rapude



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



session taglib

2003-12-05 Thread struts
In the Jsp i have:

sess:attribute name=userName/

witch prints the username. Now i want something like:

%

String username= sess:attribute name=userName/;

%

but that doesn't work. How can i assign the session variable to the String username ?

Thanks !




Re: session taglib

2003-12-05 Thread John Ferguson Smart
Try something like
   String username = session.getAttribute(username);
or
   String username = request.getSession(à.getAttribute(username);
struts wrote:

In the Jsp i have:

sess:attribute name=userName/

witch prints the username. Now i want something like:

%

String username= sess:attribute name=userName/;

%

but that doesn't work. How can i assign the session variable to the String username ?

Thanks !



 

--
John Ferguson Smart, PhD
Directeur de Projet
Département informatique Communicante 
AACOM
email : [EMAIL PROTECTED]

-
AACOM - L'Informatique communicante
120 rue du Marin Blanc - Z.I. des Paluds
13685 Aubagne Cedex
tel : 04.42.72.65.69 - fax : 04.42.72.65.68
Web : http://www.aacom.fr
-


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


Re: session taglib

2003-12-05 Thread Oron Gill Haus
You can use JSTL to accomplish this using the:

c:set var=username value=${username} /

You can also specify the scope within the value expression.  This is if
you wish to use JSTL.  Only a suggestion.  Hope it helps you out!

--- struts [EMAIL PROTECTED] wrote:
 In the Jsp i have:
 
 sess:attribute name=userName/
 
 witch prints the username. Now i want something like:
 
 %
 
 String username= sess:attribute name=userName/;
 
 %
 
 but that doesn't work. How can i assign the session variable to the
 String username ?
 
 Thanks !
 
 
 


=
Oron Gill Haus
IBM CSE Content Manager 8 - Sun Certified Programmer Java 2 1.4
office: (410) 539-3733 x1348
fax:(410) 837-9535 c/o Oron
e-mail: [EMAIL PROTECTED]
web: http://www.electronicscene.com/oron_haus

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



Re: session taglib

2003-12-05 Thread Gurpreet Dhanoa
hi

Try

String username=(String)session.getAttribute(username);

You have explicitly cast it into String as it is Serialized.


Regards
Gary

- Original Message -
From: John Ferguson Smart [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, December 05, 2003 7:13 PM
Subject: Re: session taglib


 Try something like
 String username = session.getAttribute(username);
 or
 String username = request.getSession(à.getAttribute(username);


 struts wrote:

 In the Jsp i have:
 
 sess:attribute name=userName/
 
 witch prints the username. Now i want something like:
 
 %
 
 String username= sess:attribute name=userName/;
 
 %
 
 but that doesn't work. How can i assign the session variable to the
String username ?
 
 Thanks !
 
 
 
 
 
 

 --
 John Ferguson Smart, PhD
 Directeur de Projet
 Département informatique Communicante
 AACOM
 email : [EMAIL PROTECTED]

 -
 AACOM - L'Informatique communicante
 120 rue du Marin Blanc - Z.I. des Paluds
 13685 Aubagne Cedex
 tel : 04.42.72.65.69 - fax : 04.42.72.65.68
 Web : http://www.aacom.fr
 -



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



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



using ApplicationResources in jsp...

2003-12-05 Thread AMIR-TAHMASSEB Marc



Hi,
i wonder to know if it's possible to use a property in 
ApplciationResources in the jsp code.

I want to do something like this :

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN"%@ page language="java" %%@ taglib 
uri="/WEB-INF/struts-html.tld" prefix="html" 
%%@ taglib uri="/WEB-INF/struts-bean.tld" 
prefix="bean" %%@ taglib uri="/WEB-INF/struts-template.tld" 
prefix="template" %%@ taglib 
uri="/WEB-INF/struts-logic.tld" prefix="logic" 
%% String title = 
title.from.ressources; // i don't know how to access it !
%
html:html
body
%=title%
/body
/html:html



--
Marc 
AMIR-TAHMASSEB
[EMAIL PROTECTED]

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

RE: using ApplicationResources in jsp...

2003-12-05 Thread Hunziker Dennis
why not try the following:
bean:message key=title.from.ressources/

-Original Message-
From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] 
Sent: Freitag, 5. Dezember 2003 15:01
To: [EMAIL PROTECTED]
Subject: using ApplicationResources in jsp...


Hi,
i wonder to know if it's possible to use a property in ApplciationResources
in  the jsp code.
 
I want to do something like this :
 
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
%@ page language=java %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-template.tld prefix=template %
%@ taglib uri=/WEB-INF/struts-logic.tldprefix=logic %
%
String title = title.from.ressources; // i don't know how to access it !
%
html:html
body
%=title%
/body
/html:html
 
 
 
--
Marc AMIR-TAHMASSEB
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 
 



RE: using ApplicationResources in jsp...

2003-12-05 Thread AMIR-TAHMASSEB Marc
because i need to get the value of my property inside a % ... %

 -Message d'origine-
 De : Hunziker Dennis [mailto:[EMAIL PROTECTED]
 Envoyé : vendredi 5 décembre 2003 15:03
 À : 'Struts Users Mailing List'
 Objet : RE: using ApplicationResources in jsp...
 
 
 why not try the following:
 bean:message key=title.from.ressources/
 
 -Original Message-
 From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] 
 Sent: Freitag, 5. Dezember 2003 15:01
 To: [EMAIL PROTECTED]
 Subject: using ApplicationResources in jsp...
 
 
 Hi,
 i wonder to know if it's possible to use a property in 
 ApplciationResources
 in  the jsp code.
  
 I want to do something like this :
  
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 %@ page language=java %
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 %@ taglib uri=/WEB-INF/struts-template.tld prefix=template %
 %@ taglib uri=/WEB-INF/struts-logic.tldprefix=logic %
 %
 String title = title.from.ressources; // i don't know how 
 to access it !
 %
 html:html
 body
 %=title%
 /body
 /html:html
  
  
  
 --
 Marc AMIR-TAHMASSEB
 [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 
  
 
 

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



RE: using ApplicationResources in jsp...

2003-12-05 Thread Jimmy Emmanual
why do you need to? why not just:

html:html
body
bean:message key=title.from.ressources/
/body
/html:html


-Original Message-
From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 9:07 AM
To: Struts Users Mailing List
Subject: RE: using ApplicationResources in jsp...


because i need to get the value of my property inside a % ... %

 -Message d'origine-
 De : Hunziker Dennis [mailto:[EMAIL PROTECTED]
 Envoyé : vendredi 5 décembre 2003 15:03
 À : 'Struts Users Mailing List'
 Objet : RE: using ApplicationResources in jsp...
 
 
 why not try the following:
 bean:message key=title.from.ressources/
 
 -Original Message-
 From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] 
 Sent: Freitag, 5. Dezember 2003 15:01
 To: [EMAIL PROTECTED]
 Subject: using ApplicationResources in jsp...
 
 
 Hi,
 i wonder to know if it's possible to use a property in 
 ApplciationResources
 in  the jsp code.
  
 I want to do something like this :
  
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 %@ page language=java %
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 %@ taglib uri=/WEB-INF/struts-template.tld prefix=template %
 %@ taglib uri=/WEB-INF/struts-logic.tldprefix=logic %
 %
 String title = title.from.ressources; // i don't know how 
 to access it !
 %
 html:html
 body
 %=title%
 /body
 /html:html
  
  
  
 --
 Marc AMIR-TAHMASSEB
 [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 
  
 
 

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

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



RE: using ApplicationResources in jsp...

2003-12-05 Thread AMIR-TAHMASSEB Marc
because i have to put it on an array of String and then i use this array in the code 
by a generic code.

 -Message d'origine-
 De : Jimmy Emmanual [mailto:[EMAIL PROTECTED]
 Envoyé : vendredi 5 décembre 2003 15:10
 À : 'Struts Users Mailing List'
 Objet : RE: using ApplicationResources in jsp...
 
 
 why do you need to? why not just:
 
 html:html
 body
 bean:message key=title.from.ressources/
 /body
 /html:html
 
 
 -Original Message-
 From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 9:07 AM
 To: Struts Users Mailing List
 Subject: RE: using ApplicationResources in jsp...
 
 
 because i need to get the value of my property inside a % ... %
 
  -Message d'origine-
  De : Hunziker Dennis [mailto:[EMAIL PROTECTED]
  Envoyé : vendredi 5 décembre 2003 15:03
  À : 'Struts Users Mailing List'
  Objet : RE: using ApplicationResources in jsp...
  
  
  why not try the following:
  bean:message key=title.from.ressources/
  
  -Original Message-
  From: AMIR-TAHMASSEB Marc 
 [mailto:[EMAIL PROTECTED] 
  Sent: Freitag, 5. Dezember 2003 15:01
  To: [EMAIL PROTECTED]
  Subject: using ApplicationResources in jsp...
  
  
  Hi,
  i wonder to know if it's possible to use a property in 
  ApplciationResources
  in  the jsp code.
   
  I want to do something like this :
   
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
  %@ page language=java %
  %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
  %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
  %@ taglib uri=/WEB-INF/struts-template.tld prefix=template %
  %@ taglib uri=/WEB-INF/struts-logic.tldprefix=logic %
  %
  String title = title.from.ressources; // i don't know how 
  to access it !
  %
  html:html
  body
  %=title%
  /body
  /html:html
   
   
   
  --
  Marc AMIR-TAHMASSEB
  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] 
   
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: Advantages of Struts?

2003-12-05 Thread John . Pitchko


BDY.RTF
Description: RTF file
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Help Migrating from WebTier to Struts

2003-12-05 Thread Jonathan . Crain
I am trying to migrate a 3ed party application from Macromedia's Jrun
platform to Tomcat.  The developers used a WebTier framework to create the
app.  I cannot reach the developers and was wondering if anyone has had
experience in switching form WebTier to Struts.  I am a complete newbie to
Tomcat and Struts and am in dire straits to get this to work.  

Error (for what it's worth):
An error occurred at line: 25 in the jsp file: /jsp/index.jsp

Generated servlet error:
[javac] Compiling 1 source file

C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\trac\jsp\index_jsp.java:7: package
webtier.view.controllers does not exist
import webtier.view.controllers.ViewController;
^
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\trac\jsp\index_jsp.java:62: cannot resolve
symbol
symbol  : class ViewController 
location: class org.apache.jsp.index_jsp
ViewController vc = new ViewController(request, response,
pageContext);
^

Any information would be greatly appreciated!  

Thanks in advance,

Jonathan Crain
City of Austin
Internet Operations
Communications and Technology Management Office




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



ibm ws portal V5 Struts Integration

2003-12-05 Thread Olaf Kittelmann
Hi,
has anyone tried the struts integration with portal V5?
the strutsportal folder under dev contains a StrutsBlank.war
that is a J2EE 1.2 webApp. If I want to use the StrutsPortlet
with 1.3-features like ejb2.0, what do I have to do?

regards,
Olaf


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



RE: using ApplicationResources in jsp...

2003-12-05 Thread AMIR-TAHMASSEB Marc
I want to do something like this in my jsp :

%
XXX.getRessources().getMessage(title.from.ressources);
%

but i don't know what to put instead of XXX. 

 -Message d'origine-
 De : Hunziker Dennis [mailto:[EMAIL PROTECTED]
 Envoyé : vendredi 5 décembre 2003 15:03
 À : 'Struts Users Mailing List'
 Objet : RE: using ApplicationResources in jsp...
 
 
 why not try the following:
 bean:message key=title.from.ressources/
 
 -Original Message-
 From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] 
 Sent: Freitag, 5. Dezember 2003 15:01
 To: [EMAIL PROTECTED]
 Subject: using ApplicationResources in jsp...
 
 
 Hi,
 i wonder to know if it's possible to use a property in 
 ApplciationResources
 in  the jsp code.
  
 I want to do something like this :
  
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 %@ page language=java %
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 %@ taglib uri=/WEB-INF/struts-template.tld prefix=template %
 %@ taglib uri=/WEB-INF/struts-logic.tldprefix=logic %
 %
 String title = title.from.ressources; // i don't know how 
 to access it !
 %
 html:html
 body
 %=title%
 /body
 /html:html
  
  
  
 --
 Marc AMIR-TAHMASSEB
 [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 
  
 
 

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



Re: using ApplicationResources in jsp...

2003-12-05 Thread Ralf Rapude
Hi Gary,
I am facing the same trouble. If u come to know the answer Please let me
know as well
Thanks in Advance
I havn't been able to find a solution yet though asking in several ngs
and forums.
I will post to the list if the problem is solved (but I still hope,
that someone of the listmembers knows which way to go :o).

Regards
Ralf Rapude


 Hi,
 with a logic:iterate tag I run over a Collection:

 logic:present name=%=Constants.SUBJECTS % scope=session 
 logic:iterate id=subjects name=%=Constants.SUBJECTS %
 ...output
 /logic:iterate
 /logic:present

 It works well but if I try to iterate over the same collection after
 changing the id (but still in the same jsp):

 logic:present name=%=Constants.SUBJECTS % scope=session 
 logic:iterate id=subjectsmain name=%=Constants.SUBJECTS %
 ... output
 /logic:iterate
 /logic:present

 I got this Exception - Cannot create iterator for this collection

 It works if I put my collection under a different name in the
 session-scope, but in my Opinion there must be a more proper way to
 handle the problem.

 Thanks a lot
 Ralf




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



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



RE: tags for Map creation for the html:link tag

2003-12-05 Thread Appel, Jeremy D
I for one have had to do this as well and this is quite a beneficial feature.  I would 
maybe suggest using JSTL instead of the STRUTS taglibs(logic, bean) since current 
opinion is to move to JSTL.

Jeremy

-Original Message-
From: Jesse Alexander (KADA 11)
[mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 3:46 AM
To: Mailing List [EMAIL PROTECTED]
Subject: tags for Map creation for the html:link tag


I have created two tga-prototypes that permit to construct a Map-object
that can be used to pass multiple link-parameters to the html:link tag.
Instead of having to use scriptlets to build the Map like:

. . .
% 
  java.util.HashMap linkParmMap = new java.util.HashMap();
linkParmMap.put(someName1, someValue1);
  pageContext.setAttribute(linkParmMap, linkParmMap);
%
. . .
logic:iterate name=records id=recordId
  % 
linkParmMap.put(someName2, recordsId);
  %
  html:link action=/drillDown name=linkParmMap. . .
/logic:iterate
. . .

I use this:

. . .
fjsstruts:linkMap id=myLinkMap
  fjsstruts:linkMapEntry name=myLinkMap entryKey=someName
bean:write name=someValue /
  /fjsstruts:linkMapEntry

  logic:iterate name=records id=recordId
fjsstruts:linkMapEntry name=myLinkMap entryKey=someName2
  bean:write name=recordId /
/fjsstruts:linkMapEntry
html:link action=/drillDown name=myLinkMap
  bean:write name=recordId /
/html:link
  /logic:iterate
/fjsstruts:linkMap
. . .

If there is interest I will finylize those tags and make them 
available.
I think I would slightly remodel them to make them similar to the 
JSTL tags...

regards
Alexander

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


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



Re: iterate over one collection two times in a jsp

2003-12-05 Thread James Mitchell
On Fri, 5 Dec 2003, Gurpreet Dhanoa wrote:

 hi Ralf

 I am facing the same trouble. If u come to know the answer Please let me
 know as well

Not sure if this helps, but I do this in several places on my app.
However, I use JSTL c:forEach tag.



 Thanks in Advance
 Gary
 - Original Message -
 From: Ralf Rapude [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 4:49 PM
 Subject: iterate over one collection two times in a jsp


  Hi,
  with a logic:iterate tag I run over a Collection:
 
  logic:present name=%=Constants.SUBJECTS % scope=session 
logic:iterate id=subjects name=%=Constants.SUBJECTS %
  ...output
/logic:iterate
  /logic:present
 
  It works well but if I try to iterate over the same collection after
  changing the id (but still in the same jsp):
 
  logic:present name=%=Constants.SUBJECTS % scope=session 
logic:iterate id=subjectsmain name=%=Constants.SUBJECTS %
  ... output
/logic:iterate
  /logic:present
 
  I got this Exception - Cannot create iterator for this collection
 
  It works if I put my collection under a different name in the
  session-scope, but in my Opinion there must be a more proper way to
  handle the problem.
 
  Thanks a lot
  Ralf
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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



-- 
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org


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



using Dyna Beans outside Struts, to process generic DTO-s in AP P layer

2003-12-05 Thread Voinea, Marina

Hi everybody, here is a question for the more experienced, and thank you for
the fact that you are there to advice the rest of us :

   In our APP layer we have to support calls from different client types
(HTTP requests, XML Rpc etc) and we decided to have our  internal data
object  (DTO) (used to carry data back and forth between components) with a
very generic structure :

   it will have inside lists of properties (property name/property type,
property value) or lists of lists where the objects types can be anytype,
including a custom defined class , for ex: USer object or Address
object.
   This gives a lot of flexibility but of course we lieve the world of safe
typing etc...
  We are looking at the DynaBean package (org.apache.commons.beanutils) to
help us manipulate  our generic DTO.(as opposed to in house developing a
library for that)
 I know there are some non believers as presented here : (dyna beans do
not support MAP -??) :
http://sixlegs.com/blog/java/death-to-dynabeans.html
 
http://www.gideonfamily.org/roller/comments/cmdln?anchor=are_dynabeans_not_j
avabeans

 Can anybody share their thoughs / experience about this package and relying
the framework of our APP layer DTO processing on this pacakage?
  Any advice from people who used it a lot? Does it make sens to use it
outside Struts? (they were intended for Dyna action forms mostly)...

 (Or is there the same discussion in the archives?)

  Thank you!

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



Re: Log4j with Struts

2003-12-05 Thread James Mitchell
On Fri, 5 Dec 2003, Pedro Salgado wrote:


 Do you have the log4j jar on the WEB-INF/lib?
 Do you have the log4j.properties on the WEB-INF/classes?

 You have:
 String str = new String(LogonAction.class.getName());
 Logger logger = Logger.getLogger(str);

 Shouldn't it be:
 Logger logger = Logger.getLogger(LogonAction.class);

Not sure if this was mentioned, but you should configure your app to use
commons-logging and then specify in its configuration to use Log4j.  That
way you can swap out logging implementations by simple configuration and
library addtions/removal (no recompile necessary).

What I do it this:
under /WEB-INF/classes
 - commons-logging.properties

#
# Directly selects log4j logging implementation class.
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory

# Maps to a Log4J category (uses log4j.properties)
#  note: org.apache.log4j.Category is deprecated in favor of
org.apache.log4j.Logger
#  and requests for a Category object will return a Logger object.
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategoryLog


 - log4j.properties

# Set the root logger level to DEBUG and its only appender to rolling

log4j.rootLogger=WARN, rolling, stdout

# Set the logger level for everything under org.apache to WARN
log4j.logger.org.apache=WARN
log4j.logger.com.company.framework.common.util.ApplicationConfig=WARN

# Set the logger level for org.apache.commons.validator.ValidatorUtil to
# FATAL because we know that errors will be generated here that we want to
# ignore (due to the fact that it is unknown whether a consumer is
personal
# or business and the validation.xml file is not set up to accomodate the
# differences)

log4j.logger.org.apache.commons.validator.ValidatorUtil=FATAL
log4j.logger.org.apache.log4j.TextLogger=INFO


# Configure the stdout appender to be a ConsoleAppender
log4j.appender.stdout=org.apache.log4j.ConsoleAppender

# Configure the stdout appender to use the PatternLayout
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Configure the conversion pattern for the stdout appender
log4j.appender.stdout.layout.ConversionPattern=%d - %p %c - %m%n

# Configure the rolling appender to be a RollingFileAppender
log4j.appender.rolling=org.apache.log4j.RollingFileAppender

# Configure the name of the log file for the rolling appender
log4j.appender.rolling.File=/path/to/log/files/ldapAdminWeb.log

# Configure the maximum size of the log file for the rolling appender
#log4j.appender.rolling.MaxFileSize=4MB

# Keep one backup file of the rolling appender
#log4j.appender.rolling.MaxBackupIndex=5

# Configure the rolling appender to use the PatternLayout
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout

# Configure the conversion pattern for the rolling appender
log4j.appender.rolling.layout.ConversionPattern=%d - %p %c - %m%n




then, in every classes that needs logging I do this:

public class SomeAction
extends MyBaseAction

private static Log log = LogFactory.getLog(SomeAction.class);
...


public ActionForward execute (..etc, etc...)
  throws Exception{

 ...
 ...
log.debug(Delete Item: + item.getId() +
 from Catalog: + cat.getId());
 ...
 ...
}



Hope that helps you (or anyone following this thread)




 Pedro Salgado

 On 05/12/2003 06:56, Rahul Mohan [EMAIL PROTECTED] wrote:

  hi nick,
 
  thanks for responding...its the logger class thats missing ithink...
  this is the exception i get when i try to view the page:
 
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at app.LogonAction.perform(Unknown Source)

 
  what could be the problem? please excuse my novice level...
 
  thanks again..
 
 
  - Original Message -
  From: Nick Faiz [EMAIL PROTECTED]
  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
  Sent: Friday, December 05, 2003 12:22 PM
  Subject: RE: Log4j with Struts
 
 
  Well, what class can't it find, the Logger or the LogonAction.class ?
 
  I use it with Struts, without a hassle, on WebLogic 7.2.
 
  Nick
 
  -Original Message-
  From: Rahul Mohan [mailto:[EMAIL PROTECTED]
  Sent: Friday, 5 December 2003 5:46 PM
  To: struts
  Subject: Log4j with Struts
 
  Hi,
 
  has anybody tried using Log4j with struts? I tried the following code
  and its giving a ClassDefNotFoundException during runtime..
 
  this is inside the perform method:
   String str = new String(LogonAction.class.getName()); //LogonAction
  is
  an Action Class
   logger = Logger.getLogger(str); //this line is throwing the
  exception -
  apparently str is not having a classdef
 
  somebody please help me with this.or is there any other method to
  perform logging?
 
  i am using tomcat4.1 ...
 
  Thanks in advance.
 
  Rahul Mohan
  ~~~
  MasterCraft Group
  Tata Consultancy Services
  Tata Research Development and Design Center
  54B, 

Re: session taglib

2003-12-05 Thread Scott Reisdorf
You are using a Tag Lib within a Scriptlet.
You can assign the variable using the scriplet by the following:
%
String username = (String) session.getAttribute(userName);
%
hope that helps.
-scott
At 02:40 PM 12/5/2003 +0100, you wrote:
In the Jsp i have:

sess:attribute name=userName/

witch prints the username. Now i want something like:

%

String username= sess:attribute name=userName/;

%

but that doesn't work. How can i assign the session variable to the String 
username ?

Thanks !


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


Re: ibm ws portal V5 Struts Integration

2003-12-05 Thread ian_d_stewart

According to our contacts, WebSphere 5.1 (scheduled to be released 12/19)
will offer full server-side support for J2EE 1.4.  Not sure if 5.0.2
supports J2EE 1.3 or not.


HTH,
Ian



   
 
  Olaf Kittelmann
 
  [EMAIL PROTECTED]To:   [EMAIL PROTECTED]

  eamwork.de   cc:
 
Subject:  ibm ws portal V5 Struts 
Integration   
  12/05/2003 09:10 
 
  AM   
 
  Please respond to
 
  Struts Users
 
  Mailing List
 
   
 
   
 




Hi,
has anyone tried the struts integration with portal V5?
the strutsportal folder under dev contains a StrutsBlank.war
that is a J2EE 1.2 webApp. If I want to use the StrutsPortlet
with 1.3-features like ejb2.0, what do I have to do?

regards,
Olaf


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







This transmission may contain information that is privileged, confidential and/or 
exempt from disclosure under applicable law. If you are not the intended recipient, 
you are hereby notified that any disclosure, copying, distribution, or use of the 
information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. 
If you received this transmission in error, please immediately contact the sender and 
destroy the material in its entirety, whether in electronic or hard copy format. Thank 
you.


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



RE: Problems with modules

2003-12-05 Thread James Mitchell
On Fri, 5 Dec 2003, Lawrence Williams wrote:

 Aman,

 Thanks for your reply,

 However I cant see what you are suggesting here? Can you describe what you are 
 meaning? -

 btw I don’t use the application param because as far as im aware it is deprecated 
 in favour of the message-resources element.

 The crux of my problem is that my index.jsp (Welcome file) cant seem to resolve any 
 of my module's global-forwards. However if I type a direct url to 
 http://host/app/module/logon.do the module works fine.


That's correct.

The container is serving up your index.jsp based on the uri from the
web.xml (*.do), so anything under /yourapp (or whatever your context is)
will be used by the container.

Bascially what that means is that Struts hasn't come into the picture
yet.

Unless you specifically swith to a different module (which requires a GET
or POST to something that goes through the ActionServlet (*.do in your
case), then the default configuration is used.

There is a simple module-switching example that I put together and is
available here:

http://sourceforge.net/projects/struts
 - go down to simple, and look for Module Switching Examples


 Regards
 Lawrence



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 05 December 2003 10:51
 To: Struts Users Mailing List
 Subject: Re: Problems with modules

 Hi,
 Make the following changes in ur web.xml to ur specific configuration file

   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
   param-nameapplication/param-name

 param-valuefr.improve.struts.webapp.layout.example.ApplicationResources/param-value
 /init-param
 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
 /init-param



 Thanks  Regards,

 Aman Sheriff

 ---
 MoTech Software Pvt. Ltd.
 56, Mogra Village Lane,
 Andheri East
 Mumbai - 400 069

 ph : 91 -22 - 821 4541 x 1412
 fax :  91 -22 - 820 8757
 ---

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


 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003


 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003


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



-- 
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org


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



Re: session taglib

2003-12-05 Thread James Mitchell
On Fri, 5 Dec 2003, struts wrote:

 In the Jsp i have:

 sess:attribute name=userName/

 witch prints the username. Now i want something like:

 %

 String username= sess:attribute name=userName/;

 %

 but that doesn't work. How can i assign the session variable to the String username ?

A scriptlet-free way to do this:

bean:define id=username
 sess:attribute name=userName/
/bean:define


 Thanks !




-- 
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org


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



Re: session taglib

2003-12-05 Thread Oron Gill Haus
James,

Isn't there a drive to move to JSTL vs. the Struts tag library?  I'm
curious as we've been pushing JSTL for this reason (though it rather
flexible).

Thank you.

--- James Mitchell [EMAIL PROTECTED] wrote:
 On Fri, 5 Dec 2003, struts wrote:
 
  In the Jsp i have:
 
  sess:attribute name=userName/
 
  witch prints the username. Now i want something like:
 
  %
 
  String username= sess:attribute name=userName/;
 
  %
 
  but that doesn't work. How can i assign the session variable to the
 String username ?
 
 A scriptlet-free way to do this:
 
 bean:define id=username
  sess:attribute name=userName/
 /bean:define
 
 
  Thanks !
 
 
 
 
 -- 
 James Mitchell
 Software Developer / Struts Evangelist
 http://www.struts-atlanta.org
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Oron Gill Haus
IBM CSE Content Manager 8 - Sun Certified Programmer Java 2 1.4
office: (410) 539-3733 x1348
fax:(410) 837-9535 c/o Oron
e-mail: [EMAIL PROTECTED]
web: http://www.electronicscene.com/oron_haus

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



Re: using ApplicationResources in jsp...

2003-12-05 Thread James Mitchell
On Fri, 5 Dec 2003, Ralf Rapude wrote:

 Hi Gary,
 I am facing the same trouble. If u come to know the answer Please let me
 know as well
 Thanks in Advance
 I havn't been able to find a solution yet though asking in several ngs
 and forums.
 I will post to the list if the problem is solved (but I still hope,
 that someone of the listmembers knows which way to go :o).

bean:define id=msg
 bean:message key=some.key.in.properties
/bean:define

...doing that will create a scripting variable that you can use in your
own scriptlet.

See the docs for more help (there is even a JSTL equivalent IN THE DOCS)



 Regards
 Ralf Rapude


  Hi,
  with a logic:iterate tag I run over a Collection:
 
  logic:present name=%=Constants.SUBJECTS % scope=session 
  logic:iterate id=subjects name=%=Constants.SUBJECTS %
  ...output
  /logic:iterate
  /logic:present
 
  It works well but if I try to iterate over the same collection after
  changing the id (but still in the same jsp):
 
  logic:present name=%=Constants.SUBJECTS % scope=session 
  logic:iterate id=subjectsmain name=%=Constants.SUBJECTS %
  ... output
  /logic:iterate
  /logic:present
 
  I got this Exception - Cannot create iterator for this collection
 
  It works if I put my collection under a different name in the
  session-scope, but in my Opinion there must be a more proper way to
  handle the problem.
 
  Thanks a lot
  Ralf
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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



-- 
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org


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



Re: session taglib

2003-12-05 Thread James Mitchell
On Fri, 5 Dec 2003, Oron Gill Haus wrote:

 James,

 Isn't there a drive to move to JSTL vs. the Struts tag library?  I'm
 curious as we've been pushing JSTL for this reason (though it rather
 flexible).

Yes, you are absolutely correct.  Use c:set if you can (given the min spec
requ).

Have a good one!


 Thank you.

 --- James Mitchell [EMAIL PROTECTED] wrote:
  On Fri, 5 Dec 2003, struts wrote:
 
   In the Jsp i have:
  
   sess:attribute name=userName/
  
   witch prints the username. Now i want something like:
  
   %
  
   String username= sess:attribute name=userName/;
  
   %
  
   but that doesn't work. How can i assign the session variable to the
  String username ?
 
  A scriptlet-free way to do this:
 
  bean:define id=username
   sess:attribute name=userName/
  /bean:define
 
  
   Thanks !
  
  
  
 
  --
  James Mitchell
  Software Developer / Struts Evangelist
  http://www.struts-atlanta.org
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 =
 Oron Gill Haus
 IBM CSE Content Manager 8 - Sun Certified Programmer Java 2 1.4
 office: (410) 539-3733 x1348
 fax:(410) 837-9535 c/o Oron
 e-mail: [EMAIL PROTECTED]
 web: http://www.electronicscene.com/oron_haus

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



-- 
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org


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



Re: Problems with modules

2003-12-05 Thread Henrique VIECILI
Hi,

I have the same situation, and it only changes the default configuration to
module specific one if the request is to an action wich is declared inside the
struts-module-config.xml.
So, i think you must have an index.jsp page in the default module that calls
some action in the admin module (/admin/*.do).

/index.jsp shall be:
jsp:forward page=/admin/logon.do /

and 'logon' shall be declared in struts-admin-config.xml as follows:
action path=/logon type=your.package.LogonAction
forward name=success path=logon.jsp /
/action

no changes in your web.xml

I hope it helps and works!!

Henrique Viecili



- Original Message -
From: Lawrence Williams [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 05, 2003 7:38 AM
Subject: Problems with modules


Hi,

In my web.xml I have defined a default and named module as follows:


init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
/init-param

init-param
param-nameconfig/admin/param-name
param-value/WEB-INF/struts-config-admin.xml/param-value
/init-param

And

  welcome-file-list
welcome-fileindex.jsp/welcome-file
  /welcome-file-list

Where index.jsp is simply:

%@ taglib uri=/tags/struts-logic prefix=logic %
logic:forward name=logon/


However, it seems that when I request the absolute URL:

http://localhost/myApp/admin/ (i.e. index.jsp)

Struts seems to look in my default struts-config.xml rather than in the module
specific struts-config-admin.xml

i.e. I get

javax.servlet.jsp.JspException: Cannot find global ActionForward for name logon

The global-forward

global-forwards
forward
name=logon
path=/Logon.do/

Is defined in struts-config-admin.xml

I can tell struts is looking in the wrong place because if a make a forward in
thew default config struts resolves the forward

Any suggestions?

TIA
Lawrence

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003


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


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



RT expr value in custom tag

2003-12-05 Thread Eric SCHULTZ
Good morning...

I'm trying to write my own custom tag library for Struts.  I've had some
initial success, but now I'm having some trouble.

I want to set an attribute value from the value of a bean get.  But what I
end up with in my tag is JSP code, not the value in the bean.

I.e.: 
v:properties template=inputmode parameter=%=
UserSessionBean.getInputMode() %/

is not translated.

How do I get the result of UserSessionBean.getInputMode() in my tag?  Do I
need to implement Expression Language?  Is there already a utility class
somewhere in Struts 1.1 that would evaluate something like
${UserSessionBean.inputMode} for me?

Thanks.

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



RE: Advantages of Struts?

2003-12-05 Thread McClung, Brian
The property file usage works well if you have an application that is
deployed once and doesn't change that often.  Also if there aren't several
apps running off the same domain.  In my case it doesn't work well because
there is so much information that changes, potentially from day to day, that
the property file rapidly becomes unmaintainable.  Plus, with the property
file solution I need to be involved in the creative designers process.  


Brian McClung
Senior Programmer
Belo Interactive
214-977-4083


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 8:16 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Advantages of Struts?


You can easily move your application specific configuration to other
configuration files (i.e. ApplicationResources or tiles-defs.xml). You
don't have to use the mapping.findForward() at all in your Actions,
instead, read these values from ApplicationResource files.

 Robert H. Tran wrote:
 
My point was not against configuration altogether, but rather against
the
current rigid and centralized configuration. There should be options.
If
there is configurations in a component, it should be self-contained by
the
component. It is no framework's business. If there is an api in
Struts,
 
 this
 
can be done nice and easy, as I said with Eclipse.

- Robert.

- Original Message - 
From: Martin Cooper [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 04, 2003 11:51 AM
Subject: Re: Disadvantages of Struts?




Robert H. Tran [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]


I think an action's mapping is a decision by the action itself. Like
I

said


earlier, when an application development finishes, that decision
will

become


static. At that point, when an Action's mapping changes, its code
will

have


to change too (unless the new mapping is kind of a synonym to the
old
mapping, which doesn't bear any shift in the semantics). As such,
there

is


almost no point in keeping the decision and the code separate (i.e.

making


the decision's configuration a loose end of the code). Or at least,
configuration shouldn't be the only way to add or modify an Action.

I disagree with this almost completely. If actions are written
properly,

you


should be able to reconfigure the application, to some extent at
least, by
changing the config alone and not touching the Java code. This is

immensely


useful when an app needs to be customised after the fact, and when
the
source code is not available (e.g. by a customer, in their own

environment).


--
Martin Cooper




Even though each Action's configuration may be small, the
configurations

for


all the Actions need to be kept track of and maintained (for
integrity).
That may be a significant but unnecessary side work. To view the

mappings,


there can be a tool to traverse the structure by api calls and
display

it.


That can be done after the fact and doesn't have to be before it. In
addition to that, when the decision (or configuration if any) goes
where

the


code lives, modularity increases.

IMHO,

- Robert.


- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 04, 2003 6:55 AM
Subject: RE: Disadvantages of Struts?


I have to disagree with you on the first point. I find that there is
just a small amount of necessary configuration required to build an
Action class (most of my Action configurations have about a half
dozen
lines, even less if there is no associated ActionForm). I'm not
really
sure what you mean by paddle back and forth between the code and
the
configuration, could you explain?

Thanks.

Robert H. Tran wrote:


I am not sure that is true. Struts seems to lack of an API. IMO,
there

are


more required configurations than necessary. Take Action for
example,

to


write an Action, one has to paddle back and forth between the code
and

the


configuration. It is like an executable having to configure each of

its


dlls. The visibility of the mappings is nice to have but the
mappings

can


be generated after the fact as in a debugging view. When the

application is


finished, configurations become static. But since configurations
are
required, they will be like loose ends of the application. Another

issue:


how can one componentize his code and deploy it in a self-contained

plug-in,


as with Eclipse? Please forgive my novice.

- Robert.

- Original Message - 
From: Rick Hightower [EMAIL PROTECTED]
To: 'Struts Developers List' [EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 6:24 PM
Subject: RE: Disadvantages of Struts?





Don't be silly. Struts is perfect.

-Original Message-
From: Robert H. Tran [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 2:10 PM
To: Struts Developers List
Subject: Disadvantages of Struts?

I just wonder if Struts comes with any significant drawback. I
mean

not in


terms of when to use Struts and when not to use 

RE: Server and Client side Validation at only once

2003-12-05 Thread Andy Schmidgall
You would have to submit the form when you change tabs. You can do this
with the form.submit() method. You might need to set a field in the form
to tell the submission result page where to redirect the user once the
submission is finished (i.e. send them to B.jsp if everything is ok)

-Andy

-Original Message-
From: VENKATESH GANGAL [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 05, 2003 3:02 AM
To: Struts Users Mailing List
Subject: Server and Client side Validation at only once


Hi ,

I have requirement where I want to validate the form using javascript (
using Struts Validator Framework) . The form is like this.

Basically the view has two panes, left hand side a tabs A,B,C,D,E and
right hand side will display the current page.say if you click tab A,
you will see A.jsp.When I try to shift tab A to tab B , it has to
validate both on the server side and client side befor going to tab B. 


Can anyone know how to about this ??

Thanks in advance...

Cheers...
Venkatesh Gangal

 


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



Re: using ApplicationResources in jsp...

2003-12-05 Thread EL AKARI Mehdi
try this:

bean:define id=var 
bean:message key=title.from.ressources /
/bean:define

% String var2 = var  %  !-- or what ever you want --

There is certainly a way of doing it with jstl, nut i don't know it now.

Mehdi

- Original Message - 
From: AMIR-TAHMASSEB Marc [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, December 05, 2003 2:15 PM
Subject: RE: using ApplicationResources in jsp...


because i have to put it on an array of String and then i use this array in
the code by a generic code.

 -Message d'origine-
 De : Jimmy Emmanual [mailto:[EMAIL PROTECTED]
 Envoyé : vendredi 5 décembre 2003 15:10
 À : 'Struts Users Mailing List'
 Objet : RE: using ApplicationResources in jsp...


 why do you need to? why not just:

 html:html
 body
 bean:message key=title.from.ressources/
 /body
 /html:html


 -Original Message-
 From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 9:07 AM
 To: Struts Users Mailing List
 Subject: RE: using ApplicationResources in jsp...


 because i need to get the value of my property inside a % ... %

  -Message d'origine-
  De : Hunziker Dennis [mailto:[EMAIL PROTECTED]
  Envoyé : vendredi 5 décembre 2003 15:03
  À : 'Struts Users Mailing List'
  Objet : RE: using ApplicationResources in jsp...
 
 
  why not try the following:
  bean:message key=title.from.ressources/
 
  -Original Message-
  From: AMIR-TAHMASSEB Marc
 [mailto:[EMAIL PROTECTED]
  Sent: Freitag, 5. Dezember 2003 15:01
  To: [EMAIL PROTECTED]
  Subject: using ApplicationResources in jsp...
 
 
  Hi,
  i wonder to know if it's possible to use a property in
  ApplciationResources
  in  the jsp code.
 
  I want to do something like this :
 
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
  %@ page language=java %
  %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
  %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
  %@ taglib uri=/WEB-INF/struts-template.tld prefix=template %
  %@ taglib uri=/WEB-INF/struts-logic.tldprefix=logic %
  %
  String title = title.from.ressources; // i don't know how
  to access it !
  %
  html:html
  body
  %=title%
  /body
  /html:html
 
 
 
  --
  Marc AMIR-TAHMASSEB
  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
 
 
 

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

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



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


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



[OT] iPlanet and Tibco question

2003-12-05 Thread Nail, Evan Burke
Sorry for the very off topic post, just got dumped onto another project and am not 
familiar very iPlanet or Tibco. 
 
I have a managed web server on iPlanet 4.1 that is using tibco. 
 
I get different behavior when I start the server from the command line verses the 
console. the command line works fine, the console gives me a Tibco error Native 
Implementation Required. 
 
On googling this, I found that some suggested this error might be caused by not having 
TIBRVJ.jar in the classpath. I was guess that when starting the server from the 
console it gets its classpath from a different place. 
 
This is my first look at iPlanet, I normally work on WL and since this is an old 
version of the server the docs on the net are sparse. Where is this classpath set when 
using a managed server? I've tried a few places and nothing helps. 
 
Anyone know where/what I might be able to change to get the behavior the same for both 
the command line/console?
 
 
Thanks in advance for any help and sorry for the OT on an already busy list,
 
Burke
 
 


**
This e-mail is the property of Enron Corp. and/or its relevant affiliate and may 
contain confidential and privileged material for the sole use of the intended 
recipient (s). Any review, use, distribution or disclosure by others is strictly 
prohibited. If you are not the intended recipient (or authorized to receive for the 
recipient), please contact the sender or reply to Enron Corp. at [EMAIL PROTECTED] and 
delete all copies of the message. This e-mail (and any attachments hereto) are not 
intended to be an offer (or an acceptance) and do not create or evidence a binding and 
enforceable contract between Enron Corp. (or any of its affiliates) and the intended 
recipient or any other party, and may not be relied on by anyone as the basis of a 
contract by estoppel or otherwise. Thank you. 
**



Re: Is it required to restart weblogic everytime after compiling ?? ? Need help Desperately .. :-(

2003-12-05 Thread Shakti
RE: Is it required to restart weblogic everytime after compiling ?? ? Need help 
Desperately .. :-(Hi Nick,
Sorry buddy i was busy with other stuff so cudn't reply to ur mails ... 
boss i am still facing the same problem .. i checked the logs even its showing that my 
new application is being activated .. but stil i can't see the changes getting 
reflected .. ?? but once i retstart i can see the changes .. :-(
My Questions are :
1 ) Is there any sort of cache that Weblogic maintains .. .. becuz of which new 
changed are not reflected .. 
2) if u can just mail me ur startweblogic.cmd file ... 

thanks buddy ..
Shakti

  - Original Message - 
  From: Nick Faiz 
  To: 'Shakti' ; Struts Users Mailing List ; [EMAIL PROTECTED] 
  Sent: Wednesday, December 03, 2003 1:12 PM
  Subject: RE: Is it required to restart weblogic everytime after compiling ?? ? Need 
help Desperately .. :-(


  Shakti,

  Ok. Find, in attachment, a log of my starting WebLogic 7.2 up with a 
cepts.war file present within my applications directory. A servlet called 
ProjectStartUp runs and queries a database, following the directions of my web.xml:

  servlet

  servlet-nameprojectStartUp/servlet-name

  servlet-classau.com.ce.cepts.project.ProjectStartUp/servlet-class

  load-on-startup3/load-on-startup

  /servlet

  Glance at the log, look for bold, and see the statement:

  au.com.ce.cepts.project.ProjectStartUp:57: done...: 9 

  Then, I go to my source, find the log statement at line 57 of the 
ProjectStartUp servlet and change it from:

  logger.debug(done...:  + ProjectFacade.getCache().size() +  \n\n\n\n);

  

  to:

  logger.debug(it's possible Shakti: :  + ProjectFacade.getCache().size() +  \n);

  Then I recompile and drop my new cepts.war into the applications directory. 
WebLogic, which is checking the app. dir each 3 seconds for a new deployment, notices 
this and takes the new binary and redeploys it instead of the old:

  03/12/2003 18:35:456 DEBUG ExecuteThread: '11' for queue: 'default' 
au.com.ce.cepts.project.P

  rojectStartUp:57: it's possible Shakti: : 9

  

  3/12/2003 18:35:37 Info Deployer 149033 activated application 
_appsdir_cepts_war on devServ

  er

  3/12/2003 18:35:37 Info Deployer 149074 Successfully completed deployment 
task: Activate ap

  plication _appsdir_cepts_war on devServer

  3/12/2003 18:35:38 Notice Application Poller 149404 Activate application 
_appsdir_cepts_war

   on devServer - Completed

  The above can is because I set the server in dev. mode.

  What problems are you having? Are you not seeing a new activation take place 
when you drop the new .war in?

  Nick

  P.S. Ignore the error relating to the Action servlet. It doesn't like being included 
in a .war, under my test configuration, and I've not had time to work out why yet. 
shakti_log.doc 




  -Original Message-
  From: Shakti [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, 3 December 2003 4:39 PM
  To: Struts Users Mailing List; [EMAIL PROTECTED]
  Subject: Re: Is it required to restart weblogic everytime after compiling ?? ? Need 
help Desperately .. :-(

  Hey Nick,

  I read thru all the docs and all the links that u gave me ..

  i cudn't find anything more that changing the boolean param , while i start

  the weblogic i am getting

  -Dweblogic.ProductionModeEnabled=false it means it is in development mode

  . wht are the other changes that i will have to make so that my java file

  changes are reflelected in the application after recompiling , without

  restarting the weblogic server .

  waiting for ur reply boss ...

  Thanks in advance ..

  shakti

  - Original Message -

  From: Nick Faiz [EMAIL PROTECTED]

  To: 'Struts Users Mailing List' [EMAIL PROTECTED]

  Sent: Wednesday, December 03, 2003 4:02 AM

  Subject: RE: Is it required to restart weblogic everytime after compiling ??

  ? Need help Desperately .. :-(



   Sure, but that isn't the same as redeploying a war or ear without

   restarting.

  

   Nick

  

   -Original Message-

   From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]

   Sent: Tuesday, 2 December 2003 6:14 PM

   To: Struts Users Mailing List

   Subject: RE: Is it required to restart weblogic everytime after compiling

  ??

   ? Need help Desperately .. :-(

  

   IMO Reloading is not possible for the classes in server classpath. eg

  beans

   and other utility classes used by servlets or ejbs.

  

  

  

  

   -Original Message-

   From: Nick Faiz [mailto:[EMAIL PROTECTED]

   Sent: Tuesday, December 02, 2003 12:31 PM

   To: 'Struts Users Mailing List'

   Subject: RE: Is it required to restart weblogic everytime after

   compiling ?? ? Need help Desperately .. :-(

   

   

   Check this out:

   http://e-docs.bea.com/wls/docs70/programming/deploying.html#1125125

   

   Also see,

   

Re: iterate over one collection two times in a jsp

2003-12-05 Thread Lynn Guy
I've done this and I just repeat exactly the same iterate with different output and it 
works fine.

Gurpreet Dhanoa [EMAIL PROTECTED] wrote:hi Ralf

I am facing the same trouble. If u come to know the answer Please let me
know as well
Thanks in Advance
Gary
- Original Message -
From: Ralf Rapude 
To: 
Sent: Friday, December 05, 2003 4:49 PM
Subject: iterate over one collection two times in a jsp


 Hi,
 with a logic:iterate tag I run over a Collection:

  scope=session
 
 ...output
 
 

 It works well but if I try to iterate over the same collection after
 changing the id (but still in the same jsp):

  scope=session
 
 ... output
 
 

 I got this Exception - Cannot create iterator for this collection

 It works if I put my collection under a different name in the
 session-scope, but in my Opinion there must be a more proper way to
 handle the problem.

 Thanks a lot
 Ralf




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



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



Re: Log4j with Struts

2003-12-05 Thread Joe Germuska
On Dec 5, 2003, at 9:03 AM, James Mitchell wrote:

Not sure if this was mentioned, but you should configure your app to 
use
commons-logging and then specify in its configuration to use Log4j.  
That
way you can swap out logging implementations by simple configuration 
and
library addtions/removal (no recompile necessary).

At the risk of quibbling, I would dispute this as a general rule; 
commons-logging is great for library packages which may be used in a 
variety of contexts, but unless you're writing a Struts application for 
general distribution and re-use, there's less justification for using 
commons-logging universally.

There's nothing wrong with using commons-logging in applications and 
other more finished products, but commons-logging is a greatly 
simplified API (for good reason) and in an application, you may find it 
worthwhile to commit to a more sophisticated logging tool (like Log4J) 
in order to have more powerful logging features.

Joe
--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
 We want beef in dessert if we can get it there.
  -- Betty Hogan, Director of New Product Development, National 
Cattlemen's Beef Association




smime.p7s
Description: S/MIME cryptographic signature


Re: dynamic number of lines - Indexed properties ?

2003-12-05 Thread Shantanu Deo
One way to deal with this is to break it up into two parts, in the first
step ask the user to specify the number of family members and then create
the record and appropriately display the correct number of family members.
Another would be to put a Add Member button on the page and essentially in
the corresponding action, increase the size of the collection that is
iterated over in the JSP to dynamically add (or even delete) family members.

HTH
Shantanu

- Original Message - 
From: Caroline Lauferon [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, December 05, 2003 7:30 AM
Subject: dynamic number of lines - Indexed properties ?



Hello!
up to now I had used quite simple forms... and now I need some more
complicated fields, and don't know where to start from

Here is what I want to do, with a simple example: I want to describe a
family, with all its members:
- to describe the family common properties:
Last name: _
Address: ___

- to describe a member: (corresponding to an object FamilyMember having name
and age properties, getters and setters)
Name: _
Age: __

But i don't want to decide of the max number of the family.
I see 2 options:
* at first, display just one member's description fields. the user clicks on
a button in order display a second member's description fields. (in
javascript, it would be quicker, but it will work only if the actionform
needn't be changed)
* have the two description fields and some kind of multiple select in which
th description values are put using a button (like the swap tag of struts
layout, but with no select on the left).
is it feasible with indexed properties (this model would be great, bu i
don't what view to use to populate it :-( )

I hope what i need is clear ;-). Ask me if something is not.
Thanks
Caroline



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



RE: Is it required to restart weblogic everytime after compiling ?? ? Need help Desperately .. :-(

2003-12-05 Thread Dalmia, Swati
check in weblogic.cmd file if the weblogic is set in production environment ?
I am using weblogic 8.1 and I never restart my server after compiling a single class 
file or jsp change
if changes in struts config file or web.xml then u might need to bounce your server


-Original Message-
From: Shakti [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 9:51 AM
To: Nick Faiz; Struts Users Mailing List
Subject: Re: Is it required to restart weblogic everytime after
compiling ?? ? Need help Desperately .. :-(


RE: Is it required to restart weblogic everytime after compiling ?? ? Need help 
Desperately .. :-(Hi Nick,
Sorry buddy i was busy with other stuff so cudn't reply to ur mails ... 
boss i am still facing the same problem .. i checked the logs even its showing that my 
new application is being activated .. but stil i can't see the changes getting 
reflected .. ?? but once i retstart i can see the changes .. :-(
My Questions are :
1 ) Is there any sort of cache that Weblogic maintains .. .. becuz of which new 
changed are not reflected .. 
2) if u can just mail me ur startweblogic.cmd file ... 

thanks buddy ..
Shakti

  - Original Message - 
  From: Nick Faiz 
  To: 'Shakti' ; Struts Users Mailing List ; [EMAIL PROTECTED] 
  Sent: Wednesday, December 03, 2003 1:12 PM
  Subject: RE: Is it required to restart weblogic everytime after compiling ?? ? Need 
help Desperately .. :-(


  Shakti,

  Ok. Find, in attachment, a log of my starting WebLogic 7.2 up with a 
cepts.war file present within my applications directory. A servlet called 
ProjectStartUp runs and queries a database, following the directions of my web.xml:

  servlet

  servlet-nameprojectStartUp/servlet-name

  servlet-classau.com.ce.cepts.project.ProjectStartUp/servlet-class

  load-on-startup3/load-on-startup

  /servlet

  Glance at the log, look for bold, and see the statement:

  au.com.ce.cepts.project.ProjectStartUp:57: done...: 9 

  Then, I go to my source, find the log statement at line 57 of the 
ProjectStartUp servlet and change it from:

  logger.debug(done...:  + ProjectFacade.getCache().size() +  \n\n\n\n);

  

  to:

  logger.debug(it's possible Shakti: :  + ProjectFacade.getCache().size() +  \n);

  Then I recompile and drop my new cepts.war into the applications directory. 
WebLogic, which is checking the app. dir each 3 seconds for a new deployment, notices 
this and takes the new binary and redeploys it instead of the old:

  03/12/2003 18:35:456 DEBUG ExecuteThread: '11' for queue: 'default' 
au.com.ce.cepts.project.P

  rojectStartUp:57: it's possible Shakti: : 9

  

  3/12/2003 18:35:37 Info Deployer 149033 activated application 
_appsdir_cepts_war on devServ

  er

  3/12/2003 18:35:37 Info Deployer 149074 Successfully completed deployment 
task: Activate ap

  plication _appsdir_cepts_war on devServer

  3/12/2003 18:35:38 Notice Application Poller 149404 Activate application 
_appsdir_cepts_war

   on devServer - Completed

  The above can is because I set the server in dev. mode.

  What problems are you having? Are you not seeing a new activation take place 
when you drop the new .war in?

  Nick

  P.S. Ignore the error relating to the Action servlet. It doesn't like being included 
in a .war, under my test configuration, and I've not had time to work out why yet. 
shakti_log.doc 




  -Original Message-
  From: Shakti [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, 3 December 2003 4:39 PM
  To: Struts Users Mailing List; [EMAIL PROTECTED]
  Subject: Re: Is it required to restart weblogic everytime after compiling ?? ? Need 
help Desperately .. :-(

  Hey Nick,

  I read thru all the docs and all the links that u gave me ..

  i cudn't find anything more that changing the boolean param , while i start

  the weblogic i am getting

  -Dweblogic.ProductionModeEnabled=false it means it is in development mode

  . wht are the other changes that i will have to make so that my java file

  changes are reflelected in the application after recompiling , without

  restarting the weblogic server .

  waiting for ur reply boss ...

  Thanks in advance ..

  shakti

  - Original Message -

  From: Nick Faiz [EMAIL PROTECTED]

  To: 'Struts Users Mailing List' [EMAIL PROTECTED]

  Sent: Wednesday, December 03, 2003 4:02 AM

  Subject: RE: Is it required to restart weblogic everytime after compiling ??

  ? Need help Desperately .. :-(



   Sure, but that isn't the same as redeploying a war or ear without

   restarting.

  

   Nick

  

   -Original Message-

   From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]

   Sent: Tuesday, 2 December 2003 6:14 PM

   To: Struts Users Mailing List

   Subject: RE: Is it required to restart weblogic everytime after compiling

  ??

   ? Need help Desperately .. :-(

  

   IMO Reloading is not possible 

Re: White Space

2003-12-05 Thread Martin Cooper
The catch with this is that you have to take account of things like pre
tags and JavaScript string literals. A naive whitespace collapsing filter is
likely to be a buggy one. ;-)

--
Martin Cooper


Wendy Smoak [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Derek Clarkson wrote:
 Is there anyway to automatically remove white space blank
 lines and tabs, but
 still leave normal lines in place so i can read the html if
 necessary. I.e.
 remove any occurances of the following:
 1. Empty lines including those just filled with tabs.
 2. All other tabs.
 3. Trailing white space.

Sounds like a job for a Filter!  You'd modify the HTML after it leaves
the Struts webapp, before it leaves the container on its way to the
browser.  I suspect someone has written this already...

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management




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



Re: Stupid Bean tricks

2003-12-05 Thread Martin Cooper
Why not convert your Set into a Map keyed by language / locale? Then
get(locale) is effectively provided for you.

--
Martin Cooper


Joe Hertz [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Probably a very basic question, and infinitely dealableI hope.

 I have a User object, which itself contains a Set of UserData objects
 (the UserData is stuff that needs to be multilingual. Each instance has
 the part of the user's data that would vary when presented in each
 language).

 So, in my JSP, how do I get to a specific instance of UserData? I can
 write a getter than could take a locale or even just a language code,
 but since it's not a numeric, the taglib chokes on it, or at least it
 appears to




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



[OT] Log4J raw vs. commons-logging/Log4J (was Re: Log4j with Struts)

2003-12-05 Thread Kirk Wylie
Joe Germuska wrote:
At the risk of quibbling, I would dispute this as a general rule; 
commons-logging is great for library packages which may be used in a 
variety of contexts, but unless you're writing a Struts application for 
general distribution and re-use, there's less justification for using 
commons-logging universally.

There's nothing wrong with using commons-logging in applications and 
other more finished products, but commons-logging is a greatly 
simplified API (for good reason) and in an application, you may find it 
worthwhile to commit to a more sophisticated logging tool (like Log4J) 
in order to have more powerful logging features.
Are you talking about the code-level interface (i.e. Log versus Logger) 
or in terms of the configuration? Because in our applications, we've 
taken the commons-logging approach, though we initialize the 
commons-logging package with a complex Log4J configuration, so that we 
have in essence the best of both worlds: we can use the 
behind-the-scenes power of Log4j, with the ability to swap out logging 
implementations that commons-logging gives us.

I've not seen much in the log-level API that's substantially different. 
What sorts of power are you talking about?

Kirk Wylie
M7 Corporation
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Validators

2003-12-05 Thread McRobb, John
Has anyone used validators with anything other than JavaBeans.
I am lookig to use it to validate paramaters on fn calls to remote systems.

Ta

John




Tesco Personal Finance Limited is a joint venture between The Royal Bank of Scotland 
plc and Tesco PLC. Tesco Personal Finance Limited is registered in Scotland No 173199. 
Registered Office: 42 St Andrew Square, Edinburgh EH2 2YE. 

This e-mail message is confidential and for use by the addressee only. If you are not 
the addressee, please return the message to the sender by replying to it and then 
delete the message from your computer. 

Internet e-mails are not necessarily secure. Tesco Personal Finance Limited does not 
accept responsibility for changes made to this message after it was sent.


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



RE: Is it required to restart weblogic everytime after compiling ?? ? Need help Desperately .. :-(

2003-12-05 Thread Shakti Simanta
Hi Swati,
 I have already checked it .. yaar . its in development mode .. can 
anyone help me out of this damn trouble .. i am getting pissed up working .. 
day and night .. and restarting this weblogic again and again each time i 
debug .. :-( ...
stil waiting for a solution ...
chao ..
Shakti...


From: Dalmia, Swati [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: Is it required to restart weblogic everytime after compiling 
?? ? Need help Desperately .. :-(
Date: Fri, 5 Dec 2003 10:14:18 -0700

check in weblogic.cmd file if the weblogic is set in production environment 
?
I am using weblogic 8.1 and I never restart my server after compiling a 
single class file or jsp change
if changes in struts config file or web.xml then u might need to bounce 
your server

-Original Message-
From: Shakti [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 9:51 AM
To: Nick Faiz; Struts Users Mailing List
Subject: Re: Is it required to restart weblogic everytime after
compiling ?? ? Need help Desperately .. :-(
RE: Is it required to restart weblogic everytime after compiling ?? ? Need 
help Desperately .. :-(Hi Nick,
Sorry buddy i was busy with other stuff so cudn't reply to ur 
mails ... boss i am still facing the same problem .. i checked the logs 
even its showing that my new application is being activated .. but stil i 
can't see the changes getting reflected .. ?? but once i retstart i can see 
the changes .. :-(
My Questions are :
1 ) Is there any sort of cache that Weblogic maintains .. .. becuz of which 
new changed are not reflected ..
2) if u can just mail me ur startweblogic.cmd file ...

thanks buddy ..
Shakti
  - Original Message -
  From: Nick Faiz
  To: 'Shakti' ; Struts Users Mailing List ; [EMAIL PROTECTED]
  Sent: Wednesday, December 03, 2003 1:12 PM
  Subject: RE: Is it required to restart weblogic everytime after 
compiling ?? ? Need help Desperately .. :-(

  Shakti,

  Ok. Find, in attachment, a log of my starting WebLogic 7.2 up 
with a cepts.war file present within my applications directory. A servlet 
called ProjectStartUp runs and queries a database, following the directions 
of my web.xml:

  servlet

  servlet-nameprojectStartUp/servlet-name

  
servlet-classau.com.ce.cepts.project.ProjectStartUp/servlet-class

  load-on-startup3/load-on-startup

  /servlet

  Glance at the log, look for bold, and see the statement:

  au.com.ce.cepts.project.ProjectStartUp:57: done...: 9

  Then, I go to my source, find the log statement at line 57 of 
the ProjectStartUp servlet and change it from:

  logger.debug(done...:  + ProjectFacade.getCache().size() +  
\n\n\n\n);



  to:

  logger.debug(it's possible Shakti: :  + 
ProjectFacade.getCache().size() +  \n);

  Then I recompile and drop my new cepts.war into the applications 
directory. WebLogic, which is checking the app. dir each 3 seconds for a 
new deployment, notices this and takes the new binary and redeploys it 
instead of the old:

  03/12/2003 18:35:456 DEBUG ExecuteThread: '11' for queue: 
'default' au.com.ce.cepts.project.P

  rojectStartUp:57: it's possible Shakti: : 9

  

  3/12/2003 18:35:37 Info Deployer 149033 activated application 
_appsdir_cepts_war on devServ

  er

  3/12/2003 18:35:37 Info Deployer 149074 Successfully completed 
deployment task: Activate ap

  plication _appsdir_cepts_war on devServer

  3/12/2003 18:35:38 Notice Application Poller 149404 Activate 
application _appsdir_cepts_war

   on devServer - Completed

  The above can is because I set the server in dev. mode.

  What problems are you having? Are you not seeing a new 
activation take place when you drop the new .war in?

  Nick

  P.S. Ignore the error relating to the Action servlet. It doesn't like 
being included in a .war, under my test configuration, and I've not had 
time to work out why yet. shakti_log.doc



  -Original Message-
  From: Shakti [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, 3 December 2003 4:39 PM
  To: Struts Users Mailing List; [EMAIL PROTECTED]
  Subject: Re: Is it required to restart weblogic everytime after 
compiling ?? ? Need help Desperately .. :-(

  Hey Nick,

  I read thru all the docs and all the links that u gave 
me ..

  i cudn't find anything more that changing the boolean param , while i 
start

  the weblogic i am getting

  -Dweblogic.ProductionModeEnabled=false it means it is in development 
mode

  . wht are the other changes that i will have to make so that my java 
file

  changes are reflelected in the application after recompiling , without

  restarting the weblogic server .

  waiting for ur reply boss ...

  Thanks in advance ..

  shakti

  - Original Message -

  From: Nick Faiz [EMAIL PROTECTED]

  To: 'Struts Users Mailing List' [EMAIL PROTECTED]

  

[OT] RE: Is it required to restart weblogic everytime after compiling ?? ? Need help Desperately .. :-(

2003-12-05 Thread Wendy Smoak
 and restarting this weblogic again and again 
 each time i debug .. :-( ...
 stil waiting for a solution ...

Trim your posts!  Not only was it off topic, it was 400 lines long.  How
about doing your development work on Tomcat, then deploying to Weblogic?
This has the added advantage of forcing you to write code that'll run on
any container.

-- 
Wendy Smoak


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



RE: Is it required to restart weblogic everytime after compiling ?? ? Need help Desperately .. :-(

2003-12-05 Thread Richard Yee
Shakti,
Have you consulted BEA support with this problem? It
seems to me that they or their website should provide
a direct response to your question.

Regards,

Richard

--- Shakti Simanta [EMAIL PROTECTED] wrote:
 
 Hi Swati,
   I have already checked it .. yaar . its in
 development mode .. can 
 anyone help me out of this damn trouble .. i am
 getting pissed up working .. 
 day and night .. and restarting this weblogic again
 and again each time i 
 debug .. :-( ...
 stil waiting for a solution ...
 chao ..
 Shakti...
 
 
 From: Dalmia, Swati [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List
 [EMAIL PROTECTED]
 To: Struts Users Mailing List
 [EMAIL PROTECTED]
 Subject: RE: Is it required to restart weblogic
 everytime after compiling 
 ?? ? Need help Desperately .. :-(
 Date: Fri, 5 Dec 2003 10:14:18 -0700
 
 check in weblogic.cmd file if the weblogic is set
 in production environment 
 ?
 I am using weblogic 8.1 and I never restart my
 server after compiling a 
 single class file or jsp change
 if changes in struts config file or web.xml then u
 might need to bounce 
 your server
 
 
 -Original Message-
 From: Shakti [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 9:51 AM
 To: Nick Faiz; Struts Users Mailing List
 Subject: Re: Is it required to restart weblogic
 everytime after
 compiling ?? ? Need help Desperately .. :-(
 
 
 RE: Is it required to restart weblogic everytime
 after compiling ?? ? Need 
 help Desperately .. :-(Hi Nick,
  Sorry buddy i was busy with other
 stuff so cudn't reply to ur 
 mails ... boss i am still facing the same problem
 .. i checked the logs 
 even its showing that my new application is being
 activated .. but stil i 
 can't see the changes getting reflected .. ?? but
 once i retstart i can see 
 the changes .. :-(
 My Questions are :
 1 ) Is there any sort of cache that Weblogic
 maintains .. .. becuz of which 
 new changed are not reflected ..
 2) if u can just mail me ur startweblogic.cmd file
 ...
 
 thanks buddy ..
 Shakti
 
- Original Message -
From: Nick Faiz
To: 'Shakti' ; Struts Users Mailing List ;
 [EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 1:12 PM
Subject: RE: Is it required to restart weblogic
 everytime after 
 compiling ?? ? Need help Desperately .. :-(
 
 
Shakti,
 
Ok. Find, in attachment, a log of my
 starting WebLogic 7.2 up 
 with a cepts.war file present within my
 applications directory. A servlet 
 called ProjectStartUp runs and queries a database,
 following the directions 
 of my web.xml:
 
servlet
 
   
 servlet-nameprojectStartUp/servlet-name
 


servlet-classau.com.ce.cepts.project.ProjectStartUp/servlet-class
 
load-on-startup3/load-on-startup
 
/servlet
 
Glance at the log, look for bold, and see the
 statement:
 
au.com.ce.cepts.project.ProjectStartUp:57:
 done...: 9
 
Then, I go to my source, find the log
 statement at line 57 of 
 the ProjectStartUp servlet and change it from:
 
logger.debug(done...:  +
 ProjectFacade.getCache().size() +  
 \n\n\n\n);
 
 
 
to:
 
logger.debug(it's possible Shakti: :  + 
 ProjectFacade.getCache().size() +  \n);
 
Then I recompile and drop my new
 cepts.war into the applications 
 directory. WebLogic, which is checking the app. dir
 each 3 seconds for a 
 new deployment, notices this and takes the new
 binary and redeploys it 
 instead of the old:
 
03/12/2003 18:35:456 DEBUG ExecuteThread:
 '11' for queue: 
 'default' au.com.ce.cepts.project.P
 
rojectStartUp:57: it's possible Shakti: : 9
 

 
3/12/2003 18:35:37 Info Deployer 149033
 activated application 
 _appsdir_cepts_war on devServ
 
er
 
3/12/2003 18:35:37 Info Deployer 149074
 Successfully completed 
 deployment task: Activate ap
 
plication _appsdir_cepts_war on devServer
 
3/12/2003 18:35:38 Notice Application
 Poller 149404 Activate 
 application _appsdir_cepts_war
 
 on devServer - Completed
 
The above can is because I set the
 server in dev. mode.
 
What problems are you having? Are you
 not seeing a new 
 activation take place when you drop the new .war
 in?
 
Nick
 
P.S. Ignore the error relating to the Action
 servlet. It doesn't like 
 being included in a .war, under my test
 configuration, and I've not had 
 time to work out why yet. shakti_log.doc
 
 
 
 
-Original Message-
From: Shakti [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 3 December 2003 4:39 PM
To: Struts Users Mailing List;
 [EMAIL PROTECTED]
Subject: Re: Is it required to restart weblogic
 everytime after 
 compiling ?? ? Need help Desperately .. :-(
 
Hey Nick,
 
I read thru all the docs and all
 the links that u gave 
 me ..
 
i cudn't find anything more that changing the
 boolean param , while i 
 start
 
the weblogic i am getting
 
  

dynamic generation of select fields problem

2003-12-05 Thread Ruben Pardo
Hi everybody!

  This is my problem, i've to generate a variable
quantity of select fields. The solution i thougth was
a map backed form, that dynamically generate the names
of this fields with JSTL, something like this:

c:forEach  items=${sessionScope} var =farmacia
varStatus=st
 .
  html-el:select property=value(campos${st.count})
   ..
   ..
  /html:select


/c:forEach 

but qhen i try to run this, i've got an
NullPointerException saying me that no getter for
property value(campo1) ...

I don't know what could be the problem, or how i can
solve in other way.

Thanks a lot and any type of help could be aprecciated.

___
Yahoo! Sorteos
¡Ya puedes comprar Lotería de Navidad!
http://yahoo.ventura24.es/

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



RE: Stupid Bean tricks

2003-12-05 Thread Joe Hertz
I considered that, but (and I'm an utter newbie so I apologize here)

How would I refer to an element of UserData in a bean:message tag?

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Martin Cooper
 Sent: Friday, December 05, 2003 12:32 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Stupid Bean tricks
 
 
 Why not convert your Set into a Map keyed by language / locale? Then
 get(locale) is effectively provided for you.
 
 --
 Martin Cooper
 
 
 Joe Hertz [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
oss.local...
 Probably a very basic question, and infinitely dealableI hope.

 I have a User object, which itself contains a Set of UserData objects 
 (the UserData is stuff that needs to be multilingual. Each instance 
 has the part of the user's data that would vary when presented in each

 language).

 So, in my JSP, how do I get to a specific instance of UserData? I can 
 write a getter than could take a locale or even just a language code, 
 but since it's not a numeric, the taglib chokes on it, or at least it 
 appears to




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





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



Re: dynamic generation of select fields problem

2003-12-05 Thread [EMAIL PROTECTED]
Ruben,

I guess that you can't access a property using a sintax of function in:

html-el:select property=value(campos${st.count})

Maybe you need to use the sintax of array:

html-el:select property=value[campos${st.count}]

Certo?

Paulo Marcio

- Original Message - 
From: Ruben Pardo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 05, 2003 4:07 PM
Subject: dynamic generation of select fields problem


 Hi everybody!
 
   This is my problem, i've to generate a variable
 quantity of select fields. The solution i thougth was
 a map backed form, that dynamically generate the names
 of this fields with JSTL, something like this:
 
 c:forEach  items=${sessionScope} var =farmacia
 varStatus=st
  .
   html-el:select property=value(campos${st.count})
..
..
   /html:select
 
 
 /c:forEach 
 
 but qhen i try to run this, i've got an
 NullPointerException saying me that no getter for
 property value(campo1) ...
 
 I don't know what could be the problem, or how i can
 solve in other way.
 
 Thanks a lot and any type of help could be aprecciated.

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



.do's come back as 404 file not found

2003-12-05 Thread Dhaliwal, Pritpal (HQP)
Hello Everyone,

I am using: Struts and Resin 2.1.11

All of sudden my index.do, or any other .do is not being recognized by resin
anymore. 

It was working fine two days ago, all of sudden I am getting 404s


In the logs I see that its picking up the correct struts-config.xml and it
is that ActionServlet runs its init function..

So has anyone seen it before, is it generally app server problem or I could
have messed something up in struts also?

TIA,
Paul Dhaliwal


[OT] IE problem. stumped

2003-12-05 Thread Prabhat Kumar (IT)
I'm wondering if anyone has come across this.

We have this struts application that is about to be deployed and it works fine, shows 
all the HTML pages as expected in IE 6.0.

As part of our final tests, we began testing the application on IE 5.01 SP1. This is 
where the application gets all messed up. Text gets displayed all over the page very 
randomly. We used HTML tables to layout pages and format content.

Thoughts?

Thanks, Prabhat.


RE: [OT] IE problem. stumped

2003-12-05 Thread Jarnot Voytek Contr AU HQ/SC
 -Original Message-
 From: Prabhat Kumar (IT) [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 12:57 PM
 To: [EMAIL PROTECTED]
 Subject: [OT] IE problem. stumped
 
 I'm wondering if anyone has come across this.
 
 We have this struts application that is about to be deployed 
 and it works fine, shows all the HTML pages as expected in IE 6.0.
 
 As part of our final tests, we began testing the application 
 on IE 5.01 SP1. This is where the application gets all messed 
 up. Text gets displayed all over the page very randomly. We 
 used HTML tables to layout pages and format content.
 
 Thoughts?
 

Two thoughts, try this: http://validator.w3.org/ and do this sort of testing
earlier in your lifecycle...

--
Voytek Jarnot
Quantum materiae materietur marmota monax si marmota monax materiam possit
materiari?

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



Re: [OT] RE: Is it required to restart weblogic everytime after compiling ?? ? Need help Desperately .. :-(

2003-12-05 Thread Vic Cekvenich


Wendy Smoak wrote:
and restarting this weblogic again and again 
each time i debug .. :-( ...
stil waiting for a solution ...


Trim your posts!  Not only was it off topic, it was 400 lines long.  How
about doing your development work on Tomcat, then deploying to Weblogic?
This has the added advantage of forcing you to write code that'll run on
any container.
+ 1.

Or Resin, the both have a plug in to run w/ Eclipse so you set in even.
In general, propriatory code is inferior.
.V



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


RE: .do's come back as 404 file not found

2003-12-05 Thread Joe Hertz
What's the url pattern for your action servlet defined in web.xml?

 -Original Message-
 From: Dhaliwal, Pritpal (HQP) [mailto:[EMAIL PROTECTED] 
 Sent: Friday, December 05, 2003 1:48 PM
 To: Struts Users Mailing List
 Subject: .do's come back as 404 file not found
 
 
 Hello Everyone,
 
 I am using: Struts and Resin 2.1.11
 
 All of sudden my index.do, or any other .do is not being 
 recognized by resin anymore. 
 
 It was working fine two days ago, all of sudden I am getting 404s
 
 
 In the logs I see that its picking up the correct 
 struts-config.xml and it is that ActionServlet runs its init 
 function..
 
 So has anyone seen it before, is it generally app server 
 problem or I could have messed something up in struts also?
 
 TIA,
 Paul Dhaliwal
 



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



RE: [OT] IE problem. stumped

2003-12-05 Thread Joe Hertz
IE 5.X and 6.0 are very different beasts. 6.0 in some ways is *less*
compliant with the specs then 5.2.

 -Original Message-
 From: Jarnot Voytek Contr AU HQ/SC 
 [mailto:[EMAIL PROTECTED] 
 Sent: Friday, December 05, 2003 1:59 PM
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] IE problem. stumped
 
 
  -Original Message-
  From: Prabhat Kumar (IT) [mailto:[EMAIL PROTECTED]
  Sent: Friday, December 05, 2003 12:57 PM
  To: [EMAIL PROTECTED]
  Subject: [OT] IE problem. stumped
  
  I'm wondering if anyone has come across this.
  
  We have this struts application that is about to be deployed
  and it works fine, shows all the HTML pages as expected in IE 6.0.
  
  As part of our final tests, we began testing the application
  on IE 5.01 SP1. This is where the application gets all messed 
  up. Text gets displayed all over the page very randomly. We 
  used HTML tables to layout pages and format content.
  
  Thoughts?
  
 
 Two thoughts, try this: http://validator.w3.org/ and do this 
 sort of testing earlier in your lifecycle...
 
 --
 Voytek Jarnot
 Quantum materiae materietur marmota monax si marmota monax 
 materiam possit materiari?
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 



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



Re: [OT] Log4J raw vs. commons-logging/Log4J (was Re: Log4j with Struts)

2003-12-05 Thread Joe Germuska
Are you talking about the code-level interface (i.e. Log versus 
Logger) or in terms of the configuration? Because in our applications, 
we've taken the commons-logging approach, though we initialize the 
commons-logging package with a complex Log4J configuration, so that we 
have in essence the best of both worlds: we can use the 
behind-the-scenes power of Log4j, with the ability to swap out logging 
implementations that commons-logging gives us.

I've not seen much in the log-level API that's substantially 
different. What sorts of power are you talking about?

Specifically, in a recent application we chose to use Log4J directly 
rather than Commons Logging because we wanted to use Log4J's
nested diagnostic context, in which you can basically store 
thread-local values (like current user) and have them available for all 
logging messages.

http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/NDC.html
http://jakarta.apache.org/log4j/docs/FAQ.html#NDC
Certainly if the commons logging API is adequate, you're probably 
better off using it by default, just like you're better off writing 
your code to use JAXP instead of a specific XML parser, if you can get 
away with it.

The point being that the choice to commit to one api over an 
abstraction layer is much less important when you're writing a 
self-contained application than when you're writing libraries.



Joe

--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
 We want beef in dessert if we can get it there.
  -- Betty Hogan, Director of New Product Development, National 
Cattlemen's Beef Association




smime.p7s
Description: S/MIME cryptographic signature


RE: [OT] IE problem. stumped

2003-12-05 Thread Prabhat Kumar (IT)
I just ran the validator as was suggested by Jarnot... The HTML validates fine.

What happens is sometimes, a heading from the middle of the page for some reason 
shifts to the top. And it is very random. Text beside a check-box doesn't show... and 
then when that region is highlighted it magically shows up.

-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 2:47 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] IE problem. stumped


IE 5.X and 6.0 are very different beasts. 6.0 in some ways is *less*
compliant with the specs then 5.2.

 -Original Message-
 From: Jarnot Voytek Contr AU HQ/SC 
 [mailto:[EMAIL PROTECTED] 
 Sent: Friday, December 05, 2003 1:59 PM
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] IE problem. stumped
 
 
  -Original Message-
  From: Prabhat Kumar (IT) [mailto:[EMAIL PROTECTED]
  Sent: Friday, December 05, 2003 12:57 PM
  To: [EMAIL PROTECTED]
  Subject: [OT] IE problem. stumped
  
  I'm wondering if anyone has come across this.
  
  We have this struts application that is about to be deployed
  and it works fine, shows all the HTML pages as expected in IE 6.0.
  
  As part of our final tests, we began testing the application
  on IE 5.01 SP1. This is where the application gets all messed 
  up. Text gets displayed all over the page very randomly. We 
  used HTML tables to layout pages and format content.
  
  Thoughts?
  
 
 Two thoughts, try this: http://validator.w3.org/ and do this 
 sort of testing earlier in your lifecycle...
 
 --
 Voytek Jarnot
 Quantum materiae materietur marmota monax si marmota monax 
 materiam possit materiari?
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 



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


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



RE: [OT] IE problem. stumped

2003-12-05 Thread Mahesh Joshi
This could be a display driver problem related to IE.

I have the same issue sporadically on my machine (WinNT 4.0, IE 5.5 sp2)

Our IT folks said its a driver problem and an upgrade could fix it. I am
supposed to upgrade to Win2K one of these days.


Mahesh

-Original Message-
From: Prabhat Kumar (IT) [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 12:02 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: [OT] IE problem. stumped


I just ran the validator as was suggested by Jarnot... The 
HTML validates fine.

What happens is sometimes, a heading from the middle of the 
page for some reason shifts to the top. And it is very 
random. Text beside a check-box doesn't show... and then when 
that region is highlighted it magically shows up.

-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 2:47 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] IE problem. stumped


IE 5.X and 6.0 are very different beasts. 6.0 in some ways is *less*
compliant with the specs then 5.2.

 -Original Message-
 From: Jarnot Voytek Contr AU HQ/SC 
 [mailto:[EMAIL PROTECTED] 
 Sent: Friday, December 05, 2003 1:59 PM
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] IE problem. stumped
 
 
  -Original Message-
  From: Prabhat Kumar (IT) [mailto:[EMAIL PROTECTED]
  Sent: Friday, December 05, 2003 12:57 PM
  To: [EMAIL PROTECTED]
  Subject: [OT] IE problem. stumped
  
  I'm wondering if anyone has come across this.
  
  We have this struts application that is about to be deployed
  and it works fine, shows all the HTML pages as expected in IE 6.0.
  
  As part of our final tests, we began testing the application
  on IE 5.01 SP1. This is where the application gets all messed 
  up. Text gets displayed all over the page very randomly. We 
  used HTML tables to layout pages and format content.
  
  Thoughts?
  
 
 Two thoughts, try this: http://validator.w3.org/ and do this 
 sort of testing earlier in your lifecycle...
 
 --
 Voytek Jarnot
 Quantum materiae materietur marmota monax si marmota monax 
 materiam possit materiari?
 
 
-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 



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


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


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



RE: Log4j with Struts

2003-12-05 Thread Daniel Lipofsky
 
  String str = new String(LogonAction.class.getName()); 
 

This is completely off-topic, but using
new String(String)
is almost always wasteful.  Strings are
immutable, so there is no need to copy them.
- Dan

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



Re: Stupid Bean tricks

2003-12-05 Thread Martin Cooper
Assuming your User object is stored in the request under the key user, the
language you want is en (English), and the UserData property you want is
message, you would do:

  bean:message name=user property=en.message/

--
Martin Cooper


Joe Hertz [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I considered that, but (and I'm an utter newbie so I apologize here)

 How would I refer to an element of UserData in a bean:message tag?

  -Original Message-
  From: news [mailto:[EMAIL PROTECTED] On Behalf Of Martin Cooper
  Sent: Friday, December 05, 2003 12:32 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Stupid Bean tricks
 
 
  Why not convert your Set into a Map keyed by language / locale? Then
  get(locale) is effectively provided for you.
 
  --
  Martin Cooper
 
 
  Joe Hertz [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
 oss.local...
  Probably a very basic question, and infinitely dealableI hope.
 
  I have a User object, which itself contains a Set of UserData objects
  (the UserData is stuff that needs to be multilingual. Each instance
  has the part of the user's data that would vary when presented in each

  language).
 
  So, in my JSP, how do I get to a specific instance of UserData? I can
  write a getter than could take a locale or even just a language code,
  but since it's not a numeric, the taglib chokes on it, or at least it
  appears to




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




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



RE: RT expr value in custom tag

2003-12-05 Thread Van Riper, Mike
Eric,

What you are trying to do doesn't really require the JSTL expression
language. All you need to do is specify that runtime expressions are to be
evaluated for the parameter attribute of your custom tag in your TLD file.
If you were to look at any of the TLD files that come with Struts, you would
see plenty of examples of this. For example, here is the html:base tag TLD
definition that enables runtime expression evaluation for both the target
and the server optional attributes for the tag:

tag
  namebase/name
  tagclassorg.apache.struts.taglib.html.BaseTag/tagclass
  bodycontentempty/bodycontent
  attribute
nametarget/name
requiredfalse/required
rtexprvaluetrue/rtexprvalue !-- This is what I think is needed! --
  /attribute
  attribute
nameserver/name
requiredfalse/required
rtexprvaluetrue/rtexprvalue
  /attribute
/tag

Runtime expression evaluation is what allows you to evaluate Java
expressions inside of %= ...% for your custom tag parameters. If you use
the JSTL expression language (EL), you don't use the Java expression tag.
They are two separate ways to refer to dynamic content for custom tag
attributes. To use the JSTL EL, you have to build your custom tag such that
it has EL support in it. If you really want to go that route, I haven't done
that yet myself. So, I can't help you with that. However, you can look at
how the contributed taglib (html-el) that extends the HTML taglib of Struts
1.1 to add EL support for the parameters of the Struts HTML custom tags does
just that.

Also, your example used the %= ...% tag correctly for a custom tag
parameter. However, many people initially stumble on getting this to work
correctly even when runtime expression evaluation is enabled because they
try to define only part of the custome tag attribute with the tag. For it to
work even when properly enabled for the attribute in the TLD, you have to
define the entire contents of the custom tag attribute value to be the %=
...% Java expression. If there is static content you want to include as
part of the attribute value, you typically use string operations inside the
JSP expression to concatenate and build up the final attribute value merging
your dynamic and static data.

Hope this helps, Van

Mike Van Riper
Silicon Valley Struts User Group
mail: mike.vanriper at baychi.org
http://www.baychi.org/bof/struts/

 -Original Message-
 From: Eric SCHULTZ [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 7:54 AM
 To: '[EMAIL PROTECTED]'
 Subject: RT expr value in custom tag
 
 
 Good morning...
 
 I'm trying to write my own custom tag library for Struts.  
 I've had some
 initial success, but now I'm having some trouble.
 
 I want to set an attribute value from the value of a bean 
 get.  But what I
 end up with in my tag is JSP code, not the value in the bean.
 
 I.e.: 
 v:properties template=inputmode parameter=%=
 UserSessionBean.getInputMode() %/
 
 is not translated.
 
 How do I get the result of UserSessionBean.getInputMode() in 
 my tag?  Do I
 need to implement Expression Language?  Is there already a 
 utility class
 somewhere in Struts 1.1 that would evaluate something like
 ${UserSessionBean.inputMode} for me?
 
 Thanks.
 

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



RE: .do's come back as 404 file not found

2003-12-05 Thread Dhaliwal, Pritpal (HQP)
Hello Joe,

Its maps to *.do 

Remember that same conf worked like a charm two days ago :)

Same conf is also working in another setting.

TIA,
Paul

-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 05, 2003 11:46 AM
To: 'Struts Users Mailing List'
Subject: RE: .do's come back as 404 file not found


What's the url pattern for your action servlet defined in web.xml?

 -Original Message-
 From: Dhaliwal, Pritpal (HQP) [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 1:48 PM
 To: Struts Users Mailing List
 Subject: .do's come back as 404 file not found
 
 
 Hello Everyone,
 
 I am using: Struts and Resin 2.1.11
 
 All of sudden my index.do, or any other .do is not being
 recognized by resin anymore. 
 
 It was working fine two days ago, all of sudden I am getting 404s
 
 
 In the logs I see that its picking up the correct
 struts-config.xml and it is that ActionServlet runs its init 
 function..
 
 So has anyone seen it before, is it generally app server
 problem or I could have messed something up in struts also?
 
 TIA,
 Paul Dhaliwal
 



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



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



RE: from sathish

2003-12-05 Thread David Friedman
Sathish,

So, you're using Struts (version 1.0?) and your method
signature wasn't working.  When you changed it to
the one I pulled off the struts web site's api, did it
work?

Regards,
David

-Original Message-
From: Sathish Babu K R [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 3:58 AM
To: Struts Users Mailing List
Subject: from sathish


hi david

i get session using request.getSession()?y whats  in
it?tell me.

sathish

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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


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



RE: using ApplicationResources in jsp...

2003-12-05 Thread Daniel Lipofsky

Struts has a class called RequestUtils and you can call
RequestUtils.message(pageContext, bundle, locale, key);

But maybe you should be creating your array in the Action
and passing storing it in the Form for the JSP to grab.
Then you can get messages in an action like this:
// default bundle
MessageResources mr1 = getResources(request);
String s1 = mr1.getMessage(welcome.message);
// some other bundle
MessageResources mr2 = getResources(request, alt_bundle);
String s2 = mr2.getMessage(welcome.message);
- Dan

 -Original Message-
 From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 6:16 AM
 To: Struts Users Mailing List
 Subject: RE: using ApplicationResources in jsp...
 
 
 because i have to put it on an array of String and then i use 
 this array in the code by a generic code.
 
  -Message d'origine-
  De : Jimmy Emmanual [mailto:[EMAIL PROTECTED]
  Envoyé : vendredi 5 décembre 2003 15:10
  À : 'Struts Users Mailing List'
  Objet : RE: using ApplicationResources in jsp...
  
  
  why do you need to? why not just:
  
  html:html
  body
  bean:message key=title.from.ressources/
  /body
  /html:html
  
  
  -Original Message-
  From: AMIR-TAHMASSEB Marc 
 [mailto:[EMAIL PROTECTED]
  Sent: Friday, December 05, 2003 9:07 AM
  To: Struts Users Mailing List
  Subject: RE: using ApplicationResources in jsp...
  
  
  because i need to get the value of my property inside a % ... %
  
   -Message d'origine-
   De : Hunziker Dennis [mailto:[EMAIL PROTECTED]
   Envoyé : vendredi 5 décembre 2003 15:03
   À : 'Struts Users Mailing List'
   Objet : RE: using ApplicationResources in jsp...
   
   
   why not try the following:
   bean:message key=title.from.ressources/
   
   -Original Message-
   From: AMIR-TAHMASSEB Marc 
  [mailto:[EMAIL PROTECTED] 
   Sent: Freitag, 5. Dezember 2003 15:01
   To: [EMAIL PROTECTED]
   Subject: using ApplicationResources in jsp...
   
   
   Hi,
   i wonder to know if it's possible to use a property in 
   ApplciationResources
   in  the jsp code.

   I want to do something like this :

   !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
   %@ page language=java %
   %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
   %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
   %@ taglib uri=/WEB-INF/struts-template.tld prefix=template %
   %@ taglib uri=/WEB-INF/struts-logic.tldprefix=logic %
   %
   String title = title.from.ressources; // i don't know how 
   to access it !
   %
   html:html
   body
   %=title%
   /body
   /html:html



   --
   Marc AMIR-TAHMASSEB
   [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] 

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

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



RE: RT expr value in custom tag

2003-12-05 Thread Eric SCHULTZ
Good evening...

Thanks for the reponse, I realised this shortly after I posted my question
and figured asbestos underpants would soon be required.  Shame on me not
carrying my research just a little further.

Although your final note on RT expression evaluation is something I had not
yet realised.

As for the EL evaluation mechanism, check out the class

org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager

in the Jakarta Standard Taglib (I'm looking at v1.0.4).

Thanks again.

Eric Schultz.

-Original Message-
From: Van Riper, Mike
To: '[EMAIL PROTECTED]'
Cc: 'Eric SCHULTZ'
Sent: 05/12/03 5:00 PM
Subject: RE: RT expr value in custom tag

Eric,

What you are trying to do doesn't really require the JSTL expression
language. All you need to do is specify that runtime expressions are to
be
evaluated for the parameter attribute of your custom tag in your TLD
file.
If you were to look at any of the TLD files that come with Struts, you
would
see plenty of examples of this. For example, here is the html:base tag
TLD
definition that enables runtime expression evaluation for both the
target
and the server optional attributes for the tag:

tag
  namebase/name
  tagclassorg.apache.struts.taglib.html.BaseTag/tagclass
  bodycontentempty/bodycontent
  attribute
nametarget/name
requiredfalse/required
rtexprvaluetrue/rtexprvalue !-- This is what I think is needed!
--
  /attribute
  attribute
nameserver/name
requiredfalse/required
rtexprvaluetrue/rtexprvalue
  /attribute
/tag

Runtime expression evaluation is what allows you to evaluate Java
expressions inside of %= ...% for your custom tag parameters. If you
use
the JSTL expression language (EL), you don't use the Java expression
tag.
They are two separate ways to refer to dynamic content for custom tag
attributes. To use the JSTL EL, you have to build your custom tag such
that
it has EL support in it. If you really want to go that route, I haven't
done
that yet myself. So, I can't help you with that. However, you can look
at
how the contributed taglib (html-el) that extends the HTML taglib of
Struts
1.1 to add EL support for the parameters of the Struts HTML custom tags
does
just that.

Also, your example used the %= ...% tag correctly for a custom tag
parameter. However, many people initially stumble on getting this to
work
correctly even when runtime expression evaluation is enabled because
they
try to define only part of the custome tag attribute with the tag. For
it to
work even when properly enabled for the attribute in the TLD, you have
to
define the entire contents of the custom tag attribute value to be the
%=
...% Java expression. If there is static content you want to include as
part of the attribute value, you typically use string operations inside
the
JSP expression to concatenate and build up the final attribute value
merging
your dynamic and static data.

Hope this helps, Van

Mike Van Riper
Silicon Valley Struts User Group
mail: mike.vanriper at baychi.org
http://www.baychi.org/bof/struts/

 -Original Message-
 From: Eric SCHULTZ [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 7:54 AM
 To: '[EMAIL PROTECTED]'
 Subject: RT expr value in custom tag
 
 
 Good morning...
 
 I'm trying to write my own custom tag library for Struts.  
 I've had some
 initial success, but now I'm having some trouble.
 
 I want to set an attribute value from the value of a bean 
 get.  But what I
 end up with in my tag is JSP code, not the value in the bean.
 
 I.e.: 
 v:properties template=inputmode parameter=%=
 UserSessionBean.getInputMode() %/
 
 is not translated.
 
 How do I get the result of UserSessionBean.getInputMode() in 
 my tag?  Do I
 need to implement Expression Language?  Is there already a 
 utility class
 somewhere in Struts 1.1 that would evaluate something like
 ${UserSessionBean.inputMode} for me?
 
 Thanks.
 

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



Using A DynaActionForm To Populate A Collection In The Object It Represents

2003-12-05 Thread Jame Lathren





Is it possible to use the DynaActionForm to populate a collection (an
ArrayList of other objects, for example) in the object it represents?

For example: An object (That is represented on a form by the
DynaActionForm) that holds an arrayList of other objects; Values from each
arrayList are available to be edited on the form, but can the
DynaActionForm collect them and re-assemble them into the arrayList of the
object it represents when the form is submitted?

I've been successful populating text properties in an object represented by
the DynaActionForm, but unsuccessful populating the other objects that are
part of the arrayList of the main object.

I am wondering if the DynaActionForm is a viable solution for these types
of complex objects, or if I *must* use an ActionForm class that I design
specifically for my needs.

Any help would be appreciated -

Toby

RE: Tomcat 4.1.29 Struts

2003-12-05 Thread Mukund Ramadoss
I removed the key in the struts_config. But still the result is the
same.

My struts-config looks like this:
--
?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE struts-config PUBLIC
  http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd;
 struts-config 
 message-resources 
 parameter=ApplicationResources 
 null=false /
/struts-config
--

My ApplicationResources.properties is in WEB-INF/classes directory. I
have also
Copied it to WEB-INF folder. But still it does not pick it up.

I also tried downloaded xerces.jar to WEB-INF/lib, for I read elsewhere
that it could be a xml parser issue. This does not help too.

Any suggestions.

Thanks
Mukund


-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 04, 2003 4:20 PM
To: Struts Users Mailing List
Subject: RE: Tomcat 4.1.29  Struts


 Is anyone working with Struts on Tomcat 4.1.29?
 If yes, can you provide me some inputs on the installation. I'm 
 getting org.apache.jasper.JasperException: Cannot find message 
 resources under key org.apache.struts.action.MESSAGE, when executing 
 bean:message key=index.title/ in the jsp.

I'm using Tomcat 4.1.29 and a recent nightly build of Struts.  This is a
common problem and usually happens when Struts can't find your
ApplicationResources [or whatever you named it] file.

  message-resources
  parameter=ApplicationResources 
  key=org.apache.struts.action.MESSAGE null=false / 

Where is your ApplicationResources file located?  (Should be in
WEB-INF/classes, named exactly ApplicationResources.properties, with
this setup.)

I don't have 'key' specified in my message-resources tag.  Did you put
that in for a reason?  

I have:  message-resources parameter=ApplicationResources
null=false /

I note that struts-example does use 'key', but in this fashion:

  message-resources
parameter=org.apache.struts.webapp.example.ApplicationResources / 
  message-resources
parameter=org.apache.struts.webapp.example.AlternateApplicationResource
s key=alternate / 

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



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



Re: Using A DynaActionForm To Populate A Collection In The Object It Represents

2003-12-05 Thread Richard Yee
Toby,
Yes, you can have Struts populate a DynaActionForm
with a complex datatype. You need to use indexed
properties and put the form in Session scope.

Check out these articles by James Turner:
http://www.developer.com/java/other/article.php/2214681
http://www.developer.com/java/other/article.php/2233591

-Richard

--- Jame Lathren [EMAIL PROTECTED] wrote:
 
 
 
 
 
 Is it possible to use the DynaActionForm to populate
 a collection (an
 ArrayList of other objects, for example) in the
 object it represents?
 
 For example: An object (That is represented on a
 form by the
 DynaActionForm) that holds an arrayList of other
 objects; Values from each
 arrayList are available to be edited on the form,
 but can the
 DynaActionForm collect them and re-assemble them
 into the arrayList of the
 object it represents when the form is submitted?
 
 I've been successful populating text properties in
 an object represented by
 the DynaActionForm, but unsuccessful populating the
 other objects that are
 part of the arrayList of the main object.
 
 I am wondering if the DynaActionForm is a viable
 solution for these types
 of complex objects, or if I *must* use an ActionForm
 class that I design
 specifically for my needs.
 
 Any help would be appreciated -
 
 Toby


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



RE: Tomcat 4.1.29 Struts

2003-12-05 Thread Richard Yee
Mukund,
If you are running on Windows, have you ever edited
the ApplicationProperties.properties file with
notepad? Could it possibly have a .txt extension after
the .properties extension? If you are running on Unix,
is the case correct on the file name?

-Richard

--- Mukund Ramadoss [EMAIL PROTECTED] wrote:
 I removed the key in the struts_config. But still
 the result is the
 same.
 
 My struts-config looks like this:
 --
 ?xml version=1.0 encoding=ISO-8859-1 ?
 !DOCTYPE struts-config PUBLIC
  

http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd;
  struts-config 
  message-resources 
  parameter=ApplicationResources 
  null=false /
 /struts-config
 --
 
 My ApplicationResources.properties is in
 WEB-INF/classes directory. I
 have also
 Copied it to WEB-INF folder. But still it does not
 pick it up.
 
 I also tried downloaded xerces.jar to WEB-INF/lib,
 for I read elsewhere
 that it could be a xml parser issue. This does not
 help too.
 
 Any suggestions.
 
 Thanks
 Mukund
 
 


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



RE: Tomcat 4.1.29 Struts

2003-12-05 Thread Mukund Ramadoss
Hi Richard,

Thanks for your mail.
Actually I am running on windows and there is not .txt extenstion.

The filename is ApplicationResources.properties. (not
ApplicationProperties.properties). 
Could this be a classpath issue? How do I check.

Thanks again.
Mukund

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 05, 2003 4:30 PM
To: Struts Users Mailing List
Subject: RE: Tomcat 4.1.29  Struts


Mukund,
If you are running on Windows, have you ever edited
the ApplicationProperties.properties file with
notepad? Could it possibly have a .txt extension after
the .properties extension? If you are running on Unix,
is the case correct on the file name?

-Richard

--- Mukund Ramadoss [EMAIL PROTECTED] wrote:
 I removed the key in the struts_config. But still
 the result is the
 same.
 
 My struts-config looks like this:
 --
 ?xml version=1.0 encoding=ISO-8859-1 ?
 !DOCTYPE struts-config PUBLIC
  

http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd;
  struts-config
  message-resources 
  parameter=ApplicationResources 
  null=false /
 /struts-config
 --
 
 My ApplicationResources.properties is in
 WEB-INF/classes directory. I
 have also
 Copied it to WEB-INF folder. But still it does not
 pick it up.
 
 I also tried downloaded xerces.jar to WEB-INF/lib,
 for I read elsewhere
 that it could be a xml parser issue. This does not
 help too.
 
 Any suggestions.
 
 Thanks
 Mukund
 
 


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



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



RE: Tomcat 4.1.29 Struts

2003-12-05 Thread Yee, Richard K,,DMDCWEST
Mukund,
Are there any messages in the log file? Are you using log4j and did you set
the logging level to debug? It shouldn't be a Classpath issue if the file is
located in your webapp's WEB-INF/classes directory. That is automatically
put in your apps classpath. 

-Richard

-Original Message-
From: Mukund Ramadoss [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 05, 2003 4:38 PM
To: 'Struts Users Mailing List'
Subject: RE: Tomcat 4.1.29  Struts


Hi Richard,

Thanks for your mail.
Actually I am running on windows and there is not .txt extenstion.

The filename is ApplicationResources.properties. (not
ApplicationProperties.properties). 
Could this be a classpath issue? How do I check.

Thanks again.
Mukund

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 05, 2003 4:30 PM
To: Struts Users Mailing List
Subject: RE: Tomcat 4.1.29  Struts


Mukund,
If you are running on Windows, have you ever edited
the ApplicationProperties.properties file with
notepad? Could it possibly have a .txt extension after
the .properties extension? If you are running on Unix,
is the case correct on the file name?

-Richard

--- Mukund Ramadoss [EMAIL PROTECTED] wrote:
 I removed the key in the struts_config. But still
 the result is the
 same.
 
 My struts-config looks like this:
 --
 ?xml version=1.0 encoding=ISO-8859-1 ?
 !DOCTYPE struts-config PUBLIC
  

http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd;
  struts-config
  message-resources
  parameter=ApplicationResources 
  null=false /
 /struts-config
 --
 
 My ApplicationResources.properties is in
 WEB-INF/classes directory. I
 have also
 Copied it to WEB-INF folder. But still it does not
 pick it up.
 
 I also tried downloaded xerces.jar to WEB-INF/lib,
 for I read elsewhere
 that it could be a xml parser issue. This does not
 help too.
 
 Any suggestions.
 
 Thanks
 Mukund
 
 


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



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

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



RE: Tomcat 4.1.29 Struts

2003-12-05 Thread David Friedman
Psst.  I think you have the wrong DTD:

http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd

Won't resolve for me (I use 1.1 anyway) but this does:
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd

Regards,
David


-Original Message-
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 7:47 PM
To: 'Struts Users Mailing List'
Subject: RE: Tomcat 4.1.29  Struts


Mukund,
Are there any messages in the log file? Are you using log4j and did you set
the logging level to debug? It shouldn't be a Classpath issue if the file is
located in your webapp's WEB-INF/classes directory. That is automatically
put in your apps classpath.

-Richard

-Original Message-
From: Mukund Ramadoss [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 4:38 PM
To: 'Struts Users Mailing List'
Subject: RE: Tomcat 4.1.29  Struts


Hi Richard,

Thanks for your mail.
Actually I am running on windows and there is not .txt extenstion.

The filename is ApplicationResources.properties. (not
ApplicationProperties.properties).
Could this be a classpath issue? How do I check.

Thanks again.
Mukund

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 4:30 PM
To: Struts Users Mailing List
Subject: RE: Tomcat 4.1.29  Struts


Mukund,
If you are running on Windows, have you ever edited
the ApplicationProperties.properties file with
notepad? Could it possibly have a .txt extension after
the .properties extension? If you are running on Unix,
is the case correct on the file name?

-Richard

--- Mukund Ramadoss [EMAIL PROTECTED] wrote:
 I removed the key in the struts_config. But still
 the result is the
 same.

 My struts-config looks like this:
 --
 ?xml version=1.0 encoding=ISO-8859-1 ?
 !DOCTYPE struts-config PUBLIC


http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd;
  struts-config
  message-resources
  parameter=ApplicationResources
  null=false /
 /struts-config
 --

 My ApplicationResources.properties is in
 WEB-INF/classes directory. I
 have also
 Copied it to WEB-INF folder. But still it does not
 pick it up.

 I also tried downloaded xerces.jar to WEB-INF/lib,
 for I read elsewhere
 that it could be a xml parser issue. This does not
 help too.

 Any suggestions.

 Thanks
 Mukund




__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



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

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


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



messages tag not displaying messages

2003-12-05 Thread Frank Calfo
The messages tag supposed to display all the messages automatically ?

When I place this on the JSP, the messages do not display:

[EMAIL PROTECTED] prefix=html uri=/struts-html%

html:messages id=resultMsg name=ATTR_ACTION_MESSAGES/

I know that the message key is correct, the message resource file can be 
found, and the messages collection has been properly placed in the request, 
etc. etc. because if I add (below that line) this tag:

bean:write name=resultMsg/

to the page, then the message does display.  But I shouldn't have to do 
that, right ?

Since adding the bean:write tag does display a message from the collection, 
this does not appear to be a basic setup issue.  It's more a question about 
the intended behavior of the messages tag.

Why doesn't this usage of the messages tag html:messages id=resultMsg 
name=ATTR_ACTION_MESSAGES/ automatically display all messages in the 
collection ?

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


Re: messages tag not displaying messages

2003-12-05 Thread Richard Yee
Frank,
I believe you want to use the bean:messages ./ tag.  There isn't an 
html:messages tag.

-Richard

At 06:18 PM 12/5/2003, you wrote:

The messages tag supposed to display all the messages automatically ?

When I place this on the JSP, the messages do not display:

[EMAIL PROTECTED] prefix=html uri=/struts-html%

html:messages id=resultMsg name=ATTR_ACTION_MESSAGES/

I know that the message key is correct, the message resource file can be 
found, and the messages collection has been properly placed in the 
request, etc. etc. because if I add (below that line) this tag:

bean:write name=resultMsg/

to the page, then the message does display.  But I shouldn't have to do 
that, right ?

Since adding the bean:write tag does display a message from the 
collection, this does not appear to be a basic setup issue.  It's more a 
question about the intended behavior of the messages tag.

Why doesn't this usage of the messages tag html:messages id=resultMsg 
name=ATTR_ACTION_MESSAGES/ automatically display all messages in the 
collection ?

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


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


Re: messages tag not displaying messages

2003-12-05 Thread Richard Yee
Frank,
Please disregard the last message. I wasn't paying attention and was 
looking at the Struts 1.0 docs instead of Struts 1.1.

If you are using ActionMessages, then in your action, you'd have something 
like this:

ActionMessages messages = new ActionMessages();
ActionMessage msg = new ActionMessage(data.ok);
messages.add(message1, msg);
msg = new ActionMessage(data.continue);
messages.add(message2, msg);
saveMessages(request, messages);

and in your JSP, to print out all of the messages, you would use this:

html:messages id=msg message=true
bean:write name=msg/br
/html:messages
The id param sets up the bean for the bean:write
The message param = true indicates that the bean will be obtained using 
Globals.MESSAGE_KEY instead of Globals.ERROR_KEY

To find out more, check out this article:
http://javaboutique.internet.com/tutorials/excep_struts/index-2.html
Regards,

Richard
At 06:18 PM 12/5/2003, you wrote:
The messages tag supposed to display all the messages automatically ?

When I place this on the JSP, the messages do not display:

[EMAIL PROTECTED] prefix=html uri=/struts-html%

html:messages id=resultMsg name=ATTR_ACTION_MESSAGES/

I know that the message key is correct, the message resource file can be 
found, and the messages collection has been properly placed in the 
request, etc. etc. because if I add (below that line) this tag:

bean:write name=resultMsg/

to the page, then the message does display.  But I shouldn't have to do 
that, right ?

Since adding the bean:write tag does display a message from the 
collection, this does not appear to be a basic setup issue.  It's more a 
question about the intended behavior of the messages tag.

Why doesn't this usage of the messages tag html:messages id=resultMsg 
name=ATTR_ACTION_MESSAGES/ automatically display all messages in the 
collection ?

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


  1   2   >