Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3859

request.getServletPath() return null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.3.1
    • 2.3.7
    • Core Actions
    • None
    • struts2.3 websphere7.0.0.12 tomcat5.5

    Description

      I create a class:
      public abstract class BaseAction extends ActionSupport implements
      ServletRequestAware, ServletResponseAware, ServletContextAware {

      protected HttpServletRequest request;

      protected HttpServletResponse response;

      protected HttpSession session;

      .........

      public String getServletPath()

      { return request.getServletPath(); }

      ..........
      //some get and set method
      }

      now ,in tomcat 5.5 run environment,getServletPath() method can return correct value,but in websphere 7,it return null.first,i distrust it is some problem in webphere.so i create a simple jsp file and write above code in new jsp file,very magical,it return correct value.i arrive the net to look for the answer.but,nothing i find.it's struts bug?Looking forward to reply.

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            yuxh yuhua
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified