Re: skipping repopulation between actions without external forwarding

2003-08-27 Thread Max Cooper
I can figure out Validation, Tiles, and Hiberante, but not normal redirection. What basic struts related logic am I missing? Thanks, David -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 4:56 PM To: Struts Users Mailing List Subject

Re: [OT] Question about Servlets Threads

2003-08-19 Thread Max Cooper
This seems likely to yield miserable performance. while(t.isAlive()); While I don't agree with the approach of spawning a new thread for each request (app servers typically pool threads, and you get one of those for each request already), this might yield (threading pun ;-)) better

Re: Security and Roles related

2003-08-19 Thread Max Cooper
You can use Struts with SecurityFilter, which is a filter-based system designed initially to work just like container-managed security, with a few extensions. http://www.securityfilter.org/ -Max - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August

Re: persisting session id

2003-08-15 Thread Max Cooper
You will lose the session when you close the browser. The session cookie is not persistent, which means your browser will forget the session id when it shuts down. In addition to that, the app server will destroy old sessions after a timeout period that can be set in web.xml (usually 90 minutes or

Re: Saving as CSV

2003-08-15 Thread Max Cooper
I would recommend against creating a temp file, unless it will be created, streamed back to the browser, and then deleted all within the scope of a single request. Creating files often leads to security holes (who can request the created file?), and not doing everything in one request leads to the

Re: action forward - redirect

2003-08-14 Thread Max Cooper
Use this: action-mappings actionpath=/OrderSubmit type=net.windward.store.OrderAction name=orderForm validate=true input=/order.jsp forward name=success path=/terms.jsp redirect=true/ forward name=failure path=/order.jsp/ /action /action-mappings But keep in mind

Re: really weird - evaluating a comment

2003-08-14 Thread Max Cooper
Try a JSP comment: %-- html-el:text name=var property=qty indexed=true/ --% -Max - Original Message - From: David Thielen [EMAIL PROTECTED] To: Struts-Users [EMAIL PROTECTED] Sent: Tuesday, August 12, 2003 7:27 PM Subject: really weird - evaluating a comment Hi; The following line

Re: Best place to hook the Security Call

2003-08-05 Thread Max Cooper
One approach would be to use a proprietary programmatic security system. You would have to check for a (user,company,role) combination for requests that have security requirements. This may in fact be the best way to handle your requirements, given that the same HTTP requests (/editCompany.do)

Re: Unable to compile

2003-07-30 Thread Max Cooper
The modified in the future errors might be due to a change in your system's clock or having the wrong time or wrong timezone offset in your system settings. It looks like there might be other problems, but bad modification times on files can definitely mess up a build so I would fix that first.

Re: [OT] Is jsessionid specific to Tomcat or generic to all web containers?

2003-07-28 Thread Max Cooper
I think it was Tomcat-specific at one time, but I think it is in the Servlet spec now. -Max - Original Message - From: Daniel Joshua [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, July 28, 2003 3:47 AM Subject: [OT] Is jsessionid specific to Tomcat or

Re: image question

2003-07-23 Thread Max Cooper
Burc, Since the browser is going to make a seperate request for the image data, you really just want to render an img tag with a src URL that can be used to retrieve the image from the db. You will also need an Action (or a servlet, for a reason I will explain below) that will get the image from

Re: Using bean:write to display/stream PDF content -- please help.

2003-07-23 Thread Max Cooper
This question is very similar to a question that was asked about images recently. I outlined a solution (including some code) can be used for sending PDF files as well. Here's a link to the message from the archive: http://tinyurl.com/huby Long version of the same link:

Re: Session management

2003-07-22 Thread Max Cooper
Jason, Authentication and session creation are mostly independent -- you can have a user with a session that has not been authenticated. I think a user will always have a session once they have been authenticated, however. I am not sure I understand quite what you are asking, but you can

Re: Using variable on JSP Page

2003-07-22 Thread Max Cooper
Anubhav, Here is an HTML text input field with the name defined by the Java variable 'name', which is set to the value notKnownInAdvance inside the JSP page: % String name = notKnownInAdvance; % input type=text name=%=name% It will render like this in the resulting HTML page: input type=text

Re: WARNING: invalid welcome file

2003-07-16 Thread Max Cooper
I believe that the welcome file list is just a list of filenames to look for in any directory if the user makes a request for a directory name without a filename. So, they should not start with leading slashes. Some containers are more tolerant of this than others, but it seems clear to me now

Re: trigger an action from a filter?

2003-07-15 Thread Max Cooper
You could send a redirect or forward the current request to the Struts action (mapping) from a Filter or Servlet. What has lead you to want to do this? Perhaps a simpler solution to your functional needs is possible. -Max - Original Message - From: Terje Hopsø [EMAIL PROTECTED] To:

Re: [OT] - Realm Security - How to set overlapping constraints?

2003-07-07 Thread Max Cooper
- Original Message - From: Navjot Singh [EMAIL PROTECTED] Thanks Craig, Reversing the order of constraints does work. I should have RTFM. That kind of surprises me. The Servlet Spec v2.3 section SRV 11.1 says that exact patterns should be tried first, then paths (longest to shortest,

Re: FileNotFoundException when creating FileInputStream

2003-06-19 Thread Max Cooper
FileInputStream expects a filename, but you fed it a URL. Is the XSL file within your webapp? If so, don't use a URL to reference it. If it is not within your web app but it is under your control, consider moving it into your web app. If you cannot move it, you will need to make an HTTP request

Re: [OT] IDE with easy tomcat upgrade?

2003-06-16 Thread Max Cooper
In case no one mentioned it yet, IntelliJ IDEA is an outstanding IDE with support for running and debugging code running on app servers, including Tomcat. IDEA has an excellent feature list, but what really sets it apart is how easy it is to use. Perhaps easy to use is not really the most complete

Re: [OT] IDE with easy tomcat upgrade?

2003-06-16 Thread Max Cooper
Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, June 16, 2003 1:04 PM Subject: Re: [OT] IDE with easy tomcat upgrade? In case no one mentioned it yet, IntelliJ IDEA is an outstanding IDE with support

Re: [OT] Application Security

2003-06-11 Thread Max Cooper
If the information was not supposed to be available to that user, that is the first thing to fix, and it sounds like you did that already. It may be worth doing an audit on the app to find what other holes might be there. Programming with security in mind is not something that comes naturally to

Re: Template VS JSP:include

2003-06-11 Thread Max Cooper
You can combine the use of template and content pages into one JSP to get n+1 JSPs. template:insert template:put !-- actual content -- /template:put /template:insert -Max - Original Message - From: Peng Zhao [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003

Re: Struts Dependencies

2003-06-10 Thread Max Cooper
A pretty good but not perfect way to check is to look at the Implementation-Version entry in the jar's /META-INF/MANIFEST.MF file. The jakarta-commons projects are pretty good about setting these in accordance with their release numbers. commons-beanutils.jar will show version 1.6 for the 1.6.1

Re: dynamic paths to images

2003-06-06 Thread Max Cooper
Write a custom tag that does it for you. myapp:img name=imageProvider property=path / -Max - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 05, 2003 7:39 AM Subject: dynamic paths to images I have to generate dynamic paths to images (depending

Re: CMA and LoginAction

2003-06-06 Thread Max Cooper
In a word, no. There is no way to have CMA call your Action when a user logs in. There are alternatives, however. If all your requests go through Actions, you could add code to your app's Action base class to ensure that the profile information is there. I think there are more alternatives of

Re: CMA and LoginAction

2003-06-06 Thread Max Cooper
CMA does just-in-time authentication. You will only be authenticated on the way to viewing a protected resource. After your authentication succeeds, you will end up at the protected resource that you originally requested. This is very nice because logging in doesn't take the user off the course of

Re: CMA and LoginAction

2003-06-06 Thread Max Cooper
with JRun/Objectivity CMA configuration. -Max TIA -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 6:44 PM To: Struts Users Mailing List Subject: Re: CMA and LoginAction CMA does just-in-time authentication. You will only be authenticated

Re: [OT] Newbie Question:XML parsing

2003-06-05 Thread Max Cooper
I'll third the recommendation to use Digester. I needed to parse an XML file for the securityfilter project, and I had not done any XML parsing before so I was expecting it to be a fair amount of work to do. Then I recieved a contributed solution from a member of this list that used Digester. It

Re: [OT] Release Manager

2003-06-05 Thread Max Cooper
Are you looking for how-to info about doing releases of your project/product as source code? If so, one source of info is to look at mature open-source projects, including the fine projects available from Apache. SourceForge would be another place to look. What to deliver and how to do (automate)

Re: CAM - Removing User Principal

2003-06-05 Thread Max Cooper
The details of configuring single-sign on will depend on what server you are using. It is pretty easy with Tomcat. The forthcoming 1.4 version of the J2EE spec adds a logout() method to the request interface that sounds like it could be used to achieve the cross-context logout functionality you

Re: Mutil URL access to a struts application

2003-06-05 Thread Max Cooper
Deploy three different instances of your app, one instance at each of these context paths: /APP /APP/foo /APP/foo2 -Max - Original Message - From: Laurent Garcia [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 8:03 AM Subject: Mutil URL access to a struts

Re: Collection Implementation

2003-06-03 Thread Max Cooper
Whether you need to synchronize or not depends on how you are using the object in question. If the Collection is a local variable or request-scope ActionForm/JavaBean element that won't ever be accessed by more than one thread, there is no reason to synchronize it. If it is an instance variable on

Re: SecurityFilter used with JBoss?

2003-04-06 Thread Max Cooper
Mick, I suspect that it wouldn't work, but I have never tested it. I offer my support if you want to try it out, but I don't have any experience with JBoss. -Max - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 20, 2003 12:09 AM Subject:

Re: How to do authentication in different way for different action classes

2003-04-04 Thread Max Cooper
secured? This way I do not have to put all my secured pages under /private/* and I can just intermingle them. -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 3:25 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: How to do

Re: How to do authentication in different way for different action classes

2003-04-04 Thread Max Cooper
again, raju -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 3:11 AM To: Struts Users Mailing List Subject: Re: How to do authentication in different way for different action classes That should work fine. /Content/*.do will still

Re: SecurityFilter and back button

2003-04-04 Thread Max Cooper
That looks like a bug on first glance. Please submit it to the SecurityFilter project bug list on Sourceforge so that we can track it: http://sourceforge.net/tracker/?group_id=59484atid=491164 If you aren't using it now, I recommend using the securityfilter-1.0.1 release, rather than an older

Re: Html checker from a browser wanted?

2003-04-04 Thread Max Cooper
http://www.htmlvalidator.com/ has a validator (including a functionality-limited freeware version) that will hook into IE. -Max - Original Message - From: Zsolt Koppany [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday,

Re: How can one define a hypertext link on an image ?

2003-04-03 Thread Max Cooper
Straight HTML with a JSP scriptlet: a href=login.doimg src=%=request.getContextPath()%/images/Compagny.gif border=0/a With Struts tags: html:link page=/security/login.dohtml:img page=/images/Compagny.gif border=0 //html:link The border=0 stuff will prevent a blue outline from the link from

Re: Loosing Objects in the Request.

2003-04-03 Thread Max Cooper
Are you certain that the request is getting to the JSP with the test in it? -Max - Original Message - From: Jindal, Ashwini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 03, 2003 11:43 AM Subject: Loosing Objects in the Request. Hi All, I am trying to set some

Re: How to do authentication in different way for different action classes

2003-04-03 Thread Max Cooper
You should keep *.do for your servlet mapping. Assuming you are using container-managed security, you can do something like this for your security constraints: security-constraint web-resource-collection web-resource-nameSecured Resources/web-resource-name

Re: Loosing Objects in the Request.

2003-04-03 Thread Max Cooper
wrong in your setup. -Max - Original Message - From: Jindal, Ashwini [EMAIL PROTECTED] To: Max Cooper [EMAIL PROTECTED]; Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, April 03, 2003 7:34 PM Subject: RE: Loosing Objects in the Request. Max, That is what the problem is I

Re: How to use Struts to show image from database (byte[])?

2003-04-02 Thread Max Cooper
I worked on an app where we had cache set to false for Struts. In that context, using an Action to retrieve the images prevented any of them from being cached, which was bad for server load and site performance. We were using Struts 1.0.2, though perhaps Struts 1.1 allows you to set the cache

Re: Session Load Balancing Problem

2003-04-02 Thread Max Cooper
Do you have the cluster setup to replicate the sessions? If so and it still isn't working correctly, write something that checks everything in your session to see if it is Serializable. You can use a simple JSP for the session check thing and just load it to make sure everything is serializable,

Re: No action instance for path your path name could be created

2003-04-02 Thread Max Cooper
Here's the problem: * struts-config.xml *** actionpath=/addFile type=ginsu.strutsApp.AddFileAction ** Begin AddFileAction.java package src.ginsu.strutsApp; Your Action's fully qualified class name is

Re: Base Action Class

2003-04-01 Thread Max Cooper
Why couple it to your ActionBase class? You can make it self-contained so that you can get access to it anywhere that you have a handle to the request. To get the MySession object for the session associated with the current request, you just call MySession.getMySession(request). It will even make

Re: how to get a single value from hashtable

2003-03-31 Thread Max Cooper
tag provided for this type of functionality. Regards Shashi BHushan - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, March 27, 2003 7:49 PM Subject: Re: how to get a single value from hashtable I am

Re: j_security_check

2003-03-31 Thread Max Cooper
. On Déardaoin, Már 20, 2003, at 00:20 Etc/GMT, Max Cooper wrote: You can also use SecurityFilter, a filter-based clone of container-managed security. It allows you to set a default page to take users to when they log in out of the blue. Container-managed security doesn't allow such login requests

Re: how to get a single value from hashtable

2003-03-27 Thread Max Cooper
I am not exactly sure what you are asking. Consider posting a minimal but complete code (JSP, Java) example to help us understand if the following info doesn't help: Hashtable.elements() returns an Enumeration of the values, not the keys. I believe that logic:iterate will just iterate though the

Re: Actions based on Role

2003-03-27 Thread Max Cooper
My first suggestion would be to look into container managed security, and after that look my filter-based clone of container-managed security, http://securityfilter.sourceforge.org/, that works the same (you don't have to change your app) but has a few little differences to get around things I

Re: Problem while accessing a JSP page

2003-03-24 Thread Max Cooper
Since the real location is the same as the uri, having that in your web.xml will have no effect on the operation of the application. Since the container knows to look for the org.apache.struts.taglib.logic.ForwardTag class, it seems clear that it is finding the TLD. Which means it isn't finding

Re: Fine Grained Access Control in Sturts

2003-03-21 Thread Max Cooper
A given user can have many roles, so be careful not to break that concept if you can avoid it. Even if you don't need it now, it is supported by the standard security stuff and it would be a shame to paint yourself into a such a corner accidentally. You might need it later. -Max - Original

Re: Fine Grained Access Control in Sturts

2003-03-21 Thread Max Cooper
Mobile: 079.726.14.26 _ -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 9:05 AM To: Struts Users Mailing List Subject: Re: Fine Grained Access Control in Sturts A given user can have many roles, so be careful not to break that concept if you

Re: Fine Grained Access Control in Sturts

2003-03-21 Thread Max Cooper
) ? Seb Max Cooper wrote: You can use the logic tags to do something like this: logic:present role=admin html:link page=/admin/Admin.doAdmin/html:link /logic:present This assumes you are using a security mechanism where request.isUserInRole(admin) will return true when the user

Re: Fine Grained Access Control in Sturts

2003-03-20 Thread Max Cooper
You can use the logic tags to do something like this: logic:present role=admin html:link page=/admin/Admin.doAdmin/html:link /logic:present This assumes you are using a security mechanism where request.isUserInRole(admin) will return true when the user is in that role. For that to work, you

Re: j_security_check

2003-03-19 Thread Max Cooper
You can also use SecurityFilter, a filter-based clone of container-managed security. It allows you to set a default page to take users to when they log in out of the blue. Container-managed security doesn't allow such login requests. http://securityfilter.sourceforge.net/ -Max - Original

Re: Trapping timeout of HttpSession

2003-03-19 Thread Max Cooper
If their session expired, it is gone. The form submittal will generally look like it is from a new visitor that had no session. What do you want to do in the case that the user submits a form and their session had expired? I think you might be able to make a good guess if they used to have a

Re: URL Rewriting

2003-03-19 Thread Max Cooper
You do actually have to go through the pains of rewriting all of your URLs in links and things for this to work. If you have a link in a page like this: a href=/loseMySession.doLose it!/a you will lose the session, since there is no call to rewrite the URL. I believe that the Struts tags will

Re: help in my ServletException

2003-03-17 Thread Max Cooper
That is a ClassCastException, which occurs when you try to cast a object to a class or interface that it doesn't extend or implement. We would need more details to help you determine just what cast is failing. But, I suspect that your JSP is expecting to find a BusEmpInfoForm but is finding

Re: How to change context path?

2003-03-17 Thread Max Cooper
Do it in weblogic's config.xml, or better yet through the WebLogic console (http://yourserver:7001/console). Be sure to design and implement your web apps so that they would work no matter what the context path is. -Max - Original Message - From: Kjellaug Johansen [EMAIL PROTECTED] To:

Re: switching from non SSL to SSL in struts..

2003-03-11 Thread Max Cooper
Netscape has (in the past, at least, and it sounds like the current version is the same) viewed the following as different servers: http://somehost.com/ https://somehow.com/ These are equivalent to: http://somehost.com:80/ https://somehost.com:443/ It actually seems like a reasonable assumption

Re: SecurityFilter with Struts Form

2003-03-09 Thread Max Cooper
Hi Dan, I haven't played with using Struts actions for the form-login-page and form-error-page pages very much. No action will be called when the form submits to j_security_check, which is processed by the filter, much like the container does when using container-managed security. However, you

Re: Avoiding refresh stomping

2003-03-07 Thread Max Cooper
Dan's suggestion to use redirects is a good one. I redirect in response to most POST operations to avoid these problems. It adds a bit of network overhead to some of the pages, but the exipred POST data, double submits, and the browser's address bar not matching what the user is seeing are all

Re: Association between Session object and Cookies/URL rewriting

2003-03-06 Thread Max Cooper
Session IDs identify sessions, not users. A session is using a browser to access a server from a particular machine. It doesn't matter if you login or not, sessions are meant just to associate a group of requests as coming from one (or more) person sitting at a computer using a browser. HTTP is a

Re: Association between Session object and Cookies/URL rewriting

2003-03-06 Thread Max Cooper
To: Struts Users Mailing List Subject: Re: Association between Session object and Cookies/URL rewriting 2003. március 6. 12:10 dátummal Max Cooper ezt írtad: Here's a little dialog to illustrate: Wow! That was marvellous! Tib

RE: Association between Session object and Cookies/URL rewriting

2003-03-06 Thread Max Cooper
); session.setAttribute( Action.LOCALE_KEY,locale ); } Mohan -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 6:18 PM To: Struts Users Mailing List Subject: Re: Association between Session object and Cookies/URL rewriting

Re: redirecting to HTTPS

2003-03-06 Thread Max Cooper
There are a number of issues involved that make it more complicated than it should be (cookie domains, writing out all the links properly, etc.). Fortunately, there is a project designed just for this purpose that extends Struts to support relatively painless HTTP/HTTPS switching:

Re: Association between Session object and Cookies/URL rewriting

2003-03-06 Thread Max Cooper
Requirement is this : My login page itself expires even if the user doesn't login for the session timeout period. We want to prevent that. Hmm... I don't think there is much you can do in that case with container-managed security. If the user fails to login within the session expiration time,

Re: [OT] Text editor usage (was RE: [OT]: What is vim?)

2003-03-03 Thread Max Cooper
Perhaps only good programmers use text editors. But it certainly isn't the case that good programmers only use text editors. I used to use text editors for all my programming, but I have since switched to IntelliJ IDEA because I am convinced it helps me do my work better and faster. I can

Re: [OT] Text editor usage (was RE: [OT]: What is vim?)

2003-03-03 Thread Max Cooper
I was not able to contribute to these discussions before I started using an IDE. Now I have all kinds of free time for this stuff! IDEs are great! ;-) -Max - Original Message - From: Jeff Kyser [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, March 03, 2003

Re: 1.1rc1 Error: Path index.jsp does not start with a / character

2003-02-28 Thread Max Cooper
/index.jsp gets translated (as needed) to account for the context path automatically. The paths that start with / are evaluated relative to your web app. You can use the /index.jsp style paths and deploy your app with any context path without having to change anything. -Max On Thu, 2003-02-27 at

Re: c:url or html:link from http to https?

2003-02-20 Thread Max Cooper
The sslext project is designed to meet this need, and includes extended tags to do this kind of thing (and more). Check it out: http://sslext.sourceforge.net/ -Max - Original Message - From: Bryan Field-Elliot [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent:

Re: JDBCRealm - entering site through login page

2003-02-20 Thread Max Cooper
Bookmarking the login page and then returning and logging in results in what I call an 'unsolicited login request' since the app server didn't send the user to the login form in the first place. The server doesn't know where to send the user when it gets such a request, so it fails as you

Re: how can I unprotect my registration page?

2003-02-18 Thread Max Cooper
It sounds like it is saying that 'something.exe' is not a valid url-pattern. Try '/something.exe' (or whatever the right url-pattern is for this resource) instead. -Max - Original Message - From: Mike Mattox [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday,

Re: to use Ant to configure my webApp with struts

2003-02-09 Thread Max Cooper
I've been reading the book Java Development with Ant (written by Erik Hatcher Steve Loughran, published by Manning) lately and find it to be a very good book. It covers lots of things like JUnit testing and of course building war files (and much more).

Re: Avoiding attempt to access validator dtd over the internet at startup

2003-02-08 Thread Max Cooper
Make sure that: !DOCTYPE whatever-config PUBLIC -//THIS//PART_OF_YOUR_DOCTYPE_TAG//EN http://yadayadayada; THIS//PART... matches the name of the validator doctype exactly. I'd give you a more solid example if I knew what it was supposed to be, but I don't know what it is supposed to be.

Re: Help!! Getting NT User

2003-01-30 Thread Max Cooper
I think some app servers (WebLogic, others?) allow you to use Windows network security (domain controller might be the right term?) for web app security. The users will need to login to your app specfically, but you might then be able to get some profile info by calling request.getUserPrincipal()

Re: Filters and Struts

2003-01-27 Thread Max Cooper
Filters do not apply to forwards (I thought that, too, but tested it last week and they don't). The Servlet 2.4 spec has an option to allow you to turn such forward filtering on. In reference to the original question, how about naming your action mappings (in struts-config.xml) so that they can

Re: ActionFilter and detecting a forward

2003-01-24 Thread Max Cooper
Forwards are be subject to filtering, too. That is to say, when you forward, your request might go through some filters. If you're talking about Servlet filters (i.e. javax.filter.Filter), this is not true in a Servlet 2.3 container. In Servlet 2.4, you'll have the option to say you

Re: Image References From JSP Pages inside WEB-INF

2003-01-24 Thread Max Cooper
Remember that requests for images are separate from the requests for pages. It works kind of like this dialog between the browser and server: browser: please send /index.html server: okay, here it is: html head/head bodyimg src=/images/bmx_mullet.jpg/body /html browser: (oh! I need an image, I

Re: ActionFilter and detecting a forward

2003-01-23 Thread Max Cooper
Forwards are be subject to filtering, too. That is to say, when you forward, your request might go through some filters. But I am not sure your filter will be invoked if your mainMenu forward has a path that doesn't match the filter's url-pattern. There also seems to be some inconsistency between

Re: interpolated runtime values are forbidden?

2003-01-22 Thread Max Cooper
I am not 100% sure this is the problem, but you generally can't use %= % in an attribute value unless it is the whole thing. Not okay: some:tag attribute=my favorite number is %=i% / Okay: some:tag attribute='%= my favorite number is + i %' / % String value = my favorite number is + i; %

Re: Can Action Forward be used to open a new brower window?

2003-01-22 Thread Max Cooper
Forwards happen on the server, so there is no simple way to have a forward pop up in a new window. If the browser makes a request for /showItToMe.do, you can forward it 1,000 times on the server and it is still just one request to the browser. And it is going to display the response in whatever

Re: Allow user to change password using CMS

2003-01-22 Thread Max Cooper
Don't throw out the baby with the bathwater! ;-) It is still useful to have the container manage the security in a standard, time-tested, essentially-free-to-implement way. It just means that the spec doesn't provide any help in changing your password. However, you just need to access the same

Re: Value of Struts?

2003-01-22 Thread Max Cooper
One of the important values I have found is that it makes your app somewhat regular in the sense that you know where to look for things no matter who wrote the page. Without Struts, you would have to spend time writing and describing how to use your own MVC framework, or simply let everyone on the

Re: Newbie question

2003-01-22 Thread Max Cooper
Your lazy (smart!) way #1 is correct. Let Struts instantiate your ActionForms. -Max - Original Message - From: Fred Lamuette [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 4:17 PM Subject: Newbie question For editing an article, i

Re: Security Filter and ActionForm

2003-01-11 Thread Max Cooper
The latest release of SecurityFilter (securityfilter-1.0-b5) has been fixed to allow requests to the login and error pages even if they match a security constraint. This matches the behavior of the containers I tested. It also has some security fixes, so I recommend all users upgrade to the

Re: Security Filter and ActionForm

2003-01-10 Thread Max Cooper
You might not want to tell users what was wrong for security reasons. If they type a username/password and can get a username invalid or password invalid error, they will know when they have guessed a good username. passwords can only contain letters and digits, etc. also give away information

Re: how to open a window on click of a link

2002-12-21 Thread Max Cooper
Context path? td a href=# onClick=window.open('%=request.getContextPath()%/screenLabelDetails.do')CLICK HERE/a/td -Max On Fri, 2002-12-20 at 23:22, [EMAIL PROTECTED] wrote: hi, how to open a new window in click of a link i used this code td a href=#

Re: tomcat's container based authentication and struts

2002-12-18 Thread Max Cooper
Just write out a regular HTML form: form action=j_security_check Username: input type=text name=j_usernamebr Password: input type=password name='j_passwordbr input type=submit /form -Max - Original Message - From: Boris Folgmann [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL

Re: tomcat's container based authentication and struts

2002-12-18 Thread Max Cooper
Subject: Re: tomcat's container based authentication and struts Max Cooper wrote: Just write out a regular HTML form: form action=j_security_check Username: input type=text name=j_usernamebr Password: input type=password name='j_passwordbr input type=submit /form -Max

Re: [FRIDAY] Best error message ever

2002-12-15 Thread Max Cooper
I don't think this will trump any of the fine examples posted so far, but I have always found this gsu error message amusing: gsu: you won't be doing that today. This is what you get if you try to gsu to an account that you don't have access to. -Max - Original Message - From: Nelson,

Re: Processing multiple records all at once

2002-12-12 Thread Max Cooper
Brad, I have written some pages/actions that do what you describe here. I believe that one way to go would be to use nested properties, but I haven't tried that yet, so I am not sure how to do it. The solution I used was to create an ActionForm for the page that has arrays for each field from the

Re: Processing multiple records all at once

2002-12-12 Thread Max Cooper
Brad, Is the RowsForm a session-scoped ActionForm? If it is request-scope, you can be sure that they are being set on the submit, rather than hanging around in the session. The setRows() method was intended to be used in the Action that gets the Vector of data from the DB (or elsewhere) to copy

Re: [OT] Run Java App as a Win Service

2002-11-01 Thread Max Cooper
Here's a few from a Google search for Windows service wrapper: http://wrapper.sourceforge.net/doc/english/introduction.html http://pharos.inria.fr/Java/display.jsp?id=c_6232 http://playstation2.idv.tw/serviceagent/index.php3 -Max - Original Message - From: Mark Silva [EMAIL PROTECTED]

Re: Wrapping the controller?

2002-10-02 Thread Max Cooper
Another option is to create your own Action base class (that adds logging) that all your Actions will extend. I believe this strategy has been identified as a Best Practice if and when you need to add this kind of thing. We did this on a project I worked on and added code to the base class for

Re: [OT - Java] How can I do this in Java?

2002-09-30 Thread Max Cooper
I agree that reflection is not a good solution here, but does have useful application in general (but it isn't needed here, so don't use it). Use a singleton or a statically-initialized Map to look up the patterns based on the state. Save yourself some time by putting Patterns in the map,

Re: Struts Authentication Filter

2002-09-25 Thread Max Cooper
Mark, Check out my SecurityFilter project: http://securityfilter.sourceforge.net/ The other alternative that I would suggest is using container-managed security. SecurityFilter is designed to mimic container managed security, so it is easy to switch back and forth if you aren't ready to decide

Re: Image and properties file question

2002-09-11 Thread Max Cooper
Assuming your context path is /mystruts/pages... If the image does not change with locale, it is probably easiest to do this: html:img page=/images/signoff.gif alt=Sign-off / If you want to have the image and alt tag change with the locale, do this: ( base resources file )

Re: Newbie on image

2002-09-05 Thread Max Cooper
Yes, html:image is just what you are looking for. You often want to use page= instead of src= so the tag will add your contextPath to the beginning. The action is specified in the form. Something like this will submit to booya.do: html:form action=/booya.do html:image page=/images/booya.jpg /

Re: No Action Instance

2002-08-28 Thread Max Cooper
I don't know if this is your problem, but I would consider putting your class in package and specifying the type with the fully-qualified class name. Put something like this at the top of dbopsAction.java: package com.mycompany.myapp; and make sure the class file ends up as

<    1   2   3   >