URLs not working after switching modules

O

oscar

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top