RE: Spooky Tiles problem

2005-06-07 Thread andy wix
I had similar problem in the past... Do you have any request attributes /session attributes /appcontext attributes That you are using in that page? Regards marco -Original Message- From: andy wix [mailto:[EMAIL PROTECTED] Sent: 07 June 2005 11:08 To: user@struts.apache.org

Spooky Tiles problem

2005-06-07 Thread andy wix
Hi, I am getting an exception when loading a page of Tiles. The error shown in the jsp page is: javax.servlet.jsp.JspException: ServletException in '/footer.jsp': null at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:921) at org.apache.struts.taglib.ti

redirect from index.jsp

2005-06-02 Thread andy wix
Hi, I am having trouble redirecting users from index.jsp to a Tile layout. In index.jsp I have: <%@ taglib uri="struts/logic" prefix="logic" %> and in struts-config.xml: type="com.xyz.app.actions.PreLoadViewTreeAction"> The error msg in the browser is: 404 Not Found Resource /app

Have state across 2 requests without use of session?

2005-05-31 Thread andy wix
Hi, I am having difficulty trying to write a web app without session state (not my choice). As an example, my normal approach, say, to delete a user from a list is: in the 'pre display' action: - fill an arraylist of user objects from the db and set it in the session in the jsp - this arrayl

Struttin with Struts

2005-05-27 Thread andy wix
Hi, Rick Reumann's rather splendid resource has been down for the last few days. I had not visited the site for a while so can't say how long it's been this way. Does anyone know if this is a permanent loss? regards, Andy _ Be th

setting String in scope (JSTL)

2005-05-24 Thread andy wix
Hi, I am trying to set a string variable in page scope and thought the following would work: I was hoping that I would then be able use the variable as in the following: but it doesn't work. If I just use: the css attributes are seen as expected. regards, Andy ___

Stateless web apps

2005-05-23 Thread andy wix
Hi, I am working at a place that doesn't use session state for their web apps. The reason given is that they have 2 physical servers and 2 Oracle Application Servers running on each of these machines for failover. From the little I know about clustering, I thought that if everything in the se

Slightly OT: Complex data output

2005-05-18 Thread andy wix
Hi, I am trying to output a many-to-many mapping using JSTL or Struts tags. My app will manage a user authorization database and so has a table of Applications, Roles, Users and a link table. For each Application there can be many Roles, and for each Role there can be many Users. The data model

RE: LookupDispatchAction issue

2004-12-10 Thread andy wix
Hi, This is now fixed. It was because I didn't have a 'default' method specified in the form tag. I.e., Regards, andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger

LookupDispatchAction issue

2004-12-10 Thread andy wix
Hi, I am extending the above class and all submissions when the user clicks the relevant button work OK, but if the user presses enter (CR) on the keyboard to submit the form the following exception is thrown: StandardWrapperValve[action]: Servlet.service() for servlet action threw exception jav

Re: OT: Runtime exec (again)

2004-12-02 Thread andy wix
Hi, The shutdown command now works OK. There have been a few issues with this that I didn't have in the right combination. The Tomcat service must have suitable permissions. To do this: - Under control panel select Admin tools -> Services - Right click Apache Tomcat service and select properties

OT: Runtime exec (again)

2004-12-02 Thread andy wix
Hi, Still can't get this to work. There must be some reason why this won't run under Tomcat but does work stand-alone. I have also tried the Tomcat list to no avail. To recap, I am trying to execute the following code on an Xp box with Tomcat 5.0.27: Process proc = runtime.exec("cmd.exe /C shut

simple html:select issue

2004-12-01 Thread andy wix
Hi, I am trying to use select and options tags in the simplest way where I have an ArrayList of Strings in the request (Logs) and I wish the one selected to end up in the form's logName variable. According to page 296 of Struts in action I think this should work: but I get: [ServletExceptio

RE: server shutdown

2004-11-26 Thread andy wix
Hi, I get the same results when Tomcat is not run as a service. Does this mean it must be the Tomcat security policy? Cheers Andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger -

RE: server shutdown

2004-11-26 Thread andy wix
Hi, I have now set up the Tomcat service to run as administrator (temporarily) but this doesn't resolve the problem. I am now only trying to run notepad from the exec command: Runtime runtime = Runtime.getRuntime(); Process proc = runtime.exec("C:\\WINDOWS\\system32\\notepad.exe"); This code work

RE: server shutdown

2004-11-26 Thread andy wix
Thanks for the input David. It sounds like this must be the reason. I am running Xp with Tomcat 5.0.27 and Struts 1.1. I run Tomcat as a service - how do I find out (or set up) the permissions? Thanks, Andy _ Use MSN Messenger to se

RE: Any good struts tutorials online?

2004-11-25 Thread andy wix
http://www.reumann.net/struts/main.do _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAI

OT: server shutdown

2004-11-25 Thread andy wix
Hi, I have a requirement to allow a privelidged user to reboot the server(WinXP OS). I have code as follows: Runtime runtime = Runtime.getRuntime(); Process proc = runtime.exec("cmd.exe /C shutdown -r -f -t 10"); int exitVal = proc.waitFor(); When called, the server does not shut down (although I

Re: Tiles and file download

2004-11-25 Thread andy wix
Hi, I have resolved this now. The action code is: File f = new File("test.log"); BufferedReader in = new BufferedReader(new FileReader(f)); String str; while ((str = in.readLine()) != null) { buf.append("\n" + str); } in.close(); request.setAttribute("FILE", buf.toString()); and the jsp code (not

Re: Tiles and file download

2004-11-24 Thread andy wix
Hi, Still can't get anything sensible to work. I've gone with the approach of setting a variable in scope for the 'body' tile jsp to output, as I have to use Tiles so that the user can still see the menu etc after the operation. My code is: File f = new File("C:/test/logs/test.txt"); StringBu

Tiles and file download

2004-11-23 Thread andy wix
Hi, I have a requirement to allow the user to view log files in the main body tile when they click a certain menu item in the 'menu tile'. I see on the archives that the normal way to do this is to stream the file to the response and then return null from the action. What's the approach taken

RE: Tiles and on-load events

2004-11-22 Thread andy wix
Hi, I have now fixed this issue by setting a parameter in the request with javascript when the user clicks a 'stop' button. Andy _ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger

RE: Tiles and on-load events

2004-11-22 Thread andy wix
Hi, Thanks for the tips - that javascript works perfectly. The only issue is that once I start the onload event, any attempts to navigate away from the page are ignored. Is there a way I can use the unload functions to break out of the loop if I were to include a stop button? Thanks, Andy

Tiles and on-load events

2004-11-18 Thread andy wix
Hi, I have a page which I would like frequently reloaded into the browser and was going to use javascript. The issue is that using Tiles I only have the on-load event available for the layout.jsp file and I only want one of my pages to have this functionality. Is there a work-around? Thanks, A

help files

2004-11-16 Thread andy wix
Hi, I am wondering if there is a standard Struts approach to having system help files. I am using an image button and javascript to create a nice small chromeless windows in which to display my help text (I don't use the struts framwork), but would like the help text to come from the resource f

Re: Use JSTL with html:multibox tag

2004-11-16 Thread andy wix
Thanks for the input - i've had a play and can't get it to work and now my patience has timed out so i'll use the logic:iterate method instead. Thanks, Andy _ Use MSN Messenger to send music and pics to your friends http://www.msn.c

RE: Use JSTL with html:multibox tag

2004-11-15 Thread andy wix
Hi, Thanks for the input Robert, but the array will be shorter than the arraylist whenever a checkbox is not selected. I've had a look at Rick Reumann's Struttin with Struts lesson 3 which does something similar and now have: This is a step in the right direction but still

Use JSTL with html:multibox tag

2004-11-15 Thread andy wix
Hi, All the examples I've seen of using the above tag use the logic:iterate tag to output to the page. Does anyone have an example of how to this with JSTL? My attempt is: where services is an ArrayList in session with all available services and selectedServices is the array of St

JSTL and collections

2004-11-09 Thread andy wix
Hi, If I have a class Person which has id and name instance vars and have a collection of these in a page how can I access the name if I have the id available? So I have: where each wrap object has the id for a collection in the session scope called Persons from which I wish to grab the name.

JSTL String manipulation

2004-11-03 Thread andy wix
Hi, I iterate through a collection and the following line yeilds the full path of a file: where messages is a Map and MSG1 is the key. The issue is that I would like only to display the file name, not the full path. Can this be done with JSTL or should I revert to good old fashioned Java? Rega

OT: html list

2004-11-02 Thread andy wix
Hi, Does anyone know of a mailing list similar to this one for html problems? cheers, Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ --

OT: relative versus absolute file path

2004-10-28 Thread andy wix
Hi, I have some links to sounds in a jsp page that play in the default media player under windows when the user clicks the link. This works ok when the sounds exist under the web context and are referenced as relative paths. But I now have a requirement to play files that exist at an arbitrary

OT: html table full screen

2004-10-25 Thread andy wix
Hi, My Tiles layout page sets 'the daddy' table to be width and height 100% with cellspacing="0" and cellpadding="0", and yet when the page displays there is a border approx. 10 pixels wide between the table and the edge of the browser window. DO browsers add this spacing? Regards, Andy __

The old 'please wait' issue

2004-10-13 Thread andy wix
Hi, I am trying to implement a 'please wait' page and have seen the stuff in the archives. The method of choice seems to be: * The Action that is currently doing the work should instead fire off a background thread to do it. It then forwards to a "Please Wait" page. * The background thread d

Re: Session authentication - Struts or ServletFilter

2004-10-07 Thread andy wix
Hi, That source forge Security Filter stuff looks pretty good, but I only have a basic requirement (nothing so posh as realms). I can't seem to get my (very basic) filter to work with Struts though. I have the following in my doFilter method: HttpServletRequest req = (HttpServletRequest) request;

Session authentication - Struts or ServletFilter

2004-10-06 Thread andy wix
Hi, What is the best approach for the above? I don't use container security - when a user logs in I store a User object in the session and each page should then check that the User is not null before proceding. You seem to get a real mix of opinions reading about the subject - the Servlet 2.3 s

Re: back button

2004-10-05 Thread andy wix
Hi, Just for the record the following javascript works (in the body tag of the html page): It's not pretty, but it works. Regards, Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/

Re: back button

2004-10-04 Thread andy wix
Hi, As usual I think I must be missing something fundamental! It would be pretty serious to leave the back functionality - someone could delete a contact, then press back and see the name again. If they subsequently do another delete, there's trouble! I'm thinking this problem is not simply due

Re: back button

2004-10-04 Thread andy wix
Hi, Thanks, that explains why I see the deleted name. Is there a standard way to overcome this - some way to override the back button's functionality? Regards, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! htt

Re: back button

2004-10-04 Thread andy wix
Hi, I have the following on the view page so I don't think I'm seeing the cached version of the page: response.setHeader("Cache-Control","no-cache"); // HTTP 1.1 response.setHeader("Pragma","no-cache"); // HTTP 1.0 response.setDateHeader ("Expires", -1); // Prevents caching at a proxy server Al

Re: back button

2004-10-04 Thread andy wix
Hi, The delete action does delete it from the arraylist in the session (as well as the db). That's why I think it must somehow grab the old copy when doing a 'back'. Regards, Andy _ It's fast, it's easy and it's free. Get MSN Mess

back button

2004-10-04 Thread andy wix
Hi, Where my pages show a view of data, I have had to implement caching due to the amount of data that needs to be gathered (i.e., I don't go to the database - I can get away with the dirty read risk in this case). A page might show: name group fredreddelete john blue

Re: jstl and the brink of madness

2004-09-30 Thread andy wix
Hi, Thanks - requestScope.create works. I was copying from page 12 of Core JSTL - can't belive all you read! Cheers, Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ ---

jstl and the brink of madness

2004-09-30 Thread andy wix
Hi, The following expression always evaluates to true even though I can see the create parameter in the request. <%@ taglib uri="jstl/c" prefix="c" %> hello goodbye I set the parameter up in the previous action with: request.setAttribute("create","create"); Any ideas? Thanks, Andy ___

NEWBIE: How to pass parameters between JSPs

2004-09-30 Thread andy wix
Hi, It's probably better to store them in the session rather then passing from page to page. In Login action: HttpSession session = request.getSession(); session.setAttribute("YourParams", params); and get them in the next page: YourClass xxx = (YourClass)session.getAttribu

Mixing html:link and jstl

2004-09-30 Thread andy wix
Hi, I am trying to use an html:link tag in place of the 'a' tag in the code below so that I can use the transacation=true attribute to allow tokens to work. The code sits within a jstl forEach loop so thats how it gets the index. // working code test // end working code From the html tags ap

RE: Refresh problem

2004-09-29 Thread andy wix
Hi, Ah, that will be why... I use a link to submit. Is there any way to force this to happen without a form? Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger --

Refresh problem

2004-09-29 Thread andy wix
Hi, I have a screen which lists some names in a table and has a delete option which calls an action to delete the associated name and then the view page shows the updated list. If you do a delete and then select refresh on the browser, the resulting request is for another delete which is clearly

Re: best practice

2004-09-24 Thread andy wix
Hi, Both these solutions come close but I don't always wish to have 'select' as the default, just as a 'nothing selected' option. If I modify an existing message then I wish to use the id of the sound from the ActionForm (i.e., a sound may already be selected for this message): So the issue

best practice

2004-09-23 Thread andy wix
Hi, I am wondering if there is a neat way to overcome a typical problem when offering a drop-down menu to a user. It is common to have a default option called say 'select'. The drop down objects in my case are an arraylist which are the result of a trip to the db. So far, my contrived solutio

JSTL and scope

2004-09-22 Thread andy wix
Hi, I am a little surprised that having a class variable imported into a page isn't seen by JSTL contructs. For example if i have a class that defines: package com.company.test public final class MyClass { public static final String TEST = "test"; } and my JSP page has: <[EMAIL PROTECTED] impo

JSTL, maps and type safe enum

2004-09-21 Thread andy wix
Hi, A bit of an obscure one this, but if you'll indulge me... I am iterating through an Arraylist of HashMap objects that are in the session so I have: The problem is that I get no output. The issue is with the fact that the map is keyed on a typesafe enum pattern (e.g.,): public final cla

JSTL String concatenation

2004-09-20 Thread andy wix
Hi, I have been trying for about 4 hours to get something to work that would take about 4 minutes using scriplets! (and I can find no reference to this in my Core Jstl book). Basically, I have an arraylist of sound objects in the session and when the user clicks one - it should play. The obje

OT: file chooser

2004-09-16 Thread andy wix
Hi, I am going to implement a file upload facility and, from the archives, see that Jakarta commons file upload will do the trick. Does anyone know of any 'file select' functionality for the client side? Cheers, Andy _ It's fast, it'

RTEXPR in struts html tags

2004-09-14 Thread andy wix
Hi, I can't get struts tags to accept expressions. There was the previous example I wrote to the list about (Re: tag) and now I am trying to get the focus attribute of the tag take an expression such that I can identify which text element should get focus following a validation error. If I i

Re: html:cancel usage

2004-09-14 Thread andy wix
Hi, Just for the record, I have contrived a particularly nasty work-around for this problem and share it in case anyone ever ends up as desperate as me! To recap, I have 3 buttons on a form including a cancel button for which there should be no validation. Because I have implemented a LookupDis

tag

2004-09-13 Thread andy wix
Hi, I have an interface containing all my field size definitions and wish to use this info for setting the size of tags, so that I don't have this hardcoded. I get an error saying that this tag won't accept expressions if I do it the 'old fashioned' way with a scriptlet expression (i.e., size=

Re: html:cancel usage

2004-09-09 Thread andy wix
Hi, Sorry to harp on about this but I am sure html:cancel must work, as it is fundamental to the way sites flow! It says the following about the html:cancel 'property' attribute in the Html Tag Developer Guide: "WARNING - If you set this attribute to a value other than the default, this will N

RE: html:cancel usage

2004-09-08 Thread andy wix
Hi, Has anyone else had a problem with this? I am using Struts 1.1 but presume it has worked in this and previous versions as it must come up in almost every project. I cannot switch validation to false as my submit button does require validation. I suppose I could put the cancel and submit butto

html:cancel usage

2004-09-07 Thread andy wix
Hi, When using the following tag, my form still gets validated when I click the cancel button. The cancel method gets called correctly in my LookupDispatchAction class. The tag is within an html:form tag as I believe it should be. Does anyone have a working example of this tag or know of a d

Re: No validation when html:cancel is clicked

2004-09-07 Thread andy wix
Hi, Sorry, my heading was a little mis-leading. The problem is that I get validation carried out when I click the html:cancel button and I don't want validation carried out in this case. Thanks, Andy _ Express yourself with cool ne

No validation when html:cancel is clicked

2004-09-07 Thread andy wix
Hi, I have a form with 2 buttons (one html:submit, the other html:cancel) and have implemented a LookupDispatchAction class to handle them. The 'save' button needs to validate the user entry and the 'cancel' button does not. From reading the html:cancel tag's API, I thought this would auto-magica

Log4j output

2004-09-01 Thread andy wix
Hi, I am using Log4j for my web app logging. Does anyone know how to set it up such that the Struts output goes to one file and my own log statements go to another file. Thanks, Andy _ Want to block unwanted pop-ups? Download the fre

Basic JSTL

2004-09-01 Thread andy wix
Hi, In trying to resolve another (more Struts related!) problem someone suggested using a <%@ taglib uri="jstl/c" prefix="c" %> <% Test con1 = new Test(); Test con2 = new Test(); con1.setName("Fred"); con2.setName("Dog"); ArrayList xxx = new ArrayList(); xxx.add(con1); xxx.add(con2); %>

RE: Identifying the 'clicked' line when iterating over collection

2004-09-01 Thread andy wix
Hi, I am trying to follow the advice given yesterday but am now baffled by the basic jstl stuff. I have cut it down to basics and still get no output actually written to the page. I've tried all variations on the theme (have the arraylist in the session, use c:outs in the "" tags etc). The code

Re: Identifying the 'clicked' line when iterating over collection

2004-08-31 Thread andy wix
Hi, I have tried most of the code in the replies and, alas, fear my brain is too small to get any working. I am persevering with Rick Reumann's method (because I liked the Struttin' with Struts stuff!) but I don't get a session parameter in my next page after the link is followed (I have changed

Identifying the 'clicked' line when iterating over collection

2004-08-30 Thread andy wix
Hi, In my jsp page I have an ArrayList of contact objects and I use this to build an html table; one contact per row. At the end of each table row I have edit and delete links such that the form looks roughly like: Name Number Fred1234edit delete Barney

Re: Tiles and well formed html

2004-08-26 Thread andy wix
Hi, My tiles pages (for testing) are straight forward jsp pages. Main Hello Regards, Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ -

RE: Tiles and well formed html

2004-08-25 Thread andy wix
Hi, I'm not sure if this is the correct way to continue a thread, but here goes... I have tried what Ruben suggested and I can get this to work ok. In his example the 2 tags are formatted dependant on which CSS style is selected. I cannot get mine to work where the bit inside the tag is a Til

Tiles and well formed html

2004-08-24 Thread andy wix
Hi, I have a trypical layout and each tile has its own style sheet and is well formed html. My problem is that only 1 style sheet is being used for the whole page. I saw in the mail archives that someone suggested using tags but this doesn't seem to work for me (I've tried both in the tiles an

Tiles set up

2004-08-23 Thread andy wix
Hi, I am (still!) trying to set up Tiles in my Struts app. I am hoping to use Tiles definitions, but can't find any usable (working) simple examples to build from. Even the one at Cedric Dumoulin's site doesn't use this (best practice?) feature. I have tried a 'cut n shut' from the stuff bundled

Tiles set up

2004-08-22 Thread andy wix
Hi, I am (still!) trying to set up Tiles in my Struts app. I am hoping to use Tiles definitions, but can't find any usable (working) simple examples to build from. Even the one at Cedric Dumoulin's site doesn't use this (best practice?) feature. I have tried a 'cut n shut' from the stuff bundled