7 Replies Latest reply on Jul 10, 2002 1:36 AM by balaji kuduva

    Jetty and struts

    balaji kuduva Newbie

      is it possible to run struts with jboss-jetty web server server ?

      if so, then what are the configuration files that has to be changed in jetty server?

      is it necessary to use "form bean" in each and every page we create using struts architecture?

        • 1. Re: Jetty and struts
          rolf huijbrechts Newbie


          See the Struts README:
          - (*) Copy the files "lib/struts*.tld" from the Struts distribution into the
          "WEB-INF" directory of your web application.

          - (*) Copy the JAR files from the "lib" directory of the Struts distribution
          (such as "struts.jar" and "commons-*.jar") into the "WEB-INF/lib" directory
          of your web application.

          - (*) Modify your "WEB-INF/web.xml" file to include a element to
          define the controller servlet, and a <servlet-mapping> element to establish
          which request URIs are mapped to this servlet. Normally, you will map
          the controller servlet to a wildcard pattern ("/execute/*") or a filename
          extension pattern ("*.do"). Use the "WEB-INF/web.xml" file from the
          example application (see below) for an example of how this is done.

          - (*) Modify the "WEB-INF/web.xml" file for your web application to include
          a tag library declaration like this for each Struts tag library you will
          be using:


          - Create a file "WEB-INF/struts-config.xml" that defines the mappings for your
          requests to specific action classes. Use the "struts-config.xml" file from
          the example application (see below) as a guide.

          - (*) In each JSP page that will use the Struts custom tags, add a line at
          the top of the page like this (for each Struts tag library needed):

          <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="struts-bean" %>

          (If you wish, you can use a prefix other that "struts-bean").

          - When compiling your web application components, be sure that the
          JAR files (copied above) are included on the CLASSPATH environment
          variable used by your Java compiler.

          About forms beans -see the struts user guide @


          • 2. Re: Jetty and struts
            balaji kuduva Newbie

            Dear rolf,

            Thanks a lot for the initial incentive given by you..
            my application is now recognizing struts ....

            but , if i use form beans the action mapping is not happening in the struts config.. nothing is displayed in the browser except the path.. \\application\login.do

            i have set web-inf.xml struts-conf.xml right..

            what might be the problem please help..

            with regards,

            • 3. Re: Jetty and struts
              Brad Leupen Newbie

              please post your config files.


              • 4. Re: Jetty and struts
                balaji kuduva Newbie

                hai ,

                this are the configuration files

                1.web.xml ( placed in WEB-INF\)




                2.struts-conf.xml ( placed in WEB-INF\)


                3. the jsp page(loginBack.jsp) calling action

                <%@ page language="java" %>
                <%@ page import="java.util.*"%>
                <%@ page import="TSIPack.logic.*"%>
                <%@ page import="TSIPack.view.*"%>
                <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
                <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>
                <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

                this will have a text user name and password..
                and a submit button..

                4. this is the path where i am calling th action servlet

                currently i am using jboss 3 verson

                please help me.

                • 5. Re: Jetty and struts
                  Brad Leupen Newbie


                  hey. please show me the URL you are typing into your browser to get to the loginBack.jsp page.


                  • 6. Re: Jetty and struts
                    balaji kuduva Newbie

                    dear bleupen,

                    the url is

                    after clicking the submit button in loginBack.jsp the URL shows


                    this is the output of the server
                    09:36:37,917 INFO [Jetty] action: Processing a POST for /login
                    09:36:40,190 INFO [Jetty] action: No mapping available for path /login

                    and i have set the context root as TSI
                    jboss-web.xml ( placed in WEVB-INF\)
                    <?xml version="1.0" encoding="UTF-8"?>

                    what might be the problem bleupen...

                    • 7. Re: Jetty and struts
                      balaji kuduva Newbie

                      dear bleupen,

                      this is different application running on (struts jboss jetty) verson 3 the browser says the error if i call some action

                      HTTP ERROR: 500 /Scheme/SchemeDepotPeriodInput.jsp(122,69) Attribute value should be quoted


                      what is this error ...