aspose file tools*
The moose likes Struts and the fly likes Forms delete part of the URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Forms delete part of the URL" Watch "Forms delete part of the URL" New topic
Author

Forms delete part of the URL

Pablo M�ller
Ranch Hand

Joined: Dec 12, 2006
Posts: 63
Hi,
We're deploying our apps to a demo server (Tomcat5.5.23) to be shown to our customers.
In our LAN the address for the server is http://192.168.3.83:8080/ so the apps are at http://192.168.3.83:8080/app1/, http://192.168.3.83:8080/app2/... etc
So to show them outside, whe mapped http://www.oururl.com/test/
to http://192.168.3.83:8080/
This way if we go to
http://www.oururl.com/test/app1, http://www.oururl.com/test/app2, we can access our application though the Internet. This works great until I submit a struts form.
For example, this form, extracted from app1



Should go to
http://www.oururl.com/test/showDayTimeLines.do

But it removes the /test part of the url, it goes to
http://www.oururl.com/showDayTimeLines.do
So, every form fails.
This is the mapping for that particular form... the rest are done the same way.


Is there any way to keep the complete url when submiting a form?
Thanks
Pablo


2B || !2B
Pablo M�ller
Ranch Hand

Joined: Dec 12, 2006
Posts: 63
I'm sorry for insisting, but I still have this error and I don't know how to fix it...
If any further explanation of the problem is needed, please tell me.
Kevin N Shah
Greenhorn

Joined: Sep 24, 2006
Posts: 4
How the context path is set? The action path is not getting prefixed with contextpath! Look in to server.xml!

Hope this helps.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you set up a virtual host such as

http://www.oururl.com/test/

it just plain isn't going to work with Struts. The reason it won't work is that you've set up an additional context "/test" that the web application doesn't know anything about.

If you set up a virtual host such as:

http://www.test.oururl.com/

It will work.


Merrill
Consultant, Sima Solutions
Pablo M�ller
Ranch Hand

Joined: Dec 12, 2006
Posts: 63
Thanks for your replies!!!
Merrill, I'll try the virtual host like that.
Kevin, could you give me some more detail? What should I look for?
Thanks again,
Pablo.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Forms delete part of the URL