I use Eclipse for java and C++ programming, but for web development I don't use an IDE.

Jim A.


On 07/05/2014 01:27 PM, Ken McWilliams wrote:
What IDE are you using? Knowing the IDE someone might be willing to give "click by click" instructions.


On Sat, Jul 5, 2014 at 7:23 AM, Jim Anderon <jim_ander...@jjajava.com <mailto:jim_ander...@jjajava.com>> wrote:


    index.jsp is in my hello_world.war file and hello_world.war is at
    /var/lib/tomcat6/webapps/hello_world/hello_world.war.

    I have used the web.xml file, unchanged, from the tutorial area.
    Here is the content, where the line numbers are
    inserted by my editor and are not part of the file:


      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <web-app id="WebApp_ID" version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee";
    xmlns:xsi="http://www.w3.org/200    1/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-    app_2_4.xsd">
      3 <display-name>Hello World Struts 2</display-name>
      4 <welcome-file-list>
      5 <welcome-file>index.jsp</welcome-file>
      6 </welcome-file-list>
      7
      8
      9 <filter>
     10 <filter-name>struts2</filter-name>
     11
    
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
     12 </filter>
     13
     14 <filter-mapping>
     15 <filter-name>struts2</filter-name>
     16 <url-pattern>/*</url-pattern>
     17 </filter-mapping>
     18
     19 </web-app>

    I can see there is some struts filtering, but at this point I do
    not know if something needs to be changed.


    Jim A.




    On 07/05/2014 10:08 AM, jayachandra B wrote:

        do you have index.jsp in your webContent folder and did you
        configure struts2 filter in web.xml?


        On Sat, Jul 5, 2014 at 5:33 PM, Jim Anderon
        <jim_ander...@jjajava.com <mailto:jim_ander...@jjajava.com>
        <mailto:jim_ander...@jjajava.com
        <mailto:jim_ander...@jjajava.com>>> wrote:


            Hello All,

            I am an experienced programmer, but inexperienced in web
            programming and a total newbie to struts.
            Struts looks like it will be very useful to my web
        programming so
            I have ventured into the tutorials to
            start learning how to use it. I ran the first tutorial
            'basic_struts' successfully. Next, I am trying to
            run the 'Hello World' tutorial, but it is failing. I could use
            some suggestions on what may be wrong and
            some suggestions on debug methodology when using struts. Or at
            least pointers on where to looking
            for debugging techniques.  I am trying to do some reading
        to teach
            myself, but I'm floundering at this
            point.

            I'm running crunchbang Linux, using firefox 30.0, which is
        close
            to the latest edition. By the way, I'm
            aware of the firefox 'web console' but a beginner with
        that tool
            so I have not taken advantage of it so far.
            I'm running the tomcat6 server on my localhost.

            I have read the tutorial for 'Hello World' from:

            *
*file:///usr/share/struts/struts-2.3.16.3/docs/hello-world-using-struts-2.html

            I have read each step in that tutorial and verified that the
            source code explained in the tutorial
            is in my sand box. I ran 'mvn clean project' and got a
        successful
            build. Then then copied the
            hello_world.war file to:

            * * /var/lib/tomcat6/webapps/hello_world
            *
            *enter the URL:

        http://localhost:8080/hello_world/index.action

            in the address box on Firefox and got the following error
        from tomcat:


            ----------------Start Error
Window-------------------------------------------------------------------------------------------------------------------------------------------------------------

            HTTP Status 404 - /hello_world/index.action
------------------------------------------------------------------------
            *type* Status report
            *message* _/hello_world/index.action_
            *description* _The requested resource
        (/hello_world/index.action)
            is not available._
------------------------------------------------------------------------
            Apache Tomcat/6.0.35

            -------------------End Error Window
----------------------------------------------------------------------------------------------------------------------------------------------------------


            My other webapps run ok out of /var/lib/tomcat6/webapps,
        so I at
            least know my environment is set up
            correctly, at least for the most part. When I check directory
            permissions from the /var/lib/tomcat6/webapps/hello_world
            directory, I get:

            % ls -ld . *
            drwxr-xr-x 2 jimA jimA    4096 Jul  2 09:15 .
            -rw-r--r-- 1 jimA jimA 3991999 Jul  4 15:29 hello_world.war

            I thought about attaching the hello_world.war file, but
        because it
            is 4M-bytes, I decided not to. If someone would like
            to see it, I can provide it or a portion of it.

            I feel like there is an obvious error in my set up, but I
        cannot
            see it. Can anyone offer some suggestions?

            Regards,
            Jim Anderson










-- Thanks and Regards
        Jayachandra




Reply via email to