Sorry that no one helped you, but let's take this back to the list.

How are you planning to do this?
What is the name of your application?  "test" or "WebApp"

Are you familiar with Request Path Elements?
You should read the servlet spec (section 4.4).  That will give you a good
understanding of why the approach you've described is giving the results you
didn't expect.

My only suggestion to you is to deploy your WebApp under a different name
rather that trying to nest it under some directory.

I wouldn't recommend running your test server as your production box, but if
you have no choice, try naming your test application as "test-WebApp" and
deploy it right beside "WebApp".

That would give you this:
www.mycomp.com/WebApp
www.mycomp.com/test-WebApp

...I think you'll start seeing the behavior you expect.


--
James Mitchell
Software Developer/Struts Evangelist
http://struts.sourceforge.net/struts-atlanta/



----- Original Message -----
From: "Kjellaug Johansen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 14, 2003 5:39 AM
Subject: Strutsaction on different WebApps


I've posted this on struts-user mail archive, but there haven't been any
response, so I hope you could help me! I hope you have some time to look at
my problem. Thanks! :-)

I have two servers running webapps, one for production:
www.mycomp.com/WebApp and one for testing: www.mycomp.com/test/WebApp

When I work on the production server there are no problems, but when I work
on the test-server and try to call a Struts-action (i.e.
www.mycomp.com/test/WebApp/user/saveUser.do), I'm getting redirected to the
production-server. The 'test' part in the URL for the test-server is ignored
and I'm getting redirected to www.mycomp.com/WebApp/user/saveUser.do.

The struts-config on the testserver looks like this:
<action path="/user/saveUser"
                type="com.mycomp.web.user.SaveUserAction"
                name="user"
                scope="request"
                input="/jsp/user/editUser.jsp">
 </action>

The action call in the jsp file on the testserver looks like this:
... action = "/user/saveUser.do"

My questions are:
Doesn't Struts manage an extra "level" (test) between the serverroot
(www.mycomp.com) and the webapp name (WebApp)? Are there any config-settings
I can do to solve this?


Kjellaug.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to