You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by James Gagan <jg...@shaw.ca> on 2002/10/01 08:33:28 UTC

mapping ".do" actions under oc4j

Hi all,

I suspect this is a newbie type problem, so please have some patience.

I just delivered my first struts web-app to my organization's OC4j delivery
server.

When i test it on the server, it's running under a directory structure like
:

"http://some.server:8888/apps/myApp/"

and there's a welcome file so my index.jsp page comes up without having to
enter anything more.

so far so good.

But, I had to change a number of the paths in my links to various actions
within the application.

For example, I had to rename some links to "/apps/myApp/doSomething.do"

whereas before, I just had the "/doSomething.do"

This cannot be a *good thing*, since obviously it makes the application a
lot less portable.

If it moves to another server that doesn't follow the same directory
structure, it's all gonna fall apart....

I have deployed the application under the exact same directory structure on
my own OC4j server, and I have the same problem.

Also I should note that though you don't see it in the address bar, the
directory is really:

oc4j/j2ee/home/apps/myApp/myApp-web/

and everything else (WEB-INF, jsp etc) is under that.

So, I'd really like to know how to keep this code portable,

and not have to add on to all my ".do" links to get them to work!

Any help would be really appreciated.

(I tried adding <%request.getContextPath()%> but that didn't work either,
though I may have done it wrong.)

Thanks,

James Gagan



---

Outgoing mail is certified Virus Free.

Checked by AVG anti-virus system (http://www.grisoft.com).

Version: 6.0.391 / Virus Database: 222 - Release Date: 9/19/2002

reply to: jgagan@shaw.ca


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: mapping ".do" actions under oc4j

Posted by John Owen <jo...@hotmail.com>.
Post what's in your application.xml for your Struts application.

Also, when you deploy with OC4J, you can tell it to map the default
application to your application. This may resolve your pathing issues. I
would suggest you check the orion archives for help. I know that there are
messages concerning Struts application deployment there.

John
----- Original Message -----
From: "Eddie Bush" <ek...@swbell.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, October 01, 2002 10:05 AM
Subject: Re: mapping ".do" actions under oc4j


> I don't know what's going on here, but ... my first reaction is that
> your container is broke.  The path you specify for an action *should* be
> relative to the module containing it.
>
> What version of Struts are you running?
> Did you develop under the same container you deployed under?  None of it
> should have to change ... really ... that's the point
>
> Having never had this issue before, I'm not certain what would be giving
> you this problem.  What should happen to you, assuming you're using
> <html:link> for your hyper-links, is that you'd wind up with a URL like
> http://some.server:8888/apps/myApp/apps/myApp/doSomething.do
>
> ... <punt/> Sorry, I have no clue.
>
> --
> Eddie Bush
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: mapping ".do" actions under oc4j

Posted by Eddie Bush <ek...@swbell.net>.
I don't know what's going on here, but ... my first reaction is that 
your container is broke.  The path you specify for an action *should* be 
relative to the module containing it.

What version of Struts are you running?
Did you develop under the same container you deployed under?  None of it 
should have to change ... really ... that's the point

Having never had this issue before, I'm not certain what would be giving 
you this problem.  What should happen to you, assuming you're using 
<html:link> for your hyper-links, is that you'd wind up with a URL like 
http://some.server:8888/apps/myApp/apps/myApp/doSomething.do

... <punt/> Sorry, I have no clue.

-- 
Eddie Bush




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>