Re: [S2] UTF-8
Hi Perssy What do you mean by Page Header? Just curious. Working with some of the same things. Best regards, Morten Perssy Llamosas [EMAIL PROTECTED] skrev i en meddelelse news:[EMAIL PROTECTED] Solved it on my own. The page header requires to be in utf-8 too, it is not enough to have the page encoding in jsp to utf-8. Without that line IE returns ascii while firefox returns utf-8. Perssy Llamosas wrote: Hello, I am trying to make struts read my requests as UTF-8, so far I have configured Tomcat connector to uriencode in utf-8 but my struts beans still receive ? strings. What am I missing? Perssy Llamosas - 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]
enctype=multipart/form-data gives null values for ActionForm properties
I want to upload a file as a part of a form. This requires that the enctype of the form is set to: multipart/form-data. When that is set like that the autopopulate thing doesn't work. How can I make sure that the properties are autopopulated even though I use enctype=multipart/form-data. Thanks Morten Andersen www.blobcom.com Denmark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: enctype=multipart/form-data gives null values for ActionForm properties
Sorry I rephrase the question and post as new topic. Mitchell James skrev: With most browsers, you cannot autopopulate a file upload field on a form. The reason for this is security. If such a thing was allowed, malicious web sites could have hidden frames that uploaded sensitive files. For the browsers that do allow it, they will prompt and warn the user when submit is called. -- James Mitchell 678.910.8017 On Nov 23, 2006, at 5:29 AM, Morten Andersen wrote: I want to upload a file as a part of a form. This requires that the enctype of the form is set to: multipart/form-data. When that is set like that the autopopulate thing doesn't work. How can I make sure that the properties are autopopulated even though I use enctype=multipart/form-data. Thanks Morten Andersen www.blobcom.com Denmark - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
enctype=multipart/form-data gives null values for other ActionForm properties
When I'm uploading a form I set the enctype to multipart/form-data in the jsp file. In the action receiving the form I want to use the other properties from the form, but these are not set. Example: ActionForm has the properties: - name (String) edited in a html:text... - file (FormFile) edited in a html:file... In the action I would expect to be able to get the value for name using: actionFormImpl.getName(), where actionFormImpl is the actual ActionForm, but that method returns null. Why is autopopulate not working when enctype is set as multipart/form-data? Regards Morten Andersen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
newbie guestion: JSTL Expression language
I want to use JSTL to check the role of the user (it can be one of many) I'm new to JSTL so even the simplest things gives me problems: I've set the role using request.setAttribute(role , role); This tag: c:out value=${role}/ Prints out the role fine While the following statements are newer true: c:if test=${role}==editor The role is editor /c:if c:if test=${role}=='editor' The role is editor /c:if Where do I go wrong? Morten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xslt
I've developed a struts based application that uses XSLT intensively on the server side. I would like to move some of these transformations to the client side. I use struts 1.1 I tryed incorporating stxx, but this limits the use of RequestProcessor that I use in the application. I know of the following possibilities: * Upgrade to struts 1.2 and use pipelining to incorporate stxx (Don't know much about this) * Use StrutsCX, but is that project still alive running? Anyone using it? * Use Struts Cocoon How do you use XSL in your struts apps. Morten Andersen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WARNING: No FormBeanConfig found under 'CustomerOpen'. --- What is this?
Hi there! I don't have any formbean called CustomerOpen. CustomerOpen is my action, which forwards to a formbean called CustomerInfo. (CustomerInfo is defined in struts-config.xml in my form-beans section.) Do I need to define the formbean within my action-mappings in struts-config.xml, or what is wrong here? Any ideas? ~Morten On 3/6/06, Kalcevich, Daniel [EMAIL PROTECTED] wrote: Do you have a formBean named CustomerOpen defined in the your Struts Config File? If not, that would probably be the cause of the warning. -Original Message- From: Morten Egelund Rasmussen [mailto:[EMAIL PROTECTED] Sent: Monday, March 06, 2006 11:41 AM To: user@struts.apache.org Subject: WARNING: No FormBeanConfig found under 'CustomerOpen'. --- What is this? Hi all! I am using Struts 1.2.8 on an Oracle Application Server (OC4J) with the following excerpt in my struts-config.xml: . action path=/CustomerOpen type=com.brunata.servicerapport.CustomerOpenAction name=CustomerOpen scope=request input=CustomerInfo.page validate=true forward name=success path=CustomerInfo.page/ forward name=application-error path=ApplicationError.page/ /action .. My CustomerOpenAction looks something like this: -- public class CustomerOpenAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { return mapping.findForward(success); } } -- Every time I execute this action, I get this warning in my log-file: [timestamp here] org.apache.struts.util.RequestUtils createActionForm WARNING: No FormBeanConfig found under 'CustomerOpen' I've been googling the web for a while now, and it seems like lots of people have encountered this warning, but I cannot find any solution to it. What does this mean, and how do I avoid it? ~Morten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WARNING: No FormBeanConfig found under 'CustomerOpen'. --- What is this?
Hi all! I am using Struts 1.2.8 on an Oracle Application Server (OC4J) with the following excerpt in my struts-config.xml: . action path=/CustomerOpen type=com.brunata.servicerapport.CustomerOpenAction name=CustomerOpen scope=request input=CustomerInfo.page validate=true forward name=success path=CustomerInfo.page/ forward name=application-error path=ApplicationError.page/ /action .. My CustomerOpenAction looks something like this: -- public class CustomerOpenAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { return mapping.findForward(success); } } -- Every time I execute this action, I get this warning in my log-file: [timestamp here] org.apache.struts.util.RequestUtils createActionForm WARNING: No FormBeanConfig found under 'CustomerOpen' I've been googling the web for a while now, and it seems like lots of people have encountered this warning, but I cannot find any solution to it. What does this mean, and how do I avoid it? ~Morten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Statistics
Hi Leon We volunteer to help you develop the testing environment from whatever state it's in. Please send me a message and let's start developing this highly needed tool. Morten Andersen Leon Rosenberg skrev: I have developed a solution where each struts action has an ActionStats object which counts automatically number of requests, number of errors, min/mid/max/last execution times and does all this for any specified intervals (5minutes, 15 minutes, 1 hour etc). Another action then generates xml and html output for the action stats as well as machine stats (processor load, avail. memory , and so on). As I started with it, I haven't found anything ready to use, so maybe its worth to put it on the sourceforge :-) regards leon On 2/17/06, Morten Andersen [EMAIL PROTECTED] wrote: How do you do statistics for your website solutions? Just using standard statistics packages or solutions? If then what package? I'm currently developing an XML based statistics module for J2EE that saves the stats info using XML. This makes it more flexible and easier to use. But is it worth it I wonder? What programs exists already that I can offer my customers? What do you recommend? Technology I'm currently using: Tomcat and Struts Regards Morten Andersen - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Finegrained access control
How do you implement fine-grained access control? For a project I need to implement a fine-grained access control. My idea is to let a JDBC-Realm handle the login and to implement the fine-grained access-control where the role may vary for the specific users and the pages they look at. This I would implement in RequestProcessor.processActionPerform(...) where I check the users role for the specific page and based on that get the respons taylored for that role and check whether they may do what they intend. Example: Some users may edit a page. Who that may edit the page varies over time. The users role on the page is set per page. As far as I understand Realm only checks whether the user may use a specific method (action). No finegrained access-control is possible. I'm surely not the first to do something like this. So please enlighten me with ideas on how you'd implement this. Morten Andersen Denmark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Finegrained access control
Dave Newton skrev: Morten Andersen wrote: This I would implement in RequestProcessor.processActionPerform(...) where I check the users role for the specific page and based on that get the respons taylored for that role and check whether they may do what they intend. RequestProcessor.processRoles? The role thing should be used for 2 things: * Access control. May the user submit or view a page? * View control. The role decides what the user sees. Example: Some users may edit a page. Who that may edit the page varies over time. The users role on the page is set per page. As far as I understand Realm only checks whether the user may use a specific method (action). No finegrained access-control is possible. How fine-grained do you want it? If the Realm stuff allows method-level access that seems finer-grain than URL, but I think I'm just not completely understanding your question. In the web.xml I can set some security constraints for URL patterns. I basically want to use some request parameters to determine the role. If you want _fine_-grained access control drop Spring on top of Struts and use Acegi. I'll look into that. Dave - 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]
Re: Finegrained access control
Mark Lowe skrev: On 2/28/06, Emmanouil Batsis [EMAIL PROTECTED] wrote: Dave Newton wrote: If you want _fine_-grained access control drop Spring on top of Struts and use Acegi. For us not wanting to put yet another framework into the table, any advice and pointers from more experienced people out there? My usual requirement is operation rights for roles in groups (due to resources belonging to groups) and i am currently trying to fit JAAS into the picture and take advantage of doclet etc, but i still havent even scratched the surface on this one. JAAS can be complex Sounds like the problem is do to with realm configuration and how to use the servlet spec security model.. A JDBC or DataSource realm will fit most requirements, rather than getting bogged down in Jaas. http://tomcat.apache.org/tomcat-5.0-doc/realm-howto.html OK. I'm currently using Realm almost like suggested by Mark. The only exception is that I only let some of the actions be under security. In practice this means that I can show something (like a website) for people that are not logged in while only showing the editor-buttons to people that are logged in. Now if I can determine whether the user has logged in. How can I use the request parameters to determine the users role on specific pages? I know that I can invent my own control, it just seems like something many others would need. Any tools available? Morten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Finegrained access control
Dave Newton skrev: Morten Andersen wrote: Now if I can determine whether the user has logged in. How can I use the request parameters to determine the users role on specific pages? I know that I can invent my own control, it just seems like something many others would need. Any tools available? I still don't get this: why would you want request parameters to have anything to do with determining security/access levels? That seems really dangerous. Here's an example: The user: Peter may edit the page Home. On all other pages he just sees the page but on Home an extra button is added: Edit this page. Then when Peter presses that button he is brought to the editing page. There he can edit the page but only if his role is really editor on that page. Not all users may use an action on all pages. I use Realm to figure out whether the user has logged in by putting the action that brings the user to the editing page under security restriction, but it just doesn't handle the handle the finer-grained access control where I can match a page and a user to check the users role on that specific page. Why is this dangerous? How can I avoid these dangers? Morten Are you talking about adding request _attributes_ to determine view issues? Dave - 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]
Statistics
How do you do statistics for your website solutions? Just using standard statistics packages or solutions? If then what package? I'm currently developing an XML based statistics module for J2EE that saves the stats info using XML. This makes it more flexible and easier to use. But is it worth it I wonder? What programs exists already that I can offer my customers? What do you recommend? Technology I'm currently using: Tomcat and Struts Regards Morten Andersen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Statistics
The thing I need at first was actually basic user-statistics. - How many users the last day/week/month - Who's the referer But your program sounds like a nice optimization tool. Regards Morten Leon Rosenberg skrev: I have developed a solution where each struts action has an ActionStats object which counts automatically number of requests, number of errors, min/mid/max/last execution times and does all this for any specified intervals (5minutes, 15 minutes, 1 hour etc). Another action then generates xml and html output for the action stats as well as machine stats (processor load, avail. memory , and so on). As I started with it, I haven't found anything ready to use, so maybe its worth to put it on the sourceforge :-) regards leon On 2/17/06, Morten Andersen [EMAIL PROTECTED] wrote: How do you do statistics for your website solutions? Just using standard statistics packages or solutions? If then what package? I'm currently developing an XML based statistics module for J2EE that saves the stats info using XML. This makes it more flexible and easier to use. But is it worth it I wonder? What programs exists already that I can offer my customers? What do you recommend? Technology I'm currently using: Tomcat and Struts Regards Morten Andersen - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
URL Rewriting
Hi! We are using Struts 1.1 and Tomcat 4.1.x at our company. We are considering to separate our urls from our struts configuration. Instead of /news.do?articleid=43 we would like the url to look like this: /news/article/43. Furthermore the generated html should contain urls of the form /news/article/43. This change should happen as transparently as possible for our Action classes. We have found the UrlRewriteFilter at tuckey.org. However it only solves part of the problem. The incoming requests will be translated correctly. However, the anchors in the generated html remains unchanged. A solution could be to write our own HttpConnector and then implement our own HttpServetResponse.encodeURL, which in turn will translate the links. Do anyone on this list have an (better) alternative to this problem? Thanks in advance Morten Knudsen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]