Re: Tomcat Struts = Problems with my first page
In the /WEB-INF/web.xml of your application u must have !-- The Usual Welcome File List -- welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list to describe wich is the first page open when someone access your application Lost World wrote: You cannot access the jsp like http://localhost:8080/MyFirstPage.jsp You should use Sturts-config to map your action to that JSP page. Then you should access the page which looks similar to http://localhost:8080/FirstAction.do --- [EMAIL PROTECTED] wrote: Yes, this is correct.. __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - 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: Tomcat Struts = Problems with my first page
This has to do with the applicationresources.properties files that you have configured in your struts-config.xml. It's not able to find the properties file that you have specified under the message-resources XML element, in the struts xml config file. This properties file can be placed under any WEB-INF directory, provided message-resources element points to it. Just check out one of the sample struts application. Vinod -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, March 18, 2005 9:57 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat Struts = Problems with my first page Hi There, I've created MyFirstStrutsPage.jsp: %@ page language=java % %@ taglib uri=/struts-bean.tld prefix=bean % %@ taglib uri=/struts-html.tld prefix=html % %@ taglib uri=/struts-logic.tld prefix=logic % html:html locale=true head titleTest Struts Page/title html:base/ /head bodybean:message key=index.text1 //body /html:html and my web.xml is as followed: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=_http://java.sun.com/xml/ns/j2ee_ (http://java.sun.com/xml/ns/j2ee) xmlns:xsi=_http://www.w3.org/2001/XMLSchema-instance_ (http://www.w3.org/2001/XMLSchema-instance) xsi:schemaLocation=_http://java.sun.com/xml/ns/j2ee_ (http://java.sun.com/xml/ns/j2ee) _http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd_ (http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd) version=2.4 display-nameWelcome to Tomcat/display-name description Welcome to Tomcat /description !-- JSPC servlet mappings start -- servlet servlet-nameorg.apache.jsp.index_jsp/servlet-name servlet-classorg.apache.jsp.index_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.index_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping !-- Define Struts -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping taglib taglib-uri/struts-tiles.tld/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib taglib taglib-uri/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib /web-app and i've created ApplicationResources.properties with the following entries: index.title = My first Struts application! index.text1 = This is my first Dynamic Struts application. However, when i request MyFirstStrutsPage.jsp is get the following error ( what have i done wrong, any ideas on how to fix it?): org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:373) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.NullPointerException org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java :1219) org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082) org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226) org.apache.jsp.registeruser_jsp._jspx_meth_bean_message_0(org.apache.jsp .registeruser_jsp:157) org.apache.jsp.registeruser_jsp._jspx_meth_html_html_0(org.apache.jsp.re gisteruser_jsp:118) org.apache.jsp.registeruser_jsp._jspService(org.apache.jsp.registeruser_ jsp:73) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:325) org.apache.jasper.servlet.JspServlet.service JspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Re: Tomcat Struts = Problems with my first page
ARe you requesting by typing in the browser http://localhost:8080/MyFirstStrutsPage.jsp? --- [EMAIL PROTECTED] wrote: Hi There, I've created MyFirstStrutsPage.jsp: %@ page language=java % %@ taglib uri=/struts-bean.tld prefix=bean % %@ taglib uri=/struts-html.tld prefix=html % %@ taglib uri=/struts-logic.tld prefix=logic % html:html locale=true head titleTest Struts Page/title html:base/ /head bodybean:message key=index.text1 //body /html:html and my web.xml is as followed: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=_http://java.sun.com/xml/ns/j2ee_ (http://java.sun.com/xml/ns/j2ee) xmlns:xsi=_http://www.w3.org/2001/XMLSchema-instance_ (http://www.w3.org/2001/XMLSchema-instance) xsi:schemaLocation=_http://java.sun.com/xml/ns/j2ee_ (http://java.sun.com/xml/ns/j2ee) _http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd_ (http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd) version=2.4 display-nameWelcome to Tomcat/display-name description Welcome to Tomcat /description !-- JSPC servlet mappings start -- servlet servlet-nameorg.apache.jsp.index_jsp/servlet-name servlet-classorg.apache.jsp.index_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.index_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping !-- Define Struts -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping taglib taglib-uri/struts-tiles.tld/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib taglib taglib-uri/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib /web-app and i've created ApplicationResources.properties with the following entries: index.title = My first Struts application! index.text1 = This is my first Dynamic Struts application. However, when i request MyFirstStrutsPage.jsp is get the following error ( what have i done wrong, any ideas on how to fix it?): org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.NullPointerException org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1219) org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082) org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226) org.apache.jsp.registeruser_jsp._jspx_meth_bean_message_0(org.apache.jsp.registeruser_jsp:157) org.apache.jsp.registeruser_jsp._jspx_meth_html_html_0(org.apache.jsp.registeruser_jsp:118) org.apache.jsp.registeruser_jsp._jspService(org.apache.jsp.registeruser_jsp:73) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.service JspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) __ 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: Tomcat Struts = Problems with my first page
Yes, this is correct..
Re: Tomcat Struts = Problems with my first page
You cannot access the jsp like http://localhost:8080/MyFirstPage.jsp You should use Sturts-config to map your action to that JSP page. Then you should access the page which looks similar to http://localhost:8080/FirstAction.do --- [EMAIL PROTECTED] wrote: Yes, this is correct.. __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]