RE: struts begineer mahavir
They left out a very import piece... the struts piece! Add a file called hello-world/WEB-INF/struts-config.xml (you should have gotten an error that it was missing I would think) and put the following content in it... http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";> Then access the page with the following path /hello-world/hello.do That should do the trick. -Original Message- From: mahavir [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 5:44 AM To: Struts Users Mailing List Subject: struts begineer mahavir Hi Friends i am begineer to struts,i searched on the net to start studing struts.i got following one document,according to which i had written program but i am geetting the error.The error is at the end And the document that i got from the net is Create a Directory Structure The first step in creating any web application is creating the base directory that stores all of your information. We´ll call this base directory hello-world. Inside the hello-world base directory, create a WEB-INF directory in which to store application-level classes and information. For more information on the structure of a web application, see the Servlet specification. Copy Necessary Files The struts.jar file contains all necessary classes to run a Struts application, including the ActionServlet class and the taglib classes. In a normal binary distribution, the struts.jar file is located in the lib subdirectory of the installation. Copy it to the hello-world/WEB-INF/lib directory. The struts-bean.tld file contains all necessary taglib information to utilize the Struts message tag. In a binary distribution, the struts-bean.tld file can also be found in the lib subdirectory. Copy this file to your hello-world/WEB-INF directory. Create the .properties File A properties file is a file that contains a newline ("\n") separated list of name-value pairs. In our hello world application, we need just one entry called hello.message. Property resources are located using the classloader, so make sure the properties file is in the CLASSPATH or that the servlet container automatically places the files in the CLASSPATH of the hello-word/WEB-INF/classes directory. Create a file called HelloWorldResources.properties, and save it in WEB-INF/classes/helloworld. This makes it accessible to the class identifier helloworld.HelloWorldResources. The following illustrates how one entry in the properties file should appear: hello.message=Hello Struts Developer Create the web.xml File The web.xml file (deployment descriptor) describes your web application. After creating this file, place it in the WEB-INF folder of the application. A typical Struts web.xml file defines a servlet identifier for ActionServlet using the tags. Beneath the servlet tag, use init-param to define the parameters that initialize the servlet. For this simple application, we´ll define the servlet and one init-param to define where our application resources are loaded. We´ll also define a taglib reference for use within a JSP: action org.apache.struts.action.ActionServlet application helloworld.HelloWorldResources 1 /WEB-INF/struts-bean.tld /WEB-INF/struts-bean.tld hello.jsp Create the Display Page The last step before actually running the application is to create the JSP display page. The display page is a normal JSP page that uses the Struts taglib and one Struts tag. The display page should reside in the root directory of your web application, in this case hello-world. We´ll name it hello.jsp, and it should look like this: <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> error Error: 500 Location: /hello-world/hello.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at _0002fhello_0002ejsphello_jsp_21._jspService(_0002fhello_0002ejsphello_jsp_2 1.java:100) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWr
Re: struts begineer mahavir
Hey mahavir! take a look here http://www.reumann.net/do/struts/lesson1 Kannan. mahavir wrote: Hi Friends i am begineer to struts,i searched on the net to start studing struts.i got following one document,according to which i had written program but i am geetting the error.The error is at the end And the document that i got from the net is Create a Directory Structure The first step in creating any web application is creating the base directory that stores all of your information. We´ll call this base directory hello-world. Inside the hello-world base directory, create a WEB-INF directory in which to store application-level classes and information. For more information on the structure of a web application, see the Servlet specification. Copy Necessary Files The struts.jar file contains all necessary classes to run a Struts application, including the ActionServlet class and the taglib classes. In a normal binary distribution, the struts.jar file is located in the lib subdirectory of the installation. Copy it to the hello-world/WEB-INF/lib directory. The struts-bean.tld file contains all necessary taglib information to utilize the Struts message tag. In a binary distribution, the struts-bean.tld file can also be found in the lib subdirectory. Copy this file to your hello-world/WEB-INF directory. Create the .properties File A properties file is a file that contains a newline ("\n") separated list of name-value pairs. In our hello world application, we need just one entry called hello.message. Property resources are located using the classloader, so make sure the properties file is in the CLASSPATH or that the servlet container automatically places the files in the CLASSPATH of the hello-word/WEB-INF/classes directory. Create a file called HelloWorldResources.properties, and save it in WEB-INF/classes/helloworld. This makes it accessible to the class identifier helloworld.HelloWorldResources. The following illustrates how one entry in the properties file should appear: hello.message=Hello Struts Developer Create the web.xml File The web.xml file (deployment descriptor) describes your web application. After creating this file, place it in the WEB-INF folder of the application. A typical Struts web.xml file defines a servlet identifier for ActionServlet using the tags. Beneath the servlet tag, use init-param to define the parameters that initialize the servlet. For this simple application, we´ll define the servlet and one init-param to define where our application resources are loaded. We´ll also define a taglib reference for use within a JSP: action org.apache.struts.action.ActionServlet application helloworld.HelloWorldResources 1 /WEB-INF/struts-bean.tld /WEB-INF/struts-bean.tld hello.jsp Create the Display Page The last step before actually running the application is to create the JSP display page. The display page is a normal JSP page that uses the Struts taglib and one Struts tag. The display page should reside in the root directory of your web application, in this case hello-world. We´ll name it hello.jsp, and it should look like this: <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> error Error: 500 Location: /hello-world/hello.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at _0002fhello_0002ejsphello_jsp_21._jspService(_0002fhello_0002ejsphello_jsp_2 1.java:100) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(Compi
Re: struts begineer mahavir
Hello mahavir , http://jakarta.apache.org/struts/userGuide/configuration.html#resources_config mahavir wrote: Hi Friends i am begineer to struts,i searched on the net to start studing struts.i got following one document,according to which i had written program but i am geetting the error.The error is at the end And the document that i got from the net is Create a Directory Structure The first step in creating any web application is creating the base directory that stores all of your information. We´ll call this base directory hello-world. Inside the hello-world base directory, create a WEB-INF directory in which to store application-level classes and information. For more information on the structure of a web application, see the Servlet specification. Copy Necessary Files The struts.jar file contains all necessary classes to run a Struts application, including the ActionServlet class and the taglib classes. In a normal binary distribution, the struts.jar file is located in the lib subdirectory of the installation. Copy it to the hello-world/WEB-INF/lib directory. The struts-bean.tld file contains all necessary taglib information to utilize the Struts message tag. In a binary distribution, the struts-bean.tld file can also be found in the lib subdirectory. Copy this file to your hello-world/WEB-INF directory. Create the .properties File A properties file is a file that contains a newline ("\n") separated list of name-value pairs. In our hello world application, we need just one entry called hello.message. Property resources are located using the classloader, so make sure the properties file is in the CLASSPATH or that the servlet container automatically places the files in the CLASSPATH of the hello-word/WEB-INF/classes directory. Create a file called HelloWorldResources.properties, and save it in WEB-INF/classes/helloworld. This makes it accessible to the class identifier helloworld.HelloWorldResources. The following illustrates how one entry in the properties file should appear: hello.message=Hello Struts Developer Create the web.xml File The web.xml file (deployment descriptor) describes your web application. After creating this file, place it in the WEB-INF folder of the application. A typical Struts web.xml file defines a servlet identifier for ActionServlet using the tags. Beneath the servlet tag, use init-param to define the parameters that initialize the servlet. For this simple application, we´ll define the servlet and one init-param to define where our application resources are loaded. We´ll also define a taglib reference for use within a JSP: action org.apache.struts.action.ActionServlet application helloworld.HelloWorldResources 1 /WEB-INF/struts-bean.tld /WEB-INF/struts-bean.tld hello.jsp Create the Display Page The last step before actually running the application is to create the JSP display page. The display page is a normal JSP page that uses the Struts taglib and one Struts tag. The display page should reside in the root directory of your web application, in this case hello-world. We´ll name it hello.jsp, and it should look like this: <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> error Error: 500 Location: /hello-world/hello.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at _0002fhello_0002ejsphello_jsp_21._jspService(_0002fhello_0002ejsphello_jsp_2 1.java:100) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Thread.java:479) Root cause: javax.servlet.jsp.J
Re: struts begineer
You might want to use a more recent version of tomcat and the JDK and point your browser to the struts homepage. There is documentation there that you can have a look at first. mahavir wrote: Hi Friends i want to learn struts.I have to install struts can u guide me to download and install struts on Tomcat3.2 with Windows98 se and JDK1.2. mahavir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]