Hi Yariel Ramos Moreno,
Can you send your struts-confing's action mapping code.
Thanks and Regards,
Krishna Mattam
Team Member - CDF Toolset
Contact:044-22548575
Email: [EMAIL PROTECTED]
-Original Message-
From: Yariel Ramos Moreno [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 08, 2006 7:40 AM
To: user@struts.apache.org
Subject: Struts 1.1 and IExplorer
Hello:
I'm developing a web application using Struts 1.1 and Tiles. I have a
tile for searchs consisting in a JSP with the following code: .
Buscar Noticias
...
I have an ActionForm asociated to it with the definition of searchText
property and the get, set and reset methods. Also, there is a
LookupDispatchAction defining the mappings according with the selected
button. Here is the class:
public class SearchAction extends LookupDispatchAction {
public ActionForward op_search(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
return mapping.findForward("showSearch");
}
public ActionForward op_advSearch(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
return mapping.findForward("showAdvSearch");
}
protected Map getKeyMethodMap() {
Map map = new HashMap ();
map.put("", "op_search");
map.put("search.go", "op_search");
map.put("search.adv", "op_advSearch");
return (map);
}
}
The line map.put("", "op_search"); is for the case I press Enter in the
input area instead of pressing one of the defined buttons (I'm not sure
if it work this way, maybe I don't need it).
When I execute my application in Mozila Firefox, pressing Enter in the
input area, it works fine and forwards to showSearch correctly. But when
execute it in Internet Explorer, I get the following exception:
SEVERE: Servlet.service() for servlet action threw exception
javax.servlet.ServletException: Request[/search] does not contain
handler parameter named searchType at
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
ion.java:199)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
9)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:667)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
at java.lang.Thread.run(Thread.java:595)
What's the problem here? It's mine or it's an Internet Explorer bug with
Struts 1.1? Is there another way of doing what I want (calling the
correct forward when I press Enter in the input area), something like a
default value for my property or another method (searchText)?
I need some help as soon as you can, please.
Thanks in advance.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]