URLs not working after switching modules

Discussion in 'Java' started by oscar, Dec 9, 2003.

  1. oscar

    oscar Guest

    Can anyone help me with my URL problem after switching modules?

    I have a hyperlink on a JSP in moduleA. This hyperlink will take me to
    my default module.

    <a href="switchToDefaultModule.do?page=/validateSelfCareCustomer.do?action=initialize&amp;prefix=">Go
    to Default</a>

    The switchToDefaultModule action mapping users the SwitchAction.
    <action path="/switchToDefaultModule"
    type="org.apache.struts.actions.SwitchAction">
    </action>

    When I click on the URL, the app forwards to the JSP in the default
    module. I did a forward and not a redirect here. That JSP has a
    hyperlink that points to another action in the default module.

    <a href="default.do?action=legal">legal</a>

    But when I click on the hyperlink, the URL that is used submitted is
    "http://localhost:8080/myapp/moduleA/default.do?action=legal". I was
    expecting the URL to be
    "http://localhost:8080/myapp/default.do?action=legal". My JSP has only
    "default.do?action=legal".

    How is the prefix "http://localhost:8080/myapp/moduleA" getting
    attached to the URL for the hyperlink? And why does this URL have
    moduleA even though I am in my default module?

    It's only the URL's that are not working. The forms are getting
    submitted correctly. I have referenced several books and resources on
    the internet and I have not discovered how to fix this problem.
     
    oscar, Dec 9, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. oscar
    Replies:
    0
    Views:
    534
    oscar
    Dec 9, 2003
  2. Kaidi
    Replies:
    5
    Views:
    508
    Andrew Thompson
    Jan 4, 2004
  3. Nathan Sokalski

    Converting Relative URLs into Absolute URLs

    Nathan Sokalski, Aug 11, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    778
    Sriram Srivatsan
    Aug 12, 2008
  4. Adam Monsen

    JDBC URLs ...not really URLs?

    Adam Monsen, Feb 6, 2009, in forum: Java
    Replies:
    11
    Views:
    6,390
    Adam Monsen
    Feb 8, 2009
  5. Steve T.

    dynamic URLS convert to static URLS for search engines

    Steve T., Mar 1, 2004, in forum: ASP .Net Web Services
    Replies:
    7
    Views:
    322
    Steve T.
    Mar 4, 2004
Loading...

Share This Page