Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Struts: Using Wildcards in ActionMapping

Reply
Thread Tools

Struts: Using Wildcards in ActionMapping

 
 
Josh Martin
Guest
Posts: n/a
 
      11-20-2003
Struts Group -

I've been banging my head against a wall for three days trying all
kinds of things to get the ActionMapping wildcard feature to work.
I'm receiving an error (listed below under THE ERROR), but it goes
away if I remove the wildcard from the struts-config file (see SIMPLE
CHANGE TO STRUTS-CONFIG.XML THAT MAKES IT WORK). I found a site with
a JAR file that I also tried to use as a controller, but that didn't
work either. Any help would be very appreciated!

Josh


STRUTS WILDCARD DOCUMENTATION
http://jakarta.apache.org/struts/use...ping_wildcards


THE ERROR
Cannot retrieve mapping for action /basicNavigateProduct


SITE WITH A STRUTS CONTROLLER MEANT TO HANDLE WILDCARDS
http://www.twdata.org/struts-wildcard/


IN MY JSP
<html:form name="productForm" type="com.gxs.lowes.forms.ProductForm"
action="/basicNavigateProduct.do">


THE STRUTS-CONFIG.XML
<action-mappings>

<action path="/*NavigateProduct"
type="com.gxs.lowes.actions.NavigateProductAction"
name="productForm"
scope="session"
input="{1}"
validate="true">
</action>

</action-mappings>

<controller processorClass="org.twdata.struts.WildcardTilesReq uestProcessor"
inputForward="true"/>;


ALTERNATE STRUTS-CONFIG.XML CONTROLLER SETTINGS
<controller inputForward="true"/>;


SIMPLE CHANGE TO STRUTS-CONFIG.XML THAT MAKES IT WORK
<action-mappings>

<action path="/basicNavigateProduct"
type="com.gxs.lowes.actions.NavigateProductAction"
name="productForm"
scope="session"
input="basic"
validate="true">
</action>

</action-mappings>

<controller processorClass="org.twdata.struts.WildcardTilesReq uestProcessor"
inputForward="true"/>;
 
Reply With Quote
 
 
 
 
Sudsy
Guest
Posts: n/a
 
      11-20-2003
Josh Martin wrote:
> Struts Group -
>
> I've been banging my head against a wall for three days trying all
> kinds of things to get the ActionMapping wildcard feature to work.
> I'm receiving an error (listed below under THE ERROR), but it goes
> away if I remove the wildcard from the struts-config file (see SIMPLE
> CHANGE TO STRUTS-CONFIG.XML THAT MAKES IT WORK). I found a site with
> a JAR file that I also tried to use as a controller, but that didn't
> work either. Any help would be very appreciated!
>
> Josh


I was unable to duplicate your problem in JBoss-3.2.2, which uses
Tomcat 4.1. My attempts did confirm my concerns regarding Eclipse
stability, however. At one point the auto-sync failed and after
that I was unable to redeploy the application. Restarting Eclipse
turned out to be the only solution.
I also had to heed the warning about removing the stale servlets
compiled from the JSPs.
Could you post the precise error message? Server logs could help
too...

 
Reply With Quote
 
 
 
 
Josh Martin
Guest
Posts: n/a
 
      11-21-2003
Sudsy -

Thanks for your help. Here are the exceptions from the web page and
the server log. I'm also posting the lines from basic_jsp.java (the
compiled jsp) with line numbers. In your struts-config.xml, are you
using a special controller, or are you using the default? I've tried
both ways, but it doesn't work with either. Also, if I simply remove
the wildcard, it works with both.

Thanks,
Josh


***** FROM THE WEB BROWSER *****

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

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

exception

org.apache.jasper.JasperException: Cannot retrieve mapping for action
/basicNavigateProduct
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:193)
at com.gxs.lowespcm.util.compression.CompressionFilte r.doFilter(CompressionFilter.java:214)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(St andardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)

root cause

javax.servlet.ServletException: Cannot retrieve mapping for action
/basicNavigateProduct
at org.apache.jasper.runtime.PageContextImpl.handlePa geException(PageContextImpl.java:533)
at org.apache.jsp.basic_jsp._jspService(basic_jsp.jav a:8
at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:193)
at com.gxs.lowespcm.util.compression.CompressionFilte r.doFilter(CompressionFilter.java:214)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(St andardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)

--------------------------------------------------------------------------------

Apache Tomcat/4.1.24-LE-jdk14





***** FROM THE SERVER LOG FILE *****

org.apache.jasper.JasperException: Cannot retrieve mapping for action
/basicNavigateProduct
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:193)
at com.gxs.lowespcm.util.compression.CompressionFilte r.doFilter(CompressionFilter.java:214)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(St andardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
----- Root Cause -----
javax.servlet.ServletException: Cannot retrieve mapping for action
/basicNavigateProduct
at org.apache.jasper.runtime.PageContextImpl.handlePa geException(PageContextImpl.java:533)
at org.apache.jsp.basic_jsp._jspService(basic_jsp.jav a:8
at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:193)
at com.gxs.lowespcm.util.compression.CompressionFilte r.doFilter(CompressionFilter.java:214)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(St andardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)





***** From basic_jsp.java *****

61 try {
62 _jspxFactory = JspFactory.getDefaultFactory();
63 response.setContentType("text/html;charset=ISO-8859-1");
64 pageContext = _jspxFactory.getPageContext(this, request,
response,
65 null, true, 8192, true);
66 application = pageContext.getServletContext();
67 config = pageContext.getServletConfig();
68 session = pageContext.getSession();
69 out = pageContext.getOut();
70 _jspx_out = out;
71
72 out.write("\r\n");
73 out.write("\r\n\r\n");
74 out.write("\r\n");
75 out.write("\r\n");
76 out.write("\r\n");
77 out.write("\r\n");
78 out.write("\r\n");
79 out.write("\r\n\r\n");
80 Logger logger =
Logger.getLogger("com.gxs.lowespcm.jsp.menu.jsp");
81 out.write("\r\n\r\n");
82 if (_jspx_meth_tiles_insert_0(pageContext))
83 return;
84 } catch (Throwable t) {
85 out = _jspx_out;
86 if (out != null && out.getBufferSize() != 0)
87 out.clearBuffer();
88 if (pageContext != null) pageContext.handlePageException(t);
89 } finally {
90 if (_jspxFactory != null)
_jspxFactory.releasePageContext(pageContext);
91 }
92 }


> Could you post the precise error message? Server logs could help
> too...

 
Reply With Quote
 
Sudsy
Guest
Posts: n/a
 
      11-21-2003
Josh Martin wrote:
> Sudsy -
>
> Thanks for your help. Here are the exceptions from the web page and
> the server log. I'm also posting the lines from basic_jsp.java (the
> compiled jsp) with line numbers. In your struts-config.xml, are you
> using a special controller, or are you using the default? I've tried
> both ways, but it doesn't work with either. Also, if I simply remove
> the wildcard, it works with both.
>
> Thanks,
> Josh


I copied the struts-wildcard-0.3.1.jar into the /lib directory for
the application and used a controller processorClass of
org.twdata.struts.WildcardRequestProcessor. Here's an extract from
my $JBOSS_HOME/server/default/log/server.log file:

2003-11-20 18:01:47,753 INFO
[org.apache.struts.action.RequestProcessor] Processing a 'POST' for path
'/YYWildcardDemo'
2003-11-20 18:01:47,755 DEBUG [org.twdata.struts.ActionMappingMatcher]
Time converting action mapping: 1 ms
2003-11-20 18:01:47,755 DEBUG [org.apache.struts.util.RequestUtils]
Looking for ActionForm bean instance in scope 'request' under attribute
key 'WildcardForm'
2003-11-20 18:01:47,756 DEBUG [org.apache.struts.util.RequestUtils]
Creating new ActionForm instance of type 'com.myorg.WildcardForm'
2003-11-20 18:01:47,756 DEBUG [org.apache.struts.util.RequestUtils] -->
com.myorg.WildcardForm@1086036
2003-11-20 18:01:47,758 DEBUG
[org.apache.struts.action.RequestProcessor] Storing ActionForm bean
instance in scope 'request' under attribute key 'WildcardForm'
2003-11-20 18:01:47,759 DEBUG
[org.apache.struts.action.RequestProcessor] Populating bean properties
from this request
2003-11-20 18:01:47,759 DEBUG
[org.apache.struts.action.RequestProcessor] Validating input form
properties
2003-11-20 18:01:47,781 DEBUG
[org.apache.struts.action.RequestProcessor] Validation failed,
returning to '/WEB-INF/jsp/YY.jsp'
2003-11-20 18:01:47,782 DEBUG
[org.apache.struts.action.RequestProcessor] Delegating via forward to
'/WEB-INF/jsp/YY.jsp'

My post was to /YYWildcardDemo. The second line shows the conversion
being performed by org.twdata.struts.ActionMappingMatcher. The
remainder shows the appropriate processing with the final destination
popping out at the bottom.

Here's the form-bean and action from struts-config.xml:

<form-beans>
<form-bean
name="WildcardForm"
type="com.royalencore.WildcardForm"/>
<form-beans>
<action-mappings>
<action
path="/*WildcardDemo"
type="com.myorg.WildcardAction"
name="WildcardForm"
scope="request"
input="/WEB-INF/jsp/{1}.jsp"
unknown="false"
validate="true">
<forward>
name="continue"
path="/wildcard.html"
redirect="false"/>
</action>
</action-mappings>

And here's the controller spec from the same file:

<controller
contentType="text/html;charset=UTF-8"
nocache="true"
maxFileSize="100K"
processorClass="org.twdata.struts.WildcardRequestP rocessor"/>

In order to check for the correct processing of the {n} constructs
in the file, I used the following source for com.myorg.WildcardForm:

package com.myorg;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class WildcardForm extends ActionForm {

public ActionErrors validate( ActionMapping req,
HttpServletRequest resp ) {
ActionErrors response = new ActionErrors();
response.add( ActionErrors.GLOBAL_ERROR,
new ActionError( "xxx" ) );
return( response );
}
}

 
Reply With Quote
 
Josh Martin
Guest
Posts: n/a
 
      11-22-2003
Sudsy -

Thank you for your help. I can get a non-Tiles example to run on my
box now too. I'm still unable to make it work when a Tiles plugin is
used, despite the claim at the original website.

The bottom of my struts-config.xml looks nearly identical to the one
that's working, minus the tiles plugin. Have you ever gotten your's
to work in conjunction with Tiles. I promise this is my last question
- I have to finish this up for a project, so some copying/pasting may
occur despite valiant efforts!

Josh

<controller
contentType="text/html;charset=UTF-8"
nocache="true"
maxFileSize="100K"
processorClass="org.twdata.struts.WildcardTilesReq uestProcessor"/>


<!-- Message Resources -->

<message-resources parameter="test.ApplicationResources"/>


<!-- Required for Tiles. -->

<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
<set-property property="definitions-parser-validate" value="true"
/>
</plug-in>








Sudsy <(E-Mail Removed)> wrote in message

> I copied the struts-wildcard-0.3.1.jar into the /lib directory for
> the application and used a controller processorClass of
> org.twdata.struts.WildcardRequestProcessor. Here's an extract from
> my $JBOSS_HOME/server/default/log/server.log file:

 
Reply With Quote
 
Sudsy
Guest
Posts: n/a
 
      11-22-2003
Josh Martin wrote:
> Sudsy -
>
> Thank you for your help. I can get a non-Tiles example to run on my
> box now too. I'm still unable to make it work when a Tiles plugin is
> used, despite the claim at the original website.
>
> The bottom of my struts-config.xml looks nearly identical to the one
> that's working, minus the tiles plugin. Have you ever gotten your's
> to work in conjunction with Tiles. I promise this is my last question
> - I have to finish this up for a project, so some copying/pasting may
> occur despite valiant efforts!
>
> Josh


Sorry, but before your post I'd never even found the need for wildcard
matches! Trying to mix a mortar for Tiles...?
Sounds like you're on your own with this one, although I'm heartened
to hear that you got the rest of it working.

 
Reply With Quote
 
Josh Martin
Guest
Posts: n/a
 
      11-23-2003
Sudsy -

Thanks again for all of your help! I never needed them either, but in
this one, I have a major form loaded with data across a lot of pages,
but wanted to validate (i.e. input=....) each page separately.
Instead of copying/pasting the struts config, I just added a hidden
property in the form that tells me that page they came from, and then
call the validation from the action (versus letting Struts do it with
the form itself). Seems to be working fine. Tiles is great - I have
some relatively new programs, and I created a template with "DO NOT
CHANGE ABOVE/BELOW THIS" comments, and now they can just use HTML and
the Struts taglibs!

Josh

> Sorry, but before your post I'd never even found the need for wildcard
> matches! Trying to mix a mortar for Tiles...?
> Sounds like you're on your own with this one, although I'm heartened
> to hear that you got the rest of it working.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disadvantage of using wildcards in import statement. Dipankar Java 17 08-01-2009 02:36 PM
Using wildcards with Popen in the Subprocess module William Hudspeth Python 2 03-15-2007 07:47 PM
download multiple files using wildcards with WebClient.DownloadFile() Web learner ASP .Net 0 04-18-2006 10:08 PM
Using wildcards... Harlin Seritt Python 4 05-02-2005 10:00 PM
Struts validator and ActionMapping question. philoso Java 3 01-30-2004 01:53 AM



Advertisments