RE: stop user from clicking the submit button twice

2004-01-30 Thread Dan Payne
You may also want to check out 

http://www.javaworld.com/javatips/jw-javatip136_p.html

"Summary
Struts, from the Apache Jakarta Project, implements
the Synchronizer Token pattern to prevent duplicate
form submission. Applying this pattern, you can detect
this situation and follow an alternate course of
action when it happens. But which alternate action? In
most cases, the best solution would be to simply
recover the first submit's result. This tip suggests a
simple strategy to achieve that goal. (750 words;
March 14, 2003)"

HTH

Dan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Need help forming Response object

2004-01-16 Thread Dan Payne
I would like to be able to construct a HTTP POST
response and send it to a specific server. This would
be outside of a typical client request/response chain.


What is happening (perhaps there is a better way to do
this?) is a new user signs up for a member account on
our website. The form is processed and the user data
is saved to the database. If at registration time the
user indicates they would like to sign up for our
mailing list (as most do) then I need to send an HTTP
POST response to our third-party email list provider
with the user's information. The email list provider
has a sign-up form on their site customized for my
list but we don't want the user to have to basicaly
input the data twice, once on my site and once on the
email list provider site. So this response i'd like to
construct will be sent to the URL shown in the form's
ACTION parameter. 

Can anyone point me in the right direction here?

I really appreciate it guys.

-Dan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: BUG!!! FormFile

2003-12-19 Thread Dan Payne
%>

http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>

<[EMAIL PROTECTED] file="head.jsp" %>




<[EMAIL PROTECTED] file="optionsMenu.jsp" %>


<[EMAIL PROTECTED] file="aMessage.jsp" %>


































 






   









   
































   

































   








        










Benjamin A. Janes

BLUEWAVE SVERIGE

M. +46 (0)40-631 1068
F. +46 (0)40 -631 10 50
F. +46 (0)46-540 03 50
Drottninggatan 18,
S-211 49 Malmö,
Sweden


|-+--->
| |   Dan Payne   |
| ||
| |   |
| |   2003-12-18 16:28|
| |   Please respond to   |
| |   "Struts Users   |
| |   Mailing List"   |
| |   |
|-+--->
 
>--|
  |   
  
  
|
  |   To:   [EMAIL PROTECTED]
  
  
|
  |   cc: 
  
  
|
  |   Subject:  RE: BUG!!! FormFile   
  
  
|
 
>---

RE: [OT] HTML Select box

2003-12-19 Thread Dan Payne
Hey Jerry,

You can achieve this by placing your down arrow button
next to your single-line select box. In the button's
onClick parameter, call a javascript method that
change's the elements size attribute from 1 to 10 or
whatever. That should do the trick. You'll probably
want to code the method so that a subsequent click on
the button will reduce the select box back to size=1
as well as change the button's label appropriately.

If you're unsure how to do this lemme know and perhaps
I can throw the code together for you.

Dan

-Original Message-
From: Jerry Jalenak [mailto:[EMAIL PROTECTED]
Sent: Friday, December 19, 2003 2:28 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] HTML Select box


<[EMAIL PROTECTED] />

Thanks to everyone who responded.  Let me clarify on
this:  If I set my
 to use a size=?? and set
multiple="true", I can indeed select
multiple options.  The problem is, when I set the size
parameter to
something like 10, I end up with a 10 items displayed
in a rather large box
(I know, this is how it works!).  What I would rather
have (and maybe I
simply can't do it) is to have a single line displayed
with a 'down arrow'
(like what you would get without using the
multiple="true" and with
size="1").  When you clicked on the down arrow, the
box would expand
downward, and the user would then be able to select
multiple options by
holding down the CTRL key.  Submitting the selection
would send all of the
selected options to my Action.

Does this make any more sense?

Jerry Jalenak
Development Manager, Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496

[EMAIL PROTECTED]


> -Original Message-
> From: Brice Ruth [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 19, 2003 2:03 PM
> To: Struts Users Mailing List
> Subject: Re: [OT] HTML Select box
> 
> 
> right, but that's in a multi-select box, not in a
drop-down select.
> 
> Craig R. McClanahan wrote:
> 
> >Quoting Brice Ruth <[EMAIL PROTECTED]>:
> >
> >  
> >
> >> From a GUI perspective, how would you select
multiple things in a 
> >>drop-down? I can't actually recall ever seeing
this type of widget 
> >>anywhere (irrespective of HTML).
> >>
> >>
> >>
> >
> >In HTML, this is triggered by the "multiple"
attribute on 
> the  element. 
> >If you're using  tag, must add
multiple="true".
> >
> >In a browser, it's the usual technique for multiple

> selections -- shift-click
> >selects everything between the previous point and
the 
> current point, while
> >control-click adds the individual item you're
currently pointing at.
> >
> >  
> >
> >>Could you send an example?
> >>
> >>
> >>
> >
> >Craig
> >
> >
> >  
> >
> >>Jerry Jalenak wrote:
> >>
> >>
> >>
> >>>Hi All,
> >>>
> >>>Can't seem to find a way to do this, even though
I've seen 
> it done (I
> >>>think).  What I need is a HTML select box where
the size 
> parameter=1 (so I
> >>>get a true drop-down, not a scrolling box) AND
the ability 
> to select
> >>>multiple options within the select box.  Right
now if I 
> set the multiple
> >>>parameter I get a scrolling box.  I'm using an 
> optionsCollection tag to
> >>>generate my option list (not that I think it has
anything 
> to do with my
> >>>problem  8-)  I suspect there is a JavaScript
solution out 
> there, but I
> >>>can't seem to google it.  Does anyone have any
ideas?
> >>>
> >>>TIA!
> >>>
> >>>Jerry Jalenak
> >>>Development Manager, Web Publishing
> >>>LabOne, Inc.
> >>>10101 Renner Blvd.
> >>>Lenexa, KS  66219
> >>>(913) 577-1496
> >>>
> >>>[EMAIL PROTECTED]
> >>>
> >>>
> >>>This transmission (and any information attached
to it) may 
> be confidential
> >>>  
> >>>
> >>and
> >>
> >>
> >>>is intended solely for the use of the individual
or entity 
> to which it is
> >>>addressed. If you are not the intended recipient
or the 
> person responsible
> >>>  
> >>>
> >>for
> >>
> >>
> >>>delivering the transmission to the intended
recipient, be 
> advised that you
> >>>have received this transmission in error and that
any use, 
> dissemination,
> >>>forwarding, printing, or copying of this
information is strictly
> >>>  
> >>>
> >>prohibited.
> >>
> >>
> >>>If you have received this transmission in error,
please 
> immediately notify
> >>>LabOne at the following email address: 
> [EMAIL PROTECTED]
> >>>
> >>>
>
>>>---
> --
> >>>To unsubscribe, e-mail:
[EMAIL PROTECTED]
> >>>For additional commands, e-mail: 
> [EMAIL PROTECTED]
> >>>
> >>> 
> >>>
> >>>  
> >>>
> >>-- 
> >>Brice D. Ruth
> >>Sr. IT Analyst
> >>Fiskars Brands, Inc.
> >>
> >>
>
>>
> -
> >>To unsubscribe, e-mail:
[EMAIL PROTECTED]
> >>For additional commands, e-mail:
[EMAIL PROTECTED]
> >>
> >>
> >>
> >
> >
> >
> >
>
>-
> >To unsubscribe, e-mail:
[EMAIL PROTECTED]
> >For additional commands, e-mail:
[

RE: BUG!!! FormFile

2003-12-18 Thread Dan Payne
Ben,

So is the bug in Opera or Struts? This problem is
extremely annoying. Also, do you mind posting your
work around?

Thanks,

Dan

-Original Message-
From: Ben Janes [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 1:19 AM
To: Struts Users Mailing List
Subject: RE: BUG!!! FormFile



HI Dan,

That would make sense, in my browsered enlightenment I
never use IE, only Opera 7.2..

Anyway, I wrote a work around in the PropertyUtils
class and now it all works fine... Same thing I
had wit mime types, IE: image/pjpeg Opera image/jpeg :
you tell me


Mvh
Benjamin A. Janes

BLUEWAVE SVERIGE

M. +46 (0)40-631 1068
F. +46 (0)40 -631 10 50
F. +46 (0)46-540 03 50
Drottninggatan 18,
S-211 49 Malmö,
Sweden


|-+--->
| |   Dan Payne   |
| ||
| |   |
| |   2003-12-17 17:14|
| |   Please respond to   |
| |   "Struts Users   |
| |   Mailing List"   |
| |   |
|-+--->
 
>--|
  |   
  
  
|
  |   To:   [EMAIL PROTECTED]
  
  
|
  |   cc: 
  
  
|
  |   Subject:  RE: BUG!!! FormFile   
  
  
|
 
>--|




I have the same problem but ONLY with Opera 7.2x

I'm using Struts 1.1 and with Opera 7.1 everything
worked fine. The formFile field could be left blank.
When I upgraded to 7.2 it began to throw a argument
type mismatch when the formFile field was left blank.
Could this be the source of your problem? Everything
still works fine with IE. Here's the stack trace:

javax.servlet.ServletException: BeanUtils.populate
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:182)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex

RE: html:img is not getting recognised.

2003-12-17 Thread Dan Payne
Wouldn't it need to be



as using src won't append the context?

-Dan

-Original Message-
From: Yves Sy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 2:55 AM
To: 'Struts Users Mailing List';
[EMAIL PROTECTED]
Subject: RE: html:img is not getting recognised.


Struts already appends the context path.



...should be enough

-Yves-

-Original Message-
From: Amit Kumar Sharma
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 17, 2003 4:33 PM
To: Struts Users Mailing List
Subject: html:img is not getting recognised.

Dear friends,

I am substituting the normal HTML image tag 

with the shown below but is not getting recognised,
can somebody guide
me
out how to use it, I am new to struts.


Regards,
Amit Kumar Sharma
SysArris Software Pvt Ltd
120A, Elephant Rock Road,
3rd Block, Jayanagar, 
Bangalore - 560011
Tel.: 91-80-665 4965 / 665 5052
[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]



RE: BUG!!! FormFile

2003-12-17 Thread Dan Payne
I have the same problem but ONLY with Opera 7.2x

I'm using Struts 1.1 and with Opera 7.1 everything
worked fine. The formFile field could be left blank.
When I upgraded to 7.2 it began to throw a argument
type mismatch when the formFile field was left blank.
Could this be the source of your problem? Everything
still works fine with IE. Here's the stack trace:

javax.servlet.ServletException: BeanUtils.populate
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:182)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)

root cause 

java.lang.IllegalArgumentException: argument type
mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:148

RE: context relative image reference in a CSS file

2003-01-10 Thread Dan Payne
Duh. I forget what it's called when you develop an overly complex solution
to a *very* simple problem but that's exactly what I was doing. Thanks Joe
and Craig and all others who replied. I was thinking the path would be
resolved from the file that contained the stylsheet link, not from the
stylesheet file itself. I threw in the relative reference and it's working
like a charm.

Thanks again!

-Dan

-Original Message-
From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 7:33 PM
To: Struts Users Mailing List
Subject: RE: context relative image reference in a CSS file


Okay, well I couldn't swear that "list-style-image:" works like
"background:" in CSS sheets ('cause I haven't used it), but I would assume
that it does.  We use something like this all over our CSS:

background: url(../images/icon_confirm.gif);

The url reference above is intepreted by the *browser* relative to the
location of the CSS file itself.  What file(s) the link to your CSS file is
found in is irrelevant for this interpretation, only the location of the CSS
file matters.

peace,
Joe

> -Original Message-
> From: Dan Payne [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 5:10 PM
> To: Struts Users Mailing List
> Subject: RE: context relative image reference in a CSS file
>
>
> Well, I can't use a relative reference as I've got over 500 JSPs in
> many,many folders that are running off of 4 templates. It's
> in the templates
> that the CSS link is so a reference would only be valid from
> the templates
> folder (or another folder at the same level). The folder
> structure is much
> more complex than that. I wish it was that easy.
>
> I though of changing the .css file to .jsp and rewriting the
> URL and I guess
> I'll go with that option. Does noone recall the name of that
> sourceforge
> project? (I knew I should've saved that email...)
>
> -Dan
>
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 6:04 PM
> To: Struts Users Mailing List
> Subject: RE: context relative image reference in a CSS file
>
>
>
>
> On Thu, 9 Jan 2003, Joe Barefoot wrote:
>
> > Date: Thu, 9 Jan 2003 14:46:09 -0800
> > From: Joe Barefoot <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: RE: context relative image reference in a CSS file
> >
> > The simplest solution is to use a relative path:
> > ul {
> >  list-style-image: url(../images/li.gif);
> > }
> >
> > If you have your CSS file in folder 'css' (for instance),
> with sibling
> > folder 'images', this will work no matter what the app.
> context name is,
> > in Tomcat at least (I assume other web servers resolve the same way
> > though).
> >
>
> Just a minor note ... servers don't resolve relative URIs --
> clients do.
>
> However, as long as your browser obeys the CSS spec and
> resolves relative
> URIs against the absolute URL of the stylesheet (not the
> source document),
> then this technique should work fine.
>
> > Second option:  If you're using ant to deploy, you could
> use tokens in
> > your CSS files and have ant replace them during copy/deploy using a
> > filter task--you can conditionally use different filter values for
> > replacement depending on a deploy target property or
> something.  That's
> > all I can think of.
> >
> > peace,
> > Joe
> >
>
> Craig
>
> > > -Original Message-
> > > From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, January 09, 2003 2:38 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: context relative image reference in a CSS file
> > >
> > >
> > > Hi Dan,
> > >
> > > I just ran into this same issue today, and I hope that
> > > somebody has a better
> > > idea than what I ended up doing.  I changed the .css files to
> > > .jsp and put
> > > script tags around them and included them as JSPs.  This, of
> > > course, gave me
> > > access to taglibs which would let me prepend the context path
> > > to the image.
> > >
> > > Your example would end up looking something like this:
> > >
> > > <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
> > > 
> > > ul {
> > > list-style-image: url(<html-el:rewrite page="/images/li.gif"/>);

RE: context relative image reference in a CSS file

2003-01-09 Thread Dan Payne
Well, I can't use a relative reference as I've got over 500 JSPs in
many,many folders that are running off of 4 templates. It's in the templates
that the CSS link is so a reference would only be valid from the templates
folder (or another folder at the same level). The folder structure is much
more complex than that. I wish it was that easy.

I though of changing the .css file to .jsp and rewriting the URL and I guess
I'll go with that option. Does noone recall the name of that sourceforge
project? (I knew I should've saved that email...)

-Dan

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 6:04 PM
To: Struts Users Mailing List
Subject: RE: context relative image reference in a CSS file




On Thu, 9 Jan 2003, Joe Barefoot wrote:

> Date: Thu, 9 Jan 2003 14:46:09 -0800
> From: Joe Barefoot <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: context relative image reference in a CSS file
>
> The simplest solution is to use a relative path:
> ul {
>  list-style-image: url(../images/li.gif);
> }
>
> If you have your CSS file in folder 'css' (for instance), with sibling
> folder 'images', this will work no matter what the app. context name is,
> in Tomcat at least (I assume other web servers resolve the same way
> though).
>

Just a minor note ... servers don't resolve relative URIs -- clients do.

However, as long as your browser obeys the CSS spec and resolves relative
URIs against the absolute URL of the stylesheet (not the source document),
then this technique should work fine.

> Second option:  If you're using ant to deploy, you could use tokens in
> your CSS files and have ant replace them during copy/deploy using a
> filter task--you can conditionally use different filter values for
> replacement depending on a deploy target property or something.  That's
> all I can think of.
>
> peace,
> Joe
>

Craig

> > -Original Message-
> > From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 09, 2003 2:38 PM
> > To: Struts Users Mailing List
> > Subject: Re: context relative image reference in a CSS file
> >
> >
> > Hi Dan,
> >
> > I just ran into this same issue today, and I hope that
> > somebody has a better
> > idea than what I ended up doing.  I changed the .css files to
> > .jsp and put
> > script tags around them and included them as JSPs.  This, of
> > course, gave me
> > access to taglibs which would let me prepend the context path
> > to the image.
> >
> > Your example would end up looking something like this:
> >
> > <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
> > 
> > ul {
> > list-style-image: url(<html-el:rewrite page="/images/li.gif"/>);
> > }
> > 
> >
> > This is all I was able to figure out.  Does anybody have any
> > better ideas?
> >
> > Thanks,
> >
> > Justin
> >
> >
> > - Original Message -
> > From: "Dan Payne" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, January 09, 2003 5:31 PM
> > Subject: context relative image reference in a CSS file
> >
> >
> > > I recall seeing someone mention a project on sourceforge
> > that allowed one
> > to
> > > make context independent references to images from the
> > context root within
> > > CSS files. Anyone? Or perhaps another solution?
> > >
> > > I've got this entry in my stylesheet.css file:
> > >
> > > ul {
> > > list-style-image: url(/images/li.gif);
> > > }
> > >
> > > and it's causing one hell of a headache as the app is deployed on
> > different
> > > contexts. Any ideas?
> > >
> > > thanks...Dan
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




context relative image reference in a CSS file

2003-01-09 Thread Dan Payne
I recall seeing someone mention a project on sourceforge that allowed one to
make context independent references to images from the context root within
CSS files. Anyone? Or perhaps another solution?

I've got this entry in my stylesheet.css file:

ul {
list-style-image: url(/images/li.gif);
}

and it's causing one hell of a headache as the app is deployed on different
contexts. Any ideas?

thanks...Dan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




context relative image in file

2002-12-07 Thread Dan Payne
How do I include a context relative image in the errors.header entry of my
 file?

Specifically, I'd like to achieve the following:

errors.header = 
errors.footer = 

I've checked the API and mailing list archives but didn't find anything.
Thanks in advance.

-Dan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [OT] Eclipse and webapp organization

2002-10-31 Thread Dan Payne
Spoke too soon. Nevermind that last question.

-Original Message-
From: David Graham [mailto:dgraham1980@;hotmail.com]
Sent: Thursday, October 31, 2002 11:53 AM
To: [EMAIL PROTECTED]
Subject: Re: [OT] Eclipse and webapp organization


There are lots of ways to do it.  Eclipse projects live in
$ECLIPSE_HOME/workspace by default but you can point eclipse to an outside
project folder.  I have one java project for each web-app.  It contains my
java source under /WEB-INF/src and builds into /WEB-INF/classes.  My jsps
just live in directories under the project root.

The tomcat plugin is helpful for web development:
http://www.sysdeo.com/eclipse/tomcatPlugin.html

David






>From: "Dan Payne" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: [OT] Eclipse and webapp organization
>Date: Thu, 31 Oct 2002 11:42:54 -0600
>
>I've started looking at Eclipse (thanks to the suggestions of many on this
>list) and was curious how other Struts developers organized their webapps
>w/in Eclipse.  I currently develop each webapp at
>
>C:\webapps\\bin
>C:\webapps\\build
>C:\webapps\\dist
>C:\webapps\\docs
>C:\webapps\\pre (preproduction: contains image templates, stock
>logos, etc)
>C:\webapps\\src
>C:\webapps\\unused
>C:\webapps\\web
>C:\webapps\\build.xml (for use with ant)
>C:\webapps\\startup.bat (to startup tomcat instance)
>C:\webapps\\shutdown.bat (to shutdown tomcat instance)
>
>Ant deploys to the relative context at
>
>C:\contexts\\webapps\ROOT\
>
>Each context has its own tomcat instance.
>
>Anyways, I've been doing it this way for quite some time now and am
>consequently suffering tunnel vision. How can I smoothly import my existing
>apps (these contain many, many JSPs and lots of java packages) into
>Eclipse?
>I tried creating a new project with the base set at c:\webapps\
>but that threw thousands of errors with my classes, mostly "The import
> cannot be resolved." Do I need to set up separate projects,
>one for my java classes and the other for my JSPs, or do I need a
>reshuffling of my folders/files? Any help would be appreciated.  I checked
>the documentation but didn't see any examples on how to integrate both,
>what
>seems to me to be, a simple project and a java project. I really like what
>I
>see with eclipse and would like to get started with it.
>
>Thanks again, all.
>
>-Dan
>
>
>--
>To unsubscribe, e-mail:
><mailto:struts-user-unsubscribe@;jakarta.apache.org>
>For additional commands, e-mail:
><mailto:struts-user-help@;jakarta.apache.org>


_
Get faster connections -- switch to MSN Internet Access!
http://resourcecenter.msn.com/access/plans/default.asp


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




RE: [OT] Eclipse and webapp organization

2002-10-31 Thread Dan Payne
Thanks, David.  Hey, does it matter if I create the project as a Java or
Simple project?

-Original Message-
From: David Graham [mailto:dgraham1980@;hotmail.com]
Sent: Thursday, October 31, 2002 11:53 AM
To: [EMAIL PROTECTED]
Subject: Re: [OT] Eclipse and webapp organization


There are lots of ways to do it.  Eclipse projects live in
$ECLIPSE_HOME/workspace by default but you can point eclipse to an outside
project folder.  I have one java project for each web-app.  It contains my
java source under /WEB-INF/src and builds into /WEB-INF/classes.  My jsps
just live in directories under the project root.

The tomcat plugin is helpful for web development:
http://www.sysdeo.com/eclipse/tomcatPlugin.html

David






>From: "Dan Payne" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: [OT] Eclipse and webapp organization
>Date: Thu, 31 Oct 2002 11:42:54 -0600
>
>I've started looking at Eclipse (thanks to the suggestions of many on this
>list) and was curious how other Struts developers organized their webapps
>w/in Eclipse.  I currently develop each webapp at
>
>C:\webapps\\bin
>C:\webapps\\build
>C:\webapps\\dist
>C:\webapps\\docs
>C:\webapps\\pre (preproduction: contains image templates, stock
>logos, etc)
>C:\webapps\\src
>C:\webapps\\unused
>C:\webapps\\web
>C:\webapps\\build.xml (for use with ant)
>C:\webapps\\startup.bat (to startup tomcat instance)
>C:\webapps\\shutdown.bat (to shutdown tomcat instance)
>
>Ant deploys to the relative context at
>
>C:\contexts\\webapps\ROOT\
>
>Each context has its own tomcat instance.
>
>Anyways, I've been doing it this way for quite some time now and am
>consequently suffering tunnel vision. How can I smoothly import my existing
>apps (these contain many, many JSPs and lots of java packages) into
>Eclipse?
>I tried creating a new project with the base set at c:\webapps\
>but that threw thousands of errors with my classes, mostly "The import
> cannot be resolved." Do I need to set up separate projects,
>one for my java classes and the other for my JSPs, or do I need a
>reshuffling of my folders/files? Any help would be appreciated.  I checked
>the documentation but didn't see any examples on how to integrate both,
>what
>seems to me to be, a simple project and a java project. I really like what
>I
>see with eclipse and would like to get started with it.
>
>Thanks again, all.
>
>-Dan
>
>
>--
>To unsubscribe, e-mail:
><mailto:struts-user-unsubscribe@;jakarta.apache.org>
>For additional commands, e-mail:
><mailto:struts-user-help@;jakarta.apache.org>


_
Get faster connections -- switch to MSN Internet Access!
http://resourcecenter.msn.com/access/plans/default.asp


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




[OT] Eclipse and webapp organization

2002-10-31 Thread Dan Payne
I've started looking at Eclipse (thanks to the suggestions of many on this
list) and was curious how other Struts developers organized their webapps
w/in Eclipse.  I currently develop each webapp at

C:\webapps\\bin
C:\webapps\\build
C:\webapps\\dist
C:\webapps\\docs
C:\webapps\\pre (preproduction: contains image templates, stock
logos, etc)
C:\webapps\\src
C:\webapps\\unused
C:\webapps\\web
C:\webapps\\build.xml (for use with ant)
C:\webapps\\startup.bat (to startup tomcat instance)
C:\webapps\\shutdown.bat (to shutdown tomcat instance)

Ant deploys to the relative context at

C:\contexts\\webapps\ROOT\

Each context has its own tomcat instance.

Anyways, I've been doing it this way for quite some time now and am
consequently suffering tunnel vision. How can I smoothly import my existing
apps (these contain many, many JSPs and lots of java packages) into Eclipse?
I tried creating a new project with the base set at c:\webapps\
but that threw thousands of errors with my classes, mostly "The import
 cannot be resolved." Do I need to set up separate projects,
one for my java classes and the other for my JSPs, or do I need a
reshuffling of my folders/files? Any help would be appreciated.  I checked
the documentation but didn't see any examples on how to integrate both, what
seems to me to be, a simple project and a java project. I really like what I
see with eclipse and would like to get started with it.

Thanks again, all.

-Dan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Pager taglib doesn't work

2002-10-10 Thread Dan Payne

Hallo Christoph.

I have had the same problem.  The pager taglib works great on tomcat up to
4.1.x, so you may want to downgrade to 4.0.5, which I'm using with the pager
taglib no problem.  I've notified the folks who authored the pager taglib,
but no word back from them.  We'll see.  In the meantime, if anyone has a
patch or workaround, i'd be interested.

-Dan

-Original Message-
From: Christoph Kulla [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 11:23 AM
To: [EMAIL PROTECTED]
Subject: Pager taglib doesn't work


Hi,

first of all I want to introduce myself. I'm from Germany, new to the
list and started with the struts framework a few days ago.

I'm trying to get the pager taglib
(http://jsptags.com/tags/navigation/pager/) working with struts. I use
logic:iterate to iterate through a list of items. When calling my jsp
page the first time everything works fine. I see a table with the first
20 items and the page navigation links of the pager taglib. But when
calling the jsp page a second time my table is always empty. The same
happens with the sample page of the pager taglib distribution. Btw, I'm
using tomcat 4.1.12.

Does anyone use the pager taglib with the current version of tomcat?

Imho the problem is, that the same instance of the pager tag gets reused
on every call to the jsp page and the tag instance does not get
initialized again. How can I disable caching of jsp tags?

Best regards

Christoph


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Has anyone integrated SecurityFilter within a Struts app?

2002-09-18 Thread Dan Payne

Darren, I've successfully implemented the SecurityFilter with Tomcat 4.1.10,
MySQL and JDBC Realm.  Anything I can help you with?

-Dan

-Original Message-
From: Darren Hill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 7:43 AM
To: 'Struts Users Mailing List'
Subject: Has anyone integrated SecurityFilter within a Struts app?


I'm looking for an example webapp.

I've wasted too much time already doing it myself.

I've got an app that uses JAAS with JBoss, but its too tightly coupled.  And
JBoss doesn't have the best documentation.

I also need to retrieve and store a UserView upon successful authentication,
so that I may grab it from session .. yada yada yada.

D.

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Portability issue?

2002-09-11 Thread Dan Payne

I've got a JSP in my struts app that runs fine on my windows dev box running
TC 4.1.10, JDK 1.4.0_01 but when I go live with it on my RH Linux box (TC
4.0.4, JDK 1.4.0_01) it takes over 30 seconds to load. The page contains an
action form and, admittedly, a ton of  and  and
 tags.  Anyone know what might be causing the time lag and where
i can begin investigating?

I've dropped a bunch of the struts html tags and the time lag disappears, so
it does seem to lie with struts tags.

-Dan

-Original Message-
From: Jim Young [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 1:46 PM
To: [EMAIL PROTECTED]
Subject: RE: General Struts Question


No I doubt he is the Coach/GM of the Leafs or he would have traded Struts
for Smalltalk 80.

But, since he is not the coach I am sure he checked out the resources page

http://jakarta.apache.org/struts/resources/index.html

Jim

>From: Darren Hill <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: RE: General Struts Question
>Date: Wed, 11 Sep 2002 14:35:08 -0400
>
>Wait to October ... and get Chuck Cavaness' "Programming Jakarta Struts"
>Good stuff.
>
>BTW ... do you coach the Toronto Maple Leafs.
>
>-Original Message-
>From: Pat Quinn [mailto:[EMAIL PROTECTED]]
>Sent: September 11, 2002 2:25 PM
>To: [EMAIL PROTECTED]
>Subject: General Struts Question
>
>
>Does any know of any good books on struts that are available at the
>moment... or websites for an introduction to the struts world
>
>
>_
>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>




Jim Young
Northern Objects Inc.
905 781-7019


_
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: sites powered by struts

2002-09-11 Thread Dan Payne

Shoot me.  Is that bad?

-Original Message-
From: Darren Hill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 11:06 AM
To: 'Struts Users Mailing List'
Subject: RE: sites powered by struts


Ouch ... do I see a .jsp in the address ... ;)

-Original Message-----
From: Dan Payne [mailto:[EMAIL PROTECTED]]
Sent: September 11, 2002 12:05 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: sites powered by struts


Yep.

I'm the guy behind www.specialolympicstexas.org.  It's running on a RH Linux
box with Struts and MySQL.  There's still a bevy of features in development,
but there is still quite a bit up there to surf around in.

-Dan

-Original Message-
From: Jefferson R. de O. e Silva [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 8:37 AM
To: [EMAIL PROTECTED]
Subject: sites powered by struts


Hi guys,

I'm in a process of trying to convince my developement team to use the
struts in a new project
here.

Can anyone tell me any site which is using struts ? There are some people
here wanting
to see "results"

Thanks in advance

Jefferson

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: [Dan] Security and Struts

2002-09-11 Thread Dan Payne

Darren,

No I don't have an example.war file for you although I *might* be able to do
that tonight.  However, below I've included the web.xml and
securityfilter-config.xml entries for the app.

Also, the securityfilter mailing list at
http://lists.sourceforge.net/lists/listinfo/securityfilter-user doesn't
appear to be real active but the author of the securityfilter (Max Cooper)
does read and reply, and I've yet to have a question go unanswered from
either him or someone else on the list.

Let me know if there is anything else I can do for you.

web.xml (relevant portion only)
---


Security Filter
org.securityfilter.filter.SecurityFilter

 config
 /WEB-INF/securityfilter-config.xml
 Configuration file location (this is the default
value)


 validate
 true
 Validate config file if set to true






Security Filter
/*




securityfilter-config.xml (complete)



http://www.securityfilter.org/dtd/securityfilter-config_1_0.dtd";>






Email List Subscription 
Services
/emailLists/subscribe.do


user





FORM

/users/login/index.jsp
/users/login/error.jsp
/home.do






















-Original Message-
From: Darren Hill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 8:11 AM
To: 'Struts Users Mailing List'
Subject: RE: [Dan] Security and Struts


Thanks Dan,

I just started yesterday, trying to start a struts app, using security
filter with JBoss 3.0.  I think I'll need to understand JBoss a little
further in order to get this to work correctly as I am getting a problem
with the REALM not being set-up correctly.

Do you have a quick example.war you could send?

Darren.

-Original Message-
From: Dan Payne [mailto:[EMAIL PROTECTED]]
Sent: September 10, 2002 6:51 PM
To: Struts Users Mailing List
Subject: RE: RE: Security and Struts


Darren,

I'm currently using the security filter in my Struts based app in
conjunction with a JDBC realm.  It works seemlessly.  My only qualm at this
point is I can't get the security filter to work with MD5 digesting,
although Max Cooper is looking into it and may add support in the near
future.  Otherwise I would definitely recommend it.  Let me know if you have
any additional, specific questions.

-Dan

-Original Message-
From: Darren Hill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 11:44 AM
To: 'Struts Users Mailing List'
Subject: RE: RE: Security and Struts


Nice .. thanks Todd.

Anyone ever use this with Struts?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: September 10, 2002 12:41 PM
To: Struts Users Mailing List
Subject: Re: RE: Security and Struts


Darren,

Have you looked at the SecurityFilter project by Max Cooper?  Not sure what
all you need to achieve but this project provides a fairly extensible
Security module.  You can find it at:
http://securityfilter.sourceforge.net/

Regards,
Todd G. Nist
>
> From: Darren Hill <[EMAIL PROTECTED]>
> Date: 2002/09/10 Tue PM 12:23:53 EDT
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Security and Struts
>
> Michael ... I've tried the same and thought it was a little messy.
>
> I was hope to find an example to uses roles 'n' such.
>
> -Original Message-
> From: Michael Lee [mailto:[EMAIL PROTECTED]]
> Sent: September 10, 2002 11:13 AM
> To: Struts Users Mailing List
> Subject: Re: Security and Struts
>
>
> They have a good login example in the example war in the struts/webapps
dir.
> That's the way I've done it in the past. The way I'm currently doing it is
> to use container managed security. This means NOT using struts for
> authorization/authentication (for J2EE security). Since your using JSP
your
> probably gonna do form base authentication so just post your form to
> action="j_security_check" and make sure your form username and password
> fields are j_username and j_password appropriately. Check your container
> documentation for how to hook this into its security mode

RE: sites powered by struts

2002-09-11 Thread Dan Payne

Yep.

I'm the guy behind www.specialolympicstexas.org.  It's running on a RH Linux
box with Struts and MySQL.  There's still a bevy of features in development,
but there is still quite a bit up there to surf around in.

-Dan

-Original Message-
From: Jefferson R. de O. e Silva [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 8:37 AM
To: [EMAIL PROTECTED]
Subject: sites powered by struts


Hi guys,

I'm in a process of trying to convince my developement team to use the
struts in a new project
here.

Can anyone tell me any site which is using struts ? There are some people
here wanting
to see "results"

Thanks in advance

Jefferson

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: RE: Security and Struts

2002-09-10 Thread Dan Payne

Darren,

I'm currently using the security filter in my Struts based app in
conjunction with a JDBC realm.  It works seemlessly.  My only qualm at this
point is I can't get the security filter to work with MD5 digesting,
although Max Cooper is looking into it and may add support in the near
future.  Otherwise I would definitely recommend it.  Let me know if you have
any additional, specific questions.

-Dan

-Original Message-
From: Darren Hill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 11:44 AM
To: 'Struts Users Mailing List'
Subject: RE: RE: Security and Struts


Nice .. thanks Todd.

Anyone ever use this with Struts?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: September 10, 2002 12:41 PM
To: Struts Users Mailing List
Subject: Re: RE: Security and Struts


Darren,

Have you looked at the SecurityFilter project by Max Cooper?  Not sure what
all you need to achieve but this project provides a fairly extensible
Security module.  You can find it at:
http://securityfilter.sourceforge.net/

Regards,
Todd G. Nist
>
> From: Darren Hill <[EMAIL PROTECTED]>
> Date: 2002/09/10 Tue PM 12:23:53 EDT
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Security and Struts
>
> Michael ... I've tried the same and thought it was a little messy.
>
> I was hope to find an example to uses roles 'n' such.
>
> -Original Message-
> From: Michael Lee [mailto:[EMAIL PROTECTED]]
> Sent: September 10, 2002 11:13 AM
> To: Struts Users Mailing List
> Subject: Re: Security and Struts
>
>
> They have a good login example in the example war in the struts/webapps
dir.
> That's the way I've done it in the past. The way I'm currently doing it is
> to use container managed security. This means NOT using struts for
> authorization/authentication (for J2EE security). Since your using JSP
your
> probably gonna do form base authentication so just post your form to
> action="j_security_check" and make sure your form username and password
> fields are j_username and j_password appropriately. Check your container
> documentation for how to hook this into its security model.
> I'm currently actually having a problem with this in that I need for the
> user information to be stored in the session at login. I may just put a
tag
> at the top of every page but that seems to get rid of the 'niceties' of
> using J2EE security. I want to set the locale based upon the loaded user
> object. Problem is, it goes right to the requested jsp page after login
> without loading the user and his preferences. Not sure how I'm going to
> handle this but in the mean time, that is how I handle security.
> Mike
>
>
> - Original Message -
> From: "Darren Hill" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, September 10, 2002 10:24 AM
> Subject: Security and Struts
>
>
> > Hey all,
> >
> > I'm looking for a job document and example about best practices in
> > implementing security in struts.
> > I've got the general idea about placing all my JSP's under WEB-INF, but
a
> > doc/example might really solidify it for me.  Thanks in advance.
> >
> > Darren.
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts Action breakdown with TC 4.1.0 upgrade

2002-09-06 Thread Dan Payne

I just upgraded from Tomcat 4.0.4 to 4.1.0 and now none of my action
mappings work.  Getting the "No action instance for path /home could be
created".

Everything worked fine in 4.0.4.  Anybody run into this as well?  Could
there be something I inadvertanly overlooked in re-seting up struts?

Thank.

-Dan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [TEST]

2002-09-06 Thread Dan Payne

Nah, it was in the evening.  He was asking if anyone was active at the time
of the posting.  Und ich war.

-Original Message-
From: John Owen [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 06, 2002 2:56 PM
To: Struts Users Mailing List
Subject: Re: [TEST]


He's asking if the list is "here" or "valid". I believe it is. ;)

- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, September 06, 2002 2:52 PM
Subject: Re: [TEST]


> Ich nicht sprechen Deutch.  Ich sprechen English.
>
> Is this list ... ?
>
> Peter A. J. Pilgrim wrote:
>
> > testing 1 2 3: Ist diese Liste noch da oder nicht?
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [TEST]

2002-09-03 Thread Dan Payne

Ja, diese Liste ist ja so da.

-Original Message-
From: Peter A. J. Pilgrim [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 5:49 PM
To: Struts Dev; Struts User
Subject: [TEST]


testing 1 2 3: Ist diese Liste noch da oder nicht?
--
Peter Pilgrim


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [NEWBIE] STRUTS, TC and JDBC Realm

2002-08-30 Thread Dan Payne

Found it.  Disregard request.  Thanks again.  Here's the link for anyone
else interested:

http://sourceforge.net/projects/securityfilter/

-Dan

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 12:25 PM
To: Struts Users Mailing List
Subject: Re: [NEWBIE] STRUTS, TC and JDBC Realm


This was discussed some time ago.  There are a couple of solutions:
*  There is a security-filter project on sourceforge to address this
*  You can setup a redirect action that is secure (thus it will
invoke the CMA) and have it setup so that your redirect action just
redirects to wherever you specified by a parmeter
(?redirectURL=/some/path/action.do for example).
You could take this a step further and make your login page
"smart" with JavaScript to set attributes/submit the form automatically
in a given circumstance.
* There are JAAS solutions.

I hear the security-filter (requires servlet spec 2.3 compliant
container -- filters didn't exist before then) project is working
nicely.  The usage of it "integrates" well too -- everything act just
like you were using CMA.  One of the big advantages is that you gain the
ability to configure/deploy your realm with your application.  Should
you want to deploy your application somewhere that they do not allow you
to add to their server configuration (which is a prerequisite for using
CMA), you're able to.

HTH,

Eddie

Dan Payne wrote:

>Trying to deploy an application with Struts 1.0.1 with Tomcat 4.0.4 using
>Tomcat's JDBC realm for user authentication. Trying to avoid an "Invalid
>direct reference to form login page." Need to make a login page available
to
>the Realm (/users/login/index.jsp) but also want to offer the opportunity
to
>login on the site's home page (/home.do).  Here's what I've got:
>
>web.xml
>---
>  
>
>   Email List Subscriptions
>   /emailLists/subscribe.do
>
>
>
>   user
>
>  
>
> 
>   FORM
>   
>   /users/login/index.jsp
>   /users/login/error.jsp
>   
> 
>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: [NEWBIE] STRUTS, TC and JDBC Realm

2002-08-30 Thread Dan Payne

Do you know which project it is on sourceforge?  Sounds like a good
solution.  Thanks Eddie.

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 12:25 PM
To: Struts Users Mailing List
Subject: Re: [NEWBIE] STRUTS, TC and JDBC Realm


This was discussed some time ago.  There are a couple of solutions:
*  There is a security-filter project on sourceforge to address this
*  You can setup a redirect action that is secure (thus it will
invoke the CMA) and have it setup so that your redirect action just
redirects to wherever you specified by a parmeter
(?redirectURL=/some/path/action.do for example).
You could take this a step further and make your login page
"smart" with JavaScript to set attributes/submit the form automatically
in a given circumstance.
* There are JAAS solutions.

I hear the security-filter (requires servlet spec 2.3 compliant
container -- filters didn't exist before then) project is working
nicely.  The usage of it "integrates" well too -- everything act just
like you were using CMA.  One of the big advantages is that you gain the
ability to configure/deploy your realm with your application.  Should
you want to deploy your application somewhere that they do not allow you
to add to their server configuration (which is a prerequisite for using
CMA), you're able to.

HTH,

Eddie

Dan Payne wrote:

>Trying to deploy an application with Struts 1.0.1 with Tomcat 4.0.4 using
>Tomcat's JDBC realm for user authentication. Trying to avoid an "Invalid
>direct reference to form login page." Need to make a login page available
to
>the Realm (/users/login/index.jsp) but also want to offer the opportunity
to
>login on the site's home page (/home.do).  Here's what I've got:
>
>web.xml
>---
>  
>
>   Email List Subscriptions
>   /emailLists/subscribe.do
>
>
>
>   user
>
>  
>
> 
>   FORM
>   
>   /users/login/index.jsp
>   /users/login/error.jsp
>   
> 
>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




[NEWBIE] STRUTS, TC and JDBC Realm

2002-08-30 Thread Dan Payne

Trying to deploy an application with Struts 1.0.1 with Tomcat 4.0.4 using
Tomcat's JDBC realm for user authentication. Trying to avoid an "Invalid
direct reference to form login page." Need to make a login page available to
the Realm (/users/login/index.jsp) but also want to offer the opportunity to
login on the site's home page (/home.do).  Here's what I've got:

web.xml
---
  

Email List Subscriptions
/emailLists/subscribe.do



user

  

 
   FORM
   
/users/login/index.jsp
/users/login/error.jsp
   
 


Now under this configuration, if a user clicks the link
/emailLists/subscribe.do and they are not logged in, Tomcat will redirect
them to my login page /users/login/index.jsp and upon successful
authentication Tomcat will redirect again back to /emailLists/subscribe.do.
Great!  However, if the user types their username and password on my home
page (/home.do) and then clicks the submit button, they will not be logged
in b/c the Realm requires a destination for the user (like
/emailLists/subscribe.do) or put another way, the Realm requires you try to
access a restricted page before logging in. I want to login but without
having to access a restricted page before being prompted to (namely want to
login on home page). The login form on the home page has its action set to
action="j_security_check".  Obviously this is incorrect.  Any suggestions?

Additionaly, does anyone know how Tomcat is managing these page references
(where did you come from so I know where you go if login is correct)?  Is
there any way I can set this at runtime?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




user accounts question

2002-08-27 Thread Dan Payne

All,

Love using struts and enjoy this informative mailing list.  This email is a
bit off topic but alas, this is the list I subscribe to and I figure I'll
definitely get an informed response, which is what I'm looking for.

Designing a database for a client's site.  The four tables in question are
as follows:

mysql> describe users;
+---+--+--+-+++
| Field | Type | Null | Key | Default| Extra  |
+---+--+--+-+++
| user_id   | int(11)  |  | PRI | NULL   | auto_increment |
| username  | varchar(20)  |  | |||
| email | varchar(100) |  | |||
| name  | varchar(50)  |  | |||
| authenticated | date |  | | -00-00 ||
| password  | blob |  | |||
+---+--+--+-+++

mysql> describe user_role_xref;
+--+-+--+-+-+---+
| Field| Type| Null | Key | Default | Extra |
+--+-+--+-+-+---+
| username | varchar(20) |  | PRI | |   |
| role | varchar(50) |  | PRI | |   |
+--+-+--+-+-+---+

mysql> describe user_auth_xref;
+---+-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra |
+---+-+--+-+-+---+
| user_id   | int(11) |  | PRI | 0   |   |
| auth_code | varchar(20) |  | | |   |
+---+-+--+-+-+---+

mysql> describe user_type_xref;
+--+-+--+-+-+---+
| Field| Type| Null | Key | Default | Extra |
+--+-+--+-+-+---+
| user_id  | int(11) |  | | 0   |   |
| user_type_id | int(11) |  | | 0   |   |
+--+-+--+-+-+---+

Here's the question:
Should I still use the user_id?  Or, since the username will need to be
unique anyways, should I use the username as the primary key?  If I do,
which seems to make sense, then my user_auth_xref and user_type_xref tables
might get quite larger in size.  Is this really an issue?  Especially b/c if
I forgo the user_id then things will definitely be a bit easier to code.
Anybody run into anything like this?  The user_role_xref table requires I
use the uesrname instead of the user_id as it's for Tomcat's JDBC realm for
user authentication.

Thanks.

-Dan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: