upgrading Eclipse problem with tiles

2008-11-06 Thread Gianluca Musella
Mmm... I've update my Eclipse to Web Tools Platform 3.4 to use with
TPTP 4.5 (the profiler) and my tiles.xml doen's work anymore.

22 errors:

The content of element type definition must match
(icon?,display-name?,description?,put*,putList*)

Any ideas?

Thancs
Gianluca

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



Re: upgrading Eclipse problem with tiles

2008-11-06 Thread Antonio
2008/11/6 Gianluca Musella [EMAIL PROTECTED]:
 Mmm... I've update my Eclipse to Web Tools Platform 3.4 to use with
 TPTP 4.5 (the profiler) and my tiles.xml doen's work anymore.

 22 errors:

 The content of element type definition must match
 (icon?,display-name?,description?,put*,putList*)

This is a DTD validation error. Probably your tiles.xml is not valid.

Antonio

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



jUnit Testing Problem with Tiles

2008-06-26 Thread ezgi
)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:130)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.DefaultActionProxy.execute(DefaultActionProxy.java:130)
at pack.HelloWorldTest.testHelloWorldAction(HelloWorldTest.java:38)
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:597)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:228)
at junit.framework.TestSuite.run(TestSuite.java:223)
at
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

If you look at the tutorial I refer, you can understand that I am not the
only one who have this problem. I try to set the configuration file to
tiles.defs.xml  as suggested, but it gave an XML parse exception. What can
be the solution;?

Thanks
jUnit newbie Ezgi :)

-- 
View this message in context: 
http://www.nabble.com/jUnit-Testing-Problem-with-Tiles-tp18131822p18131822.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread Antonio Petrelli
2008/6/26 ezgi [EMAIL PROTECTED]:
 If I include the tiles part in struts.xml, it gives a NullPointerException :

Did you add the StrutsTilesListener in your web.xml?
http://cwiki.apache.org/confluence/display/WW/Tiles+Plugin
Did you configure Tiles correctly?

Antonio

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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread Antonio Petrelli
2008/6/26 ezgi [EMAIL PROTECTED]:
 If you look at the tutorial I refer, you can understand that I am not the
 only one who have this problem. I try to set the configuration file to
 tiles.defs.xml  as suggested, but it gave an XML parse exception.

Can we see the Tiles definition files that you are using?

Antonio

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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread ezgi

This is the tiles.defs.xml :


?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE tiles-definitions PUBLIC
   -//Apache Software Foundation//DTD Tiles Configuration 2.0//EN
   http://tiles.apache.org/dtds/tiles-config_2_0.dtd;

tiles-definitions

definition name=tvq.template.default template=/layouts/default.jsp
put-attribute name=title value=Tiles tutorial homepage /
put-attribute name=header value=/tiles/header.jsp /
put-attribute name=menu value=/tiles/menu.jsp /
put-attribute name=content value=/tiles/content.jsp /
put-attribute name=footer value=/tiles/footer.jsp /
/definition

definition name=tvq.ListTasks extends=tvq.template.default
put-attribute name=title value=List Tasks /
put-attribute name=content value=/jsp/task/ListTasks.jsp /
/definition

definition name=tvq.addTask extends=tvq.template.default
put-attribute name=title value=Add a Task /
put-attribute name=content value=/jsp/task/addTask.jsp /
/definition

/tiles-definitions



and this is the web.xml :

?xml version=1.0 encoding=UTF-8?
web-app id=WebApp_ID version=2.4
xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
display-nameTVQ/display-name

filter
filter-namestruts2/filter-name
filter-class
org.apache.struts2.dispatcher.FilterDispatcher
/filter-class
/filter
!-- Add the filter mapping after all filters --
filter-mapping
filter-namestruts2/filter-name
url-pattern/*/url-pattern
/filter-mapping

listener
listener-class
org.springframework.web.context.ContextLoaderListener
/listener-class
/listener




listener
listener-class
org.apache.struts2.tiles.StrutsTilesListener
/listener-class
/listener

servlet
servlet-nametiles/servlet-name
servlet-class
org.apache.tiles.web.startup.TilesServlet
/servlet-class
init-param
param-name

org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
/param-name
param-value
/WEB-INF/tiles-defs.xml
/param-value
/init-param
load-on-startup2/load-on-startup
/servlet


filter
filter-nameTiles_Filter/filter-name
filter-class
org.apache.tiles.web.startup.TilesFilter
/filter-class
init-param
param-name

org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
/param-name
param-value
/WEB-INF/tiles-defs.xml
/param-value
/init-param
/filter

filter-mapping
filter-nameTiles_Filter/filter-name
url-pattern/*/url-pattern
dispatcherREQUEST/dispatcher
/filter-mapping


welcome-file-list
welcome-fileindex.html/welcome-file
welcome-fileindex.htm/welcome-file
welcome-fileindex.jsp/welcome-file
welcome-filedefault.html/welcome-file
welcome-filedefault.htm/welcome-file
welcome-filedefault.jsp/welcome-file
/welcome-file-list
/web-app


Antonio Petrelli-3 wrote:
 
 2008/6/26 ezgi [EMAIL PROTECTED]:
 If you look at the tutorial I refer, you can understand that I am not the
 only one who have this problem. I try to set the configuration file to
 tiles.defs.xml  as suggested, but it gave an XML parse exception.
 
 Can we see the Tiles definition files that you are using?
 
 Antonio
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/jUnit-Testing-Problem-with-Tiles-tp18131822p18132170.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread Antonio Petrelli
2008/6/26 ezgi [EMAIL PROTECTED]:

 This is the tiles.defs.xml :
listener
listener-class
org.apache.struts2.tiles.StrutsTilesListener
/listener-class
/listener

servlet
servlet-nametiles/servlet-name
servlet-class
org.apache.tiles.web.startup.TilesServlet
/servlet-class
init-param
param-name

 org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
/param-name
param-value
/WEB-INF/tiles-defs.xml
/param-value
/init-param
load-on-startup2/load-on-startup
/servlet


filter
filter-nameTiles_Filter/filter-name
filter-class
org.apache.tiles.web.startup.TilesFilter
/filter-class
init-param
param-name

 org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
/param-name
param-value
/WEB-INF/tiles-defs.xml
/param-value
/init-param
/filter

filter-mapping
filter-nameTiles_Filter/filter-name
url-pattern/*/url-pattern
dispatcherREQUEST/dispatcher
/filter-mapping

The problem is that you are using StrutsTilesListener (that loads
/WEB-INF/tiles.xml by default), TilesServlet and TilesFilter at the
same time.
Choose one and configure it. I suggest to use StrutsTilesListener
only. Configuring it means putting a context parameter. See:
http://tiles.apache.org/tutorial/configuration.html

Antonio

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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread ezgi

I tried three of them seperatley, but it did not work. Should I modify the
configuration variable in the BaseStrutsTestCase? I did not add there
web.xml and tiles-defs.xml.
As you suggested, I add this code into web.xml.

listener
listener-class
org.apache.tiles.web.startup.TilesListener
/listener-class
/listener

context-param
param-name

org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
/param-name
param-value

/WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml
/param-value
/context-param


Antonio Petrelli-3 wrote:
 
 2008/6/26 ezgi [EMAIL PROTECTED]:

 This is the tiles.defs.xml :
listener
listener-class
org.apache.struts2.tiles.StrutsTilesListener
/listener-class
/listener

servlet
servlet-nametiles/servlet-name
servlet-class
org.apache.tiles.web.startup.TilesServlet
/servlet-class
init-param
param-name
   
 org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
/param-name
param-value
/WEB-INF/tiles-defs.xml
/param-value
/init-param
load-on-startup2/load-on-startup
/servlet


filter
filter-nameTiles_Filter/filter-name
filter-class
org.apache.tiles.web.startup.TilesFilter
/filter-class
init-param
param-name
   
 org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
/param-name
param-value
/WEB-INF/tiles-defs.xml
/param-value
/init-param
/filter

filter-mapping
filter-nameTiles_Filter/filter-name
url-pattern/*/url-pattern
dispatcherREQUEST/dispatcher
/filter-mapping
 
 The problem is that you are using StrutsTilesListener (that loads
 /WEB-INF/tiles.xml by default), TilesServlet and TilesFilter at the
 same time.
 Choose one and configure it. I suggest to use StrutsTilesListener
 only. Configuring it means putting a context parameter. See:
 http://tiles.apache.org/tutorial/configuration.html
 
 Antonio
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/jUnit-Testing-Problem-with-Tiles-tp18131822p18132646.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread Dave Newton
--- On Thu, 6/26/08, Antonio Petrelli [EMAIL PROTECTED] wrote:
 The problem is that you are using StrutsTilesListener (that
 loads /WEB-INF/tiles.xml by default), TilesServlet and
 TilesFilter at the same time.

Two is one, one is none! Three is... three is right out.

You're just mad because of that whole Spain thing.

Dave


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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread Antonio Petrelli
2008/6/26 Dave Newton [EMAIL PROTECTED]:
 --- On Thu, 6/26/08, Antonio Petrelli [EMAIL PROTECTED] wrote:
 The problem is that you are using StrutsTilesListener (that
 loads /WEB-INF/tiles.xml by default), TilesServlet and
 TilesFilter at the same time.

 Two is one, one is none! Three is... three is right out.

 You're just mad because of that whole Spain thing.

Eh? I know I am supposed to laugh, but since I am Italian could you
explain it a little ;-)

Antonio

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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread Antonio Petrelli
2008/6/26 ezgi [EMAIL PROTECTED]:
 I tried three of them seperatley, but it did not work.

Please clarify, what do you mean with it did not work? Do you
receive an exception at startup?

 Should I modify the configuration variable in the BaseStrutsTestCase? I did 
 not add there
 web.xml and tiles-defs.xml.

Sincerely I am not into BaseStrutsTestCase, so I cannot help in this case

param-value

 /WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml
/param-value

Have you got a classpath-defs.xml anywhere in your code? If not, remove it.

Antonio

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



[OT] Re: jUnit Testing Problem with Tiles

2008-06-26 Thread Dave Newton
--- On Thu, 6/26/08, Antonio Petrelli [EMAIL PROTECTED] wrote:
 Eh? I know I am supposed to laugh, but since I am Italian
 could you explain it a little ;-)

Or cry; Spain whupped ya' 4-2.

Dave


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



[OT] Euro 2008 (WAS: Re: [OT] Re: jUnit Testing Problem with Tiles)

2008-06-26 Thread Antonio Petrelli
2008/6/26 Al Sutton [EMAIL PROTECTED]:
 At least they made it to the tournament :(

Ah now I got it. You know, I removed the tournament from my memory
after the penalty kicks :-D
I see the positive point though, Donadoni is going away and Lippi is
coming back.

Antonio

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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread ezgi

I have loaded the Tiles listener and run the jUnit test and it gave the same
NullPointer Exception. Moreover, the trace is same as before.
Then, I tried to load tiles servlet, and it gave the same error. Lastly, I
loaded the tiles filter and it gave ther same NPE. 
I have already tried three of them so I can't figure out what the problem
is. Did I load them wrongly?

I have just replaced the code with the new one, isn't it the one you
suggested? 

Modified web.xml:

?xml version=1.0 encoding=UTF-8?
web-app id=WebApp_ID version=2.4
xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
display-nameTVQ/display-name


filter
filter-namestruts2/filter-name
filter-class
org.apache.struts2.dispatcher.FilterDispatcher
/filter-class
/filter
!-- Add the filter mapping after all filters --
filter-mapping
filter-namestruts2/filter-name
url-pattern/*/url-pattern
/filter-mapping

listener
listener-class
org.springframework.web.context.ContextLoaderListener
/listener-class
/listener


listener
listener-class
org.apache.tiles.web.startup.TilesListener
/listener-class
/listener

context-param
param-name

org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
/param-name
param-value

/WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml
/param-value
/context-param

welcome-file-list
welcome-fileindex.html/welcome-file
welcome-fileindex.htm/welcome-file
welcome-fileindex.jsp/welcome-file
welcome-filedefault.html/welcome-file
welcome-filedefault.htm/welcome-file
welcome-filedefault.jsp/welcome-file
/welcome-file-list
/web-app


Antonio Petrelli-3 wrote:
 
 2008/6/26 ezgi [EMAIL PROTECTED]:
 I tried three of them seperatley, but it did not work.
 
 Please clarify, what do you mean with it did not work? Do you
 receive an exception at startup?
 
 Should I modify the configuration variable in the BaseStrutsTestCase? I
 did not add there
 web.xml and tiles-defs.xml.
 
 Sincerely I am not into BaseStrutsTestCase, so I cannot help in this case
 
param-value
   
 /WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml
/param-value
 
 Have you got a classpath-defs.xml anywhere in your code? If not, remove
 it.
 
 Antonio
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/jUnit-Testing-Problem-with-Tiles-tp18131822p18132968.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: [OT] Euro 2008 (WAS: Re: [OT] Re: jUnit Testing Problem with Tiles)

2008-06-26 Thread Antonio Petrelli
2008/6/26 Antonio Petrelli [EMAIL PROTECTED]:
 2008/6/26 Al Sutton [EMAIL PROTECTED]:
 At least they made it to the tournament :(

 Ah now I got it. You know, I removed the tournament from my memory
 after the penalty kicks :-D

Oh by the way, Al, I have to say one little secret.
We sent you Capello to kick you off the tournament :-D

Antonio

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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread Antonio Petrelli
2008/6/26 ezgi [EMAIL PROTECTED]:
 I have just replaced the code with the new one, isn't it the one you
 suggested?

Yes, but you had to adapt it to your needs.
By the way, do you still receive a parsing error, at startup?

Antonio

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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread ezgi

If I add the location of web.xml or any other thing to here  
private static final String CONFIG_LOCATIONS = file:src/struts.xml ;
I got a parsing error. I am not very experienced with tiles, I just test the
code in a big project. The problem is , if I do not include tiles, my unit
test works perfectly. If you did not look at the BaseStrutsTEstCase class,
it is a helper class to create an artificial environment for requests and
interceptors. May be my problem is related to the jUnit part, but why I
can't test with tiles?


Antonio Petrelli-3 wrote:
 
 2008/6/26 ezgi [EMAIL PROTECTED]:
 I have just replaced the code with the new one, isn't it the one you
 suggested?
 
 Yes, but you had to adapt it to your needs.
 By the way, do you still receive a parsing error, at startup?
 
 Antonio
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/jUnit-Testing-Problem-with-Tiles-tp18131822p18133212.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread Antonio Petrelli
2008/6/26 ezgi [EMAIL PROTECTED]:
 If I add the location of web.xml or any other thing to here
 private static final String CONFIG_LOCATIONS = file:src/struts.xml ;
 I got a parsing error. I am not very experienced with tiles, I just test the
 code in a big project. The problem is , if I do not include tiles, my unit
 test works perfectly. If you did not look at the BaseStrutsTEstCase class,
 it is a helper class to create an artificial environment for requests and
 interceptors. May be my problem is related to the jUnit part, but why I
 can't test with tiles?

Just one question: how are you configuring the artificial environment?

Antonio

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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread ezgi

In my action, I have a reference to Http request and it requires to access
the HttpServletRequest object, so I can not easily test the action with just
calling the execute method and comparing the result. So, I have found out a
solution from the link that I refere before, I did not write the
BaseStrutsTestCase, I modified the class. It creates mock objects and helps
to test my action outside of the server environment. It takes the advantage
of the  ActionProxy. All I did was to simulate some user input, and
remaining part is handled by this helper class.


Antonio Petrelli-3 wrote:
 
 2008/6/26 ezgi [EMAIL PROTECTED]:
 If I add the location of web.xml or any other thing to here
 private static final String CONFIG_LOCATIONS = file:src/struts.xml ;
 I got a parsing error. I am not very experienced with tiles, I just test
 the
 code in a big project. The problem is , if I do not include tiles, my
 unit
 test works perfectly. If you did not look at the BaseStrutsTEstCase
 class,
 it is a helper class to create an artificial environment for requests and
 interceptors. May be my problem is related to the jUnit part, but why I
 can't test with tiles?
 
 Just one question: how are you configuring the artificial environment?
 
 Antonio
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/jUnit-Testing-Problem-with-Tiles-tp18131822p18133546.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread Antonio Petrelli
2008/6/26 ezgi [EMAIL PROTECTED]:

 In my action, I have a reference to Http request and it requires to access
 the HttpServletRequest object, so I can not easily test the action with just
 calling the execute method and comparing the result. So, I have found out a
 solution from the link that I refere before, I did not write the
 BaseStrutsTestCase, I modified the class. It creates mock objects and helps
 to test my action outside of the server environment. It takes the advantage
 of the  ActionProxy. All I did was to simulate some user input, and
 remaining part is handled by this helper class.

And the initialization? I still cannot understand.

Antonio

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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread ezgi

This is the action class:
public class HelloWorldTest extends BaseStrutsTestCase {

HelloWorld  hello;
Map testSession;
@Before
public void setUp() throws Exception {
super.setUp();
   hello = createAction( HelloWorld.class, /,HelloWorld );
testSession = new HashMap();
testSession.put(username, admin);
testSession.put(password, sifre);

proxy.getInvocation().getInvocationContext().setParameters(testSession);

}

@Test
public void testHelloWorldAction() throws Exception {


assertTrue(SUCCESS.equals(proxy.execute())); 

}

If you look at the link, you can understand the problem. Whose
initialization is the one that you can't understand?

Antonio Petrelli-3 wrote:
 
 2008/6/26 ezgi [EMAIL PROTECTED]:

 In my action, I have a reference to Http request and it requires to
 access
 the HttpServletRequest object, so I can not easily test the action with
 just
 calling the execute method and comparing the result. So, I have found out
 a
 solution from the link that I refere before, I did not write the
 BaseStrutsTestCase, I modified the class. It creates mock objects and
 helps
 to test my action outside of the server environment. It takes the
 advantage
 of the  ActionProxy. All I did was to simulate some user input, and
 remaining part is handled by this helper class.
 
 And the initialization? I still cannot understand.
 
 Antonio
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/jUnit-Testing-Problem-with-Tiles-tp18131822p18133751.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread Antonio Petrelli
2008/6/26 ezgi [EMAIL PROTECTED]:
 If you look at the link, you can understand the problem. Whose
 initialization is the one that you can't understand?

I see, but I am sorry, without initialization Tiles won't work.

Antonio

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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread ezgi

How can I initialize tiles in this context? 

Antonio Petrelli-3 wrote:
 
 2008/6/26 ezgi [EMAIL PROTECTED]:
 If you look at the link, you can understand the problem. Whose
 initialization is the one that you can't understand?
 
 I see, but I am sorry, without initialization Tiles won't work.
 
 Antonio
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/jUnit-Testing-Problem-with-Tiles-tp18131822p18133946.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread Antonio Petrelli
2008/6/26 ezgi [EMAIL PROTECTED]:

 How can I initialize tiles in this context?

In some ways, you have to manage to put StrutsTilesListener, or at
least its code, but I don't really know how to do it.
I suggest to ask the BaseStrutsTestCase developers.

Antonio

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



Re: jUnit Testing Problem with Tiles

2008-06-26 Thread ezgi

Thank you very much, but they also seem not to find the solution.

Antonio Petrelli-3 wrote:
 
 2008/6/26 ezgi [EMAIL PROTECTED]:

 How can I initialize tiles in this context?
 
 In some ways, you have to manage to put StrutsTilesListener, or at
 least its code, but I don't really know how to do it.
 I suggest to ask the BaseStrutsTestCase developers.
 
 Antonio
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/jUnit-Testing-Problem-with-Tiles-tp18131822p18134225.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Problem with Tiles decoration and struts2

2007-11-07 Thread Amit Rana
I suppose that it is a Tiles issue.
I must admit that the code inside the TilesDecorationFilter does not
convince me... Amit, can you repost this question to the Tiles Users Mailing
list? I think that it is a Tiles bug.
http://tiles.apache.org/mail.html

Thanks
Antonio
Hi,
 Thanks, I have posted on Tiles list.

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



Re: Problem with Tiles decoration and struts2

2007-11-07 Thread Raghuveer Rawat
Amit,

looks like problem is with your struts.xml. You have set Tiles Result but
your result is jsp page. I think you need to change it to tile definition.

Try below...

struts.xml
struts
   package name=default extends=struts-default
   result-types
   result-typeclass=
org.apache.struts2.views.tiles.TilesResult
name=tiles
   /result-type
   /result-types
   action name=home class=com.tj.actions.HomeAction
   result *home*/result
   /action
   /package
/struts

tiles.xml
?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE tiles-definitions PUBLIC
  -//Apache Software Foundation//DTD Tiles Configuration 2.0//EN
  http://tiles.apache.org/dtds/tiles-config_2_0.dtd 

tiles-definitions
   definition name=blank template=/jsp/template/blankLayout.jsp
   put-attribute name=title value=my application /
   /definition

definition name=home extends=blank
   put-attribute name=title value=my application /
put-attribute name=body value=jsp/home.jsp /
   /definition

/tiles-definitions



On Nov 6, 2007 6:35 AM, Amit Rana [EMAIL PROTECTED] wrote:

 Hi,

  I am trying to get TilesDecorationFilter
 ( http://tiles.apache.org/tutorial/advanced/utils.html) to work with
 struts2.0.9 without any success. Can anyone please help me figure out
 where am I going wrong? I am not sure if this is a tiles list question
 or struts?

  Tiles is decorating jsps but not the out put from an action.

  If I access jsp/home.jsp it comes with the layout but home.action
 only prints layout and result of action is not seen anywhere. There
 are no errors. Kindly advice.

 web.xml
 web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns= http://java.sun.com/xml/ns/javaee;
xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd 
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
id=WebApp_ID version=2.5
display-nameMyApp/display-name

listener
listener-class
org.apache.struts2.tiles.StrutsTilesListener
/listener-class
/listener
filter
filter-namestruts2/filter-name
filter-class
org.apache.struts2.dispatcher.FilterDispatcher
/filter-class
/filter
filter
filter-nametilesdecoration/filter-name
filter-class
 org.apache.tiles.web.util.TilesDecorationFilter/filter-class
init-param
param-namedefinition/param-name
param-valueblank/param-value
/init-param
init-param
param-nameattribute-name/param-name
param-valuebody/param-value
/init-param
/filter
filter-mapping
filter-namestruts2/filter-name
url-pattern/*/url-pattern
/filter-mapping
filter-mapping
filter-nametilesdecoration/filter-name
url-pattern/*/url-pattern
/filter-mapping
welcome-file-list
welcome-filehome.action/welcome-file
/welcome-file-list
 /web-app

 struts.xml
 struts
package name=default extends=struts-default
result-types
result-typeclass=
 org.apache.struts2.views.tiles.TilesResult
 name=tiles
/result-type
/result-types
action name=home class= com.tj.actions.HomeAction
resultjsp/home.jsp/result
/action
/package
 /struts

 tiles.xml
 ?xml version= 1.0 encoding=ISO-8859-1 ?
 !DOCTYPE tiles-definitions PUBLIC
   -//Apache Software Foundation//DTD Tiles Configuration 2.0//EN
http://tiles.apache.org/dtds/tiles-config_2_0.dtd;

 tiles-definitions
definition name=blank template=/jsp/template/blankLayout.jsp
put-attribute name=title value=my application /
/definition
 /tiles-definitions

 blankLayout.jsp
 %@ taglib uri=http://tiles.apache.org/tags-tiles; prefix=tiles %
 html
head
titletiles:getAsString name=title//title
/head
body
tiles:insertAttribute name=body /
/body
 /html

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




Re: Problem with Tiles decoration and struts2

2007-11-07 Thread Amit Rana
-- Raghuveer Rawat wrote --
Amit,

looks like problem is with your struts.xml. You have set Tiles Result but
your result is jsp page. I think you need to change it to tile definition.

Hi,
 Thanks for the response. Thats not my problem. I do not need
TilesDecorationFilter for that. Tiles result type is already working.
I want to avoid creating definitions for every screen like you created
for home.

 I want result of the action to be automatically rendered without
having to create the screen definition.

Regards,
Amit.

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



Problem with Tiles decoration and struts2

2007-11-06 Thread Amit Rana
Hi,

 I am trying to get TilesDecorationFilter
(http://tiles.apache.org/tutorial/advanced/utils.html) to work with
struts2.0.9 without any success. Can anyone please help me figure out
where am I going wrong? I am not sure if this is a tiles list question
or struts?

 Tiles is decorating jsps but not the out put from an action.

 If I access jsp/home.jsp it comes with the layout but home.action
only prints layout and result of action is not seen anywhere. There
are no errors. Kindly advice.

web.xml
web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
id=WebApp_ID version=2.5
display-nameMyApp/display-name

listener
listener-class
org.apache.struts2.tiles.StrutsTilesListener
/listener-class
/listener
filter
filter-namestruts2/filter-name
filter-class
org.apache.struts2.dispatcher.FilterDispatcher
/filter-class
/filter
filter
filter-nametilesdecoration/filter-name

filter-classorg.apache.tiles.web.util.TilesDecorationFilter/filter-class
init-param
param-namedefinition/param-name
param-valueblank/param-value
/init-param
init-param
param-nameattribute-name/param-name
param-valuebody/param-value
/init-param
/filter
filter-mapping
filter-namestruts2/filter-name
url-pattern/*/url-pattern
/filter-mapping
filter-mapping
filter-nametilesdecoration/filter-name
url-pattern/*/url-pattern
/filter-mapping
welcome-file-list
welcome-filehome.action/welcome-file
/welcome-file-list
/web-app

struts.xml
struts
package name=default extends=struts-default
result-types
result-type
class=org.apache.struts2.views.tiles.TilesResult
name=tiles
/result-type
/result-types
action name=home class=com.tj.actions.HomeAction
resultjsp/home.jsp/result
/action
/package
/struts

tiles.xml
?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE tiles-definitions PUBLIC
   -//Apache Software Foundation//DTD Tiles Configuration 2.0//EN
   http://tiles.apache.org/dtds/tiles-config_2_0.dtd;

tiles-definitions
definition name=blank template=/jsp/template/blankLayout.jsp
put-attribute name=title value=my application /
/definition
/tiles-definitions

blankLayout.jsp
%@ taglib uri=http://tiles.apache.org/tags-tiles; prefix=tiles %
html
head
titletiles:getAsString name=title//title
/head
body
tiles:insertAttribute name=body /
/body
/html

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



Re: Problem with Tiles decoration and struts2

2007-11-06 Thread Antonio Petrelli
2007/11/6, Amit Rana [EMAIL PROTECTED]:

 I am trying to get TilesDecorationFilter
 (http://tiles.apache.org/tutorial/advanced/utils.html) to work with
 struts2.0.9 without any success. Can anyone please help me figure out
 where am I going wrong? I am not sure if this is a tiles list question
 or struts?

 Tiles is decorating jsps but not the out put from an action.

 If I access jsp/home.jsp it comes with the layout but home.action
 only prints layout and result of action is not seen anywhere. There
 are no errors. Kindly advice.


I suppose that it is a Tiles issue.
I must admit that the code inside the TilesDecorationFilter does not
convince me... Amit, can you repost this question to the Tiles Users Mailing
list? I think that it is a Tiles bug.
http://tiles.apache.org/mail.html

Thanks
Antonio


Re: Problem with Tiles decoration and struts2

2007-11-06 Thread Ghislain VANDERPOTTE
Hi,

by quickly looking at your struts.xml, it seems that the result type misses:


   action name=home class=com.tj.actions.HomeAction
   result type=tilesjsp/home.jsp/result
  ^
   /action

I think it should now work

Cheers

Ghislain

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



Re: Problem with Tiles decoration and struts2

2007-11-06 Thread Ghislain VANDERPOTTE
Oups, and I forgot the fact that the result has to be defined in the
tiles.xml file, it will not work by just adding the result type.

-- 
Ghislain

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



[s2] problem with Tiles in 2.0.5 Showcase App

2007-02-12 Thread Sébastien LABEY

Hi,

I can not make Tiles work with the 2.0.5, and I have the same problem with
the Showcase app bundled with this version. It is exactly the same log :

org.apache.jasper.JasperException: /common/layoutTemplate.jsp(8,9) Aucun
tag attribute dans la librairie de tag importée avec le préfixe tiles
(this means : No attribute tag in the library with tiles prefix).
In fact, there is no definition for the attribute tag in the
tiles-core.tld in tiles-core-2.0-20070130.184344-3.jar bundled with 2.0.5.
So how can I have the right tiles-core.tld?

Thanks in advance.

Sebastien


Re: Problem with Tiles an ActionForms

2007-01-02 Thread Laurie Harper
I don't know why setting validate=true would change how Tiles constructs 
the page, but a couple of observations which might help:


- your action mapping doesn't have an 'input' attribute defined to tell 
Struts what to display if validation fails


- your form bean extends ActionForm, not ValidatorActionForm. For 
validate=true to work correctly I think you need to extend the latter (I 
may be wrong there; it may not matter if you're not using XML-based 
validation).


Sorry I can't be more helpful; other than that, what you have looks 
reasonable to me. Have you tried enabling debug logging in Struts and 
comparing the log output for the two scenarios?


L.

Sebastian Marten wrote:

Thanks for your answer.

If i set validate=true the layout is not applied. I see only the page
createuser.jsp

If i set validate=false it works fine...

Why?


Ok here my config files:
If you nee more informations, just say it.

struts-config.xml

action input=/createuser.jsp
name=CreateUserActionForm path=/createuser scope=request
type=com.myapp.struts.CreateUser validate=false 
forward name=success path=page.welcome/
forward name=failed path=page.createuser/
/action

#
tiles-defs.xml

!-- Tiles Definition of Create User --
definition name=page.createuser extends=base.definition
put name=title value=User erstellen /
put name=body value=/createuser.jsp /
/definition

##
createuser.jsp:

html:form action=createuser
table border=1

tr
tdbean:message key=user.nick //td
tdhtml:text property=nick  //td

/tr
tr
tdbean:message key=user.name //td
tdhtml:text property=name  //td
/tr
tr
[..More inputs..]


/table



html:submit /  html:reset /
span style=color: red
html:errors/
/span
/html:form

#
createUserActionForm.java

public class CreateUserActionForm extends
org.apache.struts.action.ActionForm {

private int id;
private String nick;
private String name;
[..]

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

public String getNick() {
return nick;
}

public void setNick(String nick) {
this.nick = nick;
}
[...]

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
ActionErrors errors = new ActionErrors();

if (getNick() == null || getNick().length()  4 ) {
errors.add(nick, new ActionMessage(error.nick.required));
}

if (getName() == null || getName().length()  4) {
errors.add(name, new ActionMessage(error.name.required));
}
if (getVname() == null || getVname().length()  4) {
errors.add(name, new ActionMessage(error.vname.required));
}
[...]
 return errors;

##
CreateUser.java

public class CreateUser extends Action {

/* forward name=success path= */
private final static String SUCCESS = success;
private final static String FAILED = failed;

 public ActionForward execute(ActionMapping mapping, ActionForm  form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
 CreateUserActionForm createuser = (CreateUserActionForm) form;

user newuser = new user();
  newuser.setNick(createuser.getNick());
newuser.setName(createuser.getName());
newuser.setVname(createuser.getVname());
[...]
 if (!userliste.reg_user(newuser)){
return mapping.findForward(FAILED);
}

return mapping.findForward(SUCCESS);


##


Laurie Harper schrieb:

You can certainly use automatic validation together with Tiles, so
that's not the problem. You'll need to post your relevant
struts-config.xml excerpts and tiles-defs, and possibly relevant bits of
JSP so we can see what you're doing wrong.

L.

Sebastian Marten wrote:

After several hours of searching i found the problem.
All pages work, if I set validate=false in the struts config.
So I can't use the validate method of the bean?
Is there an alternative for this method?

Best regards,
Sebastian Marten


Sebastian Marten schrieb:

Hello List,

I have a problem with Struts Tiles.

First I wrote all sub-page's for a very little Web shop.

Then i started with tiles and created a simple test layout.
Nothing special, but it works.
I have several normal pages, like the page katliste.jsp
I click the link to the related action:

html:link action=katlisteUnser Angebot/html:link
And then the page is displayed in the Layout.

So far, so good.
Then I have 2 pages with a Struts Action Form and Action Form bean.
I Created the definition for this page in the tiles-xml and configured
the action forwards in the struts-config.
But then i

Re: Problem with Tiles an ActionForms

2006-12-29 Thread Laurie Harper
You can certainly use automatic validation together with Tiles, so 
that's not the problem. You'll need to post your relevant 
struts-config.xml excerpts and tiles-defs, and possibly relevant bits of 
JSP so we can see what you're doing wrong.


L.

Sebastian Marten wrote:

After several hours of searching i found the problem.
All pages work, if I set validate=false in the struts config.
So I can't use the validate method of the bean?
Is there an alternative for this method?

Best regards,
Sebastian Marten


Sebastian Marten schrieb:

Hello List,

I have a problem with Struts Tiles.

First I wrote all sub-page's for a very little Web shop.

Then i started with tiles and created a simple test layout.
Nothing special, but it works.
I have several normal pages, like the page katliste.jsp
I click the link to the related action:

html:link action=katlisteUnser Angebot/html:link
And then the page is displayed in the Layout.

So far, so good.
Then I have 2 pages with a Struts Action Form and Action Form bean.
I Created the definition for this page in the tiles-xml and configured
the action forwards in the struts-config.
But then i create a link the /createuser.do:
html:link action=createuserHier können sie sich Anmelden/html:link

I see only the corresponding .jsp page an not the hole layout.

There is the Problem?

I hope you can help me!

Best regards,
Sebastian Marten


[.]







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



Re: Problem with Tiles an ActionForms

2006-12-29 Thread Sebastian Marten
Thanks for your answer.

If i set validate=true the layout is not applied. I see only the page
createuser.jsp

If i set validate=false it works fine...

Why?


Ok here my config files:
If you nee more informations, just say it.

struts-config.xml

action input=/createuser.jsp
name=CreateUserActionForm path=/createuser scope=request
type=com.myapp.struts.CreateUser validate=false 
forward name=success path=page.welcome/
forward name=failed path=page.createuser/
/action

#
tiles-defs.xml

!-- Tiles Definition of Create User --
definition name=page.createuser extends=base.definition
put name=title value=User erstellen /
put name=body value=/createuser.jsp /
/definition

##
createuser.jsp:

html:form action=createuser
table border=1

tr
tdbean:message key=user.nick //td
tdhtml:text property=nick  //td

/tr
tr
tdbean:message key=user.name //td
tdhtml:text property=name  //td
/tr
tr
[..More inputs..]


/table



html:submit /  html:reset /
span style=color: red
html:errors/
/span
/html:form

#
createUserActionForm.java

public class CreateUserActionForm extends
org.apache.struts.action.ActionForm {

private int id;
private String nick;
private String name;
[..]

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

public String getNick() {
return nick;
}

public void setNick(String nick) {
this.nick = nick;
}
[...]

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
ActionErrors errors = new ActionErrors();

if (getNick() == null || getNick().length()  4 ) {
errors.add(nick, new ActionMessage(error.nick.required));
}

if (getName() == null || getName().length()  4) {
errors.add(name, new ActionMessage(error.name.required));
}
if (getVname() == null || getVname().length()  4) {
errors.add(name, new ActionMessage(error.vname.required));
}
[...]
 return errors;

##
CreateUser.java

public class CreateUser extends Action {

/* forward name=success path= */
private final static String SUCCESS = success;
private final static String FAILED = failed;

 public ActionForward execute(ActionMapping mapping, ActionForm  form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
 CreateUserActionForm createuser = (CreateUserActionForm) form;

user newuser = new user();
  newuser.setNick(createuser.getNick());
newuser.setName(createuser.getName());
newuser.setVname(createuser.getVname());
[...]
 if (!userliste.reg_user(newuser)){
return mapping.findForward(FAILED);
}

return mapping.findForward(SUCCESS);


##


Laurie Harper schrieb:
 You can certainly use automatic validation together with Tiles, so
 that's not the problem. You'll need to post your relevant
 struts-config.xml excerpts and tiles-defs, and possibly relevant bits of
 JSP so we can see what you're doing wrong.
 
 L.
 
 Sebastian Marten wrote:
 After several hours of searching i found the problem.
 All pages work, if I set validate=false in the struts config.
 So I can't use the validate method of the bean?
 Is there an alternative for this method?

 Best regards,
 Sebastian Marten


 Sebastian Marten schrieb:
 Hello List,

 I have a problem with Struts Tiles.

 First I wrote all sub-page's for a very little Web shop.

 Then i started with tiles and created a simple test layout.
 Nothing special, but it works.
 I have several normal pages, like the page katliste.jsp
 I click the link to the related action:

 html:link action=katlisteUnser Angebot/html:link
 And then the page is displayed in the Layout.

 So far, so good.
 Then I have 2 pages with a Struts Action Form and Action Form bean.
 I Created the definition for this page in the tiles-xml and configured
 the action forwards in the struts-config.
 But then i create a link the /createuser.do:
 html:link action=createuserHier können sie sich Anmelden/html:link

 I see only the corresponding .jsp page an not the hole layout.

 There is the Problem?

 I hope you can help me!

 Best regards,
 Sebastian Marten

 [.]



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



signature.asc
Description: OpenPGP digital signature


Problem with Tiles an ActionForms

2006-12-28 Thread Sebastian Marten
Hello List,

I have a problem with Struts Tiles.

First I wrote all sub-page's for a very little Web shop.

Then i started with tiles and created a simple test layout.
Nothing special, but it works.
I have several normal pages, like the page katliste.jsp
I click the link to the related action:

html:link action=katlisteUnser Angebot/html:link
And then the page is displayed in the Layout.

So far, so good.
Then I have 2 pages with a Struts Action Form and Action Form bean.
I Created the definition for this page in the tiles-xml and configured
the action forwards in the struts-config.
But then i create a link the /createuser.do:
html:link action=createuserHier können sie sich Anmelden/html:link

I see only the corresponding .jsp page an not the hole layout.

There is the Problem?

I hope you can help me!

Best regards,
Sebastian Marten



createuser.jsp

html:form action=createuser
table border=1

tr
tdbean:message key=user.nick //td
tdhtml:text property=nick  //td

/tr
tr
tdbean:message key=user.name //td
tdhtml:text property=name  //td
/tr
.
html:submit /
/html:form
##



Layout
 body

table border=2 width=100%
tr
td colspan=2
tiles:insert attribute=header /
/td

/tr
tr height=500
td width=200tiles:insert attribute=navigation
/ /td

   td tiles:insert attribute=body //td
/tr
tr
td colspan=2
tiles:insert attribute=footer /
/td
/tr

/table

/body

###

Base Definition in tiles-defs.xml

!-- Base Tiles Definition --
definition name=base.definition path=/tiles/seitenschema.jsp
put name=header value=/tiles/header.jsp /
put name=navigation value=/tiles/nav.jsp /
put name=footer value=/tiles/footer.jsp /
/definition

!-- Tiles Definition of Kategorieliste --
definition name=page.katliste extends=base.definition
put name=title value=Artikelliste /
put name=body value=/jsp/katliste.jsp /
/definition

Problem???

!-- Tiles Definition of Create User --
definition name=page.createuser extends=base.definition
put name=title value=User erstellen /
put name=body value=/createuser.jsp /
/definition


#


struts-config.xml

action path=/katliste type=com.myapp.struts.Kategorieliste 
forward name=success path=page.katliste/
/action

action input=/createuser.jsp  name=CreateUserActionForm
path=/createuser scope=request type=com.myapp.struts.CreateUser 
forward name=success path=page.welcome/
forward name=failed path=page.createuser/
/action




signature.asc
Description: OpenPGP digital signature


Re: Problem with Tiles an ActionForms

2006-12-28 Thread Sebastian Marten

After several hours of searching i found the problem.
All pages work, if I set validate=false in the struts config.
So I can't use the validate method of the bean?
Is there an alternative for this method?

Best regards,
Sebastian Marten


Sebastian Marten schrieb:
 Hello List,
 
 I have a problem with Struts Tiles.
 
 First I wrote all sub-page's for a very little Web shop.
 
 Then i started with tiles and created a simple test layout.
 Nothing special, but it works.
 I have several normal pages, like the page katliste.jsp
 I click the link to the related action:
 
 html:link action=katlisteUnser Angebot/html:link
 And then the page is displayed in the Layout.
 
 So far, so good.
 Then I have 2 pages with a Struts Action Form and Action Form bean.
 I Created the definition for this page in the tiles-xml and configured
 the action forwards in the struts-config.
 But then i create a link the /createuser.do:
 html:link action=createuserHier können sie sich Anmelden/html:link
 
 I see only the corresponding .jsp page an not the hole layout.
 
 There is the Problem?
 
 I hope you can help me!
 
 Best regards,
 Sebastian Marten
 
[.]





signature.asc
Description: OpenPGP digital signature


Reg : JSP Exception Handling Problem with Tiles

2006-09-01 Thread jaikarthi

Hi,
I am trying to handle JSP Exception in my Project. We are using Tiles
plug in in our project.
My Layout definition is
  

  

   
 

   My header and footer remains same in all pages.

  in my layout.jsp 

I defined 

%@ page errorPage=/jspException.do

whenever jsp exception occurs,JSP Exception handler gets invoked and I am
redircting to error page.

my struts config looks like this,





my action class gets executed and success is forwarded,but i am getting a
blank page.
only header.jsp alone rendered,my error.jsp is not rendered.

my error.jsp is 

%@ page isErrorPage=true%


 


unexpected error occured



I dont know why? i am badly in need of this.

Please help me Guys  i am looking for ur reply

Thanks,
JaiKarthik
-- 
View this message in context: 
http://www.nabble.com/Reg-%3A-JSP-Exception-Handling-Problem-with-Tiles-tf2202000.html#a6096810
Sent from the Struts - User forum at Nabble.com.


Re: Reg : JSP Exception Handling Problem with Tiles

2006-09-01 Thread Antonio Petrelli

It seems that your message has been corrupted. Try to resend it.

jaikarthi ha scritto:

Hi,
I am trying to handle JSP Exception in my Project. We are using Tiles
plug in in our project.
My Layout definition is
  
	
  

   
 


   My header and footer remains same in all pages.

  in my layout.jsp 

I defined 


%@ page errorPage=/jspException.do

whenever jsp exception occurs,JSP Exception handler gets invoked and I am
redircting to error page.

my struts config looks like this,





my action class gets executed and success is forwarded,but i am getting a
blank page.
only header.jsp alone rendered,my error.jsp is not rendered.

my error.jsp is 


%@ page isErrorPage=true%


	 



unexpected error occured



I dont know why? i am badly in need of this.

Please help me Guys  i am looking for ur reply

Thanks,
JaiKarthik
  



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



Re: Reg : JSP Exception Handling Problem with Tiles

2006-09-01 Thread jaikarthi

Hi,
please find the problem

   Hi, 
I am trying to handle JSP Exception in my Project. We are using Tiles
plug in in our project. 
My Layout definition is 
  definition name=page.layout path=/WEB-INF/pages/tiles/Layout.jsp 
put name=title  value=/ 
  put name=header  value=/WEB-INF/pages/tiles/header.jsp/ 
put name=body value= / 
   put name=footer  value=/WEB-INF/pages/tiles/footer.jsp/ 
 /definition 

   My header and footer remains same in all pages. 

  in my layout.jsp 

I defined 

%@ page errorPage=/jspException.do 

whenever jsp exception occurs,JSP Exception handler gets invoked and I am
redircting to error page. 

my struts config looks like this, 

action 
path=/jspException 
 type=com.sen.exception.JspExceptionHandlerAction 
scope=request  
forward name=success path=/WEB-INF/pages/error.jsp
redirect=false/ 
/action 

my action class gets executed and success is forwarded,but i am getting a
blank page. 
only header.jsp alone rendered,my error.jsp is not rendered. 

my error.jsp is 

%@ page isErrorPage=true% 
html 
head 
basefont face=Arial color=red 
/head 
body 
h2unexpected error occured/h2 
/body 
/html 

I dont know why? i am badly in need of this. 

Please help me Guys  i am looking for ur reply 

Thanks, 
JaiKarthik



Antonio Petrelli wrote:
 
 It seems that your message has been corrupted. Try to resend it.
 
 jaikarthi ha scritto:
 Hi,
 I am trying to handle JSP Exception in my Project. We are using Tiles
 plug in in our project.
 My Layout definition is
   
  
   
 

  

My header and footer remains same in all pages.

   in my layout.jsp 

 I defined 

 %@ page errorPage=/jspException.do

 whenever jsp exception occurs,JSP Exception handler gets invoked and I am
 redircting to error page.

 my struts config looks like this,


  


 my action class gets executed and success is forwarded,but i am getting a
 blank page.
 only header.jsp alone rendered,my error.jsp is not rendered.

 my error.jsp is 

 %@ page isErrorPage=true%


   


 unexpected error occured



 I dont know why? i am badly in need of this.

 Please help me Guys  i am looking for ur reply

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

-- 
View this message in context: 
http://www.nabble.com/Reg-%3A-JSP-Exception-Handling-with-tiles-tf2202000.html#a6096918
Sent from the Struts - User forum at Nabble.com.


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



Re: Reg : JSP Exception Handling Problem with Tiles

2006-09-01 Thread Antonio Petrelli

jaikarthi ha scritto:
  definition name=page.layout path=/WEB-INF/pages/tiles/Layout.jsp 
put name=title  value=/ 
  put name=header  value=/WEB-INF/pages/tiles/header.jsp/ 
put name=body value= / 
   put name=footer  value=/WEB-INF/pages/tiles/footer.jsp/ 
 /definition 


...

action 
path=/jspException 
 type=com.sen.exception.JspExceptionHandlerAction 
scope=request  
forward name=success path=/WEB-INF/pages/error.jsp
redirect=false/ 
/action 


my action class gets executed and success is forwarded,but i am getting a
blank page. 
  


It is strange, since the error.jsp is a simple JSP page. Have you got 
any exception in your log?



only header.jsp alone rendered,


What do you mean with this?


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



Re: Reg : JSP Exception Handling Problem with Tiles

2006-09-01 Thread jaikarthi

Hi,
  I am not getting any exception in log.

Antonio Petrelli wrote:
 
 jaikarthi ha scritto:
   definition name=page.layout path=/WEB-INF/pages/tiles/Layout.jsp 
 put name=title  value=/ 
   put name=header 
 value=/WEB-INF/pages/tiles/header.jsp/ 
 put name=body value= / 
put name=footer  value=/WEB-INF/pages/tiles/footer.jsp/ 
  /definition 

 ...

 action 
 path=/jspException 
  type=com.sen.exception.JspExceptionHandlerAction 
 scope=request  
 forward name=success path=/WEB-INF/pages/error.jsp
 redirect=false/ 
 /action 

 my action class gets executed and success is forwarded,but i am getting a
 blank page. 
   
 
 It is strange, since the error.jsp is a simple JSP page. Have you got 
 any exception in your log?
 
 only header.jsp alone rendered,
 
 What do you mean with this?
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Reg-%3A-JSP-Exception-Handling-with-tiles-tf2202000.html#a6098356
Sent from the Struts - User forum at Nabble.com.


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



Re: problem in tiles

2006-04-14 Thread Antonio Petrelli

Ahmed Hashim ha scritto:

I solved the problem

I think you are right, I can not call any tiles definition directly without
calling an action

I made a generic action definition to view my pages

check the solution in my blog

http://www.egjug.org/struts_action_foward_to_Tiles


Ahmed Hashim
  


Uh at a first look, I did not like your solution, because I thought that 
it could break security, that it is just like exposing JSP pages without 
passing through an action. But then I thought hey wait a moment, if I 
want to expose a definition, I NEED to call it 'viewSomething.page' and 
not 'blahblah', so security is preserved if the programmer knows what 
to do.

Congratulations, I really liked your solution!
Ciao
Antonio

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



Re: problem in tiles

2006-04-14 Thread Ahmed Hashim
Thanks Antonio,

Actually in my application I didn't allow the user to expose any jsp using
the action. I used this techniques for a certain type of pages using a
specific pattern in the generic action.

So, I think it is more secure.

Thanks.

Ahmed Hashim

On 4/14/06, Antonio Petrelli [EMAIL PROTECTED] wrote:

 Ahmed Hashim ha scritto:
  I solved the problem
 
  I think you are right, I can not call any tiles definition directly
 without
  calling an action
 
  I made a generic action definition to view my pages
 
  check the solution in my blog
 
  http://www.egjug.org/struts_action_foward_to_Tiles
 
 
  Ahmed Hashim
 

 Uh at a first look, I did not like your solution, because I thought that
 it could break security, that it is just like exposing JSP pages without
 passing through an action. But then I thought hey wait a moment, if I
 want to expose a definition, I NEED to call it 'viewSomething.page' and
 not 'blahblah', so security is preserved if the programmer knows what
 to do.
 Congratulations, I really liked your solution!
 Ciao
 Antonio

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




--
In Life, it doesn't matter who you are, but whether someone appreciates you
for what you are, accepts you and loves you unconditionally. A Real Friend (
Friendship ) is one who walks in when the rest of the world walks away.


Re: problem in tiles

2006-04-13 Thread Ahmed Hashim
I solved the problem

I think you are right, I can not call any tiles definition directly without
calling an action

I made a generic action definition to view my pages

check the solution in my blog

http://www.egjug.org/struts_action_foward_to_Tiles


Ahmed Hashim

On 4/10/06, Dave Newton [EMAIL PROTECTED] wrote:

 Ahmed Hashim wrote:
  I tried to forward to loginPage.page from the action and it is working
 fine,
  but i remember that I can request the page directly...
  any suggestion?
 

 You can use tile definitions as input or forward attribute values in
 your Struts config file; is that what you mean?

 Dave



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




--
In Life, it doesn't matter who you are, but whether someone appreciates you
for what you are, accepts you and loves you unconditionally. A Real Friend (
Friendship ) is one who walks in when the rest of the world walks away.


Re: problem in tiles

2006-04-10 Thread Antonio Petrelli

Ahmed Hashim ha scritto:

...
but i remember that I can request the page directly...
  


You remember wrong! You cannot request a Tiles definition directly. You 
have at least to write a simple JSP page with tiles:insert tag.
You can invoke a Tiles definition directly only through a forward, if 
you are using TilesRequestProcessor

Ciao
Antonio


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



Re: problem in tiles

2006-04-10 Thread Dave Newton
Ahmed Hashim wrote:
 I tried to forward to loginPage.page from the action and it is working fine,
 but i remember that I can request the page directly...
 any suggestion?
   

You can use tile definitions as input or forward attribute values in
your Struts config file; is that what you mean?

Dave



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



problem in tiles

2006-04-09 Thread Ahmed Hashim
what is wrong with this configuration?
?xml version=1.0 encoding=UTF-8?
!DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts
Configuration 1.2//EN http://struts.apache.org/dtds/struts-config_1_2.dtd


struts-config
  data-sources /

  form-beans
  form-bean name=loginForm type=evote.form.LoginActionForm
  /form-bean
  /form-beans

  global-exceptions /
  global-forwards /

  action-mappings


  /action-mappings
  controller processorClass=org.apache.struts.tiles.TilesRequestProcessor
/

  message-resources parameter=evote.struts.language.ApplicationResources
/
   plug-in className=org.apache.struts.tiles.TilesPlugin
set-property property=definitions-config value=/WEB-INF/tiles-
def.xml/
 set-property property=definitions-debug value=2 /
  set-property property=definitions-parser-details value=2 /
  set-property property=definitions-parser-validate value=true /
  set-property property=moduleAware value=true /
  /plug-in

/struts-config


?xml version='1.0'?
!DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles
Configuration 1.1//EN 
http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd;
tiles-definitions
definition name=genericLayout path=/jsp/layout/layout.jsp
put name=title value=Electronic Voting System /
put name=menu value=/jsp/layout/menu.jsp /
put name=header value=/jsp/layout/header.jsp /
put name=footer value=/jsp/layout/footer.jsp /
put name=body value=/jsp/layout/body.jsp /
/definition

definition name=loginPage.page extends=genericLayout
put name=body value=/jsp/login.jsp /
/definition
/tiles-definitions

?xml version=1.0 encoding=UTF-8?
web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance; version=2.4
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value3/param-value
/init-param
init-param
  param-namedetail/param-name
  param-value3/param-value
/init-param
load-on-startup2/load-on-startup
  /servlet
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping

/web-app

when i try to request http://localhost:8080/Evote/loginPage.do i got the
message SEVERE: Invalid path /loginPage was requested

what do you think the problem?

--
In Life, it doesn't matter who you are, but whether someone appreciates you
for what you are, accepts you and loves you unconditionally. A Real Friend (
Friendship ) is one who walks in when the rest of the world walks away.


Re: problem in tiles

2006-04-09 Thread Yang Sun
I think you should add an action in the action-mappings section for
loginPage action. You request have not been processed by tiles yet.

// Yang

On 4/9/06, Ahmed Hashim [EMAIL PROTECTED] wrote:

 what is wrong with this configuration?
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts
 Configuration 1.2//EN 
 http://struts.apache.org/dtds/struts-config_1_2.dtd
 

 struts-config
   data-sources /

   form-beans
   form-bean name=loginForm type=evote.form.LoginActionForm
   /form-bean
   /form-beans

   global-exceptions /
   global-forwards /

   action-mappings


   /action-mappings
   controller processorClass=
 org.apache.struts.tiles.TilesRequestProcessor
 /

   message-resources parameter=evote.struts.language.ApplicationResources
 
 /
plug-in className=org.apache.struts.tiles.TilesPlugin
 set-property property=definitions-config value=/WEB-INF/tiles-
 def.xml/
  set-property property=definitions-debug value=2 /
   set-property property=definitions-parser-details value=2 /
   set-property property=definitions-parser-validate value=true /
   set-property property=moduleAware value=true /
   /plug-in

 /struts-config


 ?xml version='1.0'?
 !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD
 Tiles
 Configuration 1.1//EN 
 http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd;
 tiles-definitions
 definition name=genericLayout path=/jsp/layout/layout.jsp
 put name=title value=Electronic Voting System /
 put name=menu value=/jsp/layout/menu.jsp /
 put name=header value=/jsp/layout/header.jsp /
 put name=footer value=/jsp/layout/footer.jsp /
 put name=body value=/jsp/layout/body.jsp /
 /definition

 definition name=loginPage.page extends=genericLayout
 put name=body value=/jsp/login.jsp /
 /definition
 /tiles-definitions

 ?xml version=1.0 encoding=UTF-8?
 web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; version=2.4
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
   param-namedebug/param-name
   param-value3/param-value
 /init-param
 init-param
   param-namedetail/param-name
   param-value3/param-value
 /init-param
 load-on-startup2/load-on-startup
   /servlet
   servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
   /servlet-mapping

 /web-app

 when i try to request http://localhost:8080/Evote/loginPage.do i got the
 message SEVERE: Invalid path /loginPage was requested

 what do you think the problem?

 --
 In Life, it doesn't matter who you are, but whether someone appreciates
 you
 for what you are, accepts you and loves you unconditionally. A Real Friend
 (
 Friendship ) is one who walks in when the rest of the world walks away.



Re: problem in tiles

2006-04-09 Thread Ahmed Hashim
I tried to forward to loginPage.page from the action and it is working fine,
but i remember that I can request the page directly...
any suggestion?

On 4/9/06, Yang Sun [EMAIL PROTECTED] wrote:

 I think you should add an action in the action-mappings section for
 loginPage action. You request have not been processed by tiles yet.

 // Yang

 On 4/9/06, Ahmed Hashim [EMAIL PROTECTED] wrote:
 
  what is wrong with this configuration?
  ?xml version=1.0 encoding=UTF-8?
  !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD
 Struts
  Configuration 1.2//EN 
  http://struts.apache.org/dtds/struts-config_1_2.dtd
  
 
  struts-config
data-sources /
 
form-beans
form-bean name=loginForm type=evote.form.LoginActionForm
/form-bean
/form-beans
 
global-exceptions /
global-forwards /
 
action-mappings
 
 
/action-mappings
controller processorClass=
  org.apache.struts.tiles.TilesRequestProcessor
  /
 
message-resources parameter=
 evote.struts.language.ApplicationResources
  
  /
 plug-in className=org.apache.struts.tiles.TilesPlugin
  set-property property=definitions-config value=/WEB-INF/tiles-
  def.xml/
   set-property property=definitions-debug value=2 /
set-property property=definitions-parser-details value=2 /
set-property property=definitions-parser-validate value=true /
set-property property=moduleAware value=true /
/plug-in
 
  /struts-config
 
 
  ?xml version='1.0'?
  !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD
  Tiles
  Configuration 1.1//EN 
  http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd;
  tiles-definitions
  definition name=genericLayout path=/jsp/layout/layout.jsp
  put name=title value=Electronic Voting System /
  put name=menu value=/jsp/layout/menu.jsp /
  put name=header value=/jsp/layout/header.jsp /
  put name=footer value=/jsp/layout/footer.jsp /
  put name=body value=/jsp/layout/body.jsp /
  /definition
 
  definition name=loginPage.page extends=genericLayout
  put name=body value=/jsp/login.jsp /
  /definition
  /tiles-definitions
 
  ?xml version=1.0 encoding=UTF-8?
  web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=
  http://www.w3.org/2001/XMLSchema-instance; version=2.4
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
servlet
  servlet-nameaction/servlet-name
  servlet-classorg.apache.struts.action.ActionServlet
 /servlet-class
  init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
  /init-param
  init-param
param-namedebug/param-name
param-value3/param-value
  /init-param
  init-param
param-namedetail/param-name
param-value3/param-value
  /init-param
  load-on-startup2/load-on-startup
/servlet
servlet-mapping
  servlet-nameaction/servlet-name
  url-pattern*.do/url-pattern
/servlet-mapping
 
  /web-app
 
  when i try to request http://localhost:8080/Evote/loginPage.do i got the
  message SEVERE: Invalid path /loginPage was requested
 
  what do you think the problem?
 
  --
  In Life, it doesn't matter who you are, but whether someone appreciates
  you
  for what you are, accepts you and loves you unconditionally. A Real
 Friend
  (
  Friendship ) is one who walks in when the rest of the world walks away.
 




--
In Life, it doesn't matter who you are, but whether someone appreciates you
for what you are, accepts you and loves you unconditionally. A Real Friend (
Friendship ) is one who walks in when the rest of the world walks away.


problem struts+tiles+eclipse+tomcat5+j2sdk-sun

2006-01-31 Thread vinicius
I change the MessageResources.properties, update the servlet context, export 
the files to the webapp directory in tomcat and when view the page i've got 
this error:
(i don't know if this are the correct steps! i'm using linux and the sysdeo 
plugin don't start the tomcat for me like many tutorials explain)


org.apache.jasper.JasperException: Unable to compile class for JSP

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:520)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)

root cause

java.io.FileNotFoundException: /home/vinicius/Projetos/novo 
Portal/workspace/teste/work/org/apache/jsp/index_jsp.java (No such file or 
directory)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.init(FileOutputStream.java:179)
java.io.FileOutputStream.init(FileOutputStream.java:70)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:188)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)




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



Re: problem struts+tiles+eclipse+tomcat5+j2sdk-sun

2006-01-31 Thread digant . k . joshi
copy tools.jar from jdk directory to {TomcatBaseDir}/common/lib
to make it work.




vinicius [EMAIL PROTECTED]
01/31/2006 02:13 PM
Please respond to Struts Users Mailing List

 
To: user@struts.apache.org
cc: 
Subject:problem struts+tiles+eclipse+tomcat5+j2sdk-sun


I change the MessageResources.properties, update the servlet context, 
export 
the files to the webapp directory in tomcat and when view the page i've 
got 
this error:
(i don't know if this are the correct steps! i'm using linux and the 
sysdeo 
plugin don't start the tomcat for me like many tutorials explain)


org.apache.jasper.JasperException: Unable to compile class for JSP
 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:520)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:324)
 org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
 java.security.AccessController.doPrivileged(Native 
Method)
 javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
 org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)

root cause

java.io.FileNotFoundException: /home/vinicius/Projetos/novo 
Portal/workspace/teste/work/org/apache/jsp/index_jsp.java (No such file or 

directory)
 java.io.FileOutputStream.open(Native Method)
 java.io.FileOutputStream.init(FileOutputStream.java:179)
 java.io.FileOutputStream.init(FileOutputStream.java:70)
 org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:188)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:324)
 org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
 java.security.AccessController.doPrivileged(Native 
Method)
 javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
 org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)




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





This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase  Co., its subsidiaries 
and affiliates.

Re: problem struts+tiles+eclipse+tomcat5+j2sdk-sun

2006-01-31 Thread vinicius
i know that is something basic, but i'm working in this problem for days, i'm 
new in struts an i'm dont have success in just change one line in the 
MessageResources.properties file!
 i don't know if i'm exporting correctly the application to the tomcat webapp 
directory or if i have to do something before in eclipse!!

i've got the same error!:


type Exception report

message

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:520)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)

root cause

java.io.FileNotFoundException: /home/vinicius/Projetos/novo 
Portal/workspace/portal/work/org/apache/jsp/index_jsp.java (No such file or 
directory)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.init(FileOutputStream.java:179)
java.io.FileOutputStream.init(FileOutputStream.java:70)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:188)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)


Em Ter 31 Jan 2006 17:34, [EMAIL PROTECTED] escreveu:
 copy tools.jar from jdk directory to {TomcatBaseDir}/common/lib
 to make it work.




 vinicius [EMAIL PROTECTED]
 01/31/2006 02:13 PM
 Please respond to Struts Users Mailing List


 To: user@struts.apache.org
 cc:
 Subject:problem struts+tiles+eclipse+tomcat5+j2sdk-sun


 I change the MessageResources.properties, update the servlet context,
 export
 the files to the webapp directory in tomcat and when view the page i've
 got
 this error:
 (i don't know if this are the correct steps! i'm using linux and the
 sysdeo
 plugin don't start the tomcat for me like many tutorials explain)


 org.apache.jasper.JasperException: Unable to compile class for JSP

 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:
520)

 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
295)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)

 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
9)

 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java:25) java.lang.reflect.Method.invoke(Method.java:324)
  org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
  java.security.AccessController.doPrivileged(Native
 Method

Problem with Tiles and URLRewrite Filter

2005-12-15 Thread Randy Shepherd

Hey all,

So I am trying to get outbound url rewriting working using the Tuckey 
URLRewrite Filter (http://tuckey.org/urlrewrite/) with Struts 1.2.7 
with Tiles 1.1.


It appears that my outbound rules are not even being evaluated when the 
Struts target is a tile. As a result none of my links that match the 
rule are being rewritten. So, if put a vanilla JSP as the Struts target 
in which there is a href which should be rewritten, it works. But if I 
define that same JSP as a tile, then have the Struts target as that 
tile., the url is not rewritten.


Anyone else run into this problem?

Thanks,
Randy


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



Re: Problem with Tiles and URLRewrite Filter

2005-12-15 Thread Greg Reddin


On Dec 15, 2005, at 5:14 PM, Randy Shepherd wrote:

So I am trying to get outbound url rewriting working using the  
Tuckey URLRewrite Filter (http://tuckey.org/urlrewrite/) with  
Struts 1.2.7 with Tiles 1.1.


It appears that my outbound rules are not even being evaluated when  
the Struts target is a tile. As a result none of my links that  
match the rule are being rewritten. So, if put a vanilla JSP as the  
Struts target in which there is a href which should be rewritten,  
it works. But if I define that same JSP as a tile, then have the  
Struts target as that tile., the url is not rewritten.


I'm not familiar with the Tuckey tool, but at first glance my hunch  
would be that it's related to Tiles' use of RequestDispatcher.include 
() as opposed to forward(), which is typically used by Struts.


Are you running under Servlet 2.3 or 2.4?  If under 2.3 and the  
Tuckey tool is implemented as a filter then it won't be executed when  
the RequestDispatcher is used if my understanding is correct.


Greg


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



Re: Problem with Tiles and URLRewrite Filter

2005-12-15 Thread Randy Shepherd

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I should clarify one thing. The target JSP when made a tile, is 
included in the body of the tile definition tag that extends a 
template., If I make the target JSP the path, and do not have the 
definition inherit from a template, then the outbound rule works.


bah!

Thanks again,
Randy

On Dec 15, 2005, at 3:14 PM, Randy Shepherd wrote:


Hey all,

So I am trying to get outbound url rewriting working using the Tuckey 
URLRewrite Filter (http://tuckey.org/urlrewrite/) with Struts 1.2.7 
with Tiles 1.1.


It appears that my outbound rules are not even being evaluated when 
the Struts target is a tile. As a result none of my links that match 
the rule are being rewritten. So, if put a vanilla JSP as the Struts 
target in which there is a href which should be rewritten, it works. 
But if I define that same JSP as a tile, then have the Struts target 
as that tile., the url is not rewritten.


Anyone else run into this problem?

Thanks,
Randy


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


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFDof6OvmgyD0mfSYQRAjTVAJ9a97XJ8DXtfDJejGi651mYO4ME+gCdE3aK
OotnZyCwHgQ/Wc3pjhn15DI=
=I+Ub
-END PGP SIGNATURE-


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



Re: NEWBIE Problem with Tiles

2005-11-21 Thread Greg Reddin


On Nov 19, 2005, at 2:11 PM, Laurie Harper wrote:

I haven't been tracking the status of the 'standalone Tiles' work,  
but I believe it's either done or close to done.


I haven't had much time to work on Standalone of late.  I've been  
trying to shore up the doc for the Struts version.  But, hopefully,  
once that is done it will mostly still apply to the Standalone  
version with only a few changes.  I have begun a major refactoring  
effort on the internals of Standalone Tiles.  I'm about halfway  
done.  The next big step is to get the taglib working again.  Then I  
can check in the refactored version, test cases and all.  After that  
another refactoring step will be required to remove servlet API  
dependencies so tiles will work in a portlet environment.  Then we  
might be close to being done :-)


I'll try to get my changes in sooner rather than later so people can  
start playing with them and giving feedback/contributions, etc.   
Maybe over the holiday?


Thanks,
Greg


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



NEWBIE Problem with Tiles

2005-11-19 Thread Götz Wankelmuth
Hi,

I want to use Tiles with JSF and without Struts.

Is there a tiles.jar available anywhere, or have I to install struts.jar?

Best regards,
Götz

-- 
Mit freundlichen Grüßen,
Dr. Götz Wankelmuth

-
Dr. Götz Wankelmuth
Weiherstr. 4a
D-90530 Wendelstein

mailto:[EMAIL PROTECTED]
tel: +49 (0)9129 45 73
mobile: +49 (0)172 13 25 180
-

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



Re: NEWBIE Problem with Tiles

2005-11-19 Thread Laurie Harper

Götz Wankelmuth wrote:

Hi,

I want to use Tiles with JSF and without Struts.

Is there a tiles.jar available anywhere, or have I to install struts.jar?


Not yet (at least not released), but it's being worked on. I haven't 
been tracking the status of the 'standalone Tiles' work, but I believe 
it's either done or close to done. You might want to try searching the 
dev list for 'standalone Tiles'.


L.


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



Re: NEWBIE Problem with Tiles

2005-11-19 Thread Craig McClanahan
On 11/19/05, Laurie Harper [EMAIL PROTECTED] wrote:

 Götz Wankelmuth wrote:
  Hi,
 
  I want to use Tiles with JSF and without Struts.
 
  Is there a tiles.jar available anywhere, or have I to install struts.jar
 ?

 Not yet (at least not released), but it's being worked on. I haven't
 been tracking the status of the 'standalone Tiles' work, but I believe
 it's either done or close to done. You might want to try searching the
 dev list for 'standalone Tiles'.


Indeed, nightly builds of this library are available:

http://cvs.apache.org/builds/jakarta-struts/nightly/sandbox/tiles-core/

Craig


Re: CactusStrutsTestCase working problem with tiles extension

2005-09-27 Thread Carl Smith
Thank you Richard for the answering... Since my app is written in a lower J2EE 
version so I have to use strutstest_2.0.0.jar which doesn't support 
verifyTilesForward() method. 
 
Any other suggestions? Thanks.
 

Richard Yee [EMAIL PROTECTED] wrote:
Carl,
Check the CactusStrutsTestCase javadoc. You should use 
verifyTilesForward instead of verifyForward(). There is also a 
verifyInputTilesForward() too.

-Richard


Carl Smith wrote:
 Is there any helps here? Thank you in advance.

 Carl Smith wrote:
 I am sorry for this a little long question, but you will be finding it 
 interesting... Simply put, I have (1),(2) and (3), then we I run struts 
 testing, I got error described as (4)



 (1) item in struts-config.xml
 type=my.actions.myAction 
 name=myForm 
 scope=request 
 validate=true 
 input=myInput



 (2) item in tiles-defs.xml












 (3) 
 I was trying to test MyAction.java (not shown here since it is just some 
 simple stuff),
 I wrote the following struts testing case:


 public class MyActionTest extends CactusStrutsTestCase {
 public MyActionTest(String testingName){
 super(testingName);
 }

 public void begin(WebRequest req){
 req.setAuthentication(new BasicAuthentication(username,password));
 }

 public void testDisplay() throws Exception {
 setRequestPathInfo(/MyAction);
 actionPerform();
 // after actionPerform(), MyAction is really forwarding to myApp.display.page
 // so the testing should have passed, but it did not, see below error
 verifyForward(display);

 }

 }



 (4)
 junit.framework.AssertionFailedError: was expecting 
 '/myContentRoot/myApp.display.page' but received 
 '/myContentRoot/jsp/default.jsp'
 at servletunit.struts.Common.verifyForwardPath(Common.java:170)
 at 
 servletunit.struts.CactusStrutsTestCase.verifyForward(CactusStrutsTestCase.java:432)


 However, if I delete extends=myDefault from the configure for 
 myApp.display.page in tiles-defs.xml, then the test case passed.
 It seems there is an issue with the tiles extend, why this is happening? Do 
 you have any idea or workaround?




 -
 Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 



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



-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: CactusStrutsTestCase working problem with tiles extension

2005-09-25 Thread Richard Yee

Carl,
Check the CactusStrutsTestCase javadoc. You should use 
verifyTilesForward instead of verifyForward(). There is also a 
verifyInputTilesForward() too.


-Richard


Carl Smith wrote:

Is there any helps here? Thank you in advance.

Carl Smith [EMAIL PROTECTED] wrote:
I am sorry for this a little long question, but you will be finding it 
interesting... Simply put, I have (1),(2) and (3), then we I run struts 
testing, I got error described as (4)



(1) item in struts-config.xml
type=my.actions.myAction 
name=myForm 
scope=request 
validate=true 
input=myInput




(2) item in tiles-defs.xml












(3) 
I was trying to test MyAction.java (not shown here since it is just some simple stuff),

I wrote the following struts testing case:


public class MyActionTest extends CactusStrutsTestCase {
public MyActionTest(String testingName){
super(testingName);
}

public void begin(WebRequest req){
req.setAuthentication(new BasicAuthentication(username,password));
}

public void testDisplay() throws Exception {
setRequestPathInfo(/MyAction);
actionPerform();
// after actionPerform(), MyAction is really forwarding to myApp.display.page
// so the testing should have passed, but it did not, see below error
verifyForward(display);

}

}



(4)
junit.framework.AssertionFailedError: was expecting 
'/myContentRoot/myApp.display.page' but received 
'/myContentRoot/jsp/default.jsp'
at servletunit.struts.Common.verifyForwardPath(Common.java:170)
at 
servletunit.struts.CactusStrutsTestCase.verifyForward(CactusStrutsTestCase.java:432)


However, if I delete extends=myDefault from the configure for 
myApp.display.page in tiles-defs.xml, then the test case passed.
It seems there is an issue with the tiles extend, why this is happening? Do you 
have any idea or workaround?




-
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
  




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



Re: CactusStrutsTestCase working problem with tiles extension

2005-09-24 Thread Carl Smith
Is there any helps here? Thank you in advance.

Carl Smith [EMAIL PROTECTED] wrote:
I am sorry for this a little long question, but you will be finding it 
interesting... Simply put, I have (1),(2) and (3), then we I run struts 
testing, I got error described as (4)



(1) item in struts-config.xml
type=my.actions.myAction 
name=myForm 
scope=request 
validate=true 
input=myInput



(2) item in tiles-defs.xml












(3) 
I was trying to test MyAction.java (not shown here since it is just some simple 
stuff),
I wrote the following struts testing case:


public class MyActionTest extends CactusStrutsTestCase {
public MyActionTest(String testingName){
super(testingName);
}

public void begin(WebRequest req){
req.setAuthentication(new BasicAuthentication(username,password));
}

public void testDisplay() throws Exception {
setRequestPathInfo(/MyAction);
actionPerform();
// after actionPerform(), MyAction is really forwarding to myApp.display.page
// so the testing should have passed, but it did not, see below error
verifyForward(display);

}

}



(4)
junit.framework.AssertionFailedError: was expecting 
'/myContentRoot/myApp.display.page' but received 
'/myContentRoot/jsp/default.jsp'
at servletunit.struts.Common.verifyForwardPath(Common.java:170)
at 
servletunit.struts.CactusStrutsTestCase.verifyForward(CactusStrutsTestCase.java:432)


However, if I delete extends=myDefault from the configure for 
myApp.display.page in tiles-defs.xml, then the test case passed.
It seems there is an issue with the tiles extend, why this is happening? Do you 
have any idea or workaround?




-
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: CactusStrutsTestCase working problem with tiles extension

2005-09-24 Thread Laurie Harper
Firstly, when starting a new topic it's a better idea to post a new 
message rather than replying to an existing one. Anyone not following 
the thread you reply on wont see you message if you do that.


As far as your problem goes, it's not clear what the problem is because 
it doesn't look like you posted all the relevant code: what does 
verifyForward(display) do?


At a guess, I'd say the problem is that whatever is supplying the 
expected value ('/myContentRoot/myApp.display.page') is wrong. That's a 
tile name, which is an internal value.


L.

Carl Smith wrote:

Is there any helps here? Thank you in advance.

Carl Smith [EMAIL PROTECTED] wrote:
I am sorry for this a little long question, but you will be finding it 
interesting... Simply put, I have (1),(2) and (3), then we I run struts 
testing, I got error described as (4)



(1) item in struts-config.xml
type=my.actions.myAction 
name=myForm 
scope=request 
validate=true 
input=myInput




(2) item in tiles-defs.xml












(3) 
I was trying to test MyAction.java (not shown here since it is just some simple stuff),

I wrote the following struts testing case:


public class MyActionTest extends CactusStrutsTestCase {
public MyActionTest(String testingName){
super(testingName);
}

public void begin(WebRequest req){
req.setAuthentication(new BasicAuthentication(username,password));
}

public void testDisplay() throws Exception {
setRequestPathInfo(/MyAction);
actionPerform();
// after actionPerform(), MyAction is really forwarding to myApp.display.page
// so the testing should have passed, but it did not, see below error
verifyForward(display);

}

}



(4)
junit.framework.AssertionFailedError: was expecting 
'/myContentRoot/myApp.display.page' but received 
'/myContentRoot/jsp/default.jsp'
at servletunit.struts.Common.verifyForwardPath(Common.java:170)
at 
servletunit.struts.CactusStrutsTestCase.verifyForward(CactusStrutsTestCase.java:432)


However, if I delete extends=myDefault from the configure for 
myApp.display.page in tiles-defs.xml, then the test case passed.
It seems there is an issue with the tiles extend, why this is happening? Do you 
have any idea or workaround?




-
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



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



CactusStrutsTestCase working problem with tiles extension

2005-09-23 Thread Carl Smith

I am sorry for this a little long question, but you will be finding it 
interesting... Simply put, I have (1),(2) and (3), then we I run struts 
testing, I got error described as (4)

 

(1) item in struts-config.xml
 action path=/MyAction 
  type=my.actions.myAction 
  name=myForm 
  scope=request 
  validate=true 
  input=myInput
forward name=display path=myApp.display.page /
 /action

(2) item in tiles-defs.xml
  definition name=myDefault path=/jsp/default.jsp
 put name=header value=/jsp/myHeader.jsp /
   /definition

 definition name=myApp.display.page extends=myDefault
 put name=bodyContent value=/jsp/myApp.jsp /
 /definition

(3)   
I was trying to test MyAction.java (not shown here since it is just some simple 
stuff),
I wrote the following struts testing case:

   
   public class MyActionTest extends CactusStrutsTestCase {
  public MyActionTest(String testingName){
   super(testingName);
  }
  
   public void begin(WebRequest req){
   req.setAuthentication(new BasicAuthentication(username,password));
  }
 
  public void testDisplay() throws Exception {
   setRequestPathInfo(/MyAction);
  actionPerform();
  // after actionPerform(), MyAction is really forwarding to 
myApp.display.page
  // so the testing should have passed, but it did not, see below error
   verifyForward(display);
  
  }
  
 }

 

(4)
 junit.framework.AssertionFailedError: was expecting 
'/myContentRoot/myApp.display.page' but received 
'/myContentRoot/jsp/default.jsp'
  at servletunit.struts.Common.verifyForwardPath(Common.java:170)
  at 
servletunit.struts.CactusStrutsTestCase.verifyForward(CactusStrutsTestCase.java:432)
  

 However, if I delete extends=myDefault from the configure for 
myApp.display.page in tiles-defs.xml, then the test case passed.
 It seems there is an issue with the tiles extend, why this is happening? Do 
you have any idea or workaround?




-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Problem with Tiles

2005-09-14 Thread Deepesh Nandal
Hi There,
   I am stuck at one place while working with tiles, please help.
I have my tiles-defs.xml as this:

tiles-definitions
 definition name=.mainLayout path=/WEB-INF/tiles/layout.jsp
  put name=title  value=Welcome to Net Model/  
  put name=pageheading  value=/  
  put name=header value=/WEB-INF/tiles/header.jsp/   
  put name=sider  value=/WEB-INF/tiles/sider.jsp/
  put name=body   value=/
  put name=footer value=/WEB-INF/tiles/footer.jsp/
 /definition 
 definition name=index.page extends=.mainLayout
  put name=pageheading value=Login /
  put name=body
   value=/WEB-INF/tiles/user-login.jsp type=page/   
  /definition
/tiles-definitions

AND  /WEB-INF/tiles/layout.jsp  as this:
%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
html:html
 head titletiles:getAsString name=title//title
 META http-equiv=Content-Type content=text/html; charset=UTF-8
 LINK href=style.css type=text/css rel=stylesheet
 /head
 body
tiles:insert attribute=header /br
 tiles:insert attribute=sider /br
 tiles:insert attribute=body /br
 tiles:insert attribute=footer /

 /body
/html:html

Now, I need to print the variable 'pageheading'( defined in definition 
'.mainLayout')  in /WEB-INF/tiles/header.jsp .
I cannot use tiles:getAsString name=pageheading/ inside 
/WEB-INF/tiles/header.jsp  as pageheading is valid in 
/WEB-INF/tiles/layout.jsp only . So how do I pass pageheading from 
index.page to header.jsp through .mainLayout ...

Please help .

Many Thanks,
Deepesh Nandal.


RE: problem with Tiles Struts 1.3 / Found exception stack Trace /apologies

2005-04-28 Thread Marco Mistroni
Hello all,
HUUGE apologies to Struts 1.3  Tiles 1.3 team..
Tiles worked just fine..it was me that in migrating app
From 1.2 to 1.3 I removed one plugin that was storing
Some data in applicationContext

The null pointer exception in tiles made me think that
Tiles was the problem..

Again, apologies, everything is working just fine..

Regards
marco

-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2005 15:34
To: Marco Mistroni; 'Struts Users Mailing List'
Subject: RE: problem with Tiles  Struts 1.3 / Found exception stack
Trace

At 2:58 PM +0100 4/27/05, Marco Mistroni wrote:
   I am not blaming Struts 1.3  :-)
I am actually more concerned with Tiles by itself, since I was not
Able to use the same .tld file that I was able to use with Struts 1.1

Yes, we should make sure to note that on the migrating to Struts 
1.3 page -- which I just got started...
Oh, wait -- the TLD hasn't changed since 1.2, and I think we should 
continue to have each migration notes page be focused on since the 
last version -- so I left this out -- but still, Marco and any 
others who are checking out Struts 1.3 are encouraged to help build 
this page:

http://wiki.apache.org/struts/StrutsUpgradeNotes12to13

By the way, I'm currently in active development on a Struts 1.3 
application, and people should not be too nervous about checking it 
out -- things are humming along smoothly, and while I'm not claiming 
that 1.3 is tested enough to be deemed GA, it's not showing any 
really weird behavior.  You don't need to do anything differently to 
use Struts 1.3 (besides understanding the new multi-jar packaging); 
you should be able to totally ignore most of the new stuff until 
you're ready for it.  In fact, we need some users like that to help 
verify our goal of backwards compatibility!

http://svn.apache.org/builds/struts/nightly/

Joe

-- 
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
Narrow minds are weapons made for mass destruction  -The Ex

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



problem with Tiles Struts 1.3

2005-04-27 Thread Marco Mistroni








Hello all,

 I
have moved my application from Struts 1.1 to Struts 1.3, and I am currently
experiencing problems

With Tiles.

Attached are all the files that I was
using with Struts 1.1. and the application worked just
fine.

I am afraid I dont have exception
stack trace (I had problem with my mail account L ), however

I was getting NullPointerException in pages where there was the tile:insert tag
(such as

classicLayout.jsp)



Now, for use with Struts 1.3 I have
changed the struts-tiles.tld since I noticed that
some classes

Were moved to a different package (from org.apache.struts.taglib.tiles to org.apache.struts.tiles.taglib)



So I have replaced all org.apache.struts.taglib.tiles
to org.apache.struts.tiles.taglib, but still when
running

My application I got exception.



Can anyone spot whats the problem
with tiles? Am I using the correct struts-tiles.tld?


Do I need additional files?

I tried to put the two logging files
mentioned in the Tiles documentation in my \classes directory, but still

I am experiencing same problem.



Has anyone succeeded to use tiles with
Struts 1.3?



Thanks in advance and regars

 marco














?xml version=1.0 encoding=UTF-8 ?

!DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd;

struts-config

  !-- == Data Sources Definitions === --
  !--
Define your Struts data sources in a file called struts-data-sources.xml and place
it in your merge directory.
  --

  !-- == Form Bean Definitions === --
  form-beans

   form-bean name=insertForm
   type=com.myapp.beans.EntryBean
  form-property name=date type=java.util.Date/
  form-property name=dateString type=java.lang.String/
  form-property name=amount type=java.lang.Double/
  form-property name=type type=java.lang.Integer/
  form-property name=description type=java.lang.String/
  form-property name=user type=java.lang.String/
  form-property name=statusMsg type=java.lang.String/
  form-property name=buttonSelected type=java.lang.String/
/form-bean
form-bean name=queryForm
   type=com.myapp.beans.QueryTest
  form-property name=queryType type=java.lang.String[]/
  form-property name=buttonSelected type=java.lang.String/
  form-property name=type type=java.lang.Integer/
  form-property name=dateStart type=java.lang.String/
  form-property name=dateEnd type=java.lang.String/
  form-property name=start type=java.util.Date/
  form-property name=end type=java.util.Date/
  form-property name=result type=java.util.List/
  form-property name=resultAmount type=java.lang.Double/
  form-property name=ignoreUser type=java.lang.Boolean initial=true/
  form-property name=actualType type=java.util.List/
  form-property name=statusMsg type=java.lang.String/  
  form-property name=username type=java.lang.String/
/form-bean
   form-bean name=editForm
   type=org.apache.struts.action.DynaActionForm
  form-property name=date type=java.util.Date/
  form-property name=dateString type=java.lang.String/
  form-property name=amount type=java.lang.Double/
  form-property name=type type=java.lang.Integer/
  form-property name=description type=java.lang.String/
  form-property name=user type=java.lang.String/
  form-property name=statusMsg type=java.lang.String/
  form-property name=id type=java.lang.Integer/ 
  form-property name=buttonSelected type=java.lang.String/
  form-property name=sessionid type=java.lang.String/
   /form-bean

   form-bean name=stockForm
   type=org.apache.struts.action.DynaActionForm
  form-property name=date type=java.util.Date/
  form-property name=dateString type=java.lang.String/
  form-property name=stockPrice type=java.lang.Double/
  form-property name=company type=java.lang.String/
  form-property name=text type=java.lang.String/
  form-property name=stockMove type=java.lang.Integer/
  form-property name=statusMsg type=java.lang.String/
   /form-bean
   form-bean name=queryStock
  type=org.apache.struts.action.DynaActionForm
  form-property name=queryType type=java.lang.String/
  form-property name=buttonSelected type=java.lang.String/
  form-property name=name type=java.lang.String/
  form-property name=dateStart type=java.lang.String/
  form-property name=dateEnd type=java.lang.String/
  form-property name=start type=java.util.Date/
  form-property name=end type=java.util.Date/
  form-property name=result type=java.util.List/
  form-property name=resultAmount type=java.lang.Double/
  form-property name=statusMsg type=java.lang.String/  
/form-bean
form-bean name=scheduleForm
   type=org.apache.struts.action.DynaActionForm

Re: problem with Tiles Struts 1.3

2005-04-27 Thread ziggler
where is struts1.3?

On 4/27/05, Marco Mistroni [EMAIL PROTECTED] wrote:
 
 
 Hello all,
 
 I have moved my application from Struts 1.1 to Struts 1.3, and I
 am currently experiencing problems
 
 With Tiles.
 
 Attached are all the files that I was using with Struts 1.1. and the
 application worked just fine.
 
 I am afraid I don't have exception stack trace (I had problem with my mail
 account L  ), however
 
 I was getting  NullPointerException   in pages where there was the
 tile:insert  tag (such as
 
 classicLayout.jsp)
 
  
 
 Now, for use with Struts 1.3 I have changed the struts-tiles.tld since I
 noticed that some classes
 
 Were moved to a different package  (from org.apache.struts.taglib.tiles to
 org.apache.struts.tiles.taglib)
 
  
 
 So I have replaced all org.apache.struts.taglib.tiles to
 org.apache.struts.tiles.taglib, but still when running
 
 My application I got exception.
 
  
 
 Can anyone spot what's the problem with tiles? Am I using the correct 
 struts-tiles.tld? 
 
 Do I need additional files?
 
 I tried to put the two logging files mentioned in the Tiles documentation in
 my \classes directory, but still
 
 I am experiencing same problem.
 
  
 
 Has anyone succeeded to use tiles with Struts 1.3?
 
  
 
 Thanks in advance and regars
 
 marco
 
  
 
  
 
  
 
  
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-- 
Fasten your seat belt. Here we go... 



RE: problem with Tiles Struts 1.3 / Found exception stack Trace

2005-04-27 Thread Marco Mistroni


Hello all,
I found exception stack trace for problem mentioned..
Will it 'enlighten' my problem?
I have moved my application from Struts 1.1 to Struts 1.3, and I
am currently experiencing problems
With Tiles.
Attached are all the files that I was using with Struts 1.1. and the
application worked just fine.

Full stack trace provided at end of message..
Now, for use with Struts 1.3 I have changed the struts-tiles.tld since I
noticed that some classes
Were moved to a different package  (from org.apache.struts.taglib.tiles
to org.apache.struts.tiles.taglib)

So I have replaced all org.apache.struts.taglib.tiles to
org.apache.struts.tiles.taglib, but still when running
My application I got exception.

Can anyone spot what's the problem with tiles? Am I using the correct
struts-tiles.tld? 
Do I need additional files?
I tried to put the two logging files mentioned in the Tiles
documentation in my \classes directory, but still
I am experiencing same problem.

Has anyone succeeded to use tiles with Struts 1.3?

Thanks in advance and regars
Marco



 STACK TRACE ***

22:46:47,234 INFO  [STDOUT] [TRACE] PropertyMessageResources -
-loadLocale() 2005-04-26 22:46:47,234 INFO  [STDOUT] [TRACE]
PropertyMessageResources - -  Loading resource
'org/apache/struts/taglib/html/LocalStrings.properties'
2005-04-26 22:46:47,234 INFO  [STDOUT] [TRACE] PropertyMessageResources
- -  Loading resource completed 2005-04-26 22:46:47,234 ERROR
[org.jboss.web.localhost.Engine] ApplicationDispatcher[/strutschain-web]
Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException
at
org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:366
)
at
org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:186)
at
org.apache.jsp.insertBody_jsp._jspService(insertBody_jsp.java:172)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:324)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:703)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDisp
atcher.java:589)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispat
cher.java:499)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja
va:966)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:5
81)
at
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
at
org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
at
org.apache.struts.tiles.taglib.InsertTag.doInclude(InsertTag.java:756)
at
org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTa
g.java:888)
at
org.apache.struts.tiles.taglib.InsertTag.doEndTag(InsertTag.java:458)
at
org.apache.jsp.layout.classicLayout_jsp._jspx_meth_tiles_insert_1(classi
cLayout_jsp.java:298)
at
org.apache.jsp.layout.classicLayout_jsp._jspService(classicLayout_jsp.ja
va:116)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:324)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:703)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDisp
atcher.java:589)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispat
cher.java:499)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja
va:966)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:5
81)
at
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
at
org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135

RE: problem with Tiles Struts 1.3

2005-04-27 Thread Marco Mistroni
http://svn.apache.org/builds/struts/maven/nightly/

-Original Message-
From: ziggler [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2005 09:09
To: Struts Users Mailing List
Subject: Re: problem with Tiles  Struts 1.3

where is struts1.3?
On 4/27/05, Marco Mistroni [EMAIL PROTECTED] wrote:   Hello
all,  I have moved my application from Struts 1.1 to
Struts 1.3, and I am currently experiencing problems  With Tiles. 
Attached are all the files that I was using with Struts 1.1. and the
application worked just fine.  I am afraid I don't have exception
stack trace (I had problem with my mail account L  ), however  I was
getting  NullPointerException   in pages where there was the
tile:insert  tag (such as  classicLayout.jsp) Now, for use
with Struts 1.3 I have changed the struts-tiles.tld since I noticed
that some classes  Were moved to a different package  (from
org.apache.struts.taglib.tiles to org.apache.struts.tiles.taglib)   
 So I have replaced all org.apache.struts.taglib.tiles to
org.apache.struts.tiles.taglib, but still when running  My application
I got exception. Can anyone spot what's the problem with tiles?
Am I using the correct  struts-tiles.tld?   Do I need additional
files?  I tried to put the two logging files mentioned in the Tiles
documentation in my \classes directory, but still  I am experiencing
same problem. Has anyone succeeded to use tiles with Struts
1.3? Thanks in advance and regars  marco
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED] For
additional commands, e-mail: [EMAIL PROTECTED]   

-- Fasten your seat belt. Here we go... 


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



RE: problem with Tiles Struts 1.3 / Found exception stack Trace

2005-04-27 Thread Joe Germuska
Just to make sure, if you put the contents of this tile directly in 
line in the page, you don't get this exception?  I'm using tiles 
generally with Struts 1.3 with no problems, including inlining 
elements of a form where the form is in one page and the fields are 
in other tiles.

I did run into some problems in the last week when I tried to use 
tiles:put inside a tiles:insert, but that's not something I've 
done a lot in the past, so I wrote it off to an incomplete 
understanding of the Tiles JSP tags.   I was trying to basically pass 
a parameter object into the page scope of the referenced JSP, but 
it wasn't being found.  My work around was to put things in request 
scope instead of expecting tiles:put to get them into the page scope 
of the included tile -- is that the nature of your problem?  From the 
description it could be.  I don't quite see how Struts 1.3 could be 
to blame, but maybe I'm just not thinking about it correctly.

Joe
At 9:10 AM +0100 4/27/05, Marco Mistroni wrote:
Hello all,
I found exception stack trace for problem mentioned..
Will it 'enlighten' my problem?
I have moved my application from Struts 1.1 to Struts 1.3, and I
am currently experiencing problems
With Tiles.
Attached are all the files that I was using with Struts 1.1. and the
application worked just fine.
Full stack trace provided at end of message..
Now, for use with Struts 1.3 I have changed the struts-tiles.tld since I
noticed that some classes
Were moved to a different package  (from org.apache.struts.taglib.tiles
to org.apache.struts.tiles.taglib)
So I have replaced all org.apache.struts.taglib.tiles to
org.apache.struts.tiles.taglib, but still when running
My application I got exception.
Can anyone spot what's the problem with tiles? Am I using the correct
struts-tiles.tld?
Do I need additional files?
I tried to put the two logging files mentioned in the Tiles
documentation in my \classes directory, but still
I am experiencing same problem.
Has anyone succeeded to use tiles with Struts 1.3?
Thanks in advance and regars
Marco

 STACK TRACE ***
22:46:47,234 INFO  [STDOUT] [TRACE] PropertyMessageResources -
-loadLocale() 2005-04-26 22:46:47,234 INFO  [STDOUT] [TRACE]
PropertyMessageResources - -  Loading resource
'org/apache/struts/taglib/html/LocalStrings.properties'
2005-04-26 22:46:47,234 INFO  [STDOUT] [TRACE] PropertyMessageResources
- -  Loading resource completed 2005-04-26 22:46:47,234 ERROR
[org.jboss.web.localhost.Engine] ApplicationDispatcher[/strutschain-web]
Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException
at
org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:366
)
at
org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:186)
at
org.apache.jsp.insertBody_jsp._jspService(insertBody_jsp.java:172)
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
Narrow minds are weapons made for mass destruction  -The Ex

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


RE: problem with Tiles Struts 1.3 / Found exception stack Trace

2005-04-27 Thread Marco Mistroni
Hello Joe,
I am not blaming Struts 1.3  :-)
I am actually more concerned with Tiles by itself, since I was not 
Able to use the same .tld file that I was able to use with Struts 1.1

Can anyone send me (or tell me where I can find) the latest
struts-tiles.tld?

Because the one with Struts 1.1. does not work with Tiles 1.3

Thanx and regards
marco

-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2005 14:10
To: Marco Mistroni; user@struts.apache.org
Subject: RE: problem with Tiles  Struts 1.3 / Found exception stack
Trace

Just to make sure, if you put the contents of this tile directly in 
line in the page, you don't get this exception?  I'm using tiles 
generally with Struts 1.3 with no problems, including inlining 
elements of a form where the form is in one page and the fields are 
in other tiles.

I did run into some problems in the last week when I tried to use 
tiles:put inside a tiles:insert, but that's not something I've 
done a lot in the past, so I wrote it off to an incomplete 
understanding of the Tiles JSP tags.   I was trying to basically pass 
a parameter object into the page scope of the referenced JSP, but 
it wasn't being found.  My work around was to put things in request 
scope instead of expecting tiles:put to get them into the page scope 
of the included tile -- is that the nature of your problem?  From the 
description it could be.  I don't quite see how Struts 1.3 could be 
to blame, but maybe I'm just not thinking about it correctly.

Joe

At 9:10 AM +0100 4/27/05, Marco Mistroni wrote:
Hello all,
   I found exception stack trace for problem mentioned..
Will it 'enlighten' my problem?
   I have moved my application from Struts 1.1 to Struts 1.3, and I
am currently experiencing problems
With Tiles.
Attached are all the files that I was using with Struts 1.1. and the
application worked just fine.

Full stack trace provided at end of message..
Now, for use with Struts 1.3 I have changed the struts-tiles.tld since
I
noticed that some classes
Were moved to a different package  (from org.apache.struts.taglib.tiles
to org.apache.struts.tiles.taglib)

So I have replaced all org.apache.struts.taglib.tiles to
org.apache.struts.tiles.taglib, but still when running
My application I got exception.

Can anyone spot what's the problem with tiles? Am I using the correct
struts-tiles.tld?
Do I need additional files?
I tried to put the two logging files mentioned in the Tiles
documentation in my \classes directory, but still
I am experiencing same problem.

Has anyone succeeded to use tiles with Struts 1.3?

Thanks in advance and regars
   Marco



 STACK TRACE ***

22:46:47,234 INFO  [STDOUT] [TRACE] PropertyMessageResources -
-loadLocale() 2005-04-26 22:46:47,234 INFO  [STDOUT] [TRACE]
PropertyMessageResources - -  Loading resource
'org/apache/struts/taglib/html/LocalStrings.properties'
2005-04-26 22:46:47,234 INFO  [STDOUT] [TRACE] PropertyMessageResources
- -  Loading resource completed 2005-04-26 22:46:47,234 ERROR
[org.jboss.web.localhost.Engine]
ApplicationDispatcher[/strutschain-web]
Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException
   at
org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:36
6
)
   at
org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:186)
   at
org.apache.jsp.insertBody_jsp._jspService(insertBody_jsp.java:172)

-- 
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
Narrow minds are weapons made for mass destruction  -The Ex

-
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: problem with Tiles Struts 1.3 / Found exception stack Trace

2005-04-27 Thread Joe Germuska
At 2:58 PM +0100 4/27/05, Marco Mistroni wrote:
I am not blaming Struts 1.3  :-)
I am actually more concerned with Tiles by itself, since I was not
Able to use the same .tld file that I was able to use with Struts 1.1
Yes, we should make sure to note that on the migrating to Struts 
1.3 page -- which I just got started...
Oh, wait -- the TLD hasn't changed since 1.2, and I think we should 
continue to have each migration notes page be focused on since the 
last version -- so I left this out -- but still, Marco and any 
others who are checking out Struts 1.3 are encouraged to help build 
this page:

http://wiki.apache.org/struts/StrutsUpgradeNotes12to13
By the way, I'm currently in active development on a Struts 1.3 
application, and people should not be too nervous about checking it 
out -- things are humming along smoothly, and while I'm not claiming 
that 1.3 is tested enough to be deemed GA, it's not showing any 
really weird behavior.  You don't need to do anything differently to 
use Struts 1.3 (besides understanding the new multi-jar packaging); 
you should be able to totally ignore most of the new stuff until 
you're ready for it.  In fact, we need some users like that to help 
verify our goal of backwards compatibility!

http://svn.apache.org/builds/struts/nightly/
Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
Narrow minds are weapons made for mass destruction  -The Ex

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


Re: How I decided to handle the dynamic titles/label problem with Tiles

2005-01-28 Thread Rick Reumann
bump
Dakota Jack,
Still interested in how you would provide an implementation since you 
mention you didn't like the view being tightly bound.

Rick Reumann wrote the following on 1/27/2005 10:49 AM:
Dakota Jack wrote the following on 1/27/2005 12:24 AM:
For me, and of course I speak for myself alone, I could not stand the
view being so tightly bound as your suggestion.  Maybe I misunderstand
what you are doing.
The reason I like the approach I favor is that you can write the
Struts code in the Action, etc., and the code on the JSP pages without
knowing a thing about what is happening behind the scenes.  You really
don't even need collaboration.  You can even write simply tools to
build test classes by code generation for whatever is on the JSP pages
without much difficulty.

I'd be interested more in how you would handle this. I do not like the 
view 'tightly' bound with Actions either, but reality often kicks in and 
sometimes I don't see a convenient way to handle things. So, I'll throw 
the question then back to you concerning how you would handle the 
problem at hand...

To make it simple imagine you want a title to display that is based in a 
reusable layout page that can have some dynamic information based on 
'what was done' in your business method. For example you want a title to 
display:

Updating user John Doe of Acme Company
Explain to me where you would set John Doe and set Acme Company so 
that the title section of a tile would have access to those values? I do 
not see how you can abstract that out very much. You might be able to 
put another layer (possibly a post filter) where you can code some logic 
that determines where you are going and what it needs to get out and set 
up for the view. I thought of this approach and I find it ends up doing 
yet another problem I see in so many web apps - over complication. We 
think we are simplifying things and making things more clean yet when in 
actuality it just makes things more confusing - especially to a new 
person that comes on board. So I'd be interested in your approach to the 
real world problem above.

I often use the same approach when setting up some custom success 
messages. For example your view layer might not have access to a User 
object yet your action when you saved does, but you might want display a 
success message such as

John Doe of 1245 North Street was successfully updated
Of course remember I'm not putting the exact syntax of the message into 
scope from the Action - I'm just adding the relevant params the 
MessageResources needs ie:

messages.add(ActionMessages.GLOBAL_MESSAGE, new 
ActionMessage(message.update.success, userName, companyName));

saveMessages(request, messages);
I'm probably just being dense but I don't see what the following, you 
mention, would help with:

 Also, I like to have this state object wrapped such that there is an
interface not unlike getState(...) for either the Action or the model.
 Whatever is in between the interface and the map is purely
implementation and subject to whatever choices, improvements, etc. one
might make.
I'd really appreciate more feedback with a practical example, using the 
situation provided above. Thanks a lot.


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


Re: How I decided to handle the dynamic titles/label problem with Tiles

2005-01-27 Thread Rick Reumann
Dakota Jack wrote the following on 1/27/2005 12:24 AM:
For me, and of course I speak for myself alone, I could not stand the
view being so tightly bound as your suggestion.  Maybe I misunderstand
what you are doing.
The reason I like the approach I favor is that you can write the
Struts code in the Action, etc., and the code on the JSP pages without
knowing a thing about what is happening behind the scenes.  You really
don't even need collaboration.  You can even write simply tools to
build test classes by code generation for whatever is on the JSP pages
without much difficulty.
I'd be interested more in how you would handle this. I do not like the 
view 'tightly' bound with Actions either, but reality often kicks in and 
sometimes I don't see a convenient way to handle things. So, I'll throw 
the question then back to you concerning how you would handle the 
problem at hand...

To make it simple imagine you want a title to display that is based in a 
reusable layout page that can have some dynamic information based on 
'what was done' in your business method. For example you want a title to 
display:

Updating user John Doe of Acme Company
Explain to me where you would set John Doe and set Acme Company so 
that the title section of a tile would have access to those values? I do 
not see how you can abstract that out very much. You might be able to 
put another layer (possibly a post filter) where you can code some logic 
that determines where you are going and what it needs to get out and set 
up for the view. I thought of this approach and I find it ends up doing 
yet another problem I see in so many web apps - over complication. We 
think we are simplifying things and making things more clean yet when in 
actuality it just makes things more confusing - especially to a new 
person that comes on board. So I'd be interested in your approach to the 
real world problem above.

I often use the same approach when setting up some custom success 
messages. For example your view layer might not have access to a User 
object yet your action when you saved does, but you might want display a 
success message such as

John Doe of 1245 North Street was successfully updated
Of course remember I'm not putting the exact syntax of the message into 
scope from the Action - I'm just adding the relevant params the 
MessageResources needs ie:

messages.add(ActionMessages.GLOBAL_MESSAGE, new 
ActionMessage(message.update.success, userName, companyName));

saveMessages(request, messages);
I'm probably just being dense but I don't see what the following, you 
mention, would help with:

 Also, I like to have this state object wrapped such that there is an
interface not unlike getState(...) for either the Action or the model.
 Whatever is in between the interface and the map is purely
implementation and subject to whatever choices, improvements, etc. one
might make.
I'd really appreciate more feedback with a practical example, using the 
situation provided above. Thanks a lot.

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


How I decided to handle the dynamic titles/label problem with Tiles

2005-01-26 Thread Rick Reumann
For those who care. The question I posed was how do people deal with the 
situation when using Tiles where they often need to create titles and or 
 information for headers that is slightly dynamic. For example rather 
than simply have a Title or label that says...

User Selection you might want a Title/label that says..
User Selection For Company Acme Inc.
Most of the suggestions revolved around putting the title in some sort 
of scope from within your Action which I didn't really like since what 
if the display requirement changed - you don't want to have to be 
digging into source code in order to change a label. For example with 
the above maybe the title later needs to read Acme Inc. select user

The following solution seems to be working nicely for me.
For custom stuff such as a company name you would put that into scope 
from within the Action (that's ok because it's not really the label only 
part of it).  Since the struts resources file can take up to four params 
you can add the params from your action using any labeling convention 
you want but for the sake of example I'm using messageParamA, 
messageParamB, messageParamC, messageParamD.

A tag file is used to display this info, but before I show that. Here's 
a sample of usage, using the example above

1) resources file:
label.select.user=Select User For Company {0}
2) In your action before you get to the page
request/session setAttribute(messageParamA, companyName )
//of course better to use a constant to represent your messageParam's ie 
( Constants.MESSAGE_1, companyName )

3) In your tag defintion for the page
put name=page.title.key value=label.select.user type=string/
4) In you reusable layout definition
title
tags:TilesDisplayMessage tilesDisplayKey=page.title.key/
/title
The nice thing about the above is you can change around the title in 
your resources file, yet you still get the use of the dynamic attributes 
you want to add.

The above also works nice for headers on a page. Maybe you have a 
standard header tile that is not part of your content and you need to 
have somewhat dynamic header labels.

You could just do
header.jsp
btags:TilesDisplayMessage tilesDisplayKey=header.label.key//b
and your tiles defintion would have
put name=header.label.key value=some.resource.def type=string/
The tag file is very simple
//TilesDisplayMessage.tag
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
%@ taglib prefix=tiles uri=http://struts.apache.org/tags-tiles; %
%@ taglib prefix=fmt uri=http://java.sun.com/jsp/jstl/fmt; %
%@ attribute name=tilesDisplayKey %
c:set var=params_display
tiles:getAsString name=${tilesDisplayKey}/
/c:set
fmt:message key=${params_display}
fmt:param value=${messageParamA}/
fmt:param value=${messageParamB}/
fmt:param value=${messageParamC}/
fmt:param value=${messageParamD}/
/fmt:message
If someone has a better way to handle this, please let me know.
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How I decided to handle the dynamic titles/label problem with Tiles

2005-01-26 Thread Dakota Jack
snip
On Wed, 26 Jan 2005 16:12:17 -0500, Rick Reumann [EMAIL PROTECTED] wrote:
 If someone has a better way to handle this, please let me know.
/snip

I don't know if this is better or not, but I really prefer having
some sort of module or area or whatever you want to call it that
handles state for the view separate from page, request, session and
application scopes.  I prefer having the state be a map backed or list
handler backed class that is easily used to display state to the view.
 Also, I like to have this state object wrapped such that there is an
interface not unlike getState(...) for either the Action or the model.
 Whatever is in between the interface and the map is purely
implementation and subject to whatever choices, improvements, etc. one
might make.

For me, and of course I speak for myself alone, I could not stand the
view being so tightly bound as your suggestion.  Maybe I misunderstand
what you are doing.

The reason I like the approach I favor is that you can write the
Struts code in the Action, etc., and the code on the JSP pages without
knowing a thing about what is happening behind the scenes.  You really
don't even need collaboration.  You can even write simply tools to
build test classes by code generation for whatever is on the JSP pages
without much difficulty.

Anyway, that is my $.02 worth on this.  I think we have different
approaches on this and have the greatest respect for yours as well.

Jack

-- 
--

You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



problem with tiles

2004-11-05 Thread Amit Gupta
Hi Every body,

I developed a page using tiles and used struts-html tags in template page. As a result 
when main page is excuted struts-html tags in template page are not rendered. How to 
get Struts-html tags rendred when calling template page in main page?

Amit Gupta

RE: problem with tiles

2004-11-05 Thread David G. Friedman
Amit,

What do you mean by main page?  Your web.xml's welcome-file-list such as
index.jsp?  If so, I posted about it within the last 24 hours.  Try
something like this in your index.jsp file:

%@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
tiles:insert definition=someDefinition/

Regards,
David

-Original Message-
From: Amit Gupta [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 06, 2004 12:55 AM
To: Struts Users Mailing List
Subject: problem with tiles


Hi Every body,

I developed a page using tiles and used struts-html tags in template page.
As a result when main page is excuted struts-html tags in template page are
not rendered. How to get Struts-html tags rendred when calling template page
in main page?

Amit Gupta


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



Problem sharing Tiles between applications (2)

2004-10-08 Thread Brown, Robert
Greetings:

   Perhaps you can help me with a real problem I am having using Tiles.

   I have an understanding of how to use Tiles; I have several pages that
use several parts of JSPs, as illustrated by the example below:

%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

tiles:insert page=/layouts/mainlayout.jsp flush=true
tiles:put name=title value=Typical Title of Page /
tiles:put name=banner value=/parts/toppart.jspf /
tiles:put name=menu value=/parts/menu.jspf / 
tiles:put name=content value=/content/mainpg.jspf /
tiles:put name=footer value=/parts/footer.jspf /
/tiles:insert

The names of the JSPs (and the parameters) should speak for themselves.

   I have several pages within my application which reuse the banner,
menu, and footer pages. My problem arises when I attempt to use these
same pages in another application.

   What I tried to do is create another application and have it point to the
same banner, menu, and footer pages. The exact pages. What I want to
do is have a common directory that has toppart.jspf, menu.jspf, and
footer.jspf, and have more than one application go to that directory for
those files. 

   Unfortunately, it appears that the different applications always look for
a subdirectory under their context root for the files in question --
especially if those applications are packaged in EAR files. When I try to
make one application go to another for the JSPs in question, an exception is
thrown because the tiles:insert tag cannot fnd the files.

   Has anyone else run into this problem that you know of? Is there a
possible solution? I would rather be able to reuse parts of JSPs between
applications; after all, the banner, menu, and footer are common across the
applications they will be used for. I do not want to have to have multiple
copies of these files; after all, isn't that what Tiles is supposed to help
avoid???

   Can you give some insight into this matter? Thank You.

-Robert Brown III

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



Problem sharing Tiles between applications

2004-10-07 Thread Brown, Robert
Greetings:

   Perhaps you can help me with a real problem I am having using Tiles.

   I have an understanding of how to use Tiles; I have several pages that
use several parts of JSPs, as illustrated by the example below:

%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

tiles:insert page=/layouts/mainlayout.jsp flush=true
tiles:put name=title value=Typical Title of Page /
tiles:put name=banner value=/parts/toppart.jspf /
tiles:put name=menu value=/parts/menu.jspf /
tiles:put name=content value=/content/mainpg.jspf /
tiles:put name=footer value=/parts/footer.jspf /
/tiles:insert

The names of the JSPs (and the parameters) should speak for themselves.

   I have several pages within my application which reuse the banner,
menu, and footer pages. My problem arises when I attempt to use these
same pages in another application.

   What I tried to do is create another application and have it point to the
same banner, menu, and footer pages. The exact pages. What I want to
do is have a common directory that has toppart.jspf, menu.jspf, and
footer.jspf, and have more than one application go to that directory for
those files. 

   Unfortunately, it appears that the different applications always look for
a subdirectory under their context root for the files in question --
especially if those applications are packaged in EAR files. When I try to
make one application go to another for the JSPs in question, an exception is
thrown because the tiles:insert tag cannot fnd the files.

   Has anyone else run into this problem that you know of? Is there a
possible solution? I would rather be able to reuse parts of JSPs between
applications; after all, the banner, menu, and footer are common across the
applications they will be used for. I do not want to have to have multiple
copies of these files; after all, isn't that what Tiles is supposed to help
avoid???

   Can you give some insight into this matter? Thank You.

-Robert Brown III

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



Problem with Tiles DTD

2004-06-25 Thread Ashwin D
Hi,

Our application resides on a machine which does not
have a direct connection to the internet. So, I have
changed all the references to dtds to be on the local
machine.

The struts  the tiles config file reference their 
dtds in the same directory.

!DOCTYPE tiles-definitions PUBLIC
 
 tiles_config_1_1.dtd


This works fine with Struts. However, Tiles throws an
exception at runtime about not being able to get the
DTD. Also, Tiles tries to look for the DTD in the
directory from which Tomcat was started. 

for e.g. if tomcat is started from /usr/app, Tiles
tries to look for the DTD in /usr/app

It looks like a bug with Tiles. I am wondering if
there is a known patch / fix to correct this problem.

I am using Struts 1.1 (official release) with Tomcat
5.0.19. 

Ashwin. 



__
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 

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



RE: Problem with Tiles DTD

2004-06-25 Thread Wendy Smoak
 From: Ashwin D [mailto:[EMAIL PROTECTED] 
 Our application resides on a machine which does not
 have a direct connection to the internet. So, I have
 changed all the references to dtds to be on the local
 machine.

If you leave the dtds alone, and leave them inside the .jar files, and
refer to them with the URI, (which may look like a URL, but isn't,) then
they will be located automatically with no connection to the internet.
[I think.  See below.]

So, this:

 !DOCTYPE tiles-definitions PUBLIC
   -//Apache Software Foundation//DTD Tiles Configuration 1.1//EN
   http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd;

will actually retrieve the dtd from inside the struts.jar file, where
the tiles-config_1_1.dtd file lives.  Unless I still don't understand
how this works, there is no need to do anything special.  (Granted I've
never had to work 'offline' and am still using Tomcat 4.1.  But since
nobody answered your prior message I figured I'd give it a shot.)

Craig posted a detailed explanation of how this all works not too long
ago, in response to a inquiry I made here.  Unfortunately, none of the
archives is cooperating with me right now, perhaps someone else can turn
it up.

Were you having problems that prompted you to make these changes?

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 


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