RE: Spooky Tiles problem
I think the problem was due to my having an include file in the footer that was commented out: It seems this isn't the way to comment out stuff in jsp? Why it worked for some pages and not others I still have no idea - the only thing I can think is that i may have been looking at cached pages for the ones that worked? Thanks, Andy From: "Marco Mistroni" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "'Struts Users Mailing List'" Subject: RE: Spooky Tiles problem Date: Tue, 7 Jun 2005 11:11:58 +0100 Hello, 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 Subject: Spooky Tiles problem 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(InsertTa g.java:921) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460) at _layout._jspService(_layout.java:120) [SRC:/layout.jsp:100] Line 100 of the layout.jsp is: The tile def is: test.jsp is: HELLO It is seemingly not dependant upon the jsp inserted. The same layout file works fine for other tiles. (fulluser.tree does not have the same problem and inserts the same footer.jsp file). I am entirely baffled! Thanks, Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Winks & nudges are here - download MSN Messenger 7.0 today! http://messenger.msn.co.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Spooky Tiles problem
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.tiles.InsertTag.doEndTag(InsertTag.java:460) at _layout._jspService(_layout.java:120) [SRC:/layout.jsp:100] Line 100 of the layout.jsp is: The tile def is: test.jsp is: HELLO It is seemingly not dependant upon the jsp inserted. The same layout file works fine for other tiles. (fulluser.tree does not have the same problem and inserts the same footer.jsp file). I am entirely baffled! Thanks, Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
redirect from index.jsp
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/preLoadViewTree not found on this server The above action path works ok if called direct from the jsp. There is a post in the archives from someone who had the same trouble but his fixes don't work for me: http://www.mail-archive.com/user@struts.apache.org/msg04357.html Anyone managed to do this before? Regards, Andy _ It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Have state across 2 requests without use of session?
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 arraylist is used for the values in a drop down menu - user selects one item, and through using JSTL, I get the object's uid in the 'post display' action: - look up the uid of the object in the arraylist - delete user on db (specifying uid) Is there a way of doing this using forms or something? The issue is that if I put the arraylist in the request it is no longer in scope when I get to the post display action. Thanks, andy _ Winks & nudges are here - download MSN Messenger 7.0 today! http://messenger.msn.co.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struttin with Struts
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 the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
setting String in scope (JSTL)
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 _ Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Stateless web apps
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 session implements Serializable then session state is tranparently valid accross requests - even if you end up on another jvm. Has anyone else ever heard of this restriction - I can see problems e.g., can't use Struts tokens to defeat the usual refresh problems. More immediately, I have a problem with a typical scenario. My normal approach is: I have a 'preload' action that gets an ArrayList of data from the db and sets this in the session. Then forward to the jsp that displays this stuff. This page has something like: This gives me an index of the link that was clicked and in the next action I simply look this value up from the ArrayList in the session. Does anyone know how this functionality could be achieved without using the session? Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Slightly OT: Complex data output
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 I have come up with is: There is one outer map and one to many inner maps. The outer map's keys are Applications. The outer map's values are inner maps. The inner map's keys are Roles. The inner map's values are Arraylists of Users for each Role. The issue is that I can't just output these values as an html table because I don't know the number of Users per Role or the number of Roles per App until I iterate over the map and so I can't set the rowspan element for, say, Applications. Is there a standard approach for this type of problem or does the answer lie in the data model? I suppose the alternative is to have a 'Result' object that has an Application object, a Role object and a User object and output these objects with some logic in the JSP page to ensure that, say, Application X gets listed once only. Thanks, Andy _ Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LookupDispatchAction issue
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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LookupDispatchAction issue
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 javax.servlet.ServletException: Request[/modifyOutgoingMessage] does not contain handler parameter named method at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct ion.java:199) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:484) I have seen a fix in the archives that uses JavaScript to defeat the form submission on CR but I would rather have the form submitted. Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT: Runtime exec (again)
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 - Select the logon tab - Under 'This account' select a user account with administrator role. Not that Windows 2K doesn't come with a shutdown command. There is one supplied with the Win2K resource kit. - The command must be run from the overloaded exec method that takes a String array as it will not work declared as a string. - Both output and error streams must be read otherwise the process will hang. (see http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html) - The code will not run from a batch file. Thanks for your help. Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: Runtime exec (again)
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 shutdown -r -f -m \\myPC -t 50"); int exitVal = proc.waitFor(); When this runs the proc exits with a value of 0 but nothing happens (no re-boot) and no exceptions are thrown. I have tried running the code from a batch file and without the cmd.exe /C bit. I have tried running Tomcat from the command line (not as service). I have tried allowing all permissions in the catalina.policy file: grant codeBase "file:${catalina.home}/webapps/ROOT/WEB-INF/classes/-" { permission java.security.AllPermission "*"; }; I CAN successfully set the the system time and date using the same approach though. I have absolutely no idea on this now. Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
simple html:select issue
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: [ServletException in:/selectLog.jsp] No name specified' java.lang.IllegalArgumentException: No name specified at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:721) at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) at etc Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: server shutdown
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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: server shutdown
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 works fine from a stand-alone program but not from Tomcat. Could there be some security issue with the Tomcat security permissions? Thanks, Andy _ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: server shutdown
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 send music and pics to your friends http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Any good struts tutorials online?
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: server shutdown
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 get the exit code of 0) but if I run the same command from the XP 'run' window it works as expected. I don't think it can be an access rights thing as I can use the same approach to set the system time and date successfully. Any ideas? Thanks, Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles and file download
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 pretty)is: <% String text = (String)request.getAttribute("FILE"); StringTokenizer tok = new StringTokenizer(text,"\n"); int count = tok.countTokens(); while (tok.hasMoreTokens()){ out.print(tok.nextToken());%> <%} Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles and file download
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"); StringBuffer buf = new StringBuffer(); FileReader in = new FileReader(f); int c; while ((c = in.read()) != -1){ buf.append(c); } in.close(); HttpSession session = request.getSession(); session.setAttribute("FILE", buf.toString()); - but all I get is a line of meaningless numbers in the jsp stretching across the page. Do I have to add html tags to replace CR/LF? The jsp is simply: Thanks, Andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles and file download
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 when using tiles? Thanks, andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles and on-load events
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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles and on-load events
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 _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles and on-load events
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, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help files
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 file. In that case the resource file needs to contain all the markup for the help file (in my case quite complex html tags as it involves tables and lists etc). Is there a standard approach for this? Thanks, Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use JSTL with html:multibox tag
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.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Use JSTL with html:multibox tag
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 doesn't work (the checkboxes aren't checked when viewing the page even though they should be set). The service.status field in the service class is a byte - does this have to be a String? Cheers Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Use JSTL with html:multibox tag
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 Strings in my form class. The above displays all the values in services correctly but doesn't exhibit any interaction between the checkboxes on the page and the selectedServices array. Thanks, Andy _ Get ready for school! Find articles, homework help and more in the Back to School Guide! http://special.msn.com/network/04backtoschool.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSTL and collections
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. Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSTL String manipulation
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? Regards, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: html list
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/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: relative versus absolute file path
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 location on the server (referenced as an absolte path) and when I click them nothing happens (I think I do see the correct path displayed in the browser message area - the browser prepends the path with 'file:///' so I see 'file:///c:/xxx/yyy/sound.wav'). Thanks, Andy _ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: html table full screen
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 _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
The old 'please wait' issue
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 does its work then sets a flag in the user's session when it's done. * The "Please Wait" uses a meta-refresh tag to automatically submit itself every few seconds, with the destination being a "Done Yet" action. * The "Done Yet" action will consult the flag variable in the user's session. If its not there, forward back to the "Please Wait" page again. If it's done, forward to the view from the original action. The problem is that I am using Tiles and so cannot have (as far as I know) a meta-refresh tag as this should go in the head of the document. Likewise I can't use on-load javascipt as I don't have a body tag. Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session authentication - Struts or ServletFilter
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; HttpServletResponse res = (HttpServletResponse) response; HttpSession session = req.getSession(); User user= (User )session.getAttribute("User "); if (null == user) { session.invalidate(); res.sendRedirect("/login.jsp"); } chain.doFilter(request, response); It is mapped to all urls (/*) in the web.xml. I get a 404: The requested resource (/do/processLogin) is not available - this after I have entered user/password and submitted form. If anything, I was expecting it to always be re-directed back to the login because I guess I need to exclude "/do/processLogin" from the Filter? It all works Ok without the filter. Thanks, Andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session authentication - Struts or ServletFilter
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 specification suggests authenication as a suggested use of Filters and yet my Professional SCWCD Certification book says 'Filters should not rely on session state'. I understand the Struts approach is sub-class Action and have your check in there - this does force you to have an action for every mapping though. Thanks, Andy _ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: back button
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/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: back button
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 to the caching - if I loaded the page from the db each time the browser would still have its own copy of what-was-once there. I think this must be a problem which occurs in many projects? Regards, Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: back button
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! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: back button
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 All the view action does is set the token to prevent a delete operation being repeated in the event of a user hitting the browser's refresh button. So the delete action deletes the contact from the db then deletes it from the arraylist stored in the session. The view.jsp merely outputs what it finds in the arraylist. The delete itself does work, so I just wonder what happens behind the scenes when the refresh is hit. I note the point about application scope , but in my case the app is just a thin client for local configuration and there will only be 1 user at a time. Regards, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: back button
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 Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
back button
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 delete where the the details are just read from objects in an arraylist in the session. If I click delete for the john row, then john is deleted and if I click the browser's refresh button, the request for another delete is defeated by the use of tokens. There is still a problem though when the user clicks the browser's back button. It somehow finds the old session arraylist with john still in it. I have tried with and without caching set. The request for the delete is a post. Is there a standard scheme for coping with this problem? Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jstl and the brink of madness
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/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jstl and the brink of madness
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 _ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NEWBIE: How to pass parameters between JSPs
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.getAttribute("YourParams"); regards, Andy _ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mixing html:link and jstl
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 api docs I see I could use paramId="indexPos" for the attribute but how could I set the paramName="xxx" given that this would have to appear in the request or some other scope? Thanks, Andy _ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Refresh problem
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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Refresh problem
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 undesirable. I am trying to use tokens to fix this but always get a false from the call to (NOT) istokenValid (i.e., I cannot now do the delete at all). my struts-config enties are: and the actions are: [SetTokenAction] saveToken(request); return (mapping.findForward("success")); [DeleteNameAction] if (!isTokenValid(request)) return (mapping.findForward("success")); // do the delete . // reset the token resetToken(request); When in the view page, both clicking delete and doing a refresh change the token's value. The Action class API states that the 'isTokenValid' method compares the session token with the one in the request but I never see one in the request. The logic seems sound so am I missing something (except a servicable brain)? Thanks, Andy _ Express yourself instantly with MSN Messenger! Download today - it's FREE! hthttp://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: best practice
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 really is to be able to add the 'select' option to the options list in a similar manner to the code you suggested. Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
best practice
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 solution is to have a dummy object which I add at position zero in the arraylist which has a name field of 'select', but this is nasty as there are times I want to use the arraylist (stored in the sesion) without this item and it means shipping a db with a 'must-have' record. Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSTL and scope
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] import="com.company.test.MyClass"%> you don't get any output. If you add: <% pageContext.setAttribute("test", MyClass.TEST); %> and change the JSTL to: then it works. But surely the MyClass.TEST already had page scope otherwise the setAttribute wouldn't have seen it? The upshot of all this is that I am iterating through a map that can have any one of about 30 keys. Do I really have to put all these keys into the session or some other scope every time I load the page? Thanks, Andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSTL, maps and type safe enum
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 class MessageType { public static final MessageType MSG1 = new MessageType(); public static final MessageType MSG2 = new MessageType(); } If I set up test data with Strings as the keys then it's all ok. Any ideas? (unfortunately, I have to keep the typesafe enum pattern!). Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSTL String concatenation
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 object only contains the filename so I need to prepend the path which is defined as a static variable in a class. So I have: <% String path = UploadAction.PATH; pageContext.setAttribute("path", path); %> a href= XX > where XX is the problem bit. I want to concatenate "/" + path + "${sound.fileName}" so that the href gets the full path and but only the filename is displayed. Cheers, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: file chooser
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's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RTEXPR in struts html tags
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 include the following in my jsp file: then I get the following exception: /login.jsp(13,0) According to TLD or attribute directive in tag file, attribute focus does not accept any expressions and yet according to the documentation this attribute should accept them. Thanks, Andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:cancel usage
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 LookupDispatchAction class to handle these buttons, I cannot just use the tag 'as is' because I get the following exception (my method param is called 'method'): javax.servlet.ServletException: Request[/createContact] does not contain handler parameter named method If you include property="method" with the tag, you lose the exception but validation still takes place. So what I have done (if you will excuse the fish-heads) is: Use a standard html hidden tag (the struts tag moans about not having getter for the property x) with a dummy name: Have your cancel button call some JavaScript: and the JavaScript is: function sendCancel() { document.forms[0].elements[0].name="org.apache.struts.taglib.html.CANCEL" return true; } I have tried all the other suggestions in every combination but can't get anything more elegant to work. This works but I'm not looking forward to the code review! Regards, Andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tag
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="<%=Field.MY_SIZE%>") and it just gets ignored if I use a jsp expression (i.e., size="Field.MY_SIZE"). What's the normal approach? Thanks, Andy _ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:cancel usage
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 NOT be recognized as the cancel key by the Struts controller servlet or the Action.isCancelled() method. You will need to do your own cancel detection". But nearly always a developer will be overriding this property with a value so that they can distinguish which button was clicked by the user to satisfy the Dispatch Action class. (I say this as I assume there will often be a submit button as well that should invoke validation). Does anyone know a way out of this hole I find myself in? Thanks, Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:cancel usage
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 buttons inside seperate form tags but this seems a little contrived. Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:cancel usage
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 different approach? Thanks, Andy _ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No validation when html:cancel is clicked
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 new emoticons http://www.msn.co.uk/specials/myemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
No validation when html:cancel is clicked
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-magically do the trick but my form still gets validated when I click this. Thanks, Andy PS - thanks to the chaps who helped with the 'Identifying the clicked line when iterating over collection' thing - I finally got it working! _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Log4j output
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 free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Basic JSTL
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); %> Name: Should this ouput the 2 names to the page? I can do a Thanks, Andy _ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Identifying the 'clicked' line when iterating over collection
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 is (I have omitted the html stuff): <% Contact con1 = new Contact("name1"); Contact con2 = new Contact("name2"); ArrayList contacts = new ArrayList(); contacts.add(con1); contacts.add(con2); %> ${status.index} ${contact.name} The c:out tag at the end is the only bit that works (writes to the page) so I assume the taglib declaration at the top of the file is OK. Cheers, Andy _ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Identifying the 'clicked' line when iterating over collection
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 the scope to session). To get the ID would be something, but it would save me needing an action class at all if I could get the contact object representing the 'clicked' row into the session or request scope. A cut down version of the code is: <% ArrayList list = (ArrayList)session.getAttribute("Contacts"); Iterator it = list.iterator(); int id = 0; while(it.hasNext()) { Contact tempContact = (Contact)it.next(); }%> <%=tempContact.getName()%> <%=tempContact.getNumber()%> Modify Note that I am not using any Struts Forms for this Action as I receive the ArrayList from the session. I added an html form tag as above because you had one in the example code. Cheers, Andy _ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Identifying the 'clicked' line when iterating over collection
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 2345edit delete What's the best way to identify which link was clicked? I know I can make each link name unique by using the index used to iterate through the collection and assign this to the link ID. Then (if I knew how) I could get JavaScript to identify which link was selected and add this to the request/session. Does Struts have a 'posher' way of doing this and, if not, does anyone have the JavaScript required? Cheers, Andy _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles and well formed html
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/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles and well formed html
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 Tile. So my layout.jsp looks like: <%@ taglib uri="struts/html-el" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> " rel="stylesheet" type="text/css"> etc... and my test.css file looks like: #headerTile { font-family: sans-serif; color: white; background-color:blue; font-size: 10pt; } #bodyTile { font-family: sans-serif; color: red; background-color:blue; font-size: 15pt; } etc... and my header.jsp is just a basic html file with no style sheets listed or div tags. Thanks, Andy _ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles and well formed html
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 and in the layout.jsp). Does anyone know what is considered best practice for this requirement. It seems counter-intuitive to have your tiles not well formed html but if this is the solution which tile would you pick for the 'main' html tags or does it even matter? Thanks, Andy _ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles set up
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 with Struts to no avail. As far as I can work out, to get Tiles working (with Struts already configured), you need to: Add the following to web.xml: etc... definitions-config /WEB-INF/tiles-defs.xml /WEB-INF/struts-tiles.tld /WEB-INF/struts-tiles.tld Add the following to struts-config.xml: I have the following in my tiles defs.xml file: "http://jakarta.apache.org/struts/dtds/tiles-config.dtd";> Then I invoke the action forward in a jsp file with the following: Login and get this... java.lang.NullPointerException org.apache.struts.util.RequestUtils.pageURL(RequestUtils.java:1532) org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:487) org.apache.struts.taglib.html.RewriteTag.doStartTag(RewriteTag.java:99) org.apache.strutsel.taglib.html.ELRewriteTag.doStartTag(ELRewriteTag.java:291) org.apache.jsp.index_jsp._jspx_meth_html_rewrite_0(index_jsp.java:110) org.apache.jsp.index_jsp._jspService(index_jsp.java:69) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) All the webapp/tiles/*.jsp files are where they should be and the Struts stuff alone works OK. I have tried adding the following to struts-config with the same result. I have also read somewhere that I may need an XML parser? Can anyone spot anything obviously wrong or know of a simple up-to-date example? Thanks, Andy _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles set up
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 with Struts to no avail. As far as I can work out, to get Tiles working (with Struts already configured), you need to: Add the following to web.xml: etc... definitions-config /WEB-INF/tiles-defs.xml /WEB-INF/struts-tiles.tld /WEB-INF/struts-tiles.tld Add the following to struts-config.xml: I have the following in my tiles defs.xml file: "http://jakarta.apache.org/struts/dtds/tiles-config.dtd";> Then I invoke the action forward in a jsp file with the following: Login and get this... java.lang.NullPointerException org.apache.struts.util.RequestUtils.pageURL(RequestUtils.java:1532) org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:487) org.apache.struts.taglib.html.RewriteTag.doStartTag(RewriteTag.java:99) org.apache.strutsel.taglib.html.ELRewriteTag.doStartTag(ELRewriteTag.java:291) org.apache.jsp.index_jsp._jspx_meth_html_rewrite_0(index_jsp.java:110) org.apache.jsp.index_jsp._jspService(index_jsp.java:69) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) All the webapp/tiles/*.jsp files are where they should be and the Struts stuff alone works OK. I have tried adding the following to struts-config with the same result. I have also read somewhere that I may need an XML parser? Can anyone spot anything obviously wrong or know of a simple up-to-date example? Thanks, Andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]