Re: Jakarta Struts Initial Installed
Andre. javax.servlet.ServletException: Missing message for key welcome.title Thats the reason. You have to put your message keys into a directory that is containing to the classpath. Look your entry in the struts-config.xml (Message-Resources). Manfred Bussie, Andre D wrote: I recently installed the latest struts package. I installed struts to Tomcat 5.0.19 and I'm having problems deploying the struts-blank.war. I get the following message when I visit the struts-blank index page type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Missing message for key welcome.title org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCont extImpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:800) org.apache.jsp.pages.Welcome_jsp._jspService(Welcome_jsp.java:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:311) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.struts.actions.ForwardAction.execute(ForwardAction.java:158) org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:446) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 266) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause javax.servlet.jsp.JspException: Missing message for key welcome.title org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:298) org.apache.jsp.pages.Welcome_jsp._jspx_meth_bean_message_0(Welcome_jsp.j ava:144) org.apache.jsp.pages.Welcome_jsp._jspx_meth_html_html_0(Welcome_jsp.java :102) org.apache.jsp.pages.Welcome_jsp._jspService(Welcome_jsp.java:72) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:311) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.struts.actions.ForwardAction.execute(ForwardAction.java:158) org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:446) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 266) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) note The full stack trace of the root cause is available in the Tomcat logs. Any suggestions on how this can resolved? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: concurrency in struts
There are two concepts you have to understand: thread-safe and reentrant. A method is reentrant, if many threads can enter the method as the same time without conflicting. For that you only have to act on parameters and local variables. Threads only share the data- and the code-segment of an application. Every thread gets his own stack-segment, where all local variables and the parameters will be push onto. If you act in the execute-method only on the parameters and on local variables you are thread safe. If you will join shared ressources as database connections ... you have to take care, that such ressources are either pooled or the access is sychronized. So the message is: In the execute Method don't use global variables but only local variables. This and the parameters are pushed on your stack, that is only in your thread visible. Hope it helps Manfred Wolff Jignesh Patel wrote: Riyad, But does this methods are synchronized? Otherwise if two threads execute at the same time they can access the method at the same time. And result will be big mess. -Jignesh On Monday 10 May 2004 18:29, Riyad Kalla wrote: This question is actually what made me sign up to this mailing list... the answer is that there is no implicit concurrency. All your work/variables in Actions should be method-scoped and not use ANY class variables because of this. My specific questions was that I wanted to use a class variable ActionErrors so any of my methods (DispatchAction) could add errors without initializing a new ActionError instance, and return it. But this is incorrect and can/will introduce problems. So there is no concurrency in Struts. Jignesh Patel wrote: On Monday 10 May 2004 17:21, Jignesh Patel wrote: I am just wondering, how concurrent request will be handled by single Action class. Because for many form objects(as there are thousands of browser running with jsp forms) and there is only one action class. - 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: Fwd: RE: Problem with LookupDispatchAction and parameter operation
Don't forget the message resource bundle, where the keys button.consult and button.search are defined! Manfred Struts Framework wrote: I hava already this solution, but without sucess. - Segue mensagem encaminhada - De: Sanoj, Antony (IE10) [EMAIL PROTECTED] Data: Mon, 12 Apr 2004 08:26:07 -0700 Para: Struts Users Mailing List [EMAIL PROTECTED] Assunto: RE: Problem with LookupDispatchAction and parameter operation hi, html:form action=mapCoordinate.html table width=750 height=50 border=0 cellpadding=0 cellspacing=0 bgcolor=#C0C0C0 tr what is action=mapCoordinate.html ? Change it to mapCoordinate. Regards, Sanoj Antony -Original Message- From: Struts Framework [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 8:41 PM To: [EMAIL PROTECTED] Subject: Problem with LookupDispatchAction and parameter operation Hi, I'm using the following environment with LookupDispatchAction. struts-config.xml form-bean name=mapCoordinateForm type=com.contract.mapcoordinate.web.MapCoordinateForm/ action path=/mapCoordinate parameter=operation type=com.contract.mapcoordinate.web.MapCoordinateAction name=mapCoordinateForm scope=session forward name=consult path=/WEB-INF/jsp/mapCoordinate/mapCoordinateConsult.jsp redirect=false/ /action MapCoodinateAction.java public class MapCoordinateAction extends LookupDispatchAction { protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(button.consult, consult); map.put(button.search, search); return map; } public ActionForward consult( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { MapCoordinateForm mcf = (MapCoordinateForm) form; try { MapCoordinateDelegate delegate = new MapCoordinateDelegate(); request.setAttribute(stateOptionItemList, (java.util.Collection)delegate.getStates()); request.setAttribute(addressTypeOptionItemList, delegate.getAddressTypes()); return mapping.findForward(consult); } catch (MapCoordinateDelegateException mcde) { ActionErrors erros = new ActionErrors(); erros.add( error_on_server, new ActionError(errors.on.server, mcde.getMessage())); saveErrors(request, erros); return mapping.findForward(exceptions); } } public ActionForward search( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { StringBuffer buffer = new StringBuffer(http://geo/geo/geoSearch.do?searchInitialName=False;); MapCoordinateForm mcf = (MapCoordinateForm) form; try { MapCoordinateDelegate delegate = new MapCoordinateDelegate(); request.setAttribute(stateOptionItemList, (java.util.Collection)delegate.getStates()); request.setAttribute(addressTypeOptionItemList, delegate.getAddressTypes()); mcf.setMapCoordinateVOList( delegate.process(buffer.toString()) ); return mapping.findForward(consult); } catch (MapCoordinateDelegateException mcde) { ActionErrors erros = new ActionErrors(); erros.add( error_on_server, new ActionError(errors.on.server, mcde.getMessage())); saveErrors(request, erros); return mapping.findForward(exceptions); } } mapCoordinateConsult.jsp html:form action=mapCoordinate.html table width=750 height=50 border=0 cellpadding=0 cellspacing=0 bgcolor=#C0C0C0 tr td width=100% colspan=2 background=#E0E0E0 table border=0 width=100% cellpadding=0 cellspacing=0 tr background=#CC td align=center class=td width=100%bbean:message key=mapCoordinateConsult.title//b/td /tr /table /td br br /tr /table table width=750 border=0 cellpadding=0 cellspacing=0 /table table width=750 border=0 cellpadding=0 cellspacing=0 tr td align=right html:submit property=operation styleClass=flatButton bean:message key=button.search/ /html:submit /td /tr /table br /html:form My problem is when I call the
Re: can not retrieve action mapping?
Mu. don't define that.do but only /that and evrything will work fine. Be care, that you have described a servlet extension mapping in your web.xml. Manfred Mu Mike wrote: I have this.jsp under the dir /this, it has a form defined like the below form action=/that/that.do ... /form while in struts-that-config.xml, I have that.do defined yet it tells can not retrieve the action mapping, why? _ MSN Messenger: http://messenger.msn.com/cn - 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]