tiles:insert tag inserting carriage return before /td on linux box

2003-04-02 Thread Alix Jermyn
Our tiles work fine with Tomcat 4.1.12, struts1.1b3, jdk1.4.01 on an NT box,
but as soon as we port it to a Linux box (SUSE,  same 1.1b3, tomcat 4.1.24)
our rendered html displays a subtle and rather nasty error, as a carriage
return is inserted immediately before the /td tag, causing the well known
rendering bug in tables.
 
for example;
 
td blah blahtiles:insert attribute=MainHeader //td

will be rendered correctly as:
 
td blah blah Main header text/td
 
on the NT system, but as
 
td blah blah Main header text
/td
 
on the linux server, with the carriage return causing ugly display problems.
As far as we are aware, we have saved all our text files (jsp, html, tld,
xml ...) in unix format without the NT double ODOA  CR sequence.
 
Any ideas???
 


RE: MySQL

2001-03-30 Thread Alix Jermyn


I also use the mm driver (with jRelation Framework (jrf)) and have never had
any problems


-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, 30 March 2001 14:16
To: [EMAIL PROTECTED]
Subject: Re: MySQL


I use Mark Matthew's driver  http://mmmysql.sourceforge.net/ , which
works well with Resin (and everything else under the sun). Caucho even
puts it in their own examples.

 James Bell wrote:
 
 Hi everyone
 
 I want to use MySQL with Struts.  Although not a Struts specific
 question, what jdbc driver is the best to use.  I downloaded the
 driver from caucho and noticed that it was marked as experimental.  I
 know that may mean that it is still a good driver.  But I would like
 an independent opionion.
 
 Thanks in Advance
 James Bell



Problem re-populating List property from a form to a FormBean - BUG/ENHANCEMENT in ConvertUtils/BeanUtils?

2001-02-19 Thread Alix Jermyn


There appears to by an problem populating properties which are generic
collections (as opposed to arrays) from FormBeans.

If the underlying property is an array of strings, then it is straight
forward to populate multiform boxes via the multiform tag, to and from the
corresponding property in the FormBeans via the usual struts mechanism.

However, if the property is a Collection of Strings, though the automatic
filling of the multiboxes works fine when reading data from the FormBean,
but the exception below occurs when trying to re-populate the data in the
form back to the FormBean. 

The MultiTag has the smarts to check if the property class is a collection
or an array of Strings when reading the data, however the
ConvertUtils.convert(String[], Class) method called by BeanUtils.populate
method defaults to returning an array of Strings when it doesn't recognise
the class type, and hence java.lang.IllegalArgumentException: argument type
mismatch  when trying to push the returned array into a Collection.

This could be fixed by adding some Collections (in particular a List) to the
types recognised by ConvertUtils.convert, or less preferably, 
modifying the BeanUtils.populate method.

/alix

Error: 500
Location: /projectxxx/testBriefing.do
Internal Servlet Error:
javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java,
Compiled Code)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:18
18)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1429)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:490)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
at java.lang.Thread.run(Thread.java, Compiled Code)
Root cause: 
java.lang.IllegalArgumentException: argument type mismatch
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java,
Compiled Code)
at
org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java,
Compiled Code)
at
org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java,
Compiled Code)
at org.apache.struts.util.BeanUtils.populate(BeanUtils.java,
Compiled Code)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java,
Compiled Code)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:18
18)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1429)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:490)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
at java.lang.Thread.run(Thread.java, Compiled Code)




RE: Struts and MySQL

2001-01-31 Thread Alix Jermyn


I have been using mm.mysql-2.0.3 with the struts GenericDataSource for the
past fortnight without any problems, using the jRelationalFramework at
http://sourceforge.net/projects/jrf/  (you will have to apply the uncommited
MySQLDatabasePolicy patch as listed at
http://sourceforge.net/patch/?group_id=8796 and create any needed custom
ColumnSpec classes (pretty simple cut and paste job).

I am quite taken with jRelation; it does most of the work for you, but still
leaves you with quite a bit of flexibility and portability across most
serious databases.  If you are not going to use EJBs for data access, take a
look.
/alix


I've been using mm.mysql-2.0.2 - but checking 
http://mmmysql.sourceforge.net/ . I see 2.0.4 is the latest stable
version as of 25-JAN. (The MySQL page is stale.)

I installed Resin last week, but had been using Tomcat 3.2 - and both
still work.

I just updated my MySQL version to 3.23 (declared "stable" as of
22-JAN), but it had worked with an early version too.

-T.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/




RE: EJB references

2000-12-07 Thread Alix Jermyn


Pretty much what I was thinking of too - my vague memory is that the Bean
container handles the synchronisation problem, so you can share the single
home references from your cache helper across the application without any
worries.

If you are feeling really confident, you may want to control the
initialisation process through deployment desciptors using the struts
digester...


--Original Message-
-From: Jim Richards [mailto:[EMAIL PROTECTED]]
-
-You probably need to create a helper class that does all this work, 
-keeps the references as public variables and create it as a 
-singleton in
-the init of the servlet, and store it as an application wide variable
-so you can access it easily and have references to all the 
-session beans.
-
-I can't remember the deal though with synchronisation and EJBs, you
-had better check on that as there will be a high possibility of 
-multiple threads (servlets) accessing it at the same time.
-



RE: EJB references

2000-12-06 Thread Alix Jermyn


Jim is quite right, you should be able to remove references to EJB
structures, even from the the Action Servlets themselves.  I have had some
EJB experience, but am new to struts, but one of the nice things about
struts is its abilty to isolate most of the presentation logic from the
business and backend logic.  You should be able to design the struts sides
of things without knowing about how your data will be managed in the
backend, allowing you to plug in an EJB solution, direct JDBC calls, LDAP
etc modules.   

Most of the backend logic should be accessed within the Action classes,
which will have generic data methods, which in turn access the actual data
access classes you decide to go with.  You will have a few(one)
application/session/request context web tier controller classes which know
how to deal with the EJB tier objects. I have found it cleaner/easier to
have the web tier controller(s) talk to a sesssion bean controller object in
the EJB tier which in turn deals with the necessary session and entity beans
needed to actually manipulate your data, and like Jim, would be wary of
using too many entity beans, which have a relatively heavy overhead.



--Original Message-
-From: Jim Richards [mailto:[EMAIL PROTECTED]]
-
-I'll be using ELB's for my application when I start building it
-in a few weeks time (still in the design stage). I expect to
-be using only EJBs from a action servlet, that are session
-beans, and those session beans use entity beans. From previous
-work I found there was too much overhead using the entity beans
-directly in the generation of a html page, and you rarely
-needed that direct conncetion to the database anyway.
-
-As for the references, I'm not sure what you mean. I'll be putting
-things like the JNDI and connection information into to web.xml
-as startup parameters.
-
-"Boulatian, Misak" wrote:
- 
- Hi all,
- 
- The application we design is quite large. I am still trying 
-to figure out
- the question on EJB references. From the Craig Mcc.'s 
-comment I could put
- those in one startup servlet. Is it a viable solution? I am 
-going to have
- many session references. Where am I going to store those 
-references (in
- servlet context)? How can I make those available to action 
-classes? Or I can
- put only the handle in the servlet context and call lookup 
-in every action
- class (any scalability problems with this approach?). I 
-cannot believe that
- none of you worked in large applications and will not be 
-using EJBs for
- business logic and did not go over this kind of issue.
- 
- I appreciate response,
- Misak Boulatian
-



Struts ok with WebSphere AppServer?

2000-12-01 Thread Alix Jermyn


For our next project we would like to use struts, and our client is likely
to be committed to using WebSphere for an App Server.  

Has anyone out there used WebSphere with struts before - any problems we
should be aware of before committing ourselves?

PS Craig imminent is imminent for  the Struts 1.0 milestone release? (1
week, 1 month?)

ta
Alix