more template:include/ questions

2001-06-11 Thread Jim Richards
One of the problems I'm having with template:include/ and probably more with the XML nature of JSP is that html:XXX form elements have to be within html:form/html:form tags, and no in an include used by template:include/. I have common components that different forms use, but have to do either

Re: template:put and get

2001-06-10 Thread Jim Richards
I decided to do the second option, it works quite well. I don't like the idea of putting the while html:img/ tag into the template:put/ because that'd make the template file confusing for someone trying to maintain it (the image tag would never appear in the source for the included file, the

template:put and get

2001-06-09 Thread Jim Richards
I've got a situation where I want to include a header file with template:insert template=/share/inc_header.jsp template:put name=header_image content=/media/h_modify.gif direct=true/ /template:insert and then in the header file have html:img page=/media/h_modify.gif width=315

Re: JSP expressions inside custom tags

2001-06-08 Thread Jim Richards
try html:link href=%= \/\ + name + \/index.jsp\ % You need to have the %= % present the whole string, not just the single part. At 10:56 AM 8/06/01 +0200, you wrote: Hi! I am evaluating struts for a new project. One problem I wasn't able to solve was the integration of JSP

Re: New Windows, Struts, IE 5 and sessions dying

2001-06-01 Thread Jim Richards
At 07:04 PM 1/06/01 +1200, you wrote: Summary: Any known bugs and workarounds with Multiple Windows in IE5, Servlet Sessions and Struts 1.0b1? A few things to note. Have a look to see if the redirect is forcing :80 (port 80) onto the end of the URL, this can cause the session get lost in the

Re: Potential Security Flaw in Struts MVC

2001-05-31 Thread Jim Richards
In the case at hand, nothing stops your user from logging on (so your security checks won't catch anything) and then hand typing a URL with query string parameters that maliciously or accidentally try to change things in the system. If the user is successful at doing this, it's shame on

Re: Potential Security Flaw in Struts MVC

2001-05-31 Thread Jim Richards
At 11:53 PM 30/05/01 -0700, you wrote: A good way of removing the bucketloads :-} from your Action classes is to subclass ActionServlet and implement processActionPerform to do the logon check. It's not just for login though, that was the example I used, every action that generates a form needs

Re: subclassing ActionServlet?

2001-05-24 Thread Jim Richards
I made a sub-class of ActionServlet an overloaded the initXXX() method that created the connecion pool. I did this because my database manager beans needed access to the connection pool parameters. The other choice is to use something like a singleton or factory bean pattery that generates the

Re: Possible to access Init Params from JSP??

2001-05-24 Thread Jim Richards
George Craig wrote: Yes you can. Here is how to do it: %= application.getInitParameter(SOME_KEY) % Does this actually work? I've had report that in Tomcat and JRUN, it doesn't seem to return the values. Has anyone used it?

Re: Architecture for a form-wizzard

2001-05-23 Thread Jim Richards
I`m building a site that uses a application form that spans over several pages. How should I design this application? 1. With formBeans for every page 2. One formBean for the entire application form What I find I am doing is building a separate form bean for each page that just represents the

Re: is it a bug of CheckboxTag

2001-05-14 Thread Jim Richards
, and then forward to the .jsp page. At the top of the .jsp page you can then put something like (and this is from memory, so I'm not sure of the exact syntax) logic:notExists name=editSubscriptionForm logic:forward forward=editSubscription/ /logic:notExists JeanX wrote: Jim Richards wrote at 2001

Re: FW: Design Error? Bean repopulation...

2001-05-10 Thread Jim Richards
I had this problem, and worked out a solution that seemed workable. The main thing to remember with the html:xxx/ tags is the the name part should always be the name of the form bean, and the property be relative to that, otherwise the BeanUtils won't be able to repopulate the form. I tend to

Re: Initialization of Request-Scoped Objects

2001-05-10 Thread Jim Richards
No. What I do (antd I think it this is from the example app as well, maybe subscription.jsp) is to put at the beginning of the .jsp file (this is from memory, don't have the code handy) logic:notPresent name=yourFormBean logic:forward forward=editFormCode/ /logic:notPresent Where

Re: Philosophical question(s) related to STRUTS

2001-05-10 Thread Jim Richards
As a profession developer I have taken to learning how to use Struts for several reasons (besides being Java, and thus way cool). It's free. It doesn't cost me anything to develop or deploy. Open Source. If the development team die in a freak accident from caffeine overdose at something like

Re: Forward to an Action

2001-05-08 Thread Jim Richards
Try forward name=success path=/viewCategory.do/ instead of forward name=success path=/viewCategory/ -- Kumera - a new Open Source Content Management System for small to medium web sites written in Perl and using XML

Re: Struts and DAO pattern. Expensive?

2001-05-07 Thread Jim Richards
I need to confess I'm lost. The PetStore approach sounds cleaner in some sence, but also sounds too repetite in other, and mostly, sounds way to expensive (or it isn't?). Struts uses a connection pool. So when you do a getConnection() you're actually pulling one out from a pool of shared

Re: pleae help..submit button only allows 1 parameter to be sent with the request

2001-05-02 Thread Jim Richards
Do you have multiple submit buttons, and your action treats the data differently? You can use hidden fields, so that all the data is sent with the form fields. Then your action can determine which fields to use based on the valud of the submit button. If you have the same input field name and

Re: Why isn't ActionsErrors throwable?

2001-04-26 Thread Jim Richards
Because exceptions are slow, and can only handle one error at a time. The design as it is, allows for multiple action errors to be returned to a page for display. Exceptions should be for catastrophic errors that cause the system to barf. Having a blank password doesn't really fit within that

Re: struts at webappcabaret

2001-04-26 Thread Jim Richards
Michael Mok wrote: The servlet engine to use is Tomcat 3.1. Tomcat 3.1 has lots of buggies in it, you're better off using a 3.2.x version or go straight to a 4.0, although I think 4.0 is still in beta.

RE: why does struts use forward instead of redirect

2001-04-25 Thread Jim Richards
In your code you can, I don't think there is a run-time parameter between them because it would affect code quite drastically if you switched from forwards to redirects. At 08:40 AM 25/04/01 +0100, you wrote: Can you switch between the two, i.e. make struts use redirect? At 11:13 PM 24/04/01

Re: why does struts use forward instead of redirect

2001-04-24 Thread Jim Richards
At 11:13 PM 24/04/01 -0400, you wrote: Anyone know why struts uses forward instead of redirect? A redirect sends a request back to the browser, thus generating another connection between the client and server. Forward keeps it internal to the server, which also means you can re-use the request

Re: help with JavaScript and text box.

2001-04-09 Thread Jim Richards
Try document.requisition['requisitionLines.requiredOnDate'].value = "the new value"; Alex Colic wrote: Hi, I have a text box mapped to a bean via: html:text property="requisitionLines.requiredOnDate" size="10" / My form is called requisition. If I try to set the value of

Re: servlet context attribute?

2001-04-07 Thread Jim Richards
"Young, Wayne" wrote: Ok, that gets me closer. I created the servlet put the following code in the init() method. // Store the lookup service in the servlet context LookupService lookupService = new LookupService();

Re: Newbie datasource Q

2001-03-27 Thread Jim Richards
What specific operation are you trying to do? Since you don't have autocommit set to true, you may be having transaction problems. I found it helpful to create a Test.java file with the same operations as creating the datasource (with the same parameters), a connection and doing a sample

never ending iterate tag questions

2001-03-24 Thread Jim Richards
I've now got the logic:iterate ... tag to work, but I'm confused about how it works with the collection attribute. I've seen examples for people where they have logic:iterate id="bean" collection="%= someObject.getValues() %" ... do something with bean ...

Re: Confusion : Usage of Struts

2001-03-21 Thread Jim Richards
What happens to javascript validations? Where do we fit them in the comlete picture? They don't happen at the moment. Part of the Struts 1.1 plan is to look at some forms of autogeneration of JavaScript validation. A few people have implemented their own system for this. Who takes care of

RE: Alternative Frameworks - continued

2001-03-21 Thread Jim Richards
At 10:25 PM 20/03/01 -0800, you wrote: Eric, Have you looked into ASP.net vs ...? The main problem there is that a lot of the development tools are beta, and finding an ISP that will host it is also difficult. It will be at least 12 months before it has settled down. -- Kumera - a new Open

Re: PostgreSQL problems.

2001-03-17 Thread Jim Richards
e were no .proerties file) and this rippled through the system and broke init(). I've rebuilt my postgresql.jar file and the system loads, I can access the database and we'll all live happily ever after. At 11:30 PM 14/03/01 +1100, Jim Richards wrote: At 01:28 PM 14/03/01 +0100, you wrote: We

PostgreSQL problems.

2001-03-14 Thread Jim Richards
I'm still getting problems with PostgreSQL (documented previously several times). Has anyone used it successfully as a database. Yes, I've got the settings correct, the JDBC string correct, lots of other things. I really need someone who actually has it working to put their hand up and say

Re: PostgreSQL problems.

2001-03-14 Thread Jim Richards
At 01:28 PM 14/03/01 +0100, you wrote: We are currently using PostgreSQL as a database in a productive system together with struts. We tried with Interbase before, but ran into many many difficulties. So we switched to PostgreSQL and everything went well from then on. What specific kind of

Re: PostgreSQL problems.

2001-03-14 Thread Jim Richards
At 01:51 PM 14/03/01 +0100, you wrote: This does not sound at all like a PostgreSQL problem. Doesn't the error also show up, when you remove the datasource section? No. That's the catch, it loads and runs if there's no datasource section in the struts-config.xml file (although you need to

Re: Business Object Bean Persistence Strategies

2001-03-08 Thread Jim Richards
My approach is to have: JSP - Struts Form/Action - Business Rules - Database The busines rules are set up as singleton object on servlet startup. I've subclassed the ActionServlet and overloaded the datasource init method, there I set up the four business rule classes and

Database pooling code

2001-03-07 Thread Jim Richards
Has anyone got the database pooling code/DataSource to work or specifically had it fail? I've been having problems (documented previously) and I've read about a few others who can't seem to get the pooling to work as well, and I want to get an idea of specifically where the problem might lie in

Re: startup problems

2001-02-28 Thread Jim Richards
for reference within each Action, to access the database. All is well. For now. I think what might be useful for me now is getting some time together to read all the new documentation again. Jim Richards wrote: I'm sure earlier today when I started with the new version I didn't get the load error

Re: Stupd question about Struts and EJB.

2001-02-27 Thread Jim Richards
EJBs come in two flavours (as opposed to flavors), session beans and entity beans. Session beans represent business logic and rules, entity beans represent a row in the database. The model that you'd use is to have Actions do the basic processing of form elements into data beans (just regular

Re: more than one formclass for a one jsp ?

2001-02-24 Thread Jim Richards
At 07:37 AM 23/02/01 -0500, you wrote: Hi, I wanted to have more than one form class for a one jsp file. Because in my one jsp file, i have a information of 4 tables. So i want to transfer the information to 4 formclasses? Is it possible? If what I think you are doing is wanting

Re: database locks.. (OT)

2001-02-20 Thread Jim Richards
The usual thing to check for are: Are you using the database conneciton pool? Are you closing your database connection? Do use you transactions at all? Do you commit your work? Do you have autocommit turned on? Anand Raman wrote: I am trying to implement a multi page form and in some scenario

Re: startup problems

2001-02-17 Thread Jim Richards
I'm sure earlier today when I started with the new version I didn't get the load error, and something I've done has freaked it out. But as you'll see I haven't done that much to freak it out. I think I'm onto something now. I commented out the database connection code I had:

Re: AW: JDBC Connection Pooling

2001-02-15 Thread Jim Richards
I'm trying to do the same thing here, but I'm not sure on a few of the details. I've got a servlet called DatabaseContainer, which will handle all the database connections and populating Beans to send back to the Actions. What I can't work out is, once I've get the DataSource, how does the

Re: Help with Exception

2001-02-15 Thread Jim Richards
Sorry about not cutting out the previous messages, but the discussion is sort-of relevant to what I'm having problems with. I'm getting javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection I can run the example, and I can run a test page

Re: EJB references

2000-12-06 Thread Jim Richards
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

Re: EJB references

2000-12-05 Thread Jim Richards
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

Re: Question about errors tag

2000-12-05 Thread Jim Richards
[big snip ...] Is there another way to accomplish the same thing, without tacking the error on to the redirect URL? Probably not, no. I can't see where you'd store the errors. In the session would cause problems with synchronisation, and on the redirect URL could cause buffer problems (with

Re: Nesting form inside ifParameterEquals

2000-12-05 Thread Jim Richards
You can use java script. I posted a message about this to the struts-dev mailing list a few days ago. I don't have the email, but you can find it in the mail archives, which I don't have a reference for either. Nikolaus Rumm wrote: Hello, what I wanted to do is...

Re: Article on JavaWorld

2000-12-05 Thread Jim Richards
If you're prepared to be patient, I need both of these, and can work on them but I won't be able to start unitl January on the development of it. The AutoBean idea (as an idea) is something I use already in Cold Fusion, and have done before in PL/SQL. The client side validator, as I posted

Re: Submitting forms to alternate actions

2000-12-04 Thread Jim Richards
With JavaScript you can specify the form action, so you'd have something like: form name="aForm" action="defaultAction.do" onSubmit="return checkSubmit(this);" input type="submit" name="button1" value="use default action" input type="submit" name="button2"

Re: book ideas

2000-11-30 Thread Jim Richards
I'd prefer (and this is personal preference only) more on the development of models and application frameworks then actual introduction code. Coverage of PostgreSQL as well (it has transaction, which are quite crucial to the EJBs, otherwise you get MySQL's serialised table locking which is not

Re: HttpSession.getAttribute() missing?

2000-11-27 Thread Jim Richards
Then you've got the wrong .jar file in your classpath, or earlier in your classpath. You can either edit your CLASSPATH environment variable setting, or remove the offending .jar file from your system. You'll then need to include the correct .jar file (depends on your server setup) that

Re: need some explanations

2000-11-23 Thread Jim Richards
It's really only for an example. It you want real object persistence, you'll need to develop your owne layer. Something like EJB's will make this much, much easier. Or some direct JDBC code perhaps. Vilavanh Messien wrote: I analyzed the struts example in order to develop my own small

Re: Struts + Design Philosophy

2000-11-21 Thread Jim Richards
users. What I am asking is, will STRUTS gracefully support a 2 stage approach to forms - 1 stage to construct and fill in values, and a second one to gather responses and process ? This is something I am looking at, have a look at the simple JavaScript validation page I posted yesterday

Re: thought on design

2000-11-21 Thread Jim Richards
In 1.0, the validation model for the server side has been significantly enhanced. The idea of auto-generating JavaScript validation code for the things you can check on the client side is attractive, but won't make Struts 1.0 (unless someone really hurries and creates it :-). Hmm ... I

Re: Pages being cached

2000-11-21 Thread Jim Richards
(This has been cross posted to tomcat-user, as it seems to be a tomcat issue rather then a struts issue.) I have found that this behaviour is *not* replicated when using Tomcat's built in HTTP server. I need to do some deep experimentation, and install tomcat-3.2b8 as well. I'll let you all

Pages being cached

2000-11-18 Thread Jim Richards
I'm getting weird behaviour with my struts code, and with the example application. Currently I've got Tomcat 3.2b6 running, with the latest nightly build of struts (17-11-2000, that's the 17th November, 2000) and the examples, documentation and test data all run. (Which I must say, took a very