Hi Kris,

The examples I had given are simplified (probably too much so).

In practice, we need to allow search engine to be able to index the site
correctly.  Some of the search engines we work with have issues with "?" and
query strings in general.  Also in our app, the extra path info is used to
indicate content.

www.somehose.com/myapp/homepagelayout/file1.jsp

So it is not really dynamic, in that sense.

I see your point about additional path info causing action mapping to fail.
Looks like it's just not possible with struts, regardless of container.  I
suppose I will have to use a filter to pre-process the request.

Thanks
Kevin

-----Original Message-----
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 11:58 AM
To: Struts Users Mailing List
Subject: RE: getPathInfo with Struts/Resin?


Having never used Resin, I'm in no position to comment on what can or can't
be
done with it. However, it seems like you're using path info where a request
parameter would be a better fit. It sounds like "username" is actually
dynamic,
so it might really be "jim" or "bob" or "jimbob", right? So that you'd have:

www.somehost.com/myapp/execute/edit?username=jimbob
www.somehost.com/myapp/execute/view?username=jimbob

In fact, from a Struts perspective, I'm pretty sure that the additional path
info will cause it to fail when it attempts to find a matching path for an
action mapping.

Quoting Kevin Tung <[EMAIL PROTECTED]>:

> Hi,
>
> I haven't received any response on this issue.  I assume this has not been
> done or cannot be done with Resin/Struts or with struts and any other
> container.  Or perhaps I should post to a different list altogether?
>
> Any feedback will be greatly appreciated!!
>
> Thanks,
> Kevin
>
> -----Original Message-----
> From: Kevin Tung [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 06, 2003 6:37 PM
> To: 'Struts Users Mailing List'
> Subject: getPathInfo with Struts/Resin?
>
>
> Hi,
>
> I have searched the archives and the newsgroups but couldn't find an
answer
> that applies to my specific environment, hopefully someone here has done
> this before.
>
> I am running Struts 1.1b3 (didn't work with 1.1b2 either) with Resin 2.1.6
>
> I want to be able to do the following
>
> www.somehost.com/myapp/execute/edit/username/
> www.somehost.com/myapp/execute/view/username/
>
> where view and edit will map to different Actions.  And within each
action,
> I want to be able to retrieve the username by using getPathInfo().
>
> in my web.xml
>
>   <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>/execute/*</url-pattern>
>   </servlet-mapping>
>
> in my struts_config.xml
>
>     <action     path="/edit" type="com.mycomp.EditAction"/>
>
>
> But when I point the browser to
>
> www.somehost.com/myapp/execute/edit/username/ I end up with a
>
> 400 Invalid path /edit/username/
>
> And www.somehost.com/myapp/execute/edit/ gets me
>
> 400 Invalid path /
>
> But And www.somehost.com/myapp/execute/edit (without the slash)
>
> Works fine, but it's without the path info..
>
> Is this a resin issues? or could this be a struts config issue?  Has
anyone
> gotten this scenario to work with Struts and Resin? or even another
> container?  Some config samples would be very helpful!!
>
> Thanks,
> Kevin
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


--
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

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



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

Reply via email to