Re: JSP Buffer Size

2005-05-23 Thread Catalin Croitoru
Hi,

if you use Java Servlet specification version 2.3 (at least) you can
use a Filter. make your filter intercept the jsp and in that filter
you can change the buffer. for a more information about Filter take a
look at this:

http://java.sun.com/products/servlet/Filters.html

Catalin


On 5/22/05, tarek.nabil <[EMAIL PROTECTED]> wrote:
> Hi everyone,
> 
> Is there some way that I can set the buffer size for all JSPs to some
> value other than the default 8kb without having to do it in every JSP?
> 
> Thanks
> 
> -
> 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: Fw: [HELP] How to restrict access to certain mapping action ???

2005-05-19 Thread Catalin Croitoru
hi,

you can do like this:

String myReferer = request.getHeader("Referer");

if myReferer is nul this means the request was by tiping the addres in
the addres bar. if it's not null mean the user click on a link on last
page in the browser and myReferer is the url of this page. for a full
description of this look for http description at header field
definition. i don't have a link on web for this but i think you can
find easy with google.

i hope this solve your problem.

Catalin



On 5/19/05, Pham Anh Tuan <[EMAIL PROTECTED]> wrote:
> Thank Aladin,
> 
> I'm Alibaba :D,
> 
> So, the first thing I want to say here I don't know exactly how to use
> , maybe syntax.
> 
> the second is I mean that, I don't want User do my action by typing my
> action path directly on address bar, such as
> http://www.myweb/user/useraction.do, but I allow User do my action by
> clicking on certain link on webpage, such as  page="/user/useraction.do">do
> 
> any solution :(
> 
> Anh Tuan
> - Original Message -
> From: "Aladin Alaily" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Thursday, May 19, 2005 9:49 AM
> Subject: Re: Fw: [HELP] How to restrict access to certain mapping action ???
> 
> 
> > Hi Pham,
> >
> > I think this was mentioned earlier.  There are two things you can do:
> >
> > 1) Use a filter with a url-map to your action
> >
> > 2) Use security constraints
> >
> > Aladin
> >
> >
> >
> > Pham Anh Tuan wrote:
> >>
> >> Hi all,
> >>
> >> This is the second time I post this message for help :(.
> >>
> >> I don't know how to restrict access to certain mapping action?
> >>
> >> Ex:
> >> I have action: /user/myaction.do
> >> and I don't want user directly access to above action.
> >>
> >> Could I use web.xml to solve this problem.
> >>
> >> something like:
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> Restrict access to JSP pages
> >>
> >> 
> >>
> >> *.jsp
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> With no roles defined, no access granted
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> Thanks for ur reading.
> >>
> >> Anh Tuan
> >>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



Re: Fw: [HELP] How to restrict access to certain mapping action ???

2005-05-19 Thread Catalin Croitoru
Steve, 

the solution you provide doesn't solve the problem with typing the
link in the adress bar. user can copy from the html source of the page
the hidden atribute org.apache.struts.taglib.html.TOKEN and provide to
the adres with the value. somethig like this:
http://www.domain./user/action.do?org.apache.struts.taglib.html.TOKEN=b3011824c268c91cceb23606515b7887

from the point of view of the problem:
>the second is I mean that, I don't want User do my action by typing my
>action path directly on address bar

I know you can get the referer if I am not wrong or something like
this to provide the information from what domain user clik on a link.

On 5/19/05, Steve Bosman <[EMAIL PROTECTED]> wrote:
> > the second is I mean that, I don't want User do my action by typing my
> > action path directly on address bar, such as
> > http://www.myweb/user/useraction.do, but I allow User do my action by
> > clicking on certain link on webpage, such as  > page="/user/useraction.do">do
> >
> > any solution :(
> You could try using tokens, the relevant methods are in the Action
> class. From memory you need to use saveToken in the action that prior
> to your webpage with the link
> and isTokenValid in the receiving action to validate you have been
> given a valid token and resetToken to make sure it doesn't get used
> again.
> I know it gets included automatically when you use html:form and
> believe you can have it included when using html:link (by setting an
> attribute).
> 
> Steve
> 
> -
> 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: How to handle Dates?

2005-02-25 Thread Catalin Croitoru
I solved this problem with a format key in my application.properties:

application.date_format.short=dd.MM.
application.date_format.long=dd.MM. hh:mm:ss

and in presentation layer I use : bean:write. this tag has:  formatKey
or format as atributes.
in my case I use formatKey. if you would like to change the formating
just modify the format in your application.properties.

I hope will help this.


On Fri, 25 Feb 2005 10:45:26 -, Bob Arnott <[EMAIL PROTECTED]> wrote:
> Brian McGovern wrote:
> > Hi looking for input on how to approach dates across all
> > levels of my struts app.  Mainly what approach will allow
> > me to handle formatting on the presentation layer.
> >
> > Is there any tag lib available in struts to handle
> > formatting of a date type object ?
> 
> I wrote my own tag to format dates before I came across the Jakarta
> Taglibs. You could try the Date/Time taglib if you don't want to use
> JSTL.
> 
> http://jakarta.apache.org/taglibs/doc/datetime-doc/intro.html
> 
> Cheers,
> 
> --
> Bob Arnott
> 
> 
> -
> 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: Carriage Returns in MessageResources.properties

2004-12-16 Thread Catalin Croitoru
Hi,

try tu put in your application.properties for CARRIAGE RETURN (CR) and
NEW LINE (NL) the unicode value:
CR: \u000D
NL: \u000A

in my application.properties this is work for special characters

Catta


On Thu, 16 Dec 2004 13:49:10 +0800, Richard Reyes
<[EMAIL PROTECTED]> wrote:
> Hello Guys,
> 
> How can I include a carriage return inside a properties file. I tried
> \r\n and it show as \r\n on the
> emails being sent.
> 
> Thanks
> Richard
> 
> -
> 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]