CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Posts
    49

    Question servlet mapping problem

    hi

    my web.xml :

    Code:
    <servlet>
    <servlet-name>test</servlet-name>
    <jsp-file>/abc/a.jsp</jsp-file>
    <init-param>
    <param-name>Id</param-name>
    <param-value>a.3</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>test</servlet-name>
    <url-pattern>/test</url-pattern>
    </servlet-mapping>
    <session-config>

    but the problem is......
    it opens the a.jsp page when i say..... /test
    but does not open the a.jsp with the parameter Id=a.3

    and also it does not load the CSS file when i give /nav. It display the content without the CSS.

    how to achieve this?

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: servlet mapping problem

    Have you tried:
    Code:
    ...
    <url-pattern>/test/*</url-pattern>
    ...
    Optimism is an occupational hazard of programming: testing is the treatment...
    K. Beck
    Please use &#91;CODE]...your code here...&#91;/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  3. #3
    Join Date
    Sep 2006
    Posts
    49

    Question Re: servlet mapping problem

    Quote Originally Posted by dlorde
    Have you tried:
    Code:
    ...
    <url-pattern>/test/*</url-pattern>
    ...
    Optimism is an occupational hazard of programming: testing is the treatment...
    K. Beck
    it is still not opening page with the given parameter.
    and also CSS is not being loaded.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured