web.xml

2017-09-06 Thread Andreas Ernst

Hi,

can we change in the Maven repo for quickstart the web.xml to:

http://java.sun.com/xml/ns/javaee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";

 version="3.0">

Regards
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Tapestry ignoring filter in web.xml

2012-02-22 Thread George Christman
Resolved, needed to use /* rather than
app

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-ignoring-filter-in-web-xml-tp5505535p5505715.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Tapestry ignoring filter in web.xml

2012-02-22 Thread George Christman
Hello, I've added a couple filters to my web.xml and they don't seem to be
invoked. Any ideas?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-ignoring-filter-in-web-xml-tp5505535p5505535.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: How to use context-param or init-param from web.xml in contributeApplicationDefaults?

2011-06-18 Thread Nillehammer

Hi Martin,

sorry for late reply. I was busy the last two days. I have tried the 
solution you suggested and indeed it just works. That was realy easy! 
Not having found the solution myself after digging into the sources, I 
have to admit that I'm feeling a bit stupid now.


Thanks a lot, for your solution (and for making me feel stupid),
nillehammer

Am 17.06.2011 01:41, schrieb Martin Strand:
ApplicationDefaults is only one of many SymbolProviders, you don't 
need to configure that specific SymbolProvider to set the supported 
locales.
There are other options, including support for .properties files or 
system properties.



I prefer context parameters myself, everything should "just work" if 
you add it to web.xml like so:



tapestry.supported-locales
en,de


The ServletContextSymbolProvider will handle the rest for you.
I'm sure you're already doing this for other symbols, at least 
"tapestry.app-package" :)



On Fri, 17 Jun 2011 00:28:17 +0200, Nillehammer 
 wrote:



Hi List,

I would like to replace the constant Strings in the method 
"contributeApplicationDefaults" in my AppModule. E.g. replace the 
following line:


configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,de"); // 
don't like the "en,de" here. Would like to replace it.


with something configurable in  a text file. I thought providing the 
values in web.xml either as context-param or as init-param for the 
TapestryFilter was a good idea.


My first try was to inject the Context service as additional 
parameter to the contribution method to get access to the 
context-params. That did not work. The parameter is null and Tapestry 
throws an exception. Same with ApplicationGlobals.


I then browsed through Tapestry's source code and found out that I 
could implement my own filter inheriting from 
org.apache.tapestry5.TapestryFilter. So my next try was to do that 
and override the method "protected void init(Registry registry )". My 
hope was to be able to do something sensible with the 
javax.servlet.FilterConfig that is returned by getFilter(). But I 
have no clue, what to do.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org





--
http://www.winfonet.eu


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: How to use context-param or init-param from web.xml in contributeApplicationDefaults?

2011-06-16 Thread Martin Strand
ApplicationDefaults is only one of many SymbolProviders, you don't need to  
configure that specific SymbolProvider to set the supported locales.
There are other options, including support for .properties files or system  
properties.



I prefer context parameters myself, everything should "just work" if you  
add it to web.xml like so:



  tapestry.supported-locales
  en,de


The ServletContextSymbolProvider will handle the rest for you.
I'm sure you're already doing this for other symbols, at least  
"tapestry.app-package" :)



On Fri, 17 Jun 2011 00:28:17 +0200, Nillehammer  
 wrote:



Hi List,

I would like to replace the constant Strings in the method  
"contributeApplicationDefaults" in my AppModule. E.g. replace the  
following line:


configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,de"); // don't  
like the "en,de" here. Would like to replace it.


with something configurable in  a text file. I thought providing the  
values in web.xml either as context-param or as init-param for the  
TapestryFilter was a good idea.


My first try was to inject the Context service as additional parameter  
to the contribution method to get access to the context-params. That did  
not work. The parameter is null and Tapestry throws an exception. Same  
with ApplicationGlobals.


I then browsed through Tapestry's source code and found out that I could  
implement my own filter inheriting from  
org.apache.tapestry5.TapestryFilter. So my next try was to do that and  
override the method "protected void init(Registry registry )". My hope  
was to be able to do something sensible with the  
javax.servlet.FilterConfig that is returned by getFilter(). But I have  
no clue, what to do.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: How to use context-param or init-param from web.xml in contributeApplicationDefaults?

2011-06-16 Thread Nillehammer
Yeah, a possible way to go. But I'd like a more "persistent" solution 
hence the idea of using params in web.xml


Am 17.06.2011 00:36, schrieb Lenny Primak:

I use system properties.



On Jun 16, 2011, at 6:28 PM, Nillehammer  
wrote:


Hi List,

I would like to replace the constant Strings in the method 
"contributeApplicationDefaults" in my AppModule. E.g. replace the following 
line:

configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,de"); // don't like the 
"en,de" here. Would like to replace it.

with something configurable in  a text file. I thought providing the values in 
web.xml either as context-param or as init-param for the TapestryFilter was a 
good idea.

My first try was to inject the Context service as additional parameter to the 
contribution method to get access to the context-params. That did not work. The 
parameter is null and Tapestry throws an exception. Same with 
ApplicationGlobals.

I then browsed through Tapestry's source code and found out that I could implement my own 
filter inheriting from org.apache.tapestry5.TapestryFilter. So my next try was to do that 
and override the method "protected void init(Registry registry )". My hope was 
to be able to do something sensible with the javax.servlet.FilterConfig that is returned 
by getFilter(). But I have no clue, what to do.

Does someone have an idea what to do?

Thanks in advance,
nillehammer

--
http://www.winfonet.eu


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org





--
http://www.winfonet.eu


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: How to use context-param or init-param from web.xml in contributeApplicationDefaults?

2011-06-16 Thread Lenny Primak
I use system properties. 



On Jun 16, 2011, at 6:28 PM, Nillehammer  
wrote:

> Hi List,
> 
> I would like to replace the constant Strings in the method 
> "contributeApplicationDefaults" in my AppModule. E.g. replace the following 
> line:
> 
> configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,de"); // don't like 
> the "en,de" here. Would like to replace it.
> 
> with something configurable in  a text file. I thought providing the values 
> in web.xml either as context-param or as init-param for the TapestryFilter 
> was a good idea.
> 
> My first try was to inject the Context service as additional parameter to the 
> contribution method to get access to the context-params. That did not work. 
> The parameter is null and Tapestry throws an exception. Same with 
> ApplicationGlobals.
> 
> I then browsed through Tapestry's source code and found out that I could 
> implement my own filter inheriting from org.apache.tapestry5.TapestryFilter. 
> So my next try was to do that and override the method "protected void 
> init(Registry registry )". My hope was to be able to do something sensible 
> with the javax.servlet.FilterConfig that is returned by getFilter(). But I 
> have no clue, what to do.
> 
> Does someone have an idea what to do?
> 
> Thanks in advance,
> nillehammer
> 
> -- 
> http://www.winfonet.eu
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5: How to use context-param or init-param from web.xml in contributeApplicationDefaults?

2011-06-16 Thread Nillehammer

Hi List,

I would like to replace the constant Strings in the method 
"contributeApplicationDefaults" in my AppModule. E.g. replace the 
following line:


configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,de"); // don't 
like the "en,de" here. Would like to replace it.


with something configurable in  a text file. I thought providing the 
values in web.xml either as context-param or as init-param for the 
TapestryFilter was a good idea.


My first try was to inject the Context service as additional parameter 
to the contribution method to get access to the context-params. That did 
not work. The parameter is null and Tapestry throws an exception. Same 
with ApplicationGlobals.


I then browsed through Tapestry's source code and found out that I could 
implement my own filter inheriting from 
org.apache.tapestry5.TapestryFilter. So my next try was to do that and 
override the method "protected void init(Registry registry )". My hope 
was to be able to do something sensible with the 
javax.servlet.FilterConfig that is returned by getFilter(). But I have 
no clue, what to do.


Does someone have an idea what to do?

Thanks in advance,
nillehammer

--
http://www.winfonet.eu


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Reading properties from web.xml in Tapestry5 templates

2010-05-05 Thread Mark Allan
Thanks everyone.  I guess the preferred approach is to write a service  
to provide various constants like this.


All my pages extend a very basic Page.java so I can just import the  
service into that and create accessors as necessary - that should be  
the most efficient way to do what I want.


Cheers
Mark

On 5 May 2010, at 1:10 pm, Inge Solvoll wrote:


I guess you could also contribute these strings to be accessible by
SymbolSource? This way you can easily inject single values into the
page/component class like this:

@Property
@Inject
@Symbol("streamServerLocation")
private String streamServerLocation;

On Wed, May 5, 2010 at 2:00 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:


On Wed, 05 May 2010 07:27:25 -0300, Mark Allan 
wrote:

Hi All,




Hi!


I've tried a number of variations on the following, but nothing  
works:

  ${message:comp/env/StreamServerLocation}



As Inge said, the Tapestry philosophy is to implement logic in  
classes, not

in templates. You can implement what you want this way:

Page or component class:
public String getStreamServerLocation() {
  return (String)((new
InitialContext()).lookup("java:comp/env/StreamServerLocation"))
}

In your template:

${streamServerLocation}

Better yet, follow Inge's advice and put this logic in a server, so  
it can

be reused all over your application.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant,  
developer,

and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org





--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Reading properties from web.xml in Tapestry5 templates

2010-05-05 Thread Inge Solvoll
I guess you could also contribute these strings to be accessible by
SymbolSource? This way you can easily inject single values into the
page/component class like this:

@Property
@Inject
@Symbol("streamServerLocation")
private String streamServerLocation;

On Wed, May 5, 2010 at 2:00 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Wed, 05 May 2010 07:27:25 -0300, Mark Allan 
> wrote:
>
>  Hi All,
>>
>
> Hi!
>
>
>  I've tried a number of variations on the following, but nothing works:
>>${message:comp/env/StreamServerLocation}
>>
>
> As Inge said, the Tapestry philosophy is to implement logic in classes, not
> in templates. You can implement what you want this way:
>
> Page or component class:
> public String getStreamServerLocation() {
>return (String)((new
> InitialContext()).lookup("java:comp/env/StreamServerLocation"))
> }
>
> In your template:
>
> ${streamServerLocation}
>
> Better yet, follow Inge's advice and put this logic in a server, so it can
> be reused all over your application.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Reading properties from web.xml in Tapestry5 templates

2010-05-05 Thread Thiago H. de Paula Figueiredo

On Wed, 05 May 2010 07:27:25 -0300, Mark Allan  wrote:


Hi All,


Hi!


I've tried a number of variations on the following, but nothing works:
${message:comp/env/StreamServerLocation}


As Inge said, the Tapestry philosophy is to implement logic in classes,  
not in templates. You can implement what you want this way:


Page or component class:
public String getStreamServerLocation() {
	return (String)((new  
InitialContext()).lookup("java:comp/env/StreamServerLocation"))

}

In your template:

${streamServerLocation}

Better yet, follow Inge's advice and put this logic in a server, so it can  
be reused all over your application.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Reading properties from web.xml in Tapestry5 templates

2010-05-05 Thread Inge Solvoll
I don't think so. T5 is all about avoiding logic in the templates.

I would recommend creating a service that accesses those properties, if
you're copying the logic around.

On Wed, May 5, 2010 at 12:27 PM, Mark Allan  wrote:

> Hi All,
>
> I've tried searching in vain for an answer to this, so have included my
> search terms throughout this email in case anyone is stuck on the same issue
> in the future - if it looks like I'm using various terms to refer to the
> same thing, that's why!
>
> I've got a T5 app which is almost ready to go live, so I've split it into
> two versions - service and development.  The service version runs under
> Tomcat and the development version runs under Jetty (via mvn jetty:run).
>
> Some URLs and port numbers differ between the service and development
> version, so I have some environment properties defined in WEB-INF/web.xml
> for the service version and WEB-INF/jetty-env.xml for development.  I can
> access those settings within my java files using eg:
>String audioLocation = (String)((new
> InitialContext()).lookup("java:comp/env/StreamServerLocation"));
>
> This works fine and means I don't need to change anything when moving my
> development version into service - I just commit to subversion and then
> 'update' the service directory, compile, package and deploy.  Nice and
> simple.
>
> What I'd like to do now, however, is have a way to access other constants
> in those XML files directly from the Tapestry template TML files without
> having to create properties and accessors in Java.
>
> I've tried a number of variations on the following, but nothing works:
>${message:comp/env/StreamServerLocation}
>
> Is there any way to do this?
>
> Thanks
> Mark
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Reading properties from web.xml in Tapestry5 templates

2010-05-05 Thread Mark Allan

Hi All,

I've tried searching in vain for an answer to this, so have included  
my search terms throughout this email in case anyone is stuck on the  
same issue in the future - if it looks like I'm using various terms to  
refer to the same thing, that's why!


I've got a T5 app which is almost ready to go live, so I've split it  
into two versions - service and development.  The service version runs  
under Tomcat and the development version runs under Jetty (via mvn  
jetty:run).


Some URLs and port numbers differ between the service and development  
version, so I have some environment properties defined in WEB-INF/ 
web.xml for the service version and WEB-INF/jetty-env.xml for  
development.  I can access those settings within my java files using eg:
	String audioLocation = (String)((new  
InitialContext()).lookup("java:comp/env/StreamServerLocation"));


This works fine and means I don't need to change anything when moving  
my development version into service - I just commit to subversion and  
then 'update' the service directory, compile, package and deploy.   
Nice and simple.


What I'd like to do now, however, is have a way to access other  
constants in those XML files directly from the Tapestry template TML  
files without having to create properties and accessors in Java.


I've tried a number of variations on the following, but nothing works:
${message:comp/env/StreamServerLocation}

Is there any way to do this?

Thanks
Mark

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: using web.xml in a PageTester

2009-12-19 Thread Pierre DEVREUX

Nobody knows ?


-- 
View this message in context: 
http://old.nabble.com/using-web.xml-in-a-PageTester-tp26841451p26855985.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



using web.xml in a PageTester

2009-12-18 Thread Pierre DEVREUX

Hi, 

I define a filter in web.xml with is executed before Tapestry filter.
Is it possible to use a such web.xml with PageTester.

PageTester constructor takes context path in parameter, but it seems not to
take into account web.xml file.

How can I manage this ?

Thanks.



-- 
View this message in context: 
http://old.nabble.com/using-web.xml-in-a-PageTester-tp26841451p26841451.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5: Contributing to web.xml and web app context from module

2008-08-29 Thread Alex Kotchnev
In Grails a plugin has the ability to contribute something into the spring
context, as well as the web.xml and the web application context. This allows
plugins to be very independent in adding needed functionality. For example,
when a plugin is installed into Grails, it can add a number of controllers
that can handle requests (e.g. in the case of acegi, login & logout links,
login & logout pages, etc) and can add content to the application's web.xml
(e.g. to add an extra filters, etc).

Now, it's pretty clear that T5 modules can contribute services, add stuff to
the configuration, etc. I was looking at the tapestry-spring plugin and I
noticed that it still requires some manual configuration (e.g. adding a
spring filter), which makes me think that contributing content to the
web.xml is not possible.

I was wondering, is there a reason not to support something like this in T5?
If something like this could be supported, which part of T5 should be
tweaked to support that ?

Any tips and thoughts would be highly appreciated.

Cheers,

Alex Kotchnev


Re: T5 customization with web.xml

2008-02-27 Thread Davor Hrg
you can override
protected ModuleDef[] provideExtraModuleDefs(ServletContext context)
{
return new ModuleDef[0];
}

it will definitely get called before registry is constructed

Davor hrg

On Wed, Feb 27, 2008 at 5:56 PM, Moritz Gmelin <[EMAIL PROTECTED]> wrote:
> Thanks for that hint,
>
>  since the init method of the Filter (or its subclasses) is only called
>  after the binding of the AppModule is done, I can still not get to
>  those properties.
>  But I could write a "delegate" filter that internally initializes a
>  TapestryFilter after reading the parameters and saving them as System
>  parameters.
>
>  M.
>
>  Am 27.02.2008 um 10:30 schrieb Davor Hrg:
>
>
>
>  > you could extend TapestryFilter,
>  > and copy properties from web.xml into system properties,
>  > and use system properties in your module
>  >
>  > On Wed, Feb 27, 2008 at 9:41 AM, Moritz Gmelin
>  > <[EMAIL PROTECTED]> wrote:
>  >> Hi,
>  >>
>  >> I'd like to customize my AppModule.binding() method based on
>  >> parameters I write in the web.xml file. Therefore I'd need to access
>  >> the ServletContext or tapestrys SymbolProvider in the bind() method
>  >> of
>  >> my AppModule service.
>  >> This is because I'd like to distribute different applications with
>  >> the
>  >> same AppModule class and just change the configuration based on the
>  >> web.xml file that I package.
>  >>
>  >> Thanks
>  >>
>  >> Moritz
>  >>
>  >> -
>  >> 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: T5 customization with web.xml

2008-02-27 Thread Moritz Gmelin

Thanks for that hint,

since the init method of the Filter (or its subclasses) is only called  
after the binding of the AppModule is done, I can still not get to  
those properties.
But I could write a "delegate" filter that internally initializes a  
TapestryFilter after reading the parameters and saving them as System  
parameters.


M.

Am 27.02.2008 um 10:30 schrieb Davor Hrg:


you could extend TapestryFilter,
and copy properties from web.xml into system properties,
and use system properties in your module

On Wed, Feb 27, 2008 at 9:41 AM, Moritz Gmelin  
<[EMAIL PROTECTED]> wrote:

Hi,

I'd like to customize my AppModule.binding() method based on
parameters I write in the web.xml file. Therefore I'd need to access
the ServletContext or tapestrys SymbolProvider in the bind() method  
of

my AppModule service.
This is because I'd like to distribute different applications with  
the

same AppModule class and just change the configuration based on the
web.xml file that I package.

Thanks

Moritz

-
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: T5 customization with web.xml

2008-02-27 Thread Davor Hrg
you could extend TapestryFilter,
and copy properties from web.xml into system properties,
and use system properties in your module

On Wed, Feb 27, 2008 at 9:41 AM, Moritz Gmelin <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I'd like to customize my AppModule.binding() method based on
>  parameters I write in the web.xml file. Therefore I'd need to access
>  the ServletContext or tapestrys SymbolProvider in the bind() method of
>  my AppModule service.
>  This is because I'd like to distribute different applications with the
>  same AppModule class and just change the configuration based on the
>  web.xml file that I package.
>
>  Thanks
>
>  Moritz
>
>  -
>  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]



T5 customization with web.xml

2008-02-27 Thread Moritz Gmelin

Hi,

I'd like to customize my AppModule.binding() method based on  
parameters I write in the web.xml file. Therefore I'd need to access  
the ServletContext or tapestrys SymbolProvider in the bind() method of  
my AppModule service.
This is because I'd like to distribute different applications with the  
same AppModule class and just change the configuration based on the  
web.xml file that I package.


Thanks

Moritz

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



Re: T5: problem in web.xml

2007-12-04 Thread Chris Lewis
Post a link to the JIRA if you create one. I think it's a good idea to 
allow the container to handle requests not handled by T5, but should be 
configurable and probably NOT the default. Perhaps web.xml would be the 
appropriate place to toggle this behavior.


Ritesh.S wrote:

Hello Davor,

Thanks for your help. I will try to implement the custom filter you
suggested. 


Also I will post a JIRA if necessary.

Thanks once again...

From,
Ritesh S.



Davor Hrg wrote:
  

this is just a workaround,

you should post a JIRA about this problem,
there's been some talk about tapestry letting container deal with paths
that tapestry can not resolve ... so this may be fixed in current trunk...


here's something that might work, and
save you headaches before an official solution

add this to your pom

   
  javax.servlet
  servlet-api
  2.4
  provided
    


change web.xml

  mypackage.CustomFilter
  


make this simple class that delegates most requests to tapestry filters


package mypackage;

import java.io.IOException;
import java.util.Enumeration;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

import org.apache.tapestry.TapestryFilter;

public class CustomFilter implements Filter{
TapestryFilter _delegate=new TapestryFilter();

public void destroy() {
_delegate.destroy();
}

public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) request;
String uri = req.getRequestURI();
String contextPath = req.getContextPath();
//dont know if this is needed
//if(uri.startsWith(contextPath))
uri = uri.substring(contextPath.length());
if(uri.startsWith("/myignorepath")) chain.doFilter(request,
response);
else
_delegate.doFilter(request, response, chain);
}

public void init(FilterConfig filterConfig) throws ServletException {
_delegate.init(filterConfig);
}

}

modify the doFilter method to skip problematic paths



Davor Hrg





  




Re: T5: problem in web.xml

2007-12-04 Thread Ritesh.S

Hello Davor,

Thanks for your help. I will try to implement the custom filter you
suggested. 

Also I will post a JIRA if necessary.

Thanks once again...

From,
Ritesh S.



Davor Hrg wrote:
> 
> this is just a workaround,
> 
> you should post a JIRA about this problem,
> there's been some talk about tapestry letting container deal with paths
> that tapestry can not resolve ... so this may be fixed in current trunk...
> 
> 
> here's something that might work, and
> save you headaches before an official solution
> 
> add this to your pom
> 
>
>   javax.servlet
>   servlet-api
>       2.4
>   provided
> 
> 
> 
> change web.xml
> 
>   mypackage.CustomFilter
>   
> 
> 
> make this simple class that delegates most requests to tapestry filters
> 
> 
> package mypackage;
> 
> import java.io.IOException;
> import java.util.Enumeration;
> 
> import javax.servlet.Filter;
> import javax.servlet.FilterChain;
> import javax.servlet.FilterConfig;
> import javax.servlet.ServletException;
> import javax.servlet.ServletRequest;
> import javax.servlet.ServletResponse;
> import javax.servlet.http.HttpServletRequest;
> 
> import org.apache.tapestry.TapestryFilter;
> 
> public class CustomFilter implements Filter{
> TapestryFilter _delegate=new TapestryFilter();
> 
> public void destroy() {
> _delegate.destroy();
> }
> 
> public void doFilter(ServletRequest request, ServletResponse response,
> FilterChain chain) throws IOException, ServletException {
> HttpServletRequest req = (HttpServletRequest) request;
> String uri = req.getRequestURI();
> String contextPath = req.getContextPath();
> //dont know if this is needed
> //if(uri.startsWith(contextPath))
> uri = uri.substring(contextPath.length());
> if(uri.startsWith("/myignorepath")) chain.doFilter(request,
> response);
> else
> _delegate.doFilter(request, response, chain);
> }
> 
> public void init(FilterConfig filterConfig) throws ServletException {
> _delegate.init(filterConfig);
> }
> 
> }
> 
> modify the doFilter method to skip problematic paths
> 
> 
> 
> Davor Hrg
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-%3Curl-pattern%3E-problem-in-web.xml-tf4942242.html#a14150834
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: problem in web.xml

2007-12-04 Thread Davor Hrg
this is just a workaround,

you should post a JIRA about this problem,
there's been some talk about tapestry letting container deal with paths
that tapestry can not resolve ... so this may be fixed in current trunk...


here's something that might work, and
save you headaches before an official solution

add this to your pom

   
  javax.servlet
  servlet-api
  2.4
  provided



change web.xml

  mypackage.CustomFilter
  


make this simple class that delegates most requests to tapestry filters


package mypackage;

import java.io.IOException;
import java.util.Enumeration;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

import org.apache.tapestry.TapestryFilter;

public class CustomFilter implements Filter{
TapestryFilter _delegate=new TapestryFilter();

public void destroy() {
_delegate.destroy();
}

public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) request;
String uri = req.getRequestURI();
String contextPath = req.getContextPath();
//dont know if this is needed
//if(uri.startsWith(contextPath))
uri = uri.substring(contextPath.length());
if(uri.startsWith("/myignorepath")) chain.doFilter(request,
response);
else
_delegate.doFilter(request, response, chain);
}

public void init(FilterConfig filterConfig) throws ServletException {
_delegate.init(filterConfig);
}

}

modify the doFilter method to skip problematic paths



Davor Hrg

On Dec 4, 2007 12:44 PM, Ritesh.S <[EMAIL PROTECTED]> wrote:

>
>
> Hello Davor,
> Thanks for your reply. I am giving stack trace below and problematic url.
>
> Following is the stack trace I get when I try to upload a file through the
> servlet
> which produces the .htm file and shows in url.
>
> This occures when use /*
>
> An unexpected application exception has occurred.
>
>* java.lang.IllegalArgumentException
>  Unable to resolve page 'document/DocumentUpload' to a known page
> name.
> Available page names: core/ExceptionReport, core/PropertyDisplayBlocks,
> core/PropertyEditBlocks, resource/AssignmentSummary, resource/Business,
> resource/Dashboard, resource/GenericSelectModel,
> resource/ManageResourcesList, resource/Personal, resource/Projects,
> resource/Remaining, resource/Select, resource/SelectResource_V8_5,
> resource/TaskAssignmentDetail, resource/ViewDetails,
> resource/ViewDetails_V8_5, resource/ViewSummary.
>
>  Stack trace
>  o
> org.apache.tapestry.internal.services.ComponentClassResolverImpl$8.invoke(
> ComponentClassResolverImpl.java:393)
>  o
> org.apache.tapestry.internal.services.ComponentClassResolverImpl$8.invoke(
> ComponentClassResolverImpl.java:388)
>  o
> org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(
> ConcurrentBarrier.java:77)
>  o
>
> org.apache.tapestry.internal.services.ComponentClassResolverImpl.canonicalizePageName
> (ComponentClassResolverImpl.java:386)
>  o
> org.apache.tapestry.internal.services.PagePoolImpl.checkout(
> PagePoolImpl.java:59)
>  o
> org.apache.tapestry.internal.services.RequestPageCacheImpl.get(
> RequestPageCacheImpl.java:44)
>  o
>
> org.apache.tapestry.internal.services.RequestEncodingInitializerImpl.initializeRequestEncoding
> (RequestEncodingInitializerImpl.java:42)
>  o
> org.apache.tapestry.internal.services.InternalModule$11.handle(
> InternalModule.java:539)
>  o
> org.apache.tapestry.internal.services.ComponentActionDispatcher.dispatch(
> ComponentActionDispatcher.java:116)
>  o
> org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java
> :1066)
>  o
> org.apache.tapestry.internal.services.LocalizationFilter.service(
> LocalizationFilter.java:43)
>  o
> org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java
> :657)
>  o
> org.apache.tapestry.internal.services.StaticFilesFilter.service(
> StaticFilesFilter.java:63)
>  o
> org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(
> CheckForUpdatesFilter.java:97)
>  o
> org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(
> CheckForUpdatesFilter.java:88)
>  o
> org.apache.tapestry.ioc.internal

Re: T5: problem in web.xml

2007-12-04 Thread Ritesh.S
now why it gets activated in this situation.

If anyone can tell why this is happening it will be very helpful to me. :>

Thanks in advance.. :)

Davor Hrg wrote:
> 
> could you post stack trace,
> and problematic url ?
> 
> Davor Hrg
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-%3Curl-pattern%3E-problem-in-web.xml-tf4942242.html#a14149099
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: problem in web.xml

2007-12-04 Thread Davor Hrg
could you post stack trace,
and problematic url ?

Davor Hrg

On Dec 4, 2007 11:18 AM, Ritesh.S <[EMAIL PROTECTED]> wrote:

>
> Hello everybody,
>
> I am new to tapestry and I am using Tapestry core 5.0.5.
> I integrated Tapestry 5 with spring and hibernate.
>
> I configured my application's web.xml as below -
>
> <-spring-app configuration is here->
>
> 
>
>tapestry.app-package
>com.myproject
>
>
> <- some other filters here ->
>
>
>tapestryFilter
>
> org.apache.tapestry.spring.TapestrySpringFilter
> 
>
>
>
>tapestryFilter
>/*
>
>
>
>
> org.springframework.web.context.ContextLoaderListener
> 
>
>
> <- hibernate listener->
>
> This works perfect with all Tapestry related pages.
> At certain operation in my application when a file is uploaded from jsp
> page
> by using
> servlet it generates output with .htm which fires a Tapestry Page not
> found
> exception.
> I doesn't understand why?
>
> I tried to change  to - /package/* , this solves my problem
> of
> uploading and
> all tapestry action requests are successfully handled but all Tapestry
> pages
> are displayed
> with   -  [Error] - like icons in front of every Tapestry component on
> that
> page.
> I doesn't understand why?
>
> Can anybody tell me why this is happening. I am trying solution for this
> from last 2-3 days.
> Any help is appreciated. :)
>
> Thanks in advance. ;)
>
> From,
> Ritesh S.
> --
> View this message in context:
> http://www.nabble.com/T5%3A-%3Curl-pattern%3E-problem-in-web.xml-tf4942242.html#a14147967
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


T5: problem in web.xml

2007-12-04 Thread Ritesh.S

Hello everybody,

I am new to tapestry and I am using Tapestry core 5.0.5.
I integrated Tapestry 5 with spring and hibernate.

I configured my application's web.xml as below -

<-spring-app configuration is here->



tapestry.app-package
com.myproject

   
<- some other filters here ->
   

tapestryFilter
   
org.apache.tapestry.spring.TapestrySpringFilter



tapestryFilter
/*



   
org.springframework.web.context.ContextLoaderListener


<- hibernate listener->

This works perfect with all Tapestry related pages.
At certain operation in my application when a file is uploaded from jsp page
by using
servlet it generates output with .htm which fires a Tapestry Page not found
exception.
I doesn't understand why?

I tried to change  to - /package/* , this solves my problem of
uploading and
all tapestry action requests are successfully handled but all Tapestry pages
are displayed
with   -  [Error] - like icons in front of every Tapestry component on that
page.
I doesn't understand why?

Can anybody tell me why this is happening. I am trying solution for this
from last 2-3 days.
Any help is appreciated. :)

Thanks in advance. ;)

From,
Ritesh S. 
-- 
View this message in context: 
http://www.nabble.com/T5%3A-%3Curl-pattern%3E-problem-in-web.xml-tf4942242.html#a14147967
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T5: Problem with in web.xml

2007-12-03 Thread Ritesh.S

Hello everybody,

I am new to tapestry and I am using Tapestry core 5.0.5.
I integrated Tapestry 5 with spring and hibernate.

I configured my application's web.xml as below -

<-spring-app configuration is here->


 
tapestry.app-package
com.myproject


<- some other filters here ->


tapestryFilter
   
org.apache.tapestry.spring.TapestrySpringFilter



tapestryFilter
/*
   



org.springframework.web.context.ContextLoaderListener


<- hibernate listener->

This works perfect with all Tapestry related pages.
At certain operation in my application when a file is uploaded from jsp page
by using
servlet it generates output with .htm which fires a Tapestry Page not found
exception.
I doesn't understand why? 

I tried to change  to - /package/* , this solves my problem of
uploading and
all tapestry action requests are successfully handled but all Tapestry pages
are displayed 
with   -  [Error] - like icons in front of every Tapestry component on that
page. 
I doesn't understand why? 

Can anybody tell me why this is happening. I am trying solution for this
from last 2-3 days.
Any help is appreciated. :)

Thanks in advance. ;)

From,
Ritesh S.

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Problem-with-%3Curl-pattern%3E-in-web.xml-tf4936246.html#a14129132
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



[T5] Configuring error pages in web.xml

2007-11-19 Thread Thiago H de Paula Figueiredo

Hi, everybody!

I'm trying to create a 404 page using Tapestry 5. So, in my web.xml, I have


404
/error/404


If I access the error page directly, everything runs fine. But, if I enter  
a wrong URL, the page hangs. I've put breakpoints in Error's  
onActivate(Object[] objects), but they're not hit.


Any clues? Do I need to use a static HTML file redirecting to my T5 error  
page?


Thanks in advance. :)

--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br

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



Re: a servlet with a tapestry servlet in one web.xml

2007-07-03 Thread Lutz Hühnken

Which servlet/filter handles which request is configured in web.xml.
Apparently, yours is set up in a way that a request which should go to
the WingS-Servlet is handled by the Tapestry filter, although it
shouldn't be.

Check the filter-mapping for the TapestryFilter, does it include
/application/  ? For your purpose, it shouldn't. If you can't resolve
it, you might want to post your web.xml, or the relevant sections of
it.

hth,

Lutz


On 7/3/07, Tina Umlandt <[EMAIL PROTECTED]> wrote:

Hello,

I have the following problem. I have a servlet which should be in the same 
context as the tapestry application but it is
built with a different framework named wings.

Wings is using another framework named dwr. dwr is sending request like "GET 
/application/dwr/engine.js".
Now I get the exception
"java.lang.IllegalArgumentException: Unable to resolve page 'dwr/engine' to a 
known page name. Available page names: ...
at 
org.apache.tapestry.internal.services.ComponentClassResolverImpl$8.invoke(ComponentClassResolverImpl.java:393)
at 
org.apache.tapestry.internal.services.ComponentClassResolverImpl$8.invoke(ComponentClassResolverImpl.java:388)
at 
org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
at
org.apache.tapestry.internal.services.ComponentClassResolverImpl.canonicalizePageName(ComponentClassResolverImpl.java:386)
..."

Is there a way to tell tapestry several request about which it should not care 
and just ignore?

Thx,
Tina


-
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]



a servlet with a tapestry servlet in one web.xml

2007-07-03 Thread Tina Umlandt

Hello,

I have the following problem. I have a servlet which should be in the same context as the tapestry application but it is 
built with a different framework named wings.


Wings is using another framework named dwr. dwr is sending request like "GET 
/application/dwr/engine.js".
Now I get the exception
"java.lang.IllegalArgumentException: Unable to resolve page 'dwr/engine' to a 
known page name. Available page names: ...
at 
org.apache.tapestry.internal.services.ComponentClassResolverImpl$8.invoke(ComponentClassResolverImpl.java:393)
at 
org.apache.tapestry.internal.services.ComponentClassResolverImpl$8.invoke(ComponentClassResolverImpl.java:388)
at 
org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
	at 
org.apache.tapestry.internal.services.ComponentClassResolverImpl.canonicalizePageName(ComponentClassResolverImpl.java:386)

..."

Is there a way to tell tapestry several request about which it should not care 
and just ignore?

Thx,
Tina


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



Re: T5: web.xml - multiple applications?

2007-06-07 Thread Howard Lewis Ship

That would take some doing, it's something I thought of and dismissed.
T4 supports it, and that's one of the reasons it's so complex to
discuss which files are stored where.  To me, this would be a
low-priority enhancement.

On 6/7/07, Bruce Petro <[EMAIL PROTECTED]> wrote:

I was thinking for development purposes it might be desirable to have
multiple contexts.

But I don't see how to tie a context-param (which determines which
classes handle the requests) to a filter definition (which specifies a
url pattern to handle)

I'm making a wild guess that in the sample "app" setup, perhaps it's the
app in the "tapestry.app-package" perhaps matches the app in the
filter-name.

Is that how they are paired up?  If so, then please confirm this is how
you would do this. If this isn't true - can someone specify how it's
done?



Thanks.





  

   

   tapestry.app1-package

   com.myapplication.catalog

  



  

   app1


org.apache.tapestry.TapestryFilter

  

  

app1

/catalog/*

  



  

   

   tapestry.app2-package

   com.myapplication.ordering

  

  

   app2


org.apache.tapestry.TapestryFilter

  

  

app2

/order/*

  









--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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



T5: web.xml - multiple applications?

2007-06-07 Thread Bruce Petro
I was thinking for development purposes it might be desirable to have
multiple contexts.

But I don't see how to tie a context-param (which determines which
classes handle the requests) to a filter definition (which specifies a
url pattern to handle)

I'm making a wild guess that in the sample "app" setup, perhaps it's the
app in the "tapestry.app-package" perhaps matches the app in the
filter-name.

Is that how they are paired up?  If so, then please confirm this is how
you would do this. If this isn't true - can someone specify how it's
done?

 

Thanks.

 



  

   

   tapestry.app1-package

   com.myapplication.catalog

  

 

  

   app1

 
org.apache.tapestry.TapestryFilter

  

  

app1

/catalog/*

   



  

   

   tapestry.app2-package

   com.myapplication.ordering

  

  

   app2

 
org.apache.tapestry.TapestryFilter

  

  

app2

/order/*

  



 



Problems with listener-configuration in web.xml for Spring-Integration

2006-06-16 Thread Claus Bogner
Hi,
 
I configured the web.xml of my tapestry application for integration with
struts like that:
 

http://java.sun.com/xml/ns/j2ee";
  xmlns:xsi="http://www.w3.org/TR/xmlschema-1/";
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
version="2.4">
 crm
 
 contextConfigLocation
  /WEB-INF/applicationContext*.xml
 
 
 
org.springframework.web.context.ContextLoaderListener
 
 
  crm
  org.apache.tapestry.ApplicationServlet
  1
 
 
  crm
  /app
 

 
The spring integration in my application works fine. But I have other
applications installed in my Tomcat (for example a simple
HelloWorld-Application) that does NOT use any Spring context. All
applications without a Spring integration cause an exception during startup
of Tomcat when I modify the web.xml with the -part as described
above: 



4345 [main] INFO org.apache.catalina.core.StandardHostDeployer - Processing
Co 
ntext configuration file URL
file:D:\ACRM\tools\Tomcat\conf\Catalina\localhost\H 
elloWorld.xml 

** 
org.apache.hivemind.ApplicationRuntimeException: Could not locate the Spring
app 
lication context. Most likely, you did not initialize a
ContextLoaderListener in 
side your web.xml deployment descriptor. 




Does anyone know why the entry in the web.xml-file of my
Tapestry/Spring-application has an implication for the other application?
How can I avoid that? 


Thanks, 
Claus 
 
 
 
 

Claus Bogner - Dipl.Inf. (FH), M.Sc. (Univ.)
Projektmanagement Touristik

ISO Software Systeme
Eichendorffstr. 29
90491 Nürnberg
Deutschland

Tel. : +49 / 911 - 99594-0
Fax : +49 / 911 - 99594-129

mailto:[EMAIL PROTECTED]
http://www.isogmbh.de <http://www.isogmbh.de/> 






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