Re: Parsing Error for struts-config.xml

2002-03-07 Thread Ivan Siviero

I'm having the same exception on SunOS 5.8 and Weblogic5.1sp9 which is still
unsolved.
I suppose you already have the xerces.jar in the classpath.
Let me know if you get a solution on this.
Thank you.
Ivan.
- Original Message -
From: "Suneet Shah" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 08, 2002 7:33 AM
Subject: Parsing Error for struts-config.xml


Hello,
I have struts based application that runs just fine on a number of
application server. However, on
Borland Enterprise Server I get the exception below.  I am using struts
1.02. Any ideas on how I can fix this?
Thank you.
Suneet Shah

javax.servlet.ServletException: Parsing error processing resource path
/WEB-INF/struts-config.xml
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1337)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:911)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:671)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2408)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1013)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1108
)
at java.lang.Thread.run(Thread.java:484)

java.net.MalformedURLException: unknown protocol: besjar
at org.apache.struts.digester.Digester.resolveEntity(Digester.java:613)
at
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntit
y(DefaultEntityHandler.java:750)
at
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalSubse
t(DefaultEntityHandler.java:566)
at
org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.java
:1139)
at
org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentSc
anner.java:2145)
at
org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentScanner.j
ava:2100)
at
org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XML
DocumentScanner.java:831)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:143)
at org.apache.struts.digester.Digester.parse(Digester.java:757)
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:911)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:671)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.j

[Newbie] html:link

2002-03-07 Thread Slimane Zouggari

Hi,

I have the following piece of code :

>type="be.stluc.info.struts.ElementProjet">
>
>&codpha=
>&codtac=">
>
>
>
>

I was wondering if there's a easier way to do that with the html:link tag ?

Thanx in advance,
Slimane


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts Validator NoClassDefFoundError

2002-03-07 Thread Craig Raw

I am using the commons-validator.jar from the Jakarta site. (Sorry,
missed this out when typing the contents of my WEB-INF/lib).

Since I only used the Validator for the first time after its movement to
Commons project, I doubt I have any old com.wintecinc.struts classes
around.

Craig

-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]] 
Sent: 07 March 2002 07:41 PM
To: Struts Users Mailing List
Subject: Re: Struts Validator NoClassDefFoundError

What version of the Struts Validator are you using? 
Package names were changed at some point from
com.wintecinc.struts.* to
org.apache.struts.validator.* (1/14/2002).  When this
was done, most of the validator was moved to the
Jakarta Commons Validator
(http://jakarta.apache.org/commons).  I would double
check the files/package names in the jar you have.

David

--- Craig Raw <[EMAIL PROTECTED]> wrote:
> Hi, 
> 
> I am using the Struts Validator in my webapp but
> encounter the following
> error on each page that tries to use it.
> 
> java.lang.NoClassDefFoundError:
> org/apache/struts/validator/action/ValidatorForm
>   at java.lang.ClassLoader.defineClass0(Native
> Method)
>   at
>
java.lang.ClassLoader.defineClass(ClassLoader.java:509)
> 
> 
> My WEB-INF/lib has the following jars
> commons-beanutils.jar
> commons-collections.jar
> commons-digester.jar
> jakarta-regexp-1.2.jar
> struts.jar
> struts-validator.jar
> tiles.jar
> 
> The ValidatorForm is thus clearly in the webapp
> classpath.
> I have read this may be because of the ValidatorForm
> class appearing
> twice on my system classpath, but this does not seem
> to be the case. My
> system classpath on JBoss is:
> 
> c:\Java\j2sdk1.4.0/lib/tools.jar
> run.jar
> ../lib/crimson.jar
> /C:/var/jboss/log/
> /C:/var/jboss/lib/ext/activation.jar
> /C:/var/jboss/lib/ext/castor-0.9.1.jar
> /C:/var/jboss/lib/ext/gnu-regexp-1.0.8.jar
> /C:/var/jboss/lib/ext/hsql.jar
> 
> /C:/var/jboss/lib/ext/idb.jar
> /C:/var/jboss/lib/ext/jboss-j2ee.jar
> /C:/var/jboss/lib/ext/jboss-management.jar
> /C:/var/jboss/lib/ext/jboss.jar
> /C:/var/jboss/lib/ext/jbosscx.jar
> /C:/var/jboss/lib/ext/jbossmq.jar
> /C:/var/jboss/lib/ext/jbosspool.jar
> /C:/var/jboss/lib/ext/jbosssx.jar
> /C:/var/jboss/lib/ext/jetty-service.jar
> 
> /C:/var/jboss/lib/ext/jmxtools.jar
> /C:/var/jboss/lib/ext/jndi.jar
> /C:/var/jboss/lib/ext/jnpserver.jar
> /C:/var/jboss/lib/ext/jpl-util-0_5b.jar
> /C:/var/jboss/lib/ext/log4j.jar
> /C:/var/jboss/lib/ext/mail.jar
> /C:/var/jboss/lib/ext/mysql.jar
> /C:/var/jboss/lib/ext/oswego-concurrent.jar
> /C:/var/jboss/lib/ext/ots-jts_1.0.jar
> /C:/var/jboss/lib/ext/tomcat-service.jar
> /C:/var/jboss/lib/ext/tyrex-0.9.8.5.jar
> 
> /C:/var/jboss/tmp/
> /C:/var/jboss/db/
> /C:/var/tomcat/lib/ant.jar
> /C:/var/tomcat/lib/jasper.jar
> /C:/var/tomcat/lib/servlet.jar
> /C:/var/tomcat/lib/tools.jar
> /C:/var/tomcat/lib/webserver.jar
> 
> 
> The example war that came with the Validator seems
> to work fine, so it
> must be a local issue to my deployment.
> 
> Any ideas?
> 
> Craig
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Parsing Error for struts-config.xml

2002-03-07 Thread Suneet Shah

Hello,
I have struts based application that runs just fine on a number of application server. 
However, on 
Borland Enterprise Server I get the exception below.  I am using struts 1.02. Any 
ideas on how I can fix this?
Thank you.
Suneet Shah

javax.servlet.ServletException: Parsing error processing resource path 
/WEB-INF/struts-config.xml
at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1337)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:911)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:671)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2408)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1013)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1108)
at java.lang.Thread.run(Thread.java:484)

java.net.MalformedURLException: unknown protocol: besjar
at org.apache.struts.digester.Digester.resolveEntity(Digester.java:613)
at 
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity(DefaultEntityHandler.java:750)
at 
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalSubset(DefaultEntityHandler.java:566)
at 
org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.java:1139)
at 
org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2145)
at 
org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentScanner.java:2100)
at 
org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XMLDocumentScanner.java:831)
at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:143)
at org.apache.struts.digester.Digester.parse(Digester.java:757)
at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:911)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:671)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catali

Re: [off topic?] image retrieving from db

2002-03-07 Thread @Basebeans.com

Subject: Re: [off topic?] image retrieving from db
From: "Tea Yu" <[EMAIL PROTECTED]>
 ===
I'm storing blob data into the database and using JImageMagick to return
image of different formats on the fly.  Each time I have to retrieve an
image included in a page (with other text/html contents), I have to call
the retriever Servlet or jsp from the  tag.

However, I did not hardcode the table/id info into the Servlet so
everytime I call the servlet I have to pass the table name and at least
(if the former is hardcoded) the image id to the img tag, like



Is there any way to hide the query info?  in a session manner or some
other more elegant way in Struts?

Thanks!

Tea Yu



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts and encryption

2002-03-07 Thread Bryan Field-Elliot

Many database have their own extensions for encryption, or one-way
hashing, used for things like password storage. That's probably the best
choice you could make.

Bryan

On Thu, 2002-03-07 at 19:36, Andrew H. Peterson wrote:

Is there a struts preferred method of handling encryption/decryption?   I am
authenticating users via a database lookup.  I want to store the encrypted
password in the database.

If struts doesn't have a preferred method of encryption/decryption, can
someone point me to a good Java API for  encryption/decryption?

Thanks.

ahp



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 





RE: getting ArrayList elements as objects

2002-03-07 Thread Domen, Ken

I was hoping by reflection that my sub-object would be re-created
automatically.  This was not the case.
I had to take all the attributes and recreate the sub-object in the
ActionClass and then attach it to the
parent class.

So the jsp code stays "clean" and struts-like

***







***

But in the UpdateMaterialAction class, there's a bit of work:

***
//2.  Grab request params from Bean.  Use this same bean to
repopulate
MaterialBean myForm = (MaterialBean)form;

//3.  Create the Material Object along w/ child Substances Objects
and
// then call business logic in EJB 
try
{
BusinessFacadeHome bhome = this.getBusinessFacadeHome();
BusinessFacade facade = bhome.create();

//1.  This is the parent object w/ parent attributes
Material m = new Material();
m.setMaterialID(myForm.getMaterialID());
m.setSupplierMaterialName(myForm.getSupplierMaterialName());
m.setNikeMaterialName(myForm.getNikeMaterialName());
m.setSupplierProductID(myForm.getSupplierProductID());
m.setNikeProductID(myForm.getNikeProductID());
m.setMaterialDescription(myForm.getMaterialDescription());
 
m.setFinalProductApplication(myForm.getFinalProductApplication());
m.setRemarks(myForm.getRemarks());
m.setMaterialStatus(myForm.getMaterialStatus());
m.setLastUserUpdate(myForm.getLastUserUpdate());
m.setConfirmingUser(myForm.getConfirmingUser());
if (myForm.getExceedsSubstanceLimit()) {
m.setExceedsSubstanceLimit("1"); }
else { m.setExceedsSubstanceLimit("0"); }

//2.  Struts does not automatically re-create sub-objects for
you from the jsp-- this doesn't work
ArrayList list = myForm.getSubstances();
System.out.println("list.size(): " + list.size());
Iterator i = list.iterator();
while (i.hasNext())
{
Substance s = (Substance)i.next();
System.out.println("s.getCasNumber(): " + s.getCasNumber());
}

//3.  So we have to reconstruct the sub-object and attach it to
the parent node-- this works.
String[] substanceNames =
request.getParameterValues("substanceName");
String[] casNumbers = request.getParameterValues("casNumber");
for (int j=0;jmailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 3:14 PM
To: '[EMAIL PROTECTED]'
Subject: getting ArrayList elements as objects


I want to be able to get (after a submit) the values of the iterator
as an ArrayList of objects in the action class.  Currently, substances is
an ArrayList in bean Material.  

How do people achieve this?  Or is there a work around?













--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts and encryption

2002-03-07 Thread Aamir Saalam

For Password encryption (which is one way, you can never get back the original 
password, given the encrypted string), there's one
called JCrypt.


For more info. see:

http://www.dynamic.net.au/christos/crypt/Password.txt


--aamir

-Original Message-
From: Andrew H. Peterson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 6:36 PM
To: Struts User Forum (E-mail)
Subject: Struts and encryption


Is there a struts preferred method of handling encryption/decryption?   I am
authenticating users via a database lookup.  I want to store the encrypted
password in the database.

If struts doesn't have a preferred method of encryption/decryption, can
someone point me to a good Java API for  encryption/decryption?

Thanks.

ahp



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts and encryption

2002-03-07 Thread Andrew H. Peterson

Is there a struts preferred method of handling encryption/decryption?   I am
authenticating users via a database lookup.  I want to store the encrypted
password in the database.

If struts doesn't have a preferred method of encryption/decryption, can
someone point me to a good Java API for  encryption/decryption?

Thanks.

ahp



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




What's a good practice to reuse formBeans with validation

2002-03-07 Thread @Basebeans.com

Subject: What's a good practice to reuse formBeans with validation
From: "Tea Yu" <[EMAIL PROTECTED]>
 ===
Hi, consider the following scenario:

a countryForm bean contains properties "id" and "name"
actions to 1) insert, 2) update and 3) delete countries (not likely to
happen except to remove wrong/test inputs)

if I allow my users to delete a country by id (maybe a hyperlink), then I
suppose the name field will be null.  How should I handle such a basic
validation in countryForm as name shouldn't be null in case 1) and 2) but
could be null in case 3)?  The same question applies to id field in case
1).

Is this a business logic and not to be handled in form bean?  Thus only
test if id is an integer:

if(id != null){
try{
Integer.parseInt(id)
}catch(NumberFormatException nfe){
//chain up errors
}
}


in the actionForm:

if("Delete".equals(mapping.getParameter())
//test id==null


or should I turn to struts validator (which I guess rules could be
included in the form)?  or to use 3 different formBeans?  |o|

Nice day!
Tea Yu



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




live progress...

2002-03-07 Thread Keith Chew

Hi

I would like to implement a live progress on a JSP, something like:

time = 0s
*
Synchronizing database...

time = 5s
*
Synchronizing database... DONE!
Sending mail to keith...

time =10s
*
Synchronizing database... DONE!
Sending mail to keith... DONE!

Essentially, I need to flush the ouput to the page correct? Can I do this
from the Action class? I doubt this can be achieved because the MVC
architecture forces you to prepare the entire data for view. So, you cannot
flush part of the view from the Action.

Anyone done this kind of thing?

Keith


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




HELP! Problems with HTTPS extension for struts

2002-03-07 Thread Michael Mehrle

I'm running into problems running the http extension at 
http://home1.gte.net/ditling/struts/

Below the error I get trying to launch index.jsp - anyone running into similar 
problems? BTW, after some research online, I replaced xerces.jar with crimson.jar in 
my WEB-INF/lib directory and I'm getting the indentical error. And yes, I'm running 
the lastest version of Tomcat and Struts, as well as JDK1.3 (don't want to touch 
JDK1.4 for now). Anyway, any good ideas would be appreciated...


type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error) that 
prevented it from fulfilling this request.

exception 

javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHandler.java:215)
at 
org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194)
at java.lang.Thread.run(Thread.java:484)


root cause 

java.lang.ClassCastException: org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
at 
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:139)
at org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:183)
at 
org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCache.java:165)
at org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:138)
at org.apache.jasper.EmbededServletOptions.(EmbededServletOptions.java:345)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:916)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.in

I18n / Chinese / Struts

2002-03-07 Thread Tony Li

Hi all - 

After reading some of the posts on getting internationalization working,
I've got my struts app using the appropriate resource file
(resources.properties and resources_zh.properties) depending on the
locale of the user.  

What I'm having trouble with is with the file I'm inputting into the
native2ascii.  I've been using NJStar Chinese WP to create my
resources_zh.properties.  I've tried saving the file in GB Text, Big 5
Text, UTF8 Text, and all the other available formats.  I then feed this
file to native2ascii to get my resources_zh.properties.  All I'm getting
is garbage in IE when I hit my test page.

I've followed the example on this site:
http://www.anassina.com/struts/i18n/i18n.html and added

<%@ page contentType="text/html; charset=UTF-8" %> 

to the top of my test jsp.  I've tried all the different IE
View->Encoding options and I can't get the chinese text I originally
entered into NJStar.

Any ideas or suggestions?

Thanks,

Tony Li

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: "Best Practice" for parsing an XML file - Code Review Requested

2002-03-07 Thread David M. Karr

> "Matt" == Matt Raible <[EMAIL PROTECTED]> writes:

Matt> I've completed this task - however, it would've been MUCH easier to just use 
a
Matt> properties file.  Of course, it could just be my experience with XML parsing 
-
Matt> because I had to write a lot of code to grab 4 simple varaibles.


Matt>   // Get the XML Document
Matt> DocumentBuilderFactory builderFactory =
Matt> DocumentBuilderFactory.newInstance();
Matt>   DocumentBuilder builder = builderFactory.newDocumentBuilder();
Matt>   Document doc = builder.parse(is);

Matt>   // close the input stream
Matt>   is.close();

Matt> // get the repository root
Matt>   NodeList rep = doc.getElementsByTagName("root");
Matt>   Node node = rep.item(0);
Matt> Text rootDir = (Text) node.getFirstChild();
Matt> config.setRepositoryRootDir(rootDir.getNodeValue());

Matt> // get the assets directory
Matt> rep = doc.getElementsByTagName("assets");
Matt> node = rep.item(0);
Matt> Text assetDir = (Text) node.getFirstChild();
Matt> config.setAssetDir(assetDir.getNodeValue());

You might take a look at JDOM.  It's a bit easier to use than the straight DOM
api.  The web site () has links to several articles and
example code.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Need help getting a production/stable version of v1.1

2002-03-07 Thread CyberZombie

Note that the 1/12 build will not work with JDK1.4...

Bruce Geerdes wrote:

>Ted Husted posted the 1/12 build on his web site.  You can see his message at
>"http://www.mail-archive.com/struts-user@jakarta.apache.org/msg23631.html";.
>
>Bruce
>
>
>"Read, Karen" wrote:
>
>>>We started using a version of Struts from a nightly build without source
>>>code.  This version includes support in the package
>>>org.apache.struts.taglib.html for the "indexed" attribute in a couple of
>>>the classes.  Our code relies on this as well as many of the other
>>>changes.  Some of these were not available in the newly released 1.0.2
>>>version released in Jan. 2002.  We need to find a stable version that we
>>>can use that contains these fixes and also the source code for debugging
>>>purposes. I am hoping that there will be a release soon or you can point
>>>me to a stable version that we can use that contains the needed fixes.
>>>Thank you in advance,
>>>Karen Read
>>>Railinc Corporation
>>>Cary, NC
>>>
>>--
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 
>>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html:error and html:text enhancements

2002-03-07 Thread Jonathan Fuerth

I have two quick questions about the html:errors tag:

1. Has anybody thought about implementing a "remove" attribute on the
   errors tag that removes the ActionError objects as they're printed?
   That way, you could report all of the property-specific errors
   alongside their form input boxes, then render the leftovers at the
   bottom of the form with a simple  tag.

2. Has anybody thought about implementing a "printErrors" attribute
   on the html:text tag?  This would have to mesh well with the
   "indexed" property to report all the errors encountered in a
   collection of indexed text boxes.

If nobody is currently working on this, I'd be happy to do it.  I'm
especially interested in input from the Struts maintainers so that I
can do the modificiation properly.  That way, it could be integrated
with future releases.

Thanks!

-- 
Jonathan Fuerth - SQL Power Group Inc.
(416)218-5551 (Toronto); 1-866-SQL-POWR (Toll-Free)
Unleash the Power of your Corporate Data - www.sqlpower.ca

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




and keeping the value on errors

2002-03-07 Thread Matt Raible

This might be considered off-topic, but here goes.

Does anyone have a solution for keeping the file path in a 
rendered by a  tag?

I noticed with the Validator, it is not possible to validate the user has
selected a file.  Therefore, in my action class, I am extracting the filename,
and checking to see if it is blank.  If so, I route them back to the first
page, and tell them they need to select a file.

However, the file they selected is not in the field anymore.  I'm assuming this
is a browser thing, since I know you cannot set a value using javascript
(against security on this type of field).

Does anyone have a workaround for keeping the original value in the field?

Thanks,

Matt


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: I18n for number formatting on Struts

2002-03-07 Thread Hani Hamandi

I was wondering, since internationalization worked for you:
How did you guys deal with button labels? By button-label I mean the text
displayed on your submit buttons. I found no way of displaying a
button-label from a  Isn't that right?

-Original Message-
From: Eduardo André Mallmann [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 1:38 PM
To: '[EMAIL PROTECTED]'
Subject: I18n for number formatting on Struts 


Hi all,

I'm using Struts on a project in the company. The Internacionalization for
the messages and labels on the Web pages work fine and we didn't have much
problem.

But for the internacionalization of some number formats (write 1.000,00
instead of 1,000.00, etc) we had to set somethings hard coded because we
didn't find support on Struts for this kind of thing.

Do you know if it's possible to let Struts do by himself the formatting of
numbers, dates, etc. automatically using the Locale catched from the
session, like it does for the messages and labels?

Thanks in advance,

Eduardo

Eduardo André Mallmann | Analista de sistemas

mercador.com - varejistas e fornecedores juntos em um só lugar
Rua Dona Laura, 320 / 7º andar
CEP: 90430-090, Porto Alegre, RS - Brasil
Tel.: 55.51.3378 9014
Fax: 55.51.3378 9048
mailto:[EMAIL PROTECTED]
http://www.mercador.com


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Off Topic] Poolman Setup

2002-03-07 Thread cahana

Looks like it can't find your poolman.xml file.  We jar poolman.xml and
stick the jar file in the WEB-INF/lib directory.  That way, when the app
starts up, poolman.xml will get loaded into the classpath.

- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, March 07, 2002 12:47 PM
Subject: [Off Topic] Poolman Setup


I've done everything (I think) that poolman requires in order to function,
and yet it does not.  After placing only the required jars into my \lib
folder, and having no success with Poolman starting, I threw all of them in.
It still doesn't work.

I wasn't at all sure, from the documentation, where I should poke the
poolman.xml file.  Initially I had it in my WEB-INF directory.  Then, I
copied it to the \lib directory. Still no luck.

Every time Poolman is started, I get the same exact error - a null pointer
exception.  This occurs when poolman is calling parseXML from
loadConfiguration.  The relevant piece of the stacktrace is:

java.lang.NullPointerException
at com.codestudio.management.PoolManConfiguration.parseXML
(PoolManConfiguration.java:121)
at com.codestudio.management.PoolManConfiguration.loadConfiguration
(PoolManConfiguration.java:75)
at com.codestudio.management.PoolManBootstrap.
(PoolManBootstrap.java:61)
at com.codestudio.management.PoolManBootstrap.
(PoolManBootstrap.java:54)
at com.codestudio.sql.PoolMan.start (PoolMan.java:97)

The rest of the stacktrace goes into my servlet - which worked fine before I
tried to kick off Poolman in it's init method.

I have also tried not calling start, but, instead, just allowing Poolman to
do it's 'lazy' initialization - same exact result.

I would be most appreciative if someone out there could give me a 'heads
up'.

I'm running Tomcat 4.0.1 (I can't see why that would matter) and JDK 1.3.

Thanks!

Eddie




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




getting ArrayList elements as objects

2002-03-07 Thread Domen, Ken

I want to be able to get (after a submit) the values of the iterator
as an ArrayList of objects in the action class.  Currently, substances is
an ArrayList in bean Material.  

How do people achieve this?  Or is there a work around?













--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Off Topic] Poolman Setup

2002-03-07 Thread Eddie Bush

Yes!  I had misspelled the package for my driver, but once I corrected that
it works!  Well, it seems to work.

Thanks Again!

Eddie

- Original Message -
From: "Bryan Field-Elliot" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, March 07, 2002 5:05 PM
Subject: Re: [Off Topic] Poolman Setup


> I'm no expert (having just picked up poolman a week ago) but, it appears
> to me that you don't have poolman.xml in the right place. It needs to be
> in either of the following places:
>
> 1. In the WEB-INF/classes directory (this is what I do)
> 2. Jar'd up, and then put the Jar in the WEB-INF/lib directory (as
> opposed to what you tried, which is putting the un-jar'd XML file in the
> lib directory).
>
> Bryan
>
> On Thu, 2002-03-07 at 15:47, Eddie Bush wrote:
>
> I've done everything (I think) that poolman requires in order to
function, and yet it does not.  After placing only the required jars into my
\lib folder, and having no success with Poolman starting, I threw all of
them in.  It still doesn't work.
>
> I wasn't at all sure, from the documentation, where I should poke the
poolman.xml file.  Initially I had it in my WEB-INF directory.  Then, I
copied it to the \lib directory. Still no luck.
>
> Every time Poolman is started, I get the same exact error - a null
pointer exception.  This occurs when poolman is calling parseXML from
loadConfiguration.  The relevant piece of the stacktrace is:
>
> java.lang.NullPointerException
> at com.codestudio.management.PoolManConfiguration.parseXML
(PoolManConfiguration.java:121)
> at
com.codestudio.management.PoolManConfiguration.loadConfiguration
(PoolManConfiguration.java:75)
> at com.codestudio.management.PoolManBootstrap.
(PoolManBootstrap.java:61)
> at com.codestudio.management.PoolManBootstrap.
(PoolManBootstrap.java:54)
> at com.codestudio.sql.PoolMan.start (PoolMan.java:97)
>
> The rest of the stacktrace goes into my servlet - which worked fine
before I tried to kick off Poolman in it's init method.
>
> I have also tried not calling start, but, instead, just allowing
Poolman to do it's 'lazy' initialization - same exact result.
>
> I would be most appreciative if someone out there could give me a
'heads up'.
>
> I'm running Tomcat 4.0.1 (I can't see why that would matter) and JDK
1.3.
>
> Thanks!
>
> Eddie
>
>
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Off Topic] Poolman Setup

2002-03-07 Thread Eddie Bush

Excellent Ted thanks!  I'll tuck this away in a safe place.

Thank You!

Eddie

- Original Message -
From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, March 07, 2002 5:07 PM
Subject: Re: [Off Topic] Poolman Setup


> Try
>
> /lib/poolman.jar
> /lib/log4j.jar
> /lib/jdbc2_0-stdext.jar
>
> /classes/poolman.xml
>
> in poolman.xml
>
>   WHATEVER
>   WHATEVER
>   WHATEVER
>   WHATEVER
>   WHATEVER
>   WHATEVER
>
>   /var/applogs/poolman.log
>
> in your code
>
>  Datasource datasource = PoolMan.findDataSource(WHATEVER);
>
>
> and create a /var/applogs (or \var\applogs) directory.
>
> Be careful that a clean build doesn't whack your poolman.xml. If you're
> using Ant, put it with your Java source files and
>
> 
> 
> 
> 
> 
> 
> 
> 
>
> -- Ted Husted, Husted dot Com, Fairport NY US
> -- Developing Java Web Applications with Struts
> -- Tel: +1 585 737-3463
> -- Web: http://husted.com/about/services
>
>
> Eddie Bush wrote:
> >
> > I've done everything (I think) that poolman requires in order to
function, and yet it does not.  After placing only the required jars into my
\lib folder, and having no success with Poolman starting, I threw all of
them in.  It still doesn't work.
> >
> > I wasn't at all sure, from the documentation, where I should poke the
poolman.xml file.  Initially I had it in my WEB-INF directory.  Then, I
copied it to the \lib directory. Still no luck.
> >
> > Every time Poolman is started, I get the same exact error - a null
pointer exception.  This occurs when poolman is calling parseXML from
loadConfiguration.  The relevant piece of the stacktrace is:
> >
> > java.lang.NullPointerException
> > at com.codestudio.management.PoolManConfiguration.parseXML
(PoolManConfiguration.java:121)
> > at com.codestudio.management.PoolManConfiguration.loadConfiguration
(PoolManConfiguration.java:75)
> > at com.codestudio.management.PoolManBootstrap.
(PoolManBootstrap.java:61)
> > at com.codestudio.management.PoolManBootstrap.
(PoolManBootstrap.java:54)
> > at com.codestudio.sql.PoolMan.start (PoolMan.java:97)
> >
> > The rest of the stacktrace goes into my servlet - which worked fine
before I tried to kick off Poolman in it's init method.
> >
> > I have also tried not calling start, but, instead, just allowing Poolman
to do it's 'lazy' initialization - same exact result.
> >
> > I would be most appreciative if someone out there could give me a 'heads
up'.
> >
> > I'm running Tomcat 4.0.1 (I can't see why that would matter) and JDK
1.3.
> >
> > Thanks!
> >
> > Eddie
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Off Topic] Poolman Setup

2002-03-07 Thread Ted Husted

Try

/lib/poolman.jar
/lib/log4j.jar
/lib/jdbc2_0-stdext.jar

/classes/poolman.xml

in poolman.xml

  WHATEVER
  WHATEVER
  WHATEVER
  WHATEVER
  WHATEVER
  WHATEVER

  /var/applogs/poolman.log

in your code 

 Datasource datasource = PoolMan.findDataSource(WHATEVER);


and create a /var/applogs (or \var\applogs) directory. 

Be careful that a clean build doesn't whack your poolman.xml. If you're
using Ant, put it with your Java source files and 










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


Eddie Bush wrote:
> 
> I've done everything (I think) that poolman requires in order to function, and yet 
>it does not.  After placing only the required jars into my \lib folder, and having no 
>success with Poolman starting, I threw all of them in.  It still doesn't work.
> 
> I wasn't at all sure, from the documentation, where I should poke the poolman.xml 
>file.  Initially I had it in my WEB-INF directory.  Then, I copied it to the \lib 
>directory. Still no luck.
> 
> Every time Poolman is started, I get the same exact error - a null pointer 
>exception.  This occurs when poolman is calling parseXML from loadConfiguration.  The 
>relevant piece of the stacktrace is:
> 
> java.lang.NullPointerException
> at com.codestudio.management.PoolManConfiguration.parseXML 
>(PoolManConfiguration.java:121)
> at com.codestudio.management.PoolManConfiguration.loadConfiguration 
>(PoolManConfiguration.java:75)
> at com.codestudio.management.PoolManBootstrap. (PoolManBootstrap.java:61)
> at com.codestudio.management.PoolManBootstrap. (PoolManBootstrap.java:54)
> at com.codestudio.sql.PoolMan.start (PoolMan.java:97)
> 
> The rest of the stacktrace goes into my servlet - which worked fine before I tried 
>to kick off Poolman in it's init method.
> 
> I have also tried not calling start, but, instead, just allowing Poolman to do it's 
>'lazy' initialization - same exact result.
> 
> I would be most appreciative if someone out there could give me a 'heads up'.
> 
> I'm running Tomcat 4.0.1 (I can't see why that would matter) and JDK 1.3.
> 
> Thanks!
> 
> Eddie

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Off Topic] Poolman Setup

2002-03-07 Thread Eddie Bush

That looks promising so far - thanks.  Let me muddle through the rest of
this and see if it works.

Thanks so much!

Eddie

- Original Message -
From: "Bryan Field-Elliot" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, March 07, 2002 5:05 PM
Subject: Re: [Off Topic] Poolman Setup


> I'm no expert (having just picked up poolman a week ago) but, it appears
> to me that you don't have poolman.xml in the right place. It needs to be
> in either of the following places:
>
> 1. In the WEB-INF/classes directory (this is what I do)
> 2. Jar'd up, and then put the Jar in the WEB-INF/lib directory (as
> opposed to what you tried, which is putting the un-jar'd XML file in the
> lib directory).
>
> Bryan
>
> On Thu, 2002-03-07 at 15:47, Eddie Bush wrote:
>
> I've done everything (I think) that poolman requires in order to
function, and yet it does not.  After placing only the required jars into my
\lib folder, and having no success with Poolman starting, I threw all of
them in.  It still doesn't work.
>
> I wasn't at all sure, from the documentation, where I should poke the
poolman.xml file.  Initially I had it in my WEB-INF directory.  Then, I
copied it to the \lib directory. Still no luck.
>
> Every time Poolman is started, I get the same exact error - a null
pointer exception.  This occurs when poolman is calling parseXML from
loadConfiguration.  The relevant piece of the stacktrace is:
>
> java.lang.NullPointerException
> at com.codestudio.management.PoolManConfiguration.parseXML
(PoolManConfiguration.java:121)
> at
com.codestudio.management.PoolManConfiguration.loadConfiguration
(PoolManConfiguration.java:75)
> at com.codestudio.management.PoolManBootstrap.
(PoolManBootstrap.java:61)
> at com.codestudio.management.PoolManBootstrap.
(PoolManBootstrap.java:54)
> at com.codestudio.sql.PoolMan.start (PoolMan.java:97)
>
> The rest of the stacktrace goes into my servlet - which worked fine
before I tried to kick off Poolman in it's init method.
>
> I have also tried not calling start, but, instead, just allowing
Poolman to do it's 'lazy' initialization - same exact result.
>
> I would be most appreciative if someone out there could give me a
'heads up'.
>
> I'm running Tomcat 4.0.1 (I can't see why that would matter) and JDK
1.3.
>
> Thanks!
>
> Eddie
>
>
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Off Topic] Poolman Setup

2002-03-07 Thread Bryan Field-Elliot

I'm no expert (having just picked up poolman a week ago) but, it appears
to me that you don't have poolman.xml in the right place. It needs to be
in either of the following places:

1. In the WEB-INF/classes directory (this is what I do)
2. Jar'd up, and then put the Jar in the WEB-INF/lib directory (as
opposed to what you tried, which is putting the un-jar'd XML file in the
lib directory).

Bryan

On Thu, 2002-03-07 at 15:47, Eddie Bush wrote:

I've done everything (I think) that poolman requires in order to function, and yet 
it does not.  After placing only the required jars into my \lib folder, and having no 
success with Poolman starting, I threw all of them in.  It still doesn't work.

I wasn't at all sure, from the documentation, where I should poke the poolman.xml 
file.  Initially I had it in my WEB-INF directory.  Then, I copied it to the \lib 
directory. Still no luck.

Every time Poolman is started, I get the same exact error - a null pointer 
exception.  This occurs when poolman is calling parseXML from loadConfiguration.  The 
relevant piece of the stacktrace is:

java.lang.NullPointerException
at com.codestudio.management.PoolManConfiguration.parseXML 
(PoolManConfiguration.java:121)
at com.codestudio.management.PoolManConfiguration.loadConfiguration 
(PoolManConfiguration.java:75)
at com.codestudio.management.PoolManBootstrap. (PoolManBootstrap.java:61)
at com.codestudio.management.PoolManBootstrap. (PoolManBootstrap.java:54)
at com.codestudio.sql.PoolMan.start (PoolMan.java:97)

The rest of the stacktrace goes into my servlet - which worked fine before I tried 
to kick off Poolman in it's init method.

I have also tried not calling start, but, instead, just allowing Poolman to do 
it's 'lazy' initialization - same exact result.

I would be most appreciative if someone out there could give me a 'heads up'.

I'm running Tomcat 4.0.1 (I can't see why that would matter) and JDK 1.3.

Thanks!

Eddie






Struts Tag lib handling and WSAD JSP Editor

2002-03-07 Thread Michael_J_Quinn


All
 Has anybody done any work on getting the WSAD JSP editor
 to recognise the Struts tag libs, as per the Dreamweaver UltraDev
 approach ??

cheers MQ
__
The information contained in this email communication may be confidential.
You
should only read, disclose, re-transmit, copy, distribute, act in reliance
on or
commercialise the information if you are authorised to do so. If you are
not the
intended recipient of this email communication, please notify us
immediately by
email to [EMAIL PROTECTED] or reply by email direct to the sender
and then destroy any electronic or paper copy of this message.  Any views
expressed in this email communication are those of the individual sender,
except
where the sender specifically states them to be the views of a member of
the
National Australia Bank Group of companies.  The National Australia Bank
Group
of companies does not represent, warrant or guarantee that the integrity of
this
communication has been maintained nor that the communication is free of
errors,
virus or interference.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: "Best Practice" for parsing an XML file - Code Review Requested

2002-03-07 Thread Andre Beskrowni

i've used digester before and found it pretty straightforward, you probably
just needed an extra hour :-)  but i recently read this article on Castor
XML (by a frequent poster to this list):

and am thinking this may be my future xml parsing tool.  i haven't had a
chance to use it yet, but it looks amazingly simple.

ab

> -Original Message-
> From: Matt Raible [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 12:51 PM
> To: Struts Users Mailing List
> Subject: RE: "Best Practice" for parsing an XML file - Code Review
> Requested
> 
> 
> I "tried" to use digester - documentation/samples weren't 
> good enough OR I
> wasn't smart enough to figure it out.
> 
> I tried for an hour or 2 to get it to work and gave up.
> 
> Matt
> 
> --- Phase Web and Multimedia <[EMAIL PROTECTED]> wrote:
> > Why not use Digester. I use it to parse config info for 
> various classes. It
> > is quite easy and fast.
> > 
> > Brandon Goodin
> > Phase Web and Multimedia
> > P (406) 862-2245
> > F (406) 862-0354
> > [EMAIL PROTECTED]
> > http://www.phase.ws
> > 
> > 
> > -Original Message-
> > From: Matt Raible [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 06, 2002 3:13 PM
> > To: Struts Users Mailing List
> > Subject: RE: "Best Practice" for parsing an XML file - Code Review
> > Requested
> > 
> > 
> > I've completed this task - however, it would've been MUCH 
> easier to just use
> > a
> > properties file.  Of course, it could just be my experience with XML
> > parsing -
> > because I had to write a lot of code to grab 4 simple varaibles.
> > 
> > private synchronized void loadConfig() throws Exception {
> > 
> > // Initialize our configuration object
> > config = new Configuration();
> > 
> > logCat.debug("Looking for " + configFile + " in " +
> > Constants.USER_HOME);
> > 
> > // Acquire an input stream to our configuration file
> > InputStream is = new FileInputStream(Constants.USER_HOME +
> > configFile);
> > 
> > // No file found in user.home
> > if (is == null) {
> > logCat.debug("File not found at " + 
> Constants.USER_HOME +
> > configFile
> > + " - looking in application's WEB-INF 
> directory");
> > 
> > // Look for config.xml in WEB-INF
> > is = getServletContext()
> > .getResourceAsStream("/WEB-INF/" + configFile);
> > 
> > if (is == null) {
> > throw new Exception("Configuration file '"
> > + configFile + "' not found in '"
> > + Constants.USER_HOME + "', nor in 
> '/WEB-INF/'");
> > }
> > }
> > 
> > 
> > // Get the XML Document
> > DocumentBuilderFactory builderFactory =
> > DocumentBuilderFactory.newInstance();
> > DocumentBuilder builder = 
> builderFactory.newDocumentBuilder();
> > Document doc = builder.parse(is);
> > 
> > // close the input stream
> > is.close();
> > 
> > // get the repository root
> > NodeList rep = doc.getElementsByTagName("root");
> > Node node = rep.item(0);
> > Text rootDir = (Text) node.getFirstChild();
> > config.setRepositoryRootDir(rootDir.getNodeValue());
> > 
> > // get the assets directory
> > rep = doc.getElementsByTagName("assets");
> > node = rep.item(0);
> > Text assetDir = (Text) node.getFirstChild();
> > config.setAssetDir(assetDir.getNodeValue());
> > 
> > // get the assetView path
> > rep = doc.getElementsByTagName("viewPath");
> > node = rep.item(0);
> > Text viewPath = (Text) node.getFirstChild();
> > config.setAssetViewPath(viewPath.getNodeValue());
> > 
> > // get the assetView path
> > rep = doc.getElementsByTagName("default-passing-score");
> > node = rep.item(0);
> > Text minScore = (Text) node.getFirstChild();
> > config.setAssessmentMinScore(new
> > Double(minScore.getNodeValue()).doubleValue());
> > 
> > logCat.debug(config.toString());
> > 
> > }
> > 
> > --- Ronald Haring <[EMAIL PROTECTED]> wrote:
> > > > Nothing is wrong with the properties file...Xml is just better
> > > >
> > > > 1.  one config.xml file in one central place...it's so much
> > > > easier to manage
> > > > then a whole bunch of properties
> > >
> > > You can put all your properties in one file as well, lets 
> call that file
> > > config.properties
> > >
> > > > 2.  xml handle the structure data much better then 
> properties file
> > >
> > > data structure might be nice for communications between 
> computers but for
> > > users?
> > > e.g.
> > > RepositoryRoot=d:\
> > > RepositoryAssets=assets
> > > RepositoryViewPath=file://d:/repository/assets
> > >
> > > seems just as clear to me as
> > > > >   
> > > > >   

Form Based authentication with STRUTS and WEBSPHERE

2002-03-07 Thread BinhMinh Nguyen

Hi,

My webapp is implemented based on struts and deployed
to WebSphere.

I am using custom-user-registry  to protect web
resource. I have setup
everything. when start the Admin Console, it asked me
for the user
name and password, I entered those parameters and it
let passed that
point, so I assumed that the custome user registry I
implemented 
works.


But when tried to access the protected resource, it
seems like the
application entered some sort of infinite loop, the
browser keeps
browsing and browsing...
and it seems like it would never stop !:(


I am not sure that I can use .do in websphere??? but
it works fine in weblogic. 


/login.do
   
/loginerror.do
 





The application.xml defines the role, "role-fn-user", 

This role is mapped to a group in the database at the
time of
deployment (I selected option "select users/groups" in
the "user role
mapping" panel at deployment time. I believe that the
Admin Cosole
does look up for the group in the DB using the custom
Registry because
I did test change the value of the group in the group
table and it
does return the right value if I made the change.

I am sure that I missed something or have done
something wrong. Please
help me sole this problem, I spent the last three days
trying to solve
it, but I cannot

Thanks in advance

Xenoux



   
  Furnnet
  
 Furnnet_EJB.jar
  
  
 
furnnet.war
/furnnet
 
  
  
 role-fn-user
  
   
Post a follow-up to this message





__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: I18n for number formatting on Struts

2002-03-07 Thread Andre Beskrowni

try the i18n taglib in the jakarta-taglibs project.  note that this is
eventually going to be deprecated by jstl, so if you find a bug or if the
functionality doesn't do exactly what you need, you'll have to tweak it by
yourself -- not that it's hard or anything...

ab

> -Original Message-
> From: Eduardo André Mallmann [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 1:38 PM
> To: '[EMAIL PROTECTED]'
> Subject: I18n for number formatting on Struts 
> 
> 
> Hi all,
> 
> I'm using Struts on a project in the company. The 
> Internacionalization for
> the messages and labels on the Web pages work fine and we 
> didn't have much
> problem.
> 
> But for the internacionalization of some number formats 
> (write 1.000,00
> instead of 1,000.00, etc) we had to set somethings hard coded 
> because we
> didn't find support on Struts for this kind of thing.
> 
> Do you know if it's possible to let Struts do by himself the 
> formatting of
> numbers, dates, etc. automatically using the Locale catched from the
> session, like it does for the messages and labels?
> 
> Thanks in advance,
> 
> Eduardo
> 
> Eduardo André Mallmann | Analista de sistemas
> 
> mercador.com - varejistas e fornecedores juntos em um só lugar
> Rua Dona Laura, 320 / 7º andar
> CEP: 90430-090, Porto Alegre, RS - Brasil
> Tel.: 55.51.3378 9014
> Fax: 55.51.3378 9048
> mailto:[EMAIL PROTECTED]
> http://www.mercador.com
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[Off Topic] Poolman Setup

2002-03-07 Thread Eddie Bush

I've done everything (I think) that poolman requires in order to function, and yet it 
does not.  After placing only the required jars into my \lib folder, and having no 
success with Poolman starting, I threw all of them in.  It still doesn't work.

I wasn't at all sure, from the documentation, where I should poke the poolman.xml 
file.  Initially I had it in my WEB-INF directory.  Then, I copied it to the \lib 
directory. Still no luck.

Every time Poolman is started, I get the same exact error - a null pointer exception.  
This occurs when poolman is calling parseXML from loadConfiguration.  The relevant 
piece of the stacktrace is:

java.lang.NullPointerException
at com.codestudio.management.PoolManConfiguration.parseXML 
(PoolManConfiguration.java:121)
at com.codestudio.management.PoolManConfiguration.loadConfiguration 
(PoolManConfiguration.java:75)
at com.codestudio.management.PoolManBootstrap. (PoolManBootstrap.java:61)
at com.codestudio.management.PoolManBootstrap. (PoolManBootstrap.java:54)
at com.codestudio.sql.PoolMan.start (PoolMan.java:97)

The rest of the stacktrace goes into my servlet - which worked fine before I tried to 
kick off Poolman in it's init method.

I have also tried not calling start, but, instead, just allowing Poolman to do it's 
'lazy' initialization - same exact result.

I would be most appreciative if someone out there could give me a 'heads up'.

I'm running Tomcat 4.0.1 (I can't see why that would matter) and JDK 1.3.

Thanks!

Eddie




RE: design flaw if using a template...

2002-03-07 Thread Matt Read

I'm glad you've found a solution. I'd still say you're misusing
 though, because it's not really a template that you're
inserting but if it works, it works.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 21:15
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

I am such an idiot.

In my template.jsp, I have:



This is equivalent to a jsp include. My mistake was news.do forwards to
new.jsp after getting the data from the database.

However, news.jsp uses template.jsp too!! So it's trying to go into an
infinite loop!

I have changed new.jsp to just return the news. It's going well.

Thank you very much for all you help.

Keith



-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 3:31 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Keith, they're not the same thing, by any means. As you said, if you use
your method:

you get a "too many servlet includes `/template.jsp'" error. This is doesn't
really suprise me at all - you're basically trying to use something which
blatantly isn't a template, as a template.

However if you use the method I outlined in my examples, i.e. you "put"
content into a template, whether this content is a .jsp or an action mapping
url - it works.

Honestly, just use  as it is documented and your problems will
be solved.

Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 02:18
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

I will try this again tonight. But I am doing the same as you (well, just
another way):

In template.jsp, you can either go:



if you have passed in "somecontent" to the template, eg in thepage.jsp:





This is what you have done. Alternatively, in template.jsp, you can go:



if you don't pass "somecontent" to template.jsp. The line above is just like
a jsp:include tag.

Anyway, I will test this again tonight. I hope it's something stupid I have
done. I will also report the exact exception after the test.

Thanks again Matt.

Keith


-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 1:28 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Yep, that's pretty much what I did. I don't really have a cut-down example
that demonstrates it working as I tried it as part of an app that I'm
building.

I'm not sure you're understanding the correct use of  and
. Make sure you use an example similar to mine rather than the
one you posted in your first message. Note the differences, mine uses:

to put the Action into the template that's declared using:


Your example seemed to be trying to use the path to the Action itself as the
template which is completely different:


You need to do the following:
1. Create an action mapping like this in struts-config.xml:

2. Create your template file "/mytemplate.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>




3. Create your page "/thePage.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>





4. Open up http://mymachine.com/mypage.do and it should show the result of
your 2 actions that you "put" in step 3.

Hope this is clear enough.

Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 00:14
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...



Matt, thank you very much for trying this out. I appreciate the time you are
spending to help me track the problem.

Can you give this a go:

In the address bar, type a *.do address, eg
http://localhost:8080/test/page1.do

This will call Page1Action, which forwards to page1view.jsp

In page1view.jsp, it will have your template which inserts shownews.do.

I believe this will fail.

If you have a JSP in the address bar, it's fine. But with a .do, it's not.

I have using the 26 Feb 2002 snapshot.

Keith



-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:54 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


I did try it and it worked fine. I'm using the nightly build.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:49
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

Yes, that's exactly what I want. In fact, I have the same code that you have
given below.

But Struts does not allow it. It complains that the request is already
commited and cannot forward twice.

Can someone try this out for me please? Maybe I have missed out something...

If this can be a

RE: Newbie question. Can action mappings intercept requests that are not part of forms?

2002-03-07 Thread Kanoza, Douglas (NCI)

If you've done your *.do extension mapping in web.xml, you just need to
append '.do' to the page parameter:


  


-Original Message-
From: Phil Rice [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 07, 2002 4:21 PM
To: [EMAIL PROTECTED]
Subject: Newbie question. Can action mappings intercept requests that are
not part of forms?

The problem:
I am trying to make a "logout" button work by proving a link:


  


Things I have tried
I have tried a number of variations of the following part of
struts-config.xml:


  


When I try and use the link above, the address browser of the browser shows
"/logout" as the last part of the url and LogoutAction is not executed.
I have managed to get LogoutAction to execute by creating a form, and
submitting the form.
I have fairly sure this is not a simple capitalisation problem
I have looked in the FAQ and the mailing archives.

Summary
Is there a way to intercept a hypertext link, rather than a post?

Thanks

Phil Rice

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Newbie question. Can action mappings intercept requests that are not part of forms?

2002-03-07 Thread Phil Rice

The problem:
I am trying to make a "logout" button work by proving a link:


  


Things I have tried
I have tried a number of variations of the following part of
struts-config.xml:


  


When I try and use the link above, the address browser of the browser shows
"/logout" as the last part of the url and LogoutAction is not executed.
I have managed to get LogoutAction to execute by creating a form, and
submitting the form.
I have fairly sure this is not a simple capitalisation problem
I have looked in the FAQ and the mailing archives.

Summary
Is there a way to intercept a hypertext link, rather than a post?

Thanks

Phil Rice



RE: Application Scope Variables

2002-03-07 Thread Mikael Eriksson

Hi

  The HttpSession does not have a servletcontext, the servlet has, and you
can get to the servlet from the ActionForm with the getServlet() method.

So
Object o =
 getServlet().getServletContext().getAttribute("attribute_name");

should work
  (has not tried it "live" though :-) )


  Regards
  Mikael


At 14:24 2002-03-06 -0700, you wrote:
>Hello,
>
>I was searching around in the struts-user list archives for the correct
>getServletContext() syntax and found Robert's response to a post:
>http://www.mail-archive.com/struts-user@jakarta.apache.org/msg22768.html
>
>I am trying to compile an ActionForm and I need to access the *application*
>scoped bean (not a session bean).
>
>I tried:
>
>public ActionErrors validate(ActionMapping mapping, HttpServletRequest
>request)
>{
> 
> Object o =
>request.getSession().getServletContext().getAttribute("attribute_name");
>
>}



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: design flaw if using a template...

2002-03-07 Thread Keith Chew

Hi Matt

I am such an idiot.

In my template.jsp, I have:



This is equivalent to a jsp include. My mistake was news.do forwards to
new.jsp after getting the data from the database.

However, news.jsp uses template.jsp too!! So it's trying to go into an
infinite loop!

I have changed new.jsp to just return the news. It's going well.

Thank you very much for all you help.

Keith



-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 3:31 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Keith, they're not the same thing, by any means. As you said, if you use
your method:

you get a "too many servlet includes `/template.jsp'" error. This is doesn't
really suprise me at all - you're basically trying to use something which
blatantly isn't a template, as a template.

However if you use the method I outlined in my examples, i.e. you "put"
content into a template, whether this content is a .jsp or an action mapping
url - it works.

Honestly, just use  as it is documented and your problems will
be solved.

Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 02:18
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

I will try this again tonight. But I am doing the same as you (well, just
another way):

In template.jsp, you can either go:



if you have passed in "somecontent" to the template, eg in thepage.jsp:





This is what you have done. Alternatively, in template.jsp, you can go:



if you don't pass "somecontent" to template.jsp. The line above is just like
a jsp:include tag.

Anyway, I will test this again tonight. I hope it's something stupid I have
done. I will also report the exact exception after the test.

Thanks again Matt.

Keith


-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 1:28 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Yep, that's pretty much what I did. I don't really have a cut-down example
that demonstrates it working as I tried it as part of an app that I'm
building.

I'm not sure you're understanding the correct use of  and
. Make sure you use an example similar to mine rather than the
one you posted in your first message. Note the differences, mine uses:

to put the Action into the template that's declared using:


Your example seemed to be trying to use the path to the Action itself as the
template which is completely different:


You need to do the following:
1. Create an action mapping like this in struts-config.xml:

2. Create your template file "/mytemplate.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>




3. Create your page "/thePage.jsp" something like this:
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>





4. Open up http://mymachine.com/mypage.do and it should show the result of
your 2 actions that you "put" in step 3.

Hope this is clear enough.

Matt.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 00:14
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...



Matt, thank you very much for trying this out. I appreciate the time you are
spending to help me track the problem.

Can you give this a go:

In the address bar, type a *.do address, eg
http://localhost:8080/test/page1.do

This will call Page1Action, which forwards to page1view.jsp

In page1view.jsp, it will have your template which inserts shownews.do.

I believe this will fail.

If you have a JSP in the address bar, it's fine. But with a .do, it's not.

I have using the 26 Feb 2002 snapshot.

Keith



-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:54 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


I did try it and it worked fine. I'm using the nightly build.

-Original Message-
From: Keith Chew [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2002 23:49
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


Hi Matt

Yes, that's exactly what I want. In fact, I have the same code that you have
given below.

But Struts does not allow it. It complains that the request is already
commited and cannot forward twice.

Can someone try this out for me please? Maybe I have missed out something...

If this can be achieved, it'll be so easy to mix and match your Actions, put
them as links in a page or in the template.

Keith




-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 12:12 p.m.
To: Struts Users Mailing List
Subject: RE: design flaw if using a template...


My apologies if I'm misunders

RE: design flaw if using a template...

2002-03-07 Thread Keith Chew

Hi Ross

I understand where you are coming from. I was just trying to see if I can
reuse what Struts already have.

Last night I just discovered that it was my idiocity that caused the
problem. Matt's suggestion works, I'll explain why in the reply to his post.

Keith



-Original Message-
From: Ross MacCharles [mailto:[EMAIL PROTECTED]]
Sent: Friday, 8 March 2002 4:23 a.m.
To: 'Struts Users Mailing List'
Subject: RE: design flaw if using a template...


Hi Keith.


I look at the system as having several complementary models, controllers and
event triggers.  Struts Action, ActionForm, and submit triggers are among
them but not the only ones.  In other words, I don't see Struts Actions as
being the only system entities that can respond to event triggers, and
ActionForm beans are not the only data containers.  As you have discovered,
the struts objects are really only good at responding to a subset of the
possible events, and handling a subset of the pages data.  I think that is
intentional rather than a flaw.

If you buy that, then you can use "page load" as an event trigger, and your
own home grown "NewsModel" bean.  Some other home grown controller can go
get the data and push it into the news bean.  These homegrowns cause you
trouble when you try to force them to be children of Action and ActionForm.

So I'm suggesting only that the tag load and display the data from the news
model.  However, if you wish to have the "page load event" trigger a model
update, the lines get a bit blurry because I'm using the custom tag's
execution thread to kick off the model load, and refresh the display.
Although that thread is involved with "double duty"  the object model is
still clean --- the custom tag is just rendering data, and some other
controller logic is getting the data.

You could use other events to load the news bean such as user log in,
periodic polling, etc.  Not sure what your requirements are here but I'm
guessing you want the news updated on each page load.

OK I'll shut up with the philosophical stuff and let you get back to the
real solution that Matt helped you with :)

Good Luck

/Ross





 -Original Message-
From:   Keith Chew [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, March 06, 2002 6:02 PM
To: Struts Users Mailing List
Subject:RE: design flaw if using a template...

Hi Ross

Good comments.

You see, with custom tags, there are several problems:
- For each different parts of the template, I need to create a custom tag
- This custom tag is actually what an xxxAction class is meant to do, ie
retrieve data from a database and prepare the data for view
- If I later decide not to put news in the template and put it in a separete
page, I need to port the taglib code to an xxxAction class. Not very
flexible.
- taglibs from Struts point of view, only renders data for viewing. It
should not be performing model work, which should really be in the xxxAction
class.

So, I can see that Struts was designed to handle "user invoked" actions, not
"code invoked" actions.

Any more thoughts?
Keith



-Original Message-
From: Ross MacCharles [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 11:14 a.m.
To: 'Struts Users Mailing List'
Subject: RE: design flaw if using a template...


Consider rethinking the philosophy that all data rendered in the JSP must
come from an ActionForm.   In my mind the ActionForm generally represents
the editable data for the page displayed to the user.  There's no problem
with displaying data from other sources on the same page - especially read
only data.

For news I would simply use a custom tag to get it and display it.

Put another way, I wouldn't want to have to set up a bean with "setNews" and
"setMemberCount" when I have no intention of allowing my application to edit
those values.

/Ross


 -Original Message-
From:   Keith Chew [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, March 06, 2002 4:28 PM
To: Struts Users Mailing List
Subject:design flaw if using a template...

Hi

Struts provides us with a nice MVC architecture, where:
- a user's click maps to an Action
- based on the results, the user is forwarded to the view

Now, I have a template.jsp which all pages will use. The template will
contain some views that are common to all pages, eg:
- Latest News
- Site visits
- Member count

To retrieve these information, it gets them from the database. However,
there is no user click to invoke the action. This is where the limitation of
Struts comes in. Let me explain:

In the template.jsp, we can have:



In news.jsp we can access the database and retrieve the news for display.
This breaks the MVC pattern, since the view is accessing the model.
Alternatively, we have have this in the template.jsp:



This will call the NewsAction which accesses the database, and forwards the
results to the news.jsp for display.

This is a great concept, but it does not work. Struts does not allow
multiple forwards (this happens when the c

RE: getting a list in Action class

2002-03-07 Thread Domen, Ken

Here's my problem:

During a display of the page, I use:








But I also want to update the values.   
The html then becomes:





















So now, the bean doesn't find any getSubstanaces(ArrayList), it only sees a
bunch
of casNumbers and substanceNames.  If I say, getCasNumber() in the bean, it
only
gets the first one.

How do people deal with this in struts?

ken




-Original Message-
From: keithBacon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 3:06 AM
To: Struts Users Mailing List
Subject: Re: getting a list in Action class


tricky!
does
   myForm.getSubstances();
return a list? is it the correct size?
I would have thought putting enough debug messages would highlight the
problem.
I'd guess it's not even executing your debug code because you'd get a null
pointer exception from list.iterator() if the list was missing &
CalssCastExp
if you got the wrong list. 
Intriguing! (Most likely something really obvious... bit I can't see it.)
Keith.


--- "Domen, Ken" <[EMAIL PROTECTED]> wrote:
> If my jsp has the following:
> 
> 
> 
> 
> 
> 
> 
> Why won't my receiving Action class get these elements with:
> 
> ArrayList list = myForm.getSubstances();
> Iterator i = list.iterator();
> while (i.hasNext()) {
> Substance s = (Substance)i.next();
> System.out.println("s.getCasNumber(): " + s.getCasNumber());
> }


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts Community Opportunity

2002-03-07 Thread Yu, Yanhui

Ghoot,

As a newcomer, I thank you for this proposal to re organizing the struts
documentation.  I know it is probably my own fault that I can't understand
exactly what the doc says sometimes but I still hope the doc can show the
new users easier way!

Thanks again,
Yanhui

-Original Message-
From: Emaho, Ghoot [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 7:08 AM
To: Struts Users Mailing List
Subject: Struts Community Opportunity


Hello all

I think there is an opportunity here, particularly with the imminent 1.1
release. I imagine there are going to be a whole bunch of new questions when
1.1 is released. There IS a lot of documentation for Struts. The work Ted
and others have done is great. But perhaps a new perspective on the docs
(particularly for newbies) might be prudent.

I know from my own experience that how these docs are organised and
presented can have a big effect on their usefuleness. Those of us who've
been using Struts for a longest can see how the user base has increased
dramatically, and I can only see this increasing with the release of 1.1.
Perhaps now is a good time to consider possible changes/refactoring of the
docs that would help inform new users and 'alleviate' some of the burden on
the list.

I know the docs as is are good, but thats easy for us to say when we know,
pretty much, how it works and hangs together :)

I'd be happy to offer some suggestions and effort in this regard - and I'm
sure others would too. I have experience in organising this type of content
on a large scale - especially for 'newbies', so maybe I have a different
perspective.

I'm not intending to step on anyones toes ! Any new work would obviously
build upon the existing site and Ted's great site.

Now for a shameless plugChiki (http://chiki.emaho.org) is being
developed by myself and others, and this is one of the ways it can be used,
for community building and content management. Perhaps somewhere down the
line we could have a Struts Community site powered by Chiki, with all the
relevant resources. As it is based upon Wiki this content can be dynamically
updated and managed, and there is suitable access control provided ! (well
in a release coming out very soon) Think 'The Server Side' devoted to
Struts. It would dramatically reduce the load on the mailing list, as well
as serving as a focal point for all things Struts. I imagine there would be
a group of administrators obviously, but it would also allow others to
contribute too, thereby lightening the load on everyone helping with the
list. I could go on and on about the benefits !

I'm not saying Chiki is the only answer, but I'm just volunteering something
that seems a great fit for the 'problem'. In the next 4-6 weeks Chiki will
be ready for such usage.

I'd love to see a Struts community using chiki (since it's built on Struts),
taking the whole Struts experience to a new level, one which can not only
cope with increased user base, but would positively thrive on it.

Even if people dont think this is the way to go, then I'd still be happy to
offer advise perspective and effort re the Documentation.

Please let me know what you all think

Thanks

Ghoot


> -Original Message-
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: 06 March 2002 12:43
> To: 'Struts Users Mailing List'
> Subject: RE: Newbie Struts and Jbuilder6
> 
> 
> I do not "vent anger" at newbies though I may be stern at 
> times, and I, too,
> remember what it is like learning something new...because I 
> do it everyday.
> I appreciate your generosity but I go by the old adage, "Give 
> a man a fish
> and he'll not be hungry today; teach him to fish and he'll 
> never be hungry."
> Sometimes your generosity works to the detriment of those you 
> wish to help.
> And, as I said, it encourages more laziness on a list that is 
> already way
> too busy handling inane queries.
> 
> No flame war - have a beer!
> 
> Cheers!
> Mark
> 
> -Original Message-
> From: Emaho, Ghoot [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 7:19 AM
> 
> Mark
> 
> While I understand your frustration, I dont share it !
> 
> I was happy to help. 
> 
> You seem to vent a lot of frustration at newbie users. So 
> they havent read
> all the docs - so what ! I remember what its like to be a 
> beginner and come
> up against people with your attitude. Chill out and stop 
> giving them such a
> hard time. You can still 'point them at the docs' in a 
> friendly manner. 
> 
> You act as though this list is your personal property 
> sometimes ! Newbies
> are welcome, and if they need reminding 100 times about the 
> doc then fine.
> Bear in mind that for a newcomer, the documentation can be 
> confusing and
> misleading. While everyone who has contributed has done a 
> good job, it can
> be daunting for a complete newcomer. I dont think this is the 
> place for you
> to vent your anger at them.
> 
> And I hope you can see the humour in my response :) I know it ca

RE: Newbie Struts and Jbuilder6

2002-03-07 Thread Yu, Yanhui

Thank you VERY MUCH  Ghoot!  Myself is very new to Struts and I have many
questions, I know I can say this on behalf of other newcomers that we
APPRECIATE your time and the help!

Yanhui




-Original Message-
From: Emaho, Ghoot [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 6:19 AM
To: Struts Users Mailing List
Subject: RE: Newbie Struts and Jbuilder6


Mark

While I understand your frustration, I dont share it !

I was happy to help. 

You seem to vent a lot of frustration at newbie users. So they havent read
all the docs - so what ! I remember what its like to be a beginner and come
up against people with your attitude. Chill out and stop giving them such a
hard time. You can still 'point them at the docs' in a friendly manner. 

You act as though this list is your personal property sometimes ! Newbies
are welcome, and if they need reminding 100 times about the doc then fine.
Bear in mind that for a newcomer, the documentation can be confusing and
misleading. While everyone who has contributed has done a good job, it can
be daunting for a complete newcomer. I dont think this is the place for you
to vent your anger at them.

And I hope you can see the humour in my response :) I know it can be
frustrating seeing the same q's again and again, but you dont HAVE to
respond every time someone asks a dumb question, do you ? 

I'm not looking for a flame war, but sometimes you are just too rude. Take
it somewhere else - off this list !

Hope you take this in the spirit it is intended

Take care

Ghoot

> -Original Message-
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: 06 March 2002 12:13
> To: 'Struts Users Mailing List'
> Subject: RE: Newbie Struts and Jbuilder6
> 
> 
> You going to spoon-feed him, too?  This integration is 
> clearly explained in
> the documentation; the guy didn't even bother to look.  By 
> answering such
> lame questions you encourage more lame questions.
> 
> Mark
> 
> -Original Message-
> From: Emaho, Ghoot [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 7:09 AM
> To: Struts Users Mailing List
> Subject: RE: Newbie Struts and Jbuilder6
> 
> 
> Goto 'Tools | Configure Libraries' menu, add new entry, and 
> select your
> Struts.jar.
> 
> Then goto 'Project | Project Properties' menu select the 'required
> libraries' tab, select add and then choose your newly added struts.
> 
> This then enables struts within your project.
> 
> Hope this helps
> 
> Ghoot
> 
> > -Original Message-
> > From: Sam Lai [mailto:[EMAIL PROTECTED]]
> > Sent: 06 March 2002 00:07
> > To: Struts Users Mailing List
> > Subject: Newbie Struts and Jbuilder6
> > 
> > 
> > Hi,
> > 
> > Can anyone show me how to integrate struts in Jbuilder6?
> > 
> > thanks,
> > SAM
> > 
> > 
> > NOTICE
> > This e-mail and any attachments are confidential and may 
> > contain copyright material of Macquarie Bank or third 
> > parties. If you are not the intended recipient of this email 
> > you should not read, print, re-transmit, store or act in 
> > reliance on this e-mail or any attachments, and should 
> > destroy all copies of them. Macquarie Bank does not guarantee 
> > the integrity of any emails or any attached files. The views 
> > or opinions expressed are the author's own and may not 
> > reflect the views or opinions of Macquarie Bank. 
> > 
> > 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




UltraDev 4.0 Custom Tag Library Extension

2002-03-07 Thread Soledad Villa

Hi all,
I've tried the extension UltraDev 4.0 CTLX provided by jakarta and I
happened to have many problems:
1) the TLDParser has code errors:
   a - it's importing a class from xerces.jar that doesn't exists
   b - overrides the init method but it's not invoking the
super.init(config) method

Once I've fixed those errors, I was able to see the custom tag libraries,
but there is a problem remaining: when inserting a new tag, the JspParser
from jakarta "rewrites" the jsp code and eliminates some parts of the tags.
For instance:  is changed to .

So, it's not working very well.
The question is: anybody knows a tool, extension or whatever that actually
work with struts tags in order to see the page?
Or at least, anything to solve the problem I've been talking about?

Thanks in advance,
Sol

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts Web App Challenging user with BASIC Auth

2002-03-07 Thread Matt Raible

To my knowledge, the url-pattern begins *after* the context.  So to protect
your entire application use:

/*

To protect struts actions, protect the same  that you're using for
your mapping to your action class.

HTH,

Matt

--- Satish Jeejula <[EMAIL PROTECTED]> wrote:
> David,
> 
> I have configured server.xml correctly. 
> 
> This is what I had to do to make it work.
> 
> In my web.xml file of my web application, the
> security-constraint/web-resource-name/url-pattern element was set to my
> context. It looks like the security is applicable to anything under that
> context.
> 
> For example, if my context 'url-pattern' is /myContext and if I set the
> security-constraint/web-resource-name/url-pattern to /myContext .. it does
> not work.
> 
> So I changed the url-pattern to /myContext/jsp/*. So whenever I try to
> access my index.jsp page, it will challenge the user.
> 
> I am not sure if I am doing it the right way .. but this is what I have
> observed and this is how it working.
> 
> Any suggestions are appreciated.
> 
> thanks,
> Satish
> 
> 
> -Original Message-
> From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 7:25 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Struts Web App Challenging user with BASIC Auth
> 
> 
> Subject: Re: Struts Web App Challenging user with BASIC Auth
> From: "David Bolsover" <[EMAIL PROTECTED]>
>  ===
> Satish
> 
> Have you correctly configured the Tomcat server.xml file?
> 
> David Bolsover
> 
> 
> "Satish Jeejula" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > Hi All,
> >
> > I have a web application using struts running under apache\tomcat3.3
> > configuration. I want to make this app challenge the user  using HTTP
> BASIC
> > Auth scheme.
> >
> > The admin context that comes with tomcat does implement this. But the
> admin
> > is not using struts.
> >
> > I have added security-constraint element to my web.xml file for my
> > application. But still it does not challenge me?
> >
> > Is there anything else that I need to configure for the application using
> > struts to challenge??
> >
> > Any pointers that will lead me to a solution.
> >
> > Any help is appreciated.
> >
> > Thanks,
> > Satish
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts Web App Challenging user with BASIC Auth

2002-03-07 Thread Satish Jeejula

David,

I have configured server.xml correctly. 

This is what I had to do to make it work.

In my web.xml file of my web application, the
security-constraint/web-resource-name/url-pattern element was set to my
context. It looks like the security is applicable to anything under that
context.

For example, if my context 'url-pattern' is /myContext and if I set the
security-constraint/web-resource-name/url-pattern to /myContext .. it does
not work.

So I changed the url-pattern to /myContext/jsp/*. So whenever I try to
access my index.jsp page, it will challenge the user.

I am not sure if I am doing it the right way .. but this is what I have
observed and this is how it working.

Any suggestions are appreciated.

thanks,
Satish


-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 7:25 AM
To: [EMAIL PROTECTED]
Subject: Re: Struts Web App Challenging user with BASIC Auth


Subject: Re: Struts Web App Challenging user with BASIC Auth
From: "David Bolsover" <[EMAIL PROTECTED]>
 ===
Satish

Have you correctly configured the Tomcat server.xml file?

David Bolsover


"Satish Jeejula" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi All,
>
> I have a web application using struts running under apache\tomcat3.3
> configuration. I want to make this app challenge the user  using HTTP
BASIC
> Auth scheme.
>
> The admin context that comes with tomcat does implement this. But the
admin
> is not using struts.
>
> I have added security-constraint element to my web.xml file for my
> application. But still it does not challenge me?
>
> Is there anything else that I need to configure for the application using
> struts to challenge??
>
> Any pointers that will lead me to a solution.
>
> Any help is appreciated.
>
> Thanks,
> Satish
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: I18n for number formatting on Struts

2002-03-07 Thread Andrew B Forman

I do not know of any struts-specific i18n
functionality that does what you are looking for.

However, the baseline Java i18n does:
http://java.sun.com/docs/books/tutorial/i18n/

andrew

-Original Message-
From: Eduardo André Mallmann [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 12:38 PM
To: '[EMAIL PROTECTED]'
Subject: I18n for number formatting on Struts


Hi all,

I'm using Struts on a project in the company. The Internacionalization for
the messages and labels on the Web pages work fine and we didn't have much
problem.

But for the internacionalization of some number formats (write 1.000,00
instead of 1,000.00, etc) we had to set somethings hard coded because we
didn't find support on Struts for this kind of thing.

Do you know if it's possible to let Struts do by himself the formatting of
numbers, dates, etc. automatically using the Locale catched from the
session, like it does for the messages and labels?

Thanks in advance,

Eduardo

Eduardo André Mallmann | Analista de sistemas

mercador.com - varejistas e fornecedores juntos em um só lugar
Rua Dona Laura, 320 / 7º andar
CEP: 90430-090, Porto Alegre, RS - Brasil
Tel.: 55.51.3378 9014
Fax: 55.51.3378 9048
mailto:[EMAIL PROTECTED]
http://www.mercador.com


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: redirection from an action/ refreshing page

2002-03-07 Thread Robert Nocera

You can use redirect="false" to make it a forward, which is what you
want most of the time.  I believe that false is the default value.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Yu, Yanhui [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 07, 2002 1:58 PM
To: Struts Users Mailing List
Subject: RE: redirection from an action/ refreshing page

Hi, 

I am new to Struts, and so my question maybe too simple:  Please help.

I notice redirect is used often, does that mean I have to put things in
session instead of request?  If it is true, can I use redirect="false"
(assuming this way I am using forward instead of sendRedirect?) so I can
put
more things in the request?

Thanks for any help,
Yanhui





-Original Message-
From: Mark Woon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 4:30 PM
To: Struts Users Mailing List
Subject: Re: redirection from an action/ refreshing page


Use:





[EMAIL PROTECTED] wrote:

> addendum to question.  I meant to write that we do
>
> return mapping.findForward("success");
>
> not
>
> return new ActionForward(mapping.findFoward("success"));
>
> that was a typo
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 12:38 PM
> To: [EMAIL PROTECTED]
> Subject: redirection from an action/ refreshing page
>
> After we have finished handling the form in our action, we forward the
> request on to the next page using
>
> return new ActionForward(mapping.findForward("success"));
>
> where success is defined in the action in struts-config.xml using
>   
>
> However, after the page has been forwarded, the URL displayed in the
web
> browser address page is the path to the previous action.  Namely
>
> /Save.do
>
> even though we are on the successpage.jsp.
>
> If this page is refreshed (using IE 5.5, haven't tried it on other
> browsers), it prompts me for whether I want to resubmit the form.
However,
> there is no form on the successpage.jsp.
>
> So, I am wondering, does anyone know how to prevent this from
happening?
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:


--
~~Mark Woon~~~
God put me on this Earth to accomplish a certain number of things.
Right now, I am so far behind I shall never die.



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: redirection from an action/ refreshing page

2002-03-07 Thread Yu, Yanhui

Hi, 

I am new to Struts, and so my question maybe too simple:  Please help.

I notice redirect is used often, does that mean I have to put things in
session instead of request?  If it is true, can I use redirect="false"
(assuming this way I am using forward instead of sendRedirect?) so I can put
more things in the request?

Thanks for any help,
Yanhui





-Original Message-
From: Mark Woon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 4:30 PM
To: Struts Users Mailing List
Subject: Re: redirection from an action/ refreshing page


Use:





[EMAIL PROTECTED] wrote:

> addendum to question.  I meant to write that we do
>
> return mapping.findForward("success");
>
> not
>
> return new ActionForward(mapping.findFoward("success"));
>
> that was a typo
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 12:38 PM
> To: [EMAIL PROTECTED]
> Subject: redirection from an action/ refreshing page
>
> After we have finished handling the form in our action, we forward the
> request on to the next page using
>
> return new ActionForward(mapping.findForward("success"));
>
> where success is defined in the action in struts-config.xml using
>   
>
> However, after the page has been forwarded, the URL displayed in the web
> browser address page is the path to the previous action.  Namely
>
> /Save.do
>
> even though we are on the successpage.jsp.
>
> If this page is refreshed (using IE 5.5, haven't tried it on other
> browsers), it prompts me for whether I want to resubmit the form.
However,
> there is no form on the successpage.jsp.
>
> So, I am wondering, does anyone know how to prevent this from happening?
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:


--
~~Mark Woon~~~
God put me on this Earth to accomplish a certain number of things.
Right now, I am so far behind I shall never die.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Displaying Short Dates in a Text Box

2002-03-07 Thread STEVEN . TRAVERS




I have a form that displays a date value.  It always shows up in the medium
date format.  Is there a way to specify in the  tag to display a
short date in the proper locale?  I have tried formatting the getDate()
method to return the proper date format, but it is not working.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




I18n for number formatting on Struts

2002-03-07 Thread Eduardo André Mallmann

Hi all,

I'm using Struts on a project in the company. The Internacionalization for
the messages and labels on the Web pages work fine and we didn't have much
problem.

But for the internacionalization of some number formats (write 1.000,00
instead of 1,000.00, etc) we had to set somethings hard coded because we
didn't find support on Struts for this kind of thing.

Do you know if it's possible to let Struts do by himself the formatting of
numbers, dates, etc. automatically using the Locale catched from the
session, like it does for the messages and labels?

Thanks in advance,

Eduardo

Eduardo André Mallmann | Analista de sistemas

mercador.com - varejistas e fornecedores juntos em um só lugar
Rua Dona Laura, 320 / 7º andar
CEP: 90430-090, Porto Alegre, RS - Brasil
Tel.: 55.51.3378 9014
Fax: 55.51.3378 9048
mailto:[EMAIL PROTECTED]
http://www.mercador.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Integrating Applications

2002-03-07 Thread Parimi Srinivas

Hi, 
Does struts provide any extensions to integrate two applications ?. Both
applications use struts framework.

Thanks,

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: "Best Practice" for parsing an XML file for application confi guration parameters?

2002-03-07 Thread keithBacon

nice thought!
--- Craig Tataryn <[EMAIL PROTECTED]> wrote:
> >
> >You can put all your properties in one file as well, lets call that file
> >config.properties
> >
> > > 2.  xml handle the structure data much better then properties file
> >
> >data structure might be nice for communications between computers but for
> >users?
> >e.g.
> >RepositoryRoot=d:\
> >RepositoryAssets=assets
> >RepositoryViewPath=file://d:/repository/assets
> >
> 
> Just to add, I like the format:
> 
> Repository.Root=d:\
> Repository.Assets=assets
> etc..
> 
> I suppose, if you ever wanted to goto XML at some point, you could just 
> write yourself a nice little resource bundle manager that exposed the xml 
> file in the same way you are used to using your properties file.
> 
> Craig W. Tataryn
> Programmer/Analyst
> Compuware
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: specifying dynamic value for logic:equal

2002-03-07 Thread keithBacon

Code posted below - hope it makes sense.
Keith.

--- Srinivasarao Nandiwada <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Let me briefly explain the problem  - I am using a select box in edit 
> page and wanted to use simple text corresponding to the selected value 
> in view page. My select box consists of the following :
> 
> Label One   ---> value 1
> Label Two   ---> value 2
> Label Three ---> value 3
> 
> I am using html:select and html:options in edit page and it works great. 
>   However, my form bean only stores the value of the property, and in 
> the view page, I need to convert the value of the property back to 
> label. How do I do this without using scriptlets? I thought of using 
> logic:iterate and logic:equal tags, but logic:equal tag requires a 
> constant value which does not work for me as my select box is generated 
> from the values from database. I thought of creating another property 
> corresponding to label in form bean, but is there any better solution to 
> this?
> 

In form bean get/setLinkSelectionOption. These are the values
as stored on DB.
User sees the labels.

In jsp.


  

===
The class referred to.

package com.biff.biffapp1.app;

import java.util.ArrayList;

import com.biff.utils.ZUtils;
  /**
  * The option object
  * plus static methods to return the array list of the real data.
  * dodgy having list underneath the single list item object -qq?
  */
public final class LinkSelectionOption  extends Object {
private final static String THIS_NAME = "LinkSelectionOption";

private String lsOption = null;
private String lsLabel  = null;

LinkSelectionOption(String  lsOption, String lsLabel) {
this.lsOption = lsOption;
this.lsLabel  = lsLabel;
}

public String getOption() {
return lsOption;
}
public void setOption(String lsOption) { //never called!
this.lsOption = lsOption;
}
public String getLabel() {
return lsLabel;
}
// needed qq?
public void setLabel(String lsLabel) {
this.lsLabel = lsLabel;
}

static private void dbmi(String message) {
ZUtils.writeLog(THIS_NAME, ZUtils.INFO_LEVEL,  message);
}
static private void dbmd(String message) {
ZUtils.writeLog(THIS_NAME, ZUtils.DEBUG_LEVEL,  message);
}
static private void dbmw(String message) {
ZUtils.writeLog(THIS_NAME, ZUtils.WARNING_LEVEL,  message);
}

static private ArrayList displayTypeOptions = null;
static public ArrayList getLinkSelectionOptions() {
if (displayTypeOptions == null) {
displayTypeOptions = new ArrayList(12);
displayTypeOptions.add(new LinkSelectionOption("allLinks", 
"All Links"));
displayTypeOptions.add(new LinkSelectionOption("myLinks"  , 
"Only My
Links"));
}
return displayTypeOptions;
}
static public String getDefaultOption() {
String sss =
((LinkSelectionOption)getLinkSelectionOptions().get(0)).getOption();
dbmd("getDefaultOption: returning:"+ sss);
return sss;
}
} // end Class LinkSelectionOption


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Dynamic forwards

2002-03-07 Thread Parimi Srinivas

Hi all,
I am stuck up on how to achieve dynamic forwarding. Issue is in action
mappings of struts config file, a simple forward for an action appears as



But during my application flow, the page to display may end up
/directory3/somepage.jsp. Which directory to use to pick up somepage.jsp is
dynamic. I am planning to put three different forward elements in action as 





This is an existing application and we are trying to convert to struts. Is
there a better way to achieve this ?.

Thanks,


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tomcat/Struts Profiling results

2002-03-07 Thread Yu, Yanhui

Thanks very much for sharing this information.  Is there any one out there
who has similar information on struts+WSAD (websphere studio applicaton
developer) of IBM?  We would very much appreciate if someone can post any
performance information on this combination.

Yanhui 

-Original Message-
From: TKV Tyler VanGorder [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:01 AM
To: '[EMAIL PROTECTED]'
Subject: FW: Tomcat/Struts Profiling results


Hi,

For the last week and a half, a colleague and myself have been doing load/
scalability testing for our struts/jsp-based application. I would like to
share our results in the hopes that it may help someone else faced with a
similar task. We had a tough time finding real-world examples that we could
learn from. 

This is a LONG post, so I will try to summarize first:
==
Yeah..the summary is pretty long as well. 8-)

For JSP, tag-heavy applications, we found tuning parameters that may help
others get better performance out of tomcat.

We simulated a load of 50 concurrent users using automation tools that
remove any human pauses. This is roughly equivalent to 250+ concurrent,
human users. Yes...that is an estimation.

Initially, using Tomcat 4.0.1, Stuts 1.0 Final:

The IBM JDK performed MUCH MUCH better than Sun's Server Hotspot
JVM (1.3.1)

After profiling, we discovered that a significant amount of our time
was being spent in the garbage collector with the hotspot JVM. Some
of our garbage collections took a 12+ seconds! Ouch.

We attempted tweaking the various hotspot JVM parameters to see if we
could get the hotspot VM in line with IBM's performance. We did get
better results but we still had some GCs that were taking 6 seconds.

We had a large number of throw-away objects that were confusing the
garbage collector in hotspot.

We deployed the SAME EXACT application under Weblogic 6.1's servlet
engine, using the hotspot JVM, and we saw much better performance and
this was without any hotspot tuning parameters!

So we switched back to tomcat and we ran the application, using OptimizeIt
to profile the application. A majority of our time was being spent in
the constructor of BodyContentImpl because of an initial 8K char buffer
being created for EACH tag, embedded in our page. This was more pronounced
in our application because we iterated over content that had tags nested
in the iteratorthat's 8K X Number of iterations X number of nested
tags! We found that in our application most of our tags were only outputting
a few characters.

We recompiled the BodyContentImpl and changed the initial buffer size to
512 bytes. The results were dramatic and hotspot began outperforming the IBM
JDK. Keep in mind that the hotspot server VM takes a while to tune its
runtime
so was necessary to run our scalability test on the hotspot VM several
times.
I submitted an enhancement to bugzilla, its ID is 6858.

The final results were impressive!

Our application has one workflow that is VERY database intensive. It takes
a human user approximately two minutes to complete the workflow once they
are familiar with it. The transaction does 20-40 database selects with
result
sets in the range of 10-40 rows each (on average). 20+ Inserts when the
transaction is finally saved. All database activity happens in real time,
while
the user walks through our workflow.

Tomcat 4.0.1 + (our hack), using Hotspot Server JVM 1.3.1:

   Hardware: EJB server - PII 300 (-Xms64m -Xmx64m)
 Servlet/web server - PIII Dual 550 (-Xms128m -Xmx128m)
  
   Simulated 50 automated users (No human pauses) - Average transaction
speed
   21 seconds, longest time 27 seconds!
   
Of course this is our application...and each application will have its own
load characteristics, but it is a good example of struts + tomcat.

So..if our 50 automated users average 21 seconds and a human user takes
roughly 2 minutes for the same workflow then the above platform *SHOULD*
be able to support 6X the number of human users (300 users)

Thanks and I hope this information might be useful to others trying to get
a feel for how well JSP/struts will scale.

Tyler Van Gorder [EMAIL PROTECTED]
Reed Roberts
Landacorp.

=
Detailsand the actual different tuning parameters we used:

The environments we used are as follows:


Hardware:

We used a low-end machine for the EJB server.

Database server:
  Compaq Proreliant ML370 Dual PIII 800 
  Windows 2000 Advanced Server Service Pack 2
  1Gig Ram

EJB Server:
 PII 300
 NT 4.0 Server
 128M Ram

Servlet Engine/Web Server
 PIII Dual 550.
 Windows 2000 Workstation
 256M Ram

5 client test machines...ranging in size
 Win 98 & Win NT machines.
 
All hardware was isolated on the same 100M Switch/hub



S

RE: "Best Practice" for parsing an XML file - Code Review Requested

2002-03-07 Thread Matt Raible

I "tried" to use digester - documentation/samples weren't good enough OR I
wasn't smart enough to figure it out.

I tried for an hour or 2 to get it to work and gave up.

Matt

--- Phase Web and Multimedia <[EMAIL PROTECTED]> wrote:
> Why not use Digester. I use it to parse config info for various classes. It
> is quite easy and fast.
> 
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
> 
> 
> -Original Message-
> From: Matt Raible [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 3:13 PM
> To: Struts Users Mailing List
> Subject: RE: "Best Practice" for parsing an XML file - Code Review
> Requested
> 
> 
> I've completed this task - however, it would've been MUCH easier to just use
> a
> properties file.  Of course, it could just be my experience with XML
> parsing -
> because I had to write a lot of code to grab 4 simple varaibles.
> 
> private synchronized void loadConfig() throws Exception {
> 
> // Initialize our configuration object
>   config = new Configuration();
> 
> logCat.debug("Looking for " + configFile + " in " +
> Constants.USER_HOME);
> 
>   // Acquire an input stream to our configuration file
> InputStream is = new FileInputStream(Constants.USER_HOME +
> configFile);
> 
> // No file found in user.home
> if (is == null) {
> logCat.debug("File not found at " + Constants.USER_HOME +
> configFile
>   + " - looking in application's WEB-INF directory");
> 
>   // Look for config.xml in WEB-INF
>   is = getServletContext()
>   .getResourceAsStream("/WEB-INF/" + configFile);
> 
> if (is == null) {
> throw new Exception("Configuration file '"
>   + configFile + "' not found in '"
>   + Constants.USER_HOME + "', nor in '/WEB-INF/'");
> }
> }
> 
> 
>   // Get the XML Document
> DocumentBuilderFactory builderFactory =
> DocumentBuilderFactory.newInstance();
>   DocumentBuilder builder = builderFactory.newDocumentBuilder();
>   Document doc = builder.parse(is);
> 
>   // close the input stream
>   is.close();
> 
> // get the repository root
>   NodeList rep = doc.getElementsByTagName("root");
>   Node node = rep.item(0);
> Text rootDir = (Text) node.getFirstChild();
> config.setRepositoryRootDir(rootDir.getNodeValue());
> 
> // get the assets directory
> rep = doc.getElementsByTagName("assets");
> node = rep.item(0);
> Text assetDir = (Text) node.getFirstChild();
> config.setAssetDir(assetDir.getNodeValue());
> 
> // get the assetView path
> rep = doc.getElementsByTagName("viewPath");
> node = rep.item(0);
> Text viewPath = (Text) node.getFirstChild();
> config.setAssetViewPath(viewPath.getNodeValue());
> 
> // get the assetView path
> rep = doc.getElementsByTagName("default-passing-score");
> node = rep.item(0);
> Text minScore = (Text) node.getFirstChild();
> config.setAssessmentMinScore(new
> Double(minScore.getNodeValue()).doubleValue());
> 
> logCat.debug(config.toString());
> 
> }
> 
> --- Ronald Haring <[EMAIL PROTECTED]> wrote:
> > > Nothing is wrong with the properties file...Xml is just better
> > >
> > > 1.  one config.xml file in one central place...it's so much
> > > easier to manage
> > > then a whole bunch of properties
> >
> > You can put all your properties in one file as well, lets call that file
> > config.properties
> >
> > > 2.  xml handle the structure data much better then properties file
> >
> > data structure might be nice for communications between computers but for
> > users?
> > e.g.
> > RepositoryRoot=d:\
> > RepositoryAssets=assets
> > RepositoryViewPath=file://d:/repository/assets
> >
> > seems just as clear to me as
> > > > 
> > > > d:/repository
> > > > assets
> > > > file://d:/repository/assets
> > > > 
> > etc.
> >
> > Cons of xml
> > - Carefull with that ",<,> sign eugene,
> > - Slow parsing
> >
> > Gr
> > Ronald
> >
> >
> > Furore B.V.
> > Rijswijkstraat 175-8
> > Postbus 9204
> > 1006 AE Amsterdam
> > tel. (020) 346 71 71
> > fax. (020) 346 71 77
> >
> > --
> --
> > ---
> > The information transmitted is intended only for the person
> > or entity to which it is addressed and may contain confidential
> > and/or privileged material. Any review, retransmission,
> > dissemination or other use of, or taking of any action in
> > reliance upon, this information by persons or entities other
> > than the intended recipient is prohibited. If you received
> > this in er

RE: Session Timeout?

2002-03-07 Thread Thinh Doan

Sorry we did not.  Can't help further.

T.

-Original Message-
From: Michelle Popovits [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 1:50 PM
To: 'Struts Users Mailing List'
Subject: RE: Session Timeout?


Do you use container managed authentication?
If so, where did you make this check?

My understanding is that the container will take control and send the user
directly to the login page with a new session in place (in the same way as a
new user login would).

-Michelle


-Original Message-
From: Thinh Doan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 2:42 PM
To: Struts Users Mailing List
Subject: RE: Session Timeout?


The way we did it was checking an object (e.g. user) in session.  If it's
null, do
errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError("session.timeout"));

(session.timeout is defined in your app resource properties)
thenreturn (mapping.findForward("logout"));

this logout fwd will then go back to the login page with the time out
message.

Thinh

-Original Message-
From: Michelle Popovits [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 12:49 PM
To: '[EMAIL PROTECTED]'
Subject: Session Timeout?


I have a struts web application which uses container managed authentication.

When a user is logged into the application and the session times out, the
next user-initiated action will result in the login page being displayed
(the j2ee container makes this happen).

How is it possible to tell that the reason that the user was directed to the
login page was because the session timed out and not because it was the
users first attempt at accessing the resource?

I would like to display message to the user indicating that the reason they
are in the login page is the result of a session timeout.

I am currently constrained to use of the Servlet 2.2/JSP 1.1 spec.

TIA,
Michelle

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: null value for a nested property

2002-03-07 Thread Robert Nocera

David,

I find it's best to use a form bean that is different from your data
object, so that your get methods on your form object can return an empty
string if null instead of actually returning a null value.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: David Boardman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 07, 2002 12:49 PM
To: Struts Users Mailing List
Subject: null value for a nested property

I currently am using an  tag on a form to display the name of
a
state.  The tags looks like:




The problem is that ocassionally the state field on the address bean is
null.  When this occurs the PropertyUtils.getNestedProperty() method
throws
an IllegalArgumentException which causes my jsp to break.  To circumvent
this problem I have written my own tag that extends BaseFieldTag and
overrides the doStartTag() method.  I basically perform the same
functions
as the BaseFieldTag.doStartTag() method, except that instead of the
following call:

Object value = RequestUtils.lookup(pageContext, name, property,
null);

to get the value I catch the IllegalArgumentException and set the return
value to an empty string:

  try{
valueObject = RequestUtils.lookup(pageContext, name,
property, null);
}catch(IllegalArgumentException e){
//This exception indicates that one of the nested properties
returned null
//we want to set the value to null and not throw the
exception
out
//to the jsp
valueObject = "";
}

I am wondering if there is a better way of dealing with this problem.  I
don't like the solution I am using, but I can't think of anything else.
How
about adding an attribute to the form tags that specify how null
property
values should be handled?

Thanks for your help,

Dave


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts Validator NoClassDefFoundError

2002-03-07 Thread David Winterfeldt

What version of the Struts Validator are you using? 
Package names were changed at some point from
com.wintecinc.struts.* to
org.apache.struts.validator.* (1/14/2002).  When this
was done, most of the validator was moved to the
Jakarta Commons Validator
(http://jakarta.apache.org/commons).  I would double
check the files/package names in the jar you have.

David

--- Craig Raw <[EMAIL PROTECTED]> wrote:
> Hi, 
> 
> I am using the Struts Validator in my webapp but
> encounter the following
> error on each page that tries to use it.
> 
> java.lang.NoClassDefFoundError:
> org/apache/struts/validator/action/ValidatorForm
>   at java.lang.ClassLoader.defineClass0(Native
> Method)
>   at
>
java.lang.ClassLoader.defineClass(ClassLoader.java:509)
> 
> 
> My WEB-INF/lib has the following jars
> commons-beanutils.jar
> commons-collections.jar
> commons-digester.jar
> jakarta-regexp-1.2.jar
> struts.jar
> struts-validator.jar
> tiles.jar
> 
> The ValidatorForm is thus clearly in the webapp
> classpath.
> I have read this may be because of the ValidatorForm
> class appearing
> twice on my system classpath, but this does not seem
> to be the case. My
> system classpath on JBoss is:
> 
> c:\Java\j2sdk1.4.0/lib/tools.jar
> run.jar
> ../lib/crimson.jar
> /C:/var/jboss/log/
> /C:/var/jboss/lib/ext/activation.jar
> /C:/var/jboss/lib/ext/castor-0.9.1.jar
> /C:/var/jboss/lib/ext/gnu-regexp-1.0.8.jar
> /C:/var/jboss/lib/ext/hsql.jar
> 
> /C:/var/jboss/lib/ext/idb.jar
> /C:/var/jboss/lib/ext/jboss-j2ee.jar
> /C:/var/jboss/lib/ext/jboss-management.jar
> /C:/var/jboss/lib/ext/jboss.jar
> /C:/var/jboss/lib/ext/jbosscx.jar
> /C:/var/jboss/lib/ext/jbossmq.jar
> /C:/var/jboss/lib/ext/jbosspool.jar
> /C:/var/jboss/lib/ext/jbosssx.jar
> /C:/var/jboss/lib/ext/jetty-service.jar
> 
> /C:/var/jboss/lib/ext/jmxtools.jar
> /C:/var/jboss/lib/ext/jndi.jar
> /C:/var/jboss/lib/ext/jnpserver.jar
> /C:/var/jboss/lib/ext/jpl-util-0_5b.jar
> /C:/var/jboss/lib/ext/log4j.jar
> /C:/var/jboss/lib/ext/mail.jar
> /C:/var/jboss/lib/ext/mysql.jar
> /C:/var/jboss/lib/ext/oswego-concurrent.jar
> /C:/var/jboss/lib/ext/ots-jts_1.0.jar
> /C:/var/jboss/lib/ext/tomcat-service.jar
> /C:/var/jboss/lib/ext/tyrex-0.9.8.5.jar
> 
> /C:/var/jboss/tmp/
> /C:/var/jboss/db/
> /C:/var/tomcat/lib/ant.jar
> /C:/var/tomcat/lib/jasper.jar
> /C:/var/tomcat/lib/servlet.jar
> /C:/var/tomcat/lib/tools.jar
> /C:/var/tomcat/lib/webserver.jar
> 
> 
> The example war that came with the Validator seems
> to work fine, so it
> must be a local issue to my deployment.
> 
> Any ideas?
> 
> Craig
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




null value for a nested property

2002-03-07 Thread David Boardman

I currently am using an  tag on a form to display the name of a
state.  The tags looks like:




The problem is that ocassionally the state field on the address bean is
null.  When this occurs the PropertyUtils.getNestedProperty() method throws
an IllegalArgumentException which causes my jsp to break.  To circumvent
this problem I have written my own tag that extends BaseFieldTag and
overrides the doStartTag() method.  I basically perform the same functions
as the BaseFieldTag.doStartTag() method, except that instead of the
following call:

Object value = RequestUtils.lookup(pageContext, name, property, null);

to get the value I catch the IllegalArgumentException and set the return
value to an empty string:

  try{
valueObject = RequestUtils.lookup(pageContext, name,
property, null);
}catch(IllegalArgumentException e){
//This exception indicates that one of the nested properties
returned null
//we want to set the value to null and not throw the exception
out
//to the jsp
valueObject = "";
}

I am wondering if there is a better way of dealing with this problem.  I
don't like the solution I am using, but I can't think of anything else.  How
about adding an attribute to the form tags that specify how null property
values should be handled?

Thanks for your help,

Dave


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Setting style class to html taglib

2002-03-07 Thread Matt Koidin

you need to use styleClass instead of class when working with Struts
tags.



should work...

see http://jakarta.apache.org/struts/doc-1.0.2/api/index.html for more
details
-Original Message-
From: Andrew H. Peterson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 12:33 PM
To: Struts User Forum (E-mail)
Subject: Setting style class to html taglib


I'm using the html taglib, specifically the submit and reset tags.  I
would
like to apply a CCS class to the buttons called "button":




I tried setting the class attribute, but I get the following error:

Attribute class invalid according to the specified TLD

I'm using Struts 1.02

Thanks in advance.

Andrew



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Setting style class to html taglib

2002-03-07 Thread Jakkampudi, ChandraseKhar

Try styleClass


Look here to find a list of valid attributes for submit

http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#submit

-JC

-Original Message-
From: Andrew H. Peterson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 11:33 AM
To: Struts User Forum (E-mail)
Subject: Setting style class to html taglib


I'm using the html taglib, specifically the submit and reset tags.  I would
like to apply a CCS class to the buttons called "button":




I tried setting the class attribute, but I get the following error:

Attribute class invalid according to the specified TLD

I'm using Struts 1.02

Thanks in advance.

Andrew



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Setting style class to html taglib

2002-03-07 Thread Andrew H. Peterson

I'm using the html taglib, specifically the submit and reset tags.  I would
like to apply a CCS class to the buttons called "button":




I tried setting the class attribute, but I get the following error:

Attribute class invalid according to the specified TLD

I'm using Struts 1.02

Thanks in advance.

Andrew



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: "Best Practice" for parsing an XML file - Code Review Requested

2002-03-07 Thread Phase Web and Multimedia

Why not use Digester. I use it to parse config info for various classes. It
is quite easy and fast.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 3:13 PM
To: Struts Users Mailing List
Subject: RE: "Best Practice" for parsing an XML file - Code Review
Requested


I've completed this task - however, it would've been MUCH easier to just use
a
properties file.  Of course, it could just be my experience with XML
parsing -
because I had to write a lot of code to grab 4 simple varaibles.

private synchronized void loadConfig() throws Exception {

// Initialize our configuration object
config = new Configuration();

logCat.debug("Looking for " + configFile + " in " +
Constants.USER_HOME);

// Acquire an input stream to our configuration file
InputStream is = new FileInputStream(Constants.USER_HOME +
configFile);

// No file found in user.home
if (is == null) {
logCat.debug("File not found at " + Constants.USER_HOME +
configFile
+ " - looking in application's WEB-INF directory");

// Look for config.xml in WEB-INF
is = getServletContext()
.getResourceAsStream("/WEB-INF/" + configFile);

if (is == null) {
throw new Exception("Configuration file '"
+ configFile + "' not found in '"
+ Constants.USER_HOME + "', nor in '/WEB-INF/'");
}
}


// Get the XML Document
DocumentBuilderFactory builderFactory =
DocumentBuilderFactory.newInstance();
DocumentBuilder builder = builderFactory.newDocumentBuilder();
Document doc = builder.parse(is);

// close the input stream
is.close();

// get the repository root
NodeList rep = doc.getElementsByTagName("root");
Node node = rep.item(0);
Text rootDir = (Text) node.getFirstChild();
config.setRepositoryRootDir(rootDir.getNodeValue());

// get the assets directory
rep = doc.getElementsByTagName("assets");
node = rep.item(0);
Text assetDir = (Text) node.getFirstChild();
config.setAssetDir(assetDir.getNodeValue());

// get the assetView path
rep = doc.getElementsByTagName("viewPath");
node = rep.item(0);
Text viewPath = (Text) node.getFirstChild();
config.setAssetViewPath(viewPath.getNodeValue());

// get the assetView path
rep = doc.getElementsByTagName("default-passing-score");
node = rep.item(0);
Text minScore = (Text) node.getFirstChild();
config.setAssessmentMinScore(new
Double(minScore.getNodeValue()).doubleValue());

logCat.debug(config.toString());

}

--- Ronald Haring <[EMAIL PROTECTED]> wrote:
> > Nothing is wrong with the properties file...Xml is just better
> >
> > 1.  one config.xml file in one central place...it's so much
> > easier to manage
> > then a whole bunch of properties
>
> You can put all your properties in one file as well, lets call that file
> config.properties
>
> > 2.  xml handle the structure data much better then properties file
>
> data structure might be nice for communications between computers but for
> users?
> e.g.
> RepositoryRoot=d:\
> RepositoryAssets=assets
> RepositoryViewPath=file://d:/repository/assets
>
> seems just as clear to me as
> > >   
> > >   d:/repository
> > >   assets
> > >   file://d:/repository/assets
> > >   
> etc.
>
> Cons of xml
> - Carefull with that ",<,> sign eugene,
> - Slow parsing
>
> Gr
> Ronald
>
>
> Furore B.V.
> Rijswijkstraat 175-8
> Postbus 9204
> 1006 AE Amsterdam
> tel. (020) 346 71 71
> fax. (020) 346 71 77
>
> --
--
> ---
> The information transmitted is intended only for the person
> or entity to which it is addressed and may contain confidential
> and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other
> than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material
> from any computer
> --
--
> ---
>
>


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

Struts Validator NoClassDefFoundError

2002-03-07 Thread Craig Raw

Hi, 

I am using the Struts Validator in my webapp but encounter the following
error on each page that tries to use it.

java.lang.NoClassDefFoundError:
org/apache/struts/validator/action/ValidatorForm
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:509)


My WEB-INF/lib has the following jars
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
jakarta-regexp-1.2.jar
struts.jar
struts-validator.jar
tiles.jar

The ValidatorForm is thus clearly in the webapp classpath.
I have read this may be because of the ValidatorForm class appearing
twice on my system classpath, but this does not seem to be the case. My
system classpath on JBoss is:

c:\Java\j2sdk1.4.0/lib/tools.jar
run.jar
../lib/crimson.jar
/C:/var/jboss/log/
/C:/var/jboss/lib/ext/activation.jar
/C:/var/jboss/lib/ext/castor-0.9.1.jar
/C:/var/jboss/lib/ext/gnu-regexp-1.0.8.jar
/C:/var/jboss/lib/ext/hsql.jar

/C:/var/jboss/lib/ext/idb.jar
/C:/var/jboss/lib/ext/jboss-j2ee.jar
/C:/var/jboss/lib/ext/jboss-management.jar
/C:/var/jboss/lib/ext/jboss.jar
/C:/var/jboss/lib/ext/jbosscx.jar
/C:/var/jboss/lib/ext/jbossmq.jar
/C:/var/jboss/lib/ext/jbosspool.jar
/C:/var/jboss/lib/ext/jbosssx.jar
/C:/var/jboss/lib/ext/jetty-service.jar

/C:/var/jboss/lib/ext/jmxtools.jar
/C:/var/jboss/lib/ext/jndi.jar
/C:/var/jboss/lib/ext/jnpserver.jar
/C:/var/jboss/lib/ext/jpl-util-0_5b.jar
/C:/var/jboss/lib/ext/log4j.jar
/C:/var/jboss/lib/ext/mail.jar
/C:/var/jboss/lib/ext/mysql.jar
/C:/var/jboss/lib/ext/oswego-concurrent.jar
/C:/var/jboss/lib/ext/ots-jts_1.0.jar
/C:/var/jboss/lib/ext/tomcat-service.jar
/C:/var/jboss/lib/ext/tyrex-0.9.8.5.jar

/C:/var/jboss/tmp/
/C:/var/jboss/db/
/C:/var/tomcat/lib/ant.jar
/C:/var/tomcat/lib/jasper.jar
/C:/var/tomcat/lib/servlet.jar
/C:/var/tomcat/lib/tools.jar
/C:/var/tomcat/lib/webserver.jar


The example war that came with the Validator seems to work fine, so it
must be a local issue to my deployment.

Any ideas?

Craig




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cannot resolve '/tags/struts-template.tld duringweblogic.jsp c

2002-03-07 Thread Domen, Ken

Do I need more than what's specified below to be in the classpath in order
for jspc to work?
 
if "" == "%JAVA_HOME%" set JAVA_HOME=\java
if "" == "%WL_HOME%" set WL_HOME=\weblogic
if "" == "%MY_HOME%" set MY_HOME=C:\viewstore\KDOMEN_view\ads\apps\ms3
set MYSERVER=%WL_HOME%\myserver
set
MYCLASSPATH=.;%MY_HOME%;%JAVA_HOME%\lib\classes.zip;%WL_HOME%\classes;%WL_HO
ME%\lib\weblogicaux.jar;%MYSERVER%\clientclasses;%MY_HOME%\lib\struts-1.0.ja
r;%MY_HOME%\classes;%MY_HOME%\lib\struts-templated.tld;%MY_HOME%\lib\struts-
bean.tld;%MY_HOME%\lib\struts.tld
 

java -classpath %MYCLASSPATH% -Dweblogic.home=%WL_HOME% weblogic.jspc
-docroot %MY_HOME% ms3\*.jsp
 
 
I tried putting all the tld's under WEB-INF
and also changed the web.xml taglib uri & location to /WEB-INF

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 5:03 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: cannot resolve '/tags/struts-template.tld during weblogic.jsp c



yes that's true, try to check whether the web.xml file is well formed or not
as well as check if the web.xml is valid(i mean check against the DTD
mentioned on top of the web.xml file).

I ran into the same problem once, first time it was uri issue next time I
had the DTD part on top of web.xml wrong. 
hope that helps 
Regards, 
RG 

-Original Message- 
From: Domen, Ken [ mailto:[EMAIL PROTECTED]  ] 
Sent: Wednesday, March 06, 2002 5:03 PM 
To: 'Struts Users Mailing List' 
Subject: RE: cannot resolve '/tags/struts-template.tld during 
weblogic.jsp c 


Here's my web.xml: 

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


I know that the uri & the location doesn't match but struts-html.tld is 
physically located 
at /WEB-INF/lib/struts-html.tld 

I tried changing it so that it would match up but it still failed w/ the 
following: 

C:\viewstore\KDOMEN_view\ads\apps>java -classpath 
.;C:\viewstore\KDOMEN_view\ads 
\apps\ms3;c:\jdk1.2.2\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\we

blog 
icaux.jar;c:\weblogic\myserver\clientclasses;C:\viewstore\KDOMEN_view\ads\ap

ps\m 
s3\lib\struts-1.0.jar;C:\viewstore\KDOMEN_view\ads\apps\ms3\classes;C:\views

tore 
\KDOMEN_view\ads\apps\ms3\lib\struts-templated.tld;;C:\viewstore\KDOMEN_view

\ads 
\apps\ms3\lib\struts-bean.tld;C:\viewstore\KDOMEN_view\ads\apps\ms3\lib\stru

ts.t 
ld -Dweblogic.home=c:\weblogic weblogic.jspc -docroot 
C:\viewstore\KDOMEN_view\a 
ds\apps\ms3 ms3\*.jsp 
nested IOException: java.io.IOException: cannot resolve 
'/tags/struts-html.tld' 
into a valid tag library 

-Original Message- 
From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED]
 ] 
Sent: Wednesday, March 06, 2002 8:36 AM 
To: [EMAIL PROTECTED] 
Subject: RE: cannot resolve '/tags/struts-template.tld during 
weblogic.jsp c 


I am not familiar with WLS5.1, but in WLS6.1 

if the web.xml file has the following taglib declaration 
 
/WEB-INF/struts-template.tld 
/WEB-INF/struts-template.tld 
   

it expects the struts-template.tld under the WEB-INF directory, check if you

have the struts-template.tld in the right directory. 

-Original Message- 
From: Domen, Ken [ mailto:[EMAIL PROTECTED]  ] 
Sent: Wednesday, March 06, 2002 7:54 AM 
To: '[EMAIL PROTECTED]' 
Subject: cannot resolve '/tags/struts-template.tld during weblogic.jspc 


I'm just trying to precompile my jsp's using weblogic.jspc on WLS5.1sp10 

and I get the following error: 
nested IOException: java.io.IOException: cannot resolve 
'/tags/struts-template.tld' into a valid tag library 






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


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




RE: Populating complex java objects in forms

2002-03-07 Thread Charlesworth, Chico


The scope is request, which should be ok, and other form fields that are
Strings or String Arrays are populated ok, but not complex objects like
Customer.

Any other suggestions?

-Original Message-
From: Oliver Reflé [mailto:[EMAIL PROTECTED]] 
Sent: 07 March 2002 17:10
To: Struts Users Mailing List
Subject: AW: Populating complex java objects in forms

maybe check the scope of your form beans, maybe the one in the form is held
in the session, and the one your action is expection should be in the
request.
If that happens struts generates a new form bean which is empty.

-Ursprüngliche Nachricht-
Von: Charlesworth, Chico [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 7. März 2002 18:08
An: 'Struts Users Mailing List'
Betreff: RE: Populating complex java objects in forms



ive got my getter and setter methods in my formbean ...

any other ideas?
chico

-Original Message-
From: Ronald Haring [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 17:04
To: 'Struts Users Mailing List'
Subject: RE: Populating complex java objects in forms

yes you can do that but do you have a getCustomer() and setCustomer() method
in your formbean?

Gr
Ronald

> -Original Message-
> From: Charlesworth, Chico [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 5:56 PM
> To: 'Struts Users Mailing List'
> Subject: Populating complex java objects in forms
>
>
>
> Hi,
>
> If I've got a complex java object (i.e Customer) in the Form
> class, I can
> then read off this object in the jsp page, but when
> submitting to the Action
> class the Customer object is null.
>
> The jsp would look like:
> 
>   Customer Name: 
>   
>   Update
> Customer
> 
>
> So this would display the current customer name, but if I change the
> customer name and then hit the submit link, I find the
> customer instance is
> now null in the updateCustomer action class.
>
> Am I doing something wrong, or is it not possible to populate
> complex java
> objects in the jsp form using struts?
>
> Cheers,
> Chico.
>
>
> --
> The content of this e-mail is confidential, may contain
> privileged material
> and is intended solely for the recipient(s) named above. If
> you receive this
> in error, please notify Software AG immediately and delete
> this e-mail.
>
> Software AG (UK) Limited
> Registered in England & Wales 1310740
> Registered Office: Hudson House, Hudson Way,
> Pride Park, Derby DE24 8HS
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:



Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
>from any computer

---


--
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England & Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:


-- 
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England & Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




AW: Populating complex java objects in forms

2002-03-07 Thread Oliver Reflé

maybe check the scope of your form beans, maybe the one in the form is held
in the session, and the one your action is expection should be in the
request.
If that happens struts generates a new form bean which is empty.

-Ursprüngliche Nachricht-
Von: Charlesworth, Chico [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 7. März 2002 18:08
An: 'Struts Users Mailing List'
Betreff: RE: Populating complex java objects in forms



ive got my getter and setter methods in my formbean ...

any other ideas?
chico

-Original Message-
From: Ronald Haring [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 17:04
To: 'Struts Users Mailing List'
Subject: RE: Populating complex java objects in forms

yes you can do that but do you have a getCustomer() and setCustomer() method
in your formbean?

Gr
Ronald

> -Original Message-
> From: Charlesworth, Chico [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 5:56 PM
> To: 'Struts Users Mailing List'
> Subject: Populating complex java objects in forms
>
>
>
> Hi,
>
> If I've got a complex java object (i.e Customer) in the Form
> class, I can
> then read off this object in the jsp page, but when
> submitting to the Action
> class the Customer object is null.
>
> The jsp would look like:
> 
>   Customer Name: 
>   
>   Update
> Customer
> 
>
> So this would display the current customer name, but if I change the
> customer name and then hit the submit link, I find the
> customer instance is
> now null in the updateCustomer action class.
>
> Am I doing something wrong, or is it not possible to populate
> complex java
> objects in the jsp form using struts?
>
> Cheers,
> Chico.
>
>
> --
> The content of this e-mail is confidential, may contain
> privileged material
> and is intended solely for the recipient(s) named above. If
> you receive this
> in error, please notify Software AG immediately and delete
> this e-mail.
>
> Software AG (UK) Limited
> Registered in England & Wales 1310740
> Registered Office: Hudson House, Hudson Way,
> Pride Park, Derby DE24 8HS
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:



Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
>from any computer

---


--
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England & Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Populating complex java objects in forms

2002-03-07 Thread Charlesworth, Chico


ive got my getter and setter methods in my formbean ...

any other ideas?
chico

-Original Message-
From: Ronald Haring [mailto:[EMAIL PROTECTED]] 
Sent: 07 March 2002 17:04
To: 'Struts Users Mailing List'
Subject: RE: Populating complex java objects in forms

yes you can do that but do you have a getCustomer() and setCustomer() method
in your formbean?

Gr
Ronald 

> -Original Message-
> From: Charlesworth, Chico [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 5:56 PM
> To: 'Struts Users Mailing List'
> Subject: Populating complex java objects in forms
> 
> 
> 
> Hi,
> 
> If I've got a complex java object (i.e Customer) in the Form 
> class, I can
> then read off this object in the jsp page, but when 
> submitting to the Action
> class the Customer object is null.
> 
> The jsp would look like:
> 
>   Customer Name: 
>   
>   Update 
> Customer
> 
> 
> So this would display the current customer name, but if I change the
> customer name and then hit the submit link, I find the 
> customer instance is
> now null in the updateCustomer action class.
> 
> Am I doing something wrong, or is it not possible to populate 
> complex java
> objects in the jsp form using struts?
> 
> Cheers,
> Chico.
> 
> 
> -- 
> The content of this e-mail is confidential, may contain 
> privileged material
> and is intended solely for the recipient(s) named above. If 
> you receive this
> in error, please notify Software AG immediately and delete 
> this e-mail.
> 
> Software AG (UK) Limited
> Registered in England & Wales 1310740
> Registered Office: Hudson House, Hudson Way,
> Pride Park, Derby DE24 8HS
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:



Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
from any computer

---


-- 
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England & Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Populating complex java objects in forms

2002-03-07 Thread Ronald Haring

yes you can do that but do you have a getCustomer() and setCustomer() method
in your formbean?

Gr
Ronald 

> -Original Message-
> From: Charlesworth, Chico [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 5:56 PM
> To: 'Struts Users Mailing List'
> Subject: Populating complex java objects in forms
> 
> 
> 
> Hi,
> 
> If I've got a complex java object (i.e Customer) in the Form 
> class, I can
> then read off this object in the jsp page, but when 
> submitting to the Action
> class the Customer object is null.
> 
> The jsp would look like:
> 
>   Customer Name: 
>   
>   Update 
> Customer
> 
> 
> So this would display the current customer name, but if I change the
> customer name and then hit the submit link, I find the 
> customer instance is
> now null in the updateCustomer action class.
> 
> Am I doing something wrong, or is it not possible to populate 
> complex java
> objects in the jsp form using struts?
> 
> Cheers,
> Chico.
> 
> 
> -- 
> The content of this e-mail is confidential, may contain 
> privileged material
> and is intended solely for the recipient(s) named above. If 
> you receive this
> in error, please notify Software AG immediately and delete 
> this e-mail.
> 
> Software AG (UK) Limited
> Registered in England & Wales 1310740
> Registered Office: Hudson House, Hudson Way,
> Pride Park, Derby DE24 8HS
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:



Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
from any computer

---




Re: indexing of errors?

2002-03-07 Thread David Winterfeldt

Your property isn't really 'blah'.  It is 'blah[0]',
'blah[1]', etc.  So if you use the full property for a
field for the ActionErrors key, then you can retrieve
it next to each field.

ActionErrors errors = new ActionErrors();
errors.add("blah[0]", new ActionError("error.msg"));

 

This type of question would be a good question to ask
on the Struts User list.  And any development
suggestions are good to post to bugzilla if there
really is a feature request you want so they don't get
lost.

David

--- "Kerstetter, Shawn" <[EMAIL PROTECTED]> wrote:
> 
> I have a form which contains 0 .. n "blah" text
> boxes all of which need to
> be validated for integer content on the server.  If
> the ith, the jth and the
> kth elements fail validation, I would like to be
> able to present the error
> message "Invalid Number Format" next to the
> appropriate "blah" text boxes.
> My custom validation component is capable of
> tracking the index, but I don't
> see support for indexing in ActionError,
> ActionErrors or in ErrorTag.  I am
> wondering how this case is normally handled in
> Struts.
> 
> Currently, if I do:
> 
>  
> 
> for each blah form element I would get the error
> message repeated for each
> failure for each element. 
> I need to be able to do something like the
> following:
> 
> 
> 
> As a real world example, consider a "view cart" page
> in a typical ecom
> application, in which a customer would set the
> quantity to zero to remove
> one or more items from the cart.  Now imagine that
> this user fat fingers the
> situation and enters something that is not a number
> in one of the quantity
> text boxes.  Finally, imagine that I wanted to
> direct the user's attention
> to the offending row of the table with a friendly
> message.
> 
> Thanks for any help,
> 
> Shawn.
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Populating complex java objects in forms

2002-03-07 Thread Charlesworth, Chico


Hi,

If I've got a complex java object (i.e Customer) in the Form class, I can
then read off this object in the jsp page, but when submitting to the Action
class the Customer object is null.

The jsp would look like:

Customer Name: 

Update Customer


So this would display the current customer name, but if I change the
customer name and then hit the submit link, I find the customer instance is
now null in the updateCustomer action class.

Am I doing something wrong, or is it not possible to populate complex java
objects in the jsp form using struts?

Cheers,
Chico.


-- 
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England & Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: nesting: iterate cannot find attrribute

2002-03-07 Thread Elijah Jacobs

Thanks for the responses guys - well appreciated

I found some insight in this:

it seems the error occurs only when I have a setter method to my Vector.
When I comment out the line below from my FormBean, the JSP page finds my
property just fine.

public void setX(Vector x) { this.x = x; }

I can't seem to find this in any documentation concerning this...does anyone
have further insight on why this is occuring?

- ej

btw .. i'm on weblogic 5.1, struts 1.0, windows 2000

- Original Message -
From: "Galbreath, Mark" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, March 07, 2002 10:57 AM
Subject: RE: nesting: iterate cannot find attrribute


> Looks like an issue of scope.
>
> Mark
>
> -Original Message-
> From: Elijah Jacobs [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 4:59 PM
>
> I'm trying to do a simple iterate .. it's even simpler that than one I
> download from Arron Bate's site since the formbean has the reference to
the
> list of objects.
>
> In my FormBean I have:
> 
> private Vector x = null;
>
> public Object[] getX(){
> return  this.x.toArray();
> }
>  public void setX(Vector x) { this.x = x; }
>
> 
>
> I first set this attribute to some value in my action class.  In my jsp
page
> I have:
>
> 
>  something
> 
>
> Note: I put this right under the  tag since it's in the
> FormBean class.
>
> The problem is that weblogic is not finding the getter for property "x".
>
> I get the error:
> javax.servlet.jsp.JspException: No getter method for property x of bean
> auctionForm
>
> Does anyone have any suggestions on how I can go about solving this?
>
> thanks for any help in this,
> - ej
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Design issue

2002-03-07 Thread Ross MacCharles


Since you are creating new pages for each OEM, I think I would prefer to
embed the OEM value in the pages themselves.  Then your 3 step process can
be replaced with just the 3rd step, and you don't need to restart your
container. 

If you do go with your approach, you may want to determine if the container
is smart enough to recognize the same servlet across multiple aliases.
Otherwise you are going to have unnecessary servlet instances. 

Seems like Tiles may fit in well here so you could possibly reuse some of
the pages across OEMs.  

/Ross



 -Original Message-
From:   Parimi Srinivas [mailto:[EMAIL PROTECTED]] 
Sent:   Wednesday, March 06, 2002 9:40 PM
To: 'Struts Users Mailing List' (E-mail)
Subject:Design issue

Hi all,
I want to validate my design. 

One of our applications caters to 3 OEM's. Application has three business
functionalities and each business functionality has 4 to 5 screens on an
average. The only difference between OEM's is LOOK and FEEL of the
application. To achieve different LOOK and FEEL for OEM's, OEM names are
mapped to 3 different aliases ( OEM1, OEM2 and OEM3) of action servlet.
Mappings of OEM name and action servlet alias are stored in an xml mappings
file. When users belonging to a particular OEM access application for the
first time,  OEM name is retrieved depending up on the action servlet alias
and stored in a new session. Appropriate JSP's are processed depending up on
the OEM name stored in the session. 

There is no user authentication screen in the application. 

If a new OEM is added to the application, following steps are followed -
1. a new servlet alias is created
2. Create a mapping between OEM name and action servlet alias.
3. Create JSP pages for new OEM.

Any suggestions,




--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




multi-app support and page="" & forward="" across sub applications

2002-03-07 Thread Torgeir Veimo

We use  with page & forward attributes primarily to avoid 
coding the context path. Now we are splitting up our application into 
separate sub-applications, but there is one catch; How do we link 
between actions in different sub-applications, while still using page="" 
or forward=""? All the actions in a subapp automatically gets prefixed 
with its sub-application name.


-- 
-Torgeir


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




specifying dynamic value for logic:equal

2002-03-07 Thread Srinivasarao Nandiwada

Hi,

Let me briefly explain the problem  - I am using a select box in edit 
page and wanted to use simple text corresponding to the selected value 
in view page. My select box consists of the following :

Label One   ---> value 1
Label Two   ---> value 2
Label Three ---> value 3

I am using html:select and html:options in edit page and it works great. 
  However, my form bean only stores the value of the property, and in 
the view page, I need to convert the value of the property back to 
label. How do I do this without using scriptlets? I thought of using 
logic:iterate and logic:equal tags, but logic:equal tag requires a 
constant value which does not work for me as my select box is generated 
from the values from database. I thought of creating another property 
corresponding to label in form bean, but is there any better solution to 
this?

Thanks,
nsr


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: "Best Practice" for parsing an XML file for application confi gurationparameters?

2002-03-07 Thread Craig Tataryn

>
>You can put all your properties in one file as well, lets call that file
>config.properties
>
> > 2.  xml handle the structure data much better then properties file
>
>data structure might be nice for communications between computers but for
>users?
>e.g.
>RepositoryRoot=d:\
>RepositoryAssets=assets
>RepositoryViewPath=file://d:/repository/assets
>

Just to add, I like the format:

Repository.Root=d:\
Repository.Assets=assets
etc..

I suppose, if you ever wanted to goto XML at some point, you could just 
write yourself a nice little resource bundle manager that exposed the xml 
file in the same way you are used to using your properties file.

Craig W. Tataryn
Programmer/Analyst
Compuware

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Pre Populating Fields - bit of a newbie question

2002-03-07 Thread Galbreath, Mark

You are right on that point, Don!  I was assuming he had a known, captive
population of users (I don't know why).

Mark

-Original Message-
From: Donald Miller [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 10:36 AM

If you use JavaScript, the date will be based on the client's system date;
therefore, you must be sure all of your clients' system dates are
accurately set.  A server-side default gives you more control.

Don

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: nesting: iterate cannot find attrribute

2002-03-07 Thread Galbreath, Mark

Looks like an issue of scope.

Mark

-Original Message-
From: Elijah Jacobs [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 4:59 PM

I'm trying to do a simple iterate .. it's even simpler that than one I
download from Arron Bate's site since the formbean has the reference to the
list of objects.

In my FormBean I have:

private Vector x = null;

public Object[] getX(){
return  this.x.toArray();
}
 public void setX(Vector x) { this.x = x; }



I first set this attribute to some value in my action class.  In my jsp page
I have:


 something


Note: I put this right under the  tag since it's in the
FormBean class.

The problem is that weblogic is not finding the getter for property "x".

I get the error:
javax.servlet.jsp.JspException: No getter method for property x of bean
auctionForm

Does anyone have any suggestions on how I can go about solving this?

thanks for any help in this,
- ej

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Pre Populating Fields - bit of a newbie question

2002-03-07 Thread Donald Miller


If you use JavaScript, the date will be based on the client's system date;
therefore, you must be sure all of your clients' system dates are
accurately set.  A server-side default gives you more control.

Don


   
 
"Galbreath,
 
Mark"To: "'Struts Users Mailing List'" 
<[EMAIL PROTECTED]> 
 Subject: RE: Pre Populating Fields - bit 
of a newbie question  
   
 
03/05/2002 
 
11:56 AM   
 
Please respond 
 
to "Struts 
 
Users Mailing  
 
List"  
 
   
 
   
 




Use JavaScript.  What's the point of having the overhead of creating an
object for something as simple as getting the current date?

Mark

-Original Message-
From: Mattos, John [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 12:28 PM

Anyone?

Pre populating fields?

I need to have a startDate and endDate field in my form, and I'd like to
prepopulate the endDate field with today's date. There's a bean that has
set/getEndDate() methods, and I get to the form from an Action.perform()
call

What's the best way to prepopulate that field?

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






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Newbie] logic:iterate

2002-03-07 Thread Galbreath, Mark

Probably because everything stored in a Vector is an object of type Object
and  is trying to cast your Element object to a String.

Mark

-Original Message-
From: Slimane [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 5:08 PM

Hi,

I try to do an iteration on a vector. When this vector contains only 
Strings, the iteration works well. For that, I use the following piece of
code:

>
>   
>

But, when I try with a vector containing custom objects, it doesn't work :(
For example, I have a Vecor of Element. Element is a bean which contains 2 
attributes (2 String named: id and name)
To iterate on that vector, I use the following piece of code:

>type="be.stluc.info.struts.Element">
>   
>

That doesn't work, and the following exception is thrown:

>Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Errortype 
>Exception reportmessage Internal Server Errordescription The server 
>encountered an internal error (Internal Server Error) that prevented it 
>from fulfilling this request.exception java.lang.ClassCastException: 
>java.lang.String

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts Community Opportunity

2002-03-07 Thread John Menke

Emaho,

count me in also.  I am new to Struts but learning fast.  Give me a shout if
you need something.

-john

-Original Message-
From: Emaho, Ghoot [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 9:43 AM
To: Struts Users Mailing List
Subject: RE: Struts Community Opportunity


Gabriel

> As you might know, I am working on the Struts/Velocity integration.
> My personal interest in Chiki is to find out how easily it could be
> turned into a show case for Struts/Velocity.

Cool ! This is on my list, so maybe we can collaborate ? I'd like to see
Chiki grow to use more than JSP for the Presentation Tier. So it becomes a
fuller example, running either Xml oro RDBMS, and JSP Velocity or Tiles (or
others). This is the kind of example which isnt really available at the
moment - the same app with simple config to change which
Presentation/Business tier it uses.

Looking at Velocity etc is on my list - but someway down at the moment ! So
it would be good to coordinate our efforts, saving on any duplication.

> In any case, I'll report back once I have had a chance to spend some
> more time with Chiki.

Great.

> I certainly would voluteer to help with setting up and maintaining
> a Chiki-based Struts Know How forum. My experience is that like a
> nice garden, such a forum needs a few gardeners that are devoted
> to its well being.

Absolutely. I'll look forward to speaking with you more.

Thanks

Ghoot

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cannot resolve '/tags/struts-template.tld during weblogic.jsp c

2002-03-07 Thread Galbreath, Mark

Why are you putting it in the lib directory?  It belongs in WEB-INF.

Mark

-Original Message-
From: Domen, Ken [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 8:03 PM

Here's my web.xml:


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


I know that the uri & the location doesn't match but struts-html.tld is
physically located
at /WEB-INF/lib/struts-html.tld

I tried changing it so that it would match up but it still failed w/ the

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: design flaw if using a template...

2002-03-07 Thread Ross MacCharles

Hi Keith.


I look at the system as having several complementary models, controllers and
event triggers.  Struts Action, ActionForm, and submit triggers are among
them but not the only ones.  In other words, I don't see Struts Actions as
being the only system entities that can respond to event triggers, and
ActionForm beans are not the only data containers.  As you have discovered,
the struts objects are really only good at responding to a subset of the
possible events, and handling a subset of the pages data.  I think that is
intentional rather than a flaw.

If you buy that, then you can use "page load" as an event trigger, and your
own home grown "NewsModel" bean.  Some other home grown controller can go
get the data and push it into the news bean.  These homegrowns cause you
trouble when you try to force them to be children of Action and ActionForm.

So I'm suggesting only that the tag load and display the data from the news
model.  However, if you wish to have the "page load event" trigger a model
update, the lines get a bit blurry because I'm using the custom tag's
execution thread to kick off the model load, and refresh the display.
Although that thread is involved with "double duty"  the object model is
still clean --- the custom tag is just rendering data, and some other
controller logic is getting the data.

You could use other events to load the news bean such as user log in,
periodic polling, etc.  Not sure what your requirements are here but I'm
guessing you want the news updated on each page load.

OK I'll shut up with the philosophical stuff and let you get back to the
real solution that Matt helped you with :)

Good Luck

/Ross





 -Original Message-
From:   Keith Chew [mailto:[EMAIL PROTECTED]] 
Sent:   Wednesday, March 06, 2002 6:02 PM
To: Struts Users Mailing List
Subject:RE: design flaw if using a template...

Hi Ross

Good comments.

You see, with custom tags, there are several problems:
- For each different parts of the template, I need to create a custom tag
- This custom tag is actually what an xxxAction class is meant to do, ie
retrieve data from a database and prepare the data for view
- If I later decide not to put news in the template and put it in a separete
page, I need to port the taglib code to an xxxAction class. Not very
flexible.
- taglibs from Struts point of view, only renders data for viewing. It
should not be performing model work, which should really be in the xxxAction
class.

So, I can see that Struts was designed to handle "user invoked" actions, not
"code invoked" actions.

Any more thoughts?
Keith



-Original Message-
From: Ross MacCharles [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 11:14 a.m.
To: 'Struts Users Mailing List'
Subject: RE: design flaw if using a template...


Consider rethinking the philosophy that all data rendered in the JSP must
come from an ActionForm.   In my mind the ActionForm generally represents
the editable data for the page displayed to the user.  There's no problem
with displaying data from other sources on the same page - especially read
only data.

For news I would simply use a custom tag to get it and display it.

Put another way, I wouldn't want to have to set up a bean with "setNews" and
"setMemberCount" when I have no intention of allowing my application to edit
those values.

/Ross


 -Original Message-
From:   Keith Chew [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, March 06, 2002 4:28 PM
To: Struts Users Mailing List
Subject:design flaw if using a template...

Hi

Struts provides us with a nice MVC architecture, where:
- a user's click maps to an Action
- based on the results, the user is forwarded to the view

Now, I have a template.jsp which all pages will use. The template will
contain some views that are common to all pages, eg:
- Latest News
- Site visits
- Member count

To retrieve these information, it gets them from the database. However,
there is no user click to invoke the action. This is where the limitation of
Struts comes in. Let me explain:

In the template.jsp, we can have:



In news.jsp we can access the database and retrieve the news for display.
This breaks the MVC pattern, since the view is accessing the model.
Alternatively, we have have this in the template.jsp:



This will call the NewsAction which accesses the database, and forwards the
results to the news.jsp for display.

This is a great concept, but it does not work. Struts does not allow
multiple forwards (this happens when the current page is already a .do).
Here's an example:
(1) User clicks on viewUserDetail.do
(2) ViewDetialAction forwards to user.jsp
(3) In template.jsp (used by user.jsp), news.do invokes NewsAction, and it
forwards to news.jsp

This is a double forward, which results in an exception.

Basically, I want to call



in the JSP. Has anyone done something like this?

Keith


--
To unsubscribe, e-mail:

For additional commands, e-mail:


RE: "Best Practice" for parsing an XML file - Code Review Requested

2002-03-07 Thread Matt Raible

Good idea.  What I'm trying to get away from is that user's (sys admins) have
to edit the web.xml file.  This is because I plan on distributing my
application as a WAR, and need to I have certain parameters that WILL need to
be changed for different systems (i.e. Unix vs. Windows).  Also my web.xml is
already pretty huge, so digging through it to edit parameters might be tought. 
And it'll get overwritten everytime a new version is distributed.

That is why I look it up in System.getProperty("user.home") and then /WEB-INF/.

Maybe a bad idea, but everytime I move my app to my OS X box, I have to change
the parameters in the config file.  If I lookup user.home, then I alleviate
this problem.  However, when the app is first installed, it won't be in
user.home, so I look in /WEB-INF/.

Thanks for your help,

Matt

--- "Emaho, Ghoot" <[EMAIL PROTECTED]> wrote:
> Matt
> 
> As an aside you may want to consider how you retrieve the config xml file.
> Currently you are using the code
> 
> InputStream is = new FileInputStream(Constants.USER_HOME + configFile)
> 
> While this is fine, it may not always be portable, or as portable as other
> methods. For instance Chiki has a similar mechanism for loading the config
> xml file, but it is done using URL
> 
> conf.setConfigFile(getServletContext().getResource(chikiConfigFile))
> ...and then
> Document doc = builder.build(getConfigFile());
> 
> This removes any hardcoding in your constants file to the path of the file,
> and is more portable across containers. 'chikiConfigFile' is  a Servlet Init
> parameter, so the location can be changed at deploy time without changing
> code.
> 
> As I said, your example does work. I just wanted to point out alternative
> method that may be more suitable. Check the Chiki code for full details.
> 
> Cheers
> 
> Ghoot
> 
> 
> > -Original Message-
> > From: Matt Raible [mailto:[EMAIL PROTECTED]]
> > Sent: 06 March 2002 22:13
> > To: Struts Users Mailing List
> > Subject: RE: "Best Practice" for parsing an XML file - Code Review
> > Requested
> > 
> > 
> > I've completed this task - however, it would've been MUCH 
> > easier to just use a
> > properties file.  Of course, it could just be my experience 
> > with XML parsing -
> > because I had to write a lot of code to grab 4 simple varaibles.
> > 
> > private synchronized void loadConfig() throws Exception {
> > 
> > // Initialize our configuration object
> > config = new Configuration();
> > 
> > logCat.debug("Looking for " + configFile + " in " +
> > Constants.USER_HOME);
> > 
> > // Acquire an input stream to our configuration file
> > InputStream is = new 
> > FileInputStream(Constants.USER_HOME + configFile);
> > 
> > // No file found in user.home
> > if (is == null) {
> > logCat.debug("File not found at " + Constants.USER_HOME +
> > configFile
> > + " - looking in application's WEB-INF directory");
> > 
> > // Look for config.xml in WEB-INF
> > is = getServletContext()
> > .getResourceAsStream("/WEB-INF/" + configFile);
> > 
> > if (is == null) {
> > throw new Exception("Configuration file '" 
> > + configFile + "' not found in '" 
> > + Constants.USER_HOME + "', nor in 
> > '/WEB-INF/'");
> > }
> > }
> > 
> > 
> > // Get the XML Document
> > DocumentBuilderFactory builderFactory =
> > DocumentBuilderFactory.newInstance();
> > DocumentBuilder builder = 
> > builderFactory.newDocumentBuilder();
> > Document doc = builder.parse(is);
> > 
> > // close the input stream
> > is.close();
> > 
> > // get the repository root
> > NodeList rep = doc.getElementsByTagName("root");
> > Node node = rep.item(0);
> > Text rootDir = (Text) node.getFirstChild();
> > config.setRepositoryRootDir(rootDir.getNodeValue());
> > 
> > // get the assets directory
> > rep = doc.getElementsByTagName("assets");
> > node = rep.item(0);
> > Text assetDir = (Text) node.getFirstChild();
> > config.setAssetDir(assetDir.getNodeValue());
> > 
> > // get the assetView path
> > rep = doc.getElementsByTagName("viewPath");
> > node = rep.item(0);
> > Text viewPath = (Text) node.getFirstChild();
> > config.setAssetViewPath(viewPath.getNodeValue());
> > 
> > // get the assetView path
> > rep = doc.getElementsByTagName("default-passing-score");
> > node = rep.item(0);
> > Text minScore = (Text) node.getFirstChild();
> > config.setAssessmentMinScore(new
> > Double(minScore.getNodeValue()).doubleValue());
> >   

RE: [Fwd: Introducing Enterprise Object Broker]

2002-03-07 Thread Emaho, Ghoot

On this note, has anyone used McKoi ? (http://mckoi.com) Its an Open Source Java SQL 
Database System that I've just started looking at, and it looks very promising. 
Wondered if anyone else had come across it.

In the context of Struts apps, it allows you to bundle the db with your app, great for 
apps like Chiki that need to run out of the box without requiring users to setup any 
external 3rd party stuff.

Let me know if you have experience with McKoi. I intend to upgrade Chiki to use McKoi 
and I'll knock together a little tutorial on using McKoi with Struts apps, if anyones 
interested.

Cheers

Ghoot

> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: 07 March 2002 11:37
> To: [EMAIL PROTECTED]
> Subject: [Fwd: Introducing Enterprise Object Broker]
> 
> 
> Since hooking up a with a persistence layer is an important part of
> using Struts, I thought I would pass this along. 
> 
> -Ted.
> 
>  Original Message 
> Subject: Introducing Enterprise Object Broker
> Date: Thu, 07 Mar 2002 09:08:24 +
> From: Paul Hammant <[EMAIL PROTECTED]>
> Reply-To: "Jakarta General List" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> 
> Folks,
> 
> Enterprise Object Broker (EOB) is an application server that 
> tries to a 
> be a simpler EJB container.  It is not complete yet, but we have many 
> demos showing local, remote, and webapp usage.  
> 
> Take a look at http://eob.sourceforge.net/
> 
> Features:
> 
>   * Not J2EE compliant.
>   * Real Java interfaces & impls (no XxxHome or XxxRemote 
> interfaces) .
>   * Does not use RMI for interoperation (no RemoteException, no 
> extending rmi.Remote interface).
>   - Uses AltRMI (commons-sandbox).
>   * No forced choices about persistence.
>   - Use files, Castor, XML, JDBC, delegated, whatever..
>   * Avalon Framework methods ( IoC pattern )
>   - Beans are handed a ServiceManager they use to lookup() other 
> beans without have multiple
>   lines of JNDI code.
>   * Applications can hand a WAR file to Hendrik Schreiber's Jo! 
> webserver (same VM) for web publishing.
>   * Sits on top of Avalon-Phoenix.
>   - Meaning it could be along side (and the beans could use) 
> multiple other server components.
> 
> Supplied Examples:
> 
>   0 - Dual impl stock-quote service with ugly WAR file web-presence.
>   1 - Small People & Addresses PIM. Beans in different jars, and 
> potentially machines.
>   2 - Small shopping cart app. Beans all in one jar.
>   3 - A port of Velocity's ForumDemo app.  The obj model 
> moved to EOB, 
> Jo! handling WAR file.
> 
> For those interested in the EOB project, ignore the 0.20 
> release as it 
> does not have the ForumDemo in it.  If you are CVS and Ant savvy, you 
> should manage to build and launch the demo.
> 
> We are looking to add more demos, especially Jakarta ones.  The best 
> candidates are WAR file apps with object models (hopefully 
> interface/impl separated) that can be moved out of the Servlet's 
> context.  These also include EJB using webapps, but the EJB 
> side would 
> have to be trimmed of the EJB 'noise' before being run in EOB.
> 
> As well as our need for more demos, we are interested in 
> people to join 
> in the main development.  Apache license of course.
> 
> Regards,
> 
> - Paul H
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts Community Opportunity

2002-03-07 Thread Emaho, Ghoot

Gabriel

> As you might know, I am working on the Struts/Velocity integration.
> My personal interest in Chiki is to find out how easily it could be
> turned into a show case for Struts/Velocity. 

Cool ! This is on my list, so maybe we can collaborate ? I'd like to see Chiki grow to 
use more than JSP for the Presentation Tier. So it becomes a fuller example, running 
either Xml oro RDBMS, and JSP Velocity or Tiles (or others). This is the kind of 
example which isnt really available at the moment - the same app with simple config to 
change which Presentation/Business tier it uses.

Looking at Velocity etc is on my list - but someway down at the moment ! So it would 
be good to coordinate our efforts, saving on any duplication.

> In any case, I'll report back once I have had a chance to spend some
> more time with Chiki.

Great.

> I certainly would voluteer to help with setting up and maintaining
> a Chiki-based Struts Know How forum. My experience is that like a
> nice garden, such a forum needs a few gardeners that are devoted
> to its well being.

Absolutely. I'll look forward to speaking with you more.

Thanks

Ghoot

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts Community Opportunity

2002-03-07 Thread Gabriel Sidler

"Emaho, Ghoot" wrote:
> 
> Gabriel
> 
> I see it's built on TWiki. Chiki has many similarities to Twiki re functionality. 
>Obviously it's written in Java using Struts (not perl). Have you taken a look at 
>Chiki ? I'd be interested in any feedback you might have. The current release has 
>everything you listed (except version control which is in the next release) and more. 
>As an experienced Wiki user I'd appreciate your feedback. Your site is a good example 
>of how these things can be used. A Community site (using Chiki) for Struts would be a 
>great resource. Of course it doesnt have to be Chiki (there are many Wiki's out 
>there) but it'd be good to use something that's built on Struts.
> 
> Looking forward to your feedback


Ghoot,
Looking into Chiki is on my to do list. I just didn't get around 
to do it yet (have browsed your site extensively but not looked 
at the implementation)
In any case, for a Struts forum I think it would be nice to use
Struts technolgoy even if Chiki misses some features of other Wikis 
at the moment. I'm sure this will change soon :-)

As you might know, I am working on the Struts/Velocity integration.
My personal interest in Chiki is to find out how easily it could be
turned into a show case for Struts/Velocity. 

In any case, I'll report back once I have had a chance to spend some
more time with Chiki.

I certainly would voluteer to help with setting up and maintaining
a Chiki-based Struts Know How forum. My experience is that like a
nice garden, such a forum needs a few gardeners that are devoted
to its well being.

Gabe



--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Newbie] logic:iterate

2002-03-07 Thread Slimane Zouggari

Hello,

yes it has a String as a return value !
But don't bother, now (although I didn't change a thing) it works ! :)

Thanks for your help though :)

Friendly regards,
Slimane

>does elt.getName() return a String?
>
>--- Slimane  wrote:
> > Hi,
> >
> > I try to do an iteration on a vector. When this vector contains only
> > Strings, the iteration works well. For that, I use the following piece of
> > code:
> >
> > >
> > >   
> > >
> >
> > But, when I try with a vector containing custom objects, it doesn't work :(
> > For example, I have a Vecor of Element. Element is a bean which contains 2
> > attributes (2 String named: id and name)
> > To iterate on that vector, I use the following piece of code:
> >
> > > > >type="be.stluc.info.struts.Element">
> > >   
> > >
> >
> > That doesn't work, and the following exception is thrown:
> >
> > >Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Errortype

[SNIP]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: how to edit an array of records with action forms?

2002-03-07 Thread Arron Bates

Nightly build version can use implementations of the java.util.List 
rather than having to get back the primitive array object. Makes things 
easier to work with.

Returning the Object[] actually renders everything but ArrayList style 
collections useless because the mapped collections and such don't know 
how to update from an index. Returning the array from an ArrayList 
itself isn't that big a hit, as it's backed by such an array anyways.

Arron.


Ian Tomey wrote:

>ahh, just paid more attention to your example code :-) 
>
>  
>public BunchBean() {
>  this.bananaList = new ArrayList();
>  this.bananaList.add(new BananaBean());
>  this.bananaList.add(new BananaBean());
>  this.bananaList.add(new BananaBean());
>}
> 
>public Object[] getBananaList() {
>  return this.bananaList.toArray();
>}
>
>
>could this potentially be a bit of a performance killer ( the .toArray() ) stuff with 
>some collection types?
>
>cheers
>Ian
>
>
[EMAIL PROTECTED] 03/07/02 12:31pm >>>

>Who's fixing the number of records?... The tags will happily do whatever 
>with what they're given. The monkey example adds and deletes objects in 
>the various lists with ease.
>
>You could even map the bean properties to access columns in a result 
>set. Wouldn't be on the "best practice" list however :)
>
>Arron.
>
>
>Ian Tomey wrote:
>
>>Hi Arron,
>>
>>Had a quick look at it, seems like what I need. One gotcha though is that the number 
>of records is not fixed, so the creation of the array of row objects in the form 
>constructor has to be bigger than the max size expected. I'm hoping that 
>actionForm.reset is called before bean population then I can init the size of the 
>array from looking up the param. ugh, an ugly kludge.
>>
>>good work BTW.
>>
>>Cheers
>>Ian
>>
>[EMAIL PROTECTED] 03/06/02 05:24pm >>>
>
>>If you're on a nightly build, you'll have the nested extension already 
>>there. It will help you make light work of iterating objects.
>>
>>For a pimer and tutorial, go here...
>>http://www.keyboardmonkey.com/struts 
>>
>>And for mor implementation detail for each of the tags, the Struts site 
>>has the most complete info.
>>
>>Arron.
>>
>>Ian Tomey wrote:
>>
>>>Hi all,
>>>
>>>Got an array of records and I want to put them onto the screen to edit. What is the 
>technique to go about this? (i am using the nightly 1.1 at the moment)
>>>
>>>is it create an action form that maps a single record and create a load of them? or 
>create an action form with the properties being arrays of the information?
>>>
>>>one form in total or one form per record?
>>>
>>>i take it the indexed= attribute for the html tags is going to be useful?
>>>
>>>It's not obvious how to do this and I just dont have time to expriement (deadline 
>to meet). Any help appreciated
>>>
>>>Cheers
>>>Ian
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:   
>>>For additional commands, e-mail: 
>>>
>>>
>>
>>
>>--
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 
>>
>>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Downloading files locally

2002-03-07 Thread R. BIGGS

Security is not an issue for this application will only be used internally
by our users.
- Original Message -
From: "SUPRIYA MISRA" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 07, 2002 7:26 AM
Subject: Re: Downloading files locally


> I keep the file at webapps\project\download.xls level and forward it to
this
> location. Download is automatic except for .txt file. Question  is :-
there
> is no security - anybody can download it.
>
>
> >From: "R. BIGGS" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Subject: Downloading files locally
> >Date: Wed, 6 Mar 2002 22:04:25 -0500
> >
> >Greetings,
> >
> >I know Struts provides the capability to upload files through the browser
> >but does it posses this capability for downloading files? If Struts does
> >not provide this option does anyone know of any other way to achieve
this?
> >
> >TIA
> >
> >Biggs
>
>
>
>
> _
> Join the world's largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: how to edit an array of records with action forms?

2002-03-07 Thread Ian Tomey


ahh, just paid more attention to your example code :-) 

  
public BunchBean() {
  this.bananaList = new ArrayList();
  this.bananaList.add(new BananaBean());
  this.bananaList.add(new BananaBean());
  this.bananaList.add(new BananaBean());
}
 
public Object[] getBananaList() {
  return this.bananaList.toArray();
}


could this potentially be a bit of a performance killer ( the .toArray() ) stuff with 
some collection types?

cheers
Ian


>>> [EMAIL PROTECTED] 03/07/02 12:31pm >>>
Who's fixing the number of records?... The tags will happily do whatever 
with what they're given. The monkey example adds and deletes objects in 
the various lists with ease.

You could even map the bean properties to access columns in a result 
set. Wouldn't be on the "best practice" list however :)

Arron.


Ian Tomey wrote:

>Hi Arron,
>
>Had a quick look at it, seems like what I need. One gotcha though is that the number 
>of records is not fixed, so the creation of the array of row objects in the form 
>constructor has to be bigger than the max size expected. I'm hoping that 
>actionForm.reset is called before bean population then I can init the size of the 
>array from looking up the param. ugh, an ugly kludge.
>
>good work BTW.
>
>Cheers
>Ian
>
[EMAIL PROTECTED] 03/06/02 05:24pm >>>

>If you're on a nightly build, you'll have the nested extension already 
>there. It will help you make light work of iterating objects.
>
>For a pimer and tutorial, go here...
>http://www.keyboardmonkey.com/struts 
>
>And for mor implementation detail for each of the tags, the Struts site 
>has the most complete info.
>
>Arron.
>
>Ian Tomey wrote:
>
>>Hi all,
>>
>>Got an array of records and I want to put them onto the screen to edit. What is the 
>technique to go about this? (i am using the nightly 1.1 at the moment)
>>
>>is it create an action form that maps a single record and create a load of them? or 
>create an action form with the properties being arrays of the information?
>>
>>one form in total or one form per record?
>>
>>i take it the indexed= attribute for the html tags is going to be useful?
>>
>>It's not obvious how to do this and I just dont have time to expriement (deadline to 
>meet). Any help appreciated
>>
>>Cheers
>>Ian
>>
>>
>>--
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 
>>
>>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: how to edit an array of records with action forms?

2002-03-07 Thread Arron Bates

Who's fixing the number of records?... The tags will happily do whatever 
with what they're given. The monkey example adds and deletes objects in 
the various lists with ease.

You could even map the bean properties to access columns in a result 
set. Wouldn't be on the "best practice" list however :)

Arron.


Ian Tomey wrote:

>Hi Arron,
>
>Had a quick look at it, seems like what I need. One gotcha though is that the number 
>of records is not fixed, so the creation of the array of row objects in the form 
>constructor has to be bigger than the max size expected. I'm hoping that 
>actionForm.reset is called before bean population then I can init the size of the 
>array from looking up the param. ugh, an ugly kludge.
>
>good work BTW.
>
>Cheers
>Ian
>
[EMAIL PROTECTED] 03/06/02 05:24pm >>>

>If you're on a nightly build, you'll have the nested extension already 
>there. It will help you make light work of iterating objects.
>
>For a pimer and tutorial, go here...
>http://www.keyboardmonkey.com/struts 
>
>And for mor implementation detail for each of the tags, the Struts site 
>has the most complete info.
>
>Arron.
>
>Ian Tomey wrote:
>
>>Hi all,
>>
>>Got an array of records and I want to put them onto the screen to edit. What is the 
>technique to go about this? (i am using the nightly 1.1 at the moment)
>>
>>is it create an action form that maps a single record and create a load of them? or 
>create an action form with the properties being arrays of the information?
>>
>>one form in total or one form per record?
>>
>>i take it the indexed= attribute for the html tags is going to be useful?
>>
>>It's not obvious how to do this and I just dont have time to expriement (deadline to 
>meet). Any help appreciated
>>
>>Cheers
>>Ian
>>
>>
>>--
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 
>>
>>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




form/multipart

2002-03-07 Thread Torgeir Veimo

I am having trouble with a form that contains both a file upload button 
and some other button.

There is one input field which is used to create a new file, and a 
submit button for that. There is also a file upload button, and a submit 
button for that.



 <%-- create a new file --%>
 
 

 <%-- upload a file --%>
 
 



Upload of file works ok. The trouble I'm having is that if I want to 
create a new file, by entering a filename and selecting the new_document 
submit action, I get an exception.

It works if I select a file to upload, yet still selects "new_document".

Is there a way around this?

Here the exception I get

javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:756)
at 
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2602)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:2025)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:562)
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)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:536)

root cause

java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1418)
at 
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1321)
at 
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1350)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:607)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:754)
at 
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2602

Re: Downloading files locally

2002-03-07 Thread SUPRIYA MISRA

I keep the file at webapps\project\download.xls level and forward it to this 
location. Download is automatic except for .txt file. Question  is :- there 
is no security - anybody can download it.


>From: "R. BIGGS" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: Downloading files locally
>Date: Wed, 6 Mar 2002 22:04:25 -0500
>
>Greetings,
>
>I know Struts provides the capability to upload files through the browser 
>but does it posses this capability for downloading files? If Struts does 
>not provide this option does anyone know of any other way to achieve this?
>
>TIA
>
>Biggs




_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts Web App Challenging user with BASIC Auth

2002-03-07 Thread @Basebeans.com

Subject: Re: Struts Web App Challenging user with BASIC Auth
From: "David Bolsover" <[EMAIL PROTECTED]>
 ===
Satish

Have you correctly configured the Tomcat server.xml file?

David Bolsover


"Satish Jeejula" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi All,
>
> I have a web application using struts running under apache\tomcat3.3
> configuration. I want to make this app challenge the user  using HTTP
BASIC
> Auth scheme.
>
> The admin context that comes with tomcat does implement this. But the
admin
> is not using struts.
>
> I have added security-constraint element to my web.xml file for my
> application. But still it does not challenge me?
>
> Is there anything else that I need to configure for the application using
> struts to challenge??
>
> Any pointers that will lead me to a solution.
>
> Any help is appreciated.
>
> Thanks,
> Satish
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Help with inside - variable in onmouseover problem

2002-03-07 Thread Ronald Haring

I dont know if html:link can use other tags inside of it.
What you can do is to set the  in the headers
and use plain html e.g.
 ,1)">


Gr
Ronald 

> -Original Message-
> From: Antony Stace [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 2:29 AM
> To: [EMAIL PROTECTED]
> Subject: Help with  inside  - variable in
> onmouseover problem
> 
> 
> Hi
> 
> I need some help constructing a  tag inside an 
>  tag, 
> what I need is logically this, 
> 
> 
> 
>  onmouseout="MM_swapImgRestore()" 
> onmouseover="MM_swapImage('prev','', name="houseTag" property="mouseOverPic"filter="true"/> ,1)" 
> > property="mouseOverPic" filter="true"/>" />
> 
> 
> 
> but I do not know how to write this correctly.  Can someone 
> please show
> me how to write this correctly.
> 
> Thanks for your help
> 
> Tony
> 
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:



Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
from any computer

---




RE: Application Scope Variables

2002-03-07 Thread keithBacon

Application Scope - Generally, application scope beans are initialized in the
init() method of a startup servlet. However, it is legal for an
Action class to create such beans, if this is appropriate, like this:

Foo foo = ... create a Foo ...;
servlet.getServletContext().setAttribute("foo", foo);

---
from
http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/taglib/bean/package-summary.html#package_description
a really good bit of doc - once you stumble across it.
=

--- "Farrell, Sarah" <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I was searching around in the struts-user list archives for the correct
> getServletContext() syntax and found Robert's response to a post:
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg22768.html
> 
> I am trying to compile an ActionForm and I need to access the *application*
> scoped bean (not a session bean).
> 
> I tried:
> 
> public ActionErrors validate(ActionMapping mapping, HttpServletRequest
> request) 
> {
>   
>   Object o =
> request.getSession().getServletContext().getAttribute("attribute_name");
> 
> }
> 
> And it won't compile:
> 
> [javac] C:\cvs
> work\energizer\source\edu\cccs\energizer\SupplementalForm.java:280: cannot
> resolve symbol
> [javac] symbol  : method getServletContext  ()
> [javac] location: interface javax.servlet.http.HttpSession
> [javac]   Object o =
> request.getSession().getServletContext().getAttribute("attribute_name");
> [javac] 
> 
> The difference btw what I'm doing and what Robert had suggested is that I'm
> trying to do it within the ActionForm and not within the Action, but I can't
> figure out why it won't work in the ActionForm.
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[Fwd: Introducing Enterprise Object Broker]

2002-03-07 Thread Ted Husted

Since hooking up a with a persistence layer is an important part of
using Struts, I thought I would pass this along. 

-Ted.

 Original Message 
Subject: Introducing Enterprise Object Broker
Date: Thu, 07 Mar 2002 09:08:24 +
From: Paul Hammant <[EMAIL PROTECTED]>
Reply-To: "Jakarta General List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]

Folks,

Enterprise Object Broker (EOB) is an application server that tries to a 
be a simpler EJB container.  It is not complete yet, but we have many 
demos showing local, remote, and webapp usage.  

Take a look at http://eob.sourceforge.net/

Features:

  * Not J2EE compliant.
  * Real Java interfaces & impls (no XxxHome or XxxRemote interfaces) .
  * Does not use RMI for interoperation (no RemoteException, no 
extending rmi.Remote interface).
  - Uses AltRMI (commons-sandbox).
  * No forced choices about persistence.
  - Use files, Castor, XML, JDBC, delegated, whatever..
  * Avalon Framework methods ( IoC pattern )
  - Beans are handed a ServiceManager they use to lookup() other 
beans without have multiple
  lines of JNDI code.
  * Applications can hand a WAR file to Hendrik Schreiber's Jo! 
webserver (same VM) for web publishing.
  * Sits on top of Avalon-Phoenix.
  - Meaning it could be along side (and the beans could use) 
multiple other server components.

Supplied Examples:

  0 - Dual impl stock-quote service with ugly WAR file web-presence.
  1 - Small People & Addresses PIM. Beans in different jars, and 
potentially machines.
  2 - Small shopping cart app. Beans all in one jar.
  3 - A port of Velocity's ForumDemo app.  The obj model moved to EOB, 
Jo! handling WAR file.

For those interested in the EOB project, ignore the 0.20 release as it 
does not have the ForumDemo in it.  If you are CVS and Ant savvy, you 
should manage to build and launch the demo.

We are looking to add more demos, especially Jakarta ones.  The best 
candidates are WAR file apps with object models (hopefully 
interface/impl separated) that can be moved out of the Servlet's 
context.  These also include EJB using webapps, but the EJB side would 
have to be trimmed of the EJB 'noise' before being run in EOB.

As well as our need for more demos, we are interested in people to join 
in the main development.  Apache license of course.

Regards,

- Paul H


--
To unsubscribe, e-mail:  

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: how to edit an array of records with action forms?

2002-03-07 Thread Ian Tomey


Hi Arron,

Had a quick look at it, seems like what I need. One gotcha though is that the number 
of records is not fixed, so the creation of the array of row objects in the form 
constructor has to be bigger than the max size expected. I'm hoping that 
actionForm.reset is called before bean population then I can init the size of the 
array from looking up the param. ugh, an ugly kludge.

good work BTW.

Cheers
Ian

>>> [EMAIL PROTECTED] 03/06/02 05:24pm >>>
If you're on a nightly build, you'll have the nested extension already 
there. It will help you make light work of iterating objects.

For a pimer and tutorial, go here...
http://www.keyboardmonkey.com/struts 

And for mor implementation detail for each of the tags, the Struts site 
has the most complete info.

Arron.

Ian Tomey wrote:

>Hi all,
>
>Got an array of records and I want to put them onto the screen to edit. What is the 
>technique to go about this? (i am using the nightly 1.1 at the moment)
>
>is it create an action form that maps a single record and create a load of them? or 
>create an action form with the properties being arrays of the information?
>
>one form in total or one form per record?
>
>i take it the indexed= attribute for the html tags is going to be useful?
>
>It's not obvious how to do this and I just dont have time to expriement (deadline to 
>meet). Any help appreciated
>
>Cheers
>Ian
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: "Best Practice" for parsing an XML file - Code Review Requested

2002-03-07 Thread CARDON Denis

Hi Matt,

I agree with Emaho, xml is (much) better for describing data. 
As for the parsing, I totally agree with you, using DOM is a pain
that one should avoid as much as possible. In your case you 
may use a more user friendly API such as Dom4j or jDom.

If you have some time to spend, you may even try to learn 
about XML schema and use Castor (castor.exolab.org) to create
a XML to bean mapping, then reading your config file will be
as easy as getting property from a bean. Example bellow : 


  
url0
driver0
login0
password0
  


then reading this file will be as easy as : 

//starting here!
Reader input = new FileReader("c:/configFile.xml");
ConfigFile config = ConfigFile.unmarshal(input);
DatabaseConnection db = config.getDataBaseConnection();
String url = db.getUrl();
String driver = db.getDriver();
String login = db.getLogin();
String password = db.getPassword();
//that's it!

Moreover it will tell you if your config file is not valid
(for example if you mis-spelled one element).

The only tricky part is to create the XML schema. You may 
use Xml Spy, it has a very intuitive schema editor (it has
an evaluation version). Once you have get used to it, 
doing all this should be a matter of minutes.

Hope this help

Denis


> -Original Message-
> From: Emaho, Ghoot [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 11:16 AM
> To: Struts Users Mailing List
> Subject: RE: "Best Practice" for parsing an XML file - Code Review
> Requested
> 
> 
> Matt
> 
> As an aside you may want to consider how you retrieve the 
> config xml file. Currently you are using the code
> 
> InputStream is = new FileInputStream(Constants.USER_HOME + configFile)
> 
> While this is fine, it may not always be portable, or as 
> portable as other methods. For instance Chiki has a similar 
> mechanism for loading the config xml file, but it is done using URL
> 
> conf.setConfigFile(getServletContext().getResource(chikiConfigFile))
> ...and then
> Document doc = builder.build(getConfigFile());
> 
> This removes any hardcoding in your constants file to the 
> path of the file, and is more portable across containers. 
> 'chikiConfigFile' is  a Servlet Init parameter, so the 
> location can be changed at deploy time without changing code.
> 
> As I said, your example does work. I just wanted to point out 
> alternative method that may be more suitable. Check the Chiki 
> code for full details.
> 
> Cheers
> 
> Ghoot
> 
> 
> > -Original Message-
> > From: Matt Raible [mailto:[EMAIL PROTECTED]]
> > Sent: 06 March 2002 22:13
> > To: Struts Users Mailing List
> > Subject: RE: "Best Practice" for parsing an XML file - Code Review
> > Requested
> > 
> > 
> > I've completed this task - however, it would've been MUCH 
> > easier to just use a
> > properties file.  Of course, it could just be my experience 
> > with XML parsing -
> > because I had to write a lot of code to grab 4 simple varaibles.
> > 
> > private synchronized void loadConfig() throws Exception {
> > 
> > // Initialize our configuration object
> > config = new Configuration();
> > 
> > logCat.debug("Looking for " + configFile + " in " +
> > Constants.USER_HOME);
> > 
> > // Acquire an input stream to our configuration file
> > InputStream is = new 
> > FileInputStream(Constants.USER_HOME + configFile);
> > 
> > // No file found in user.home
> > if (is == null) {
> > logCat.debug("File not found at " + 
> Constants.USER_HOME +
> > configFile
> > + " - looking in application's WEB-INF 
> directory");
> > 
> > // Look for config.xml in WEB-INF
> > is = getServletContext()
> > .getResourceAsStream("/WEB-INF/" + configFile);
> > 
> > if (is == null) {
> > throw new Exception("Configuration file '" 
> > + configFile + "' not found in '" 
> > + Constants.USER_HOME + "', nor in 
> > '/WEB-INF/'");
> > }
> > }
> > 
> > 
> > // Get the XML Document
> > DocumentBuilderFactory builderFactory =
> > DocumentBuilderFactory.newInstance();
> > DocumentBuilder builder = 
> > builderFactory.newDocumentBuilder();
> > Document doc = builder.parse(is);
> > 
> > // close the input stream
> > is.close();
> > 
> > // get the repository root
> > NodeList rep = doc.getElementsByTagName("root");
> > Node node = rep.item(0);
> > Text rootDir = (Text) node.getFirstChild();
> > config.setRepositoryRootDir(rootDir.getNodeValue());
> > 
> > // get the assets directory
> > rep = doc.getElementsByTagName("assets");
> > node = rep.item(0);
> > Text assetDir = (Text

Re: problems with doing a Titles Invoice example

2002-03-07 Thread Cedric Dumoulin


  Hello,

  It is a problem with custom tags implementing "BodyTag" interface in jsp 1.1 : it
is not possible to do a flush inside such tag.
  In your example,  (or  ?) implement BodyTag, and
 do an include which automatically do a flush (even if you
specify flush="false").

  Your construct should be possible with jsp1.2 (try with Tomcat4), but I think
that  need to be reimplemented to use new Tag support.
  A workaround is to write the iterate loop as a scriptlet ;-(

Cedric


Dirk Storck wrote:

> Hi,
>
> I try to do a example like the tiles invoice example by my own
>
> My first page looks like the following snippet:
>
> 
> 
> 
>  
>  property="articles">
> 
> 
> 
>   
> 
> 
> 
>
>   
> .
> .
> .
>
> The productShortView.jsp looks like the next snippet:
>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
>
> 
> 
> 
>  cellpadding="0">
> 
> 
>  >
>  property="content" id="content"
> type="com.tecmath.cms.mt.valueobjects.ContentVO"/>
>  property="previewFile" value="">
> 
>  property="thumbnailFile" value="">
>  alt="keyframe" />
> 
> 
> 
>
> 
>  valign="top">
> :
>  />:
> :
> :
> 
>  valign="top">
>  paramId="articleId"
> paramName="article"
> paramProperty="id">
>  property="title"/>
> 
>  property="department"/>
> 
>  property="length"/> : 00:00:00 -
> 00:00:28
>  property="dateOfPublication"/>
> 
> <%--
> 
>  :
> 
> 
>  property="targetPrice" >
>  property="currency" />
> 
>  property="targetPrice">
>  property="currency" /> property="targetCurrency" />
> 
> 
> 
>  property="targetPrice" >
>  />
> 
>  property="targetPrice">
>  />
> 
> 
> --%>
>  rowspan="3"> 
>  rowspan="3">
>
>  paramId="articleId"
> paramName="article"
> paramProperty="id">
>  SRC="/iwf/graphics/detailsmall.gif" border="0" />
> 
>  
>
>  paramName="article" paramProperty="id">
> " SRC="/iwf/graphics/cart.gif" border="0">
> 
>
>  
> <%--
>  SRC="/iwf/graphics/favourite.gif" border="0" />
> --%>
> 
> 
> 
> 
> 
> 
>  valign="top"> : 
>  alt="Lizenzampel" />
> 
> 
> 
>  />:
>  
>
>  paramId="articleID"
> paramName="article"
> paramProperty="id">
> 
>  
>
>  paramId="articleId"
> paramName="article"
> paramProperty="id">
> 
> 

Re: Multiple submit buttons solution

2002-03-07 Thread keithBacon

You're right peter.
Come on the old struts pro's - do we need this or not?
I don't know enough to judge.
for - good to have choiice of using link or button.
against - you can do it with a link so why add more fiddly functionality 

> 
> Hi Keith,
> 
> Yes you can use links but sometimes you need to submit the form for each
> action. I'll give you an example:
> 
> 
> 
> 
> Question name
> Question text
> 
>  To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >