You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vincent PROSPER <Vi...@Alkinos.com> on 2002/11/28 12:22:29 UTC

RE: [Subapps forward] contextRelative troubles (tiles pb?)

Hi,

one thing I did not mention is that I use tiles...
Does it have any incidence on the ContextPath???

Another thing: whether I specify ContextRelative="true" or "false", I always
get:

javax.servlet.include.context_path=/mywebapp

even in subapp pages... Where can I find the variable that says that the
controller appends the subapp prefix to the context path?

Could you please help me.

Thanks in advance

Vince
-----Original Message-----
From: Vincent PROSPER [mailto:Vincent.Prosper@Alkinos.com]
Sent: Thursday, November 28, 2002 8:47 AM
To: struts-user@jakarta.apache.org
Subject: [Subapps forward] contextRelative troubles


Hi,

I'm trying to use contextRelative forwards in order to point to existing
subapps.
I have a portal, and several modules. The portal is of course my webapp.

All that can be found in docs has been coded:

web.xml:
...
   <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/conf/struts-config.xml</param-value>
   </init-param>

   <!-- List of Subapps -->

     <init-param>
      <param-name>config/soparias-listing-module</param-name>
      <param-value>/WEB-INF/conf/struts-listing-config.xml</param-value>
     </init-param>
...

struts-config.xml:
...
	<!-- accessing listing webapp -->
	<forward contextRelative="true"
		name="getListing"
		path="/soparias-listing-module/outsideGetListing.do"
		redirect="true"/>
...

struts-listing-config.xml:
...
 <action-mappings>
  <action path="/outsideGetListing"
      name="listForm"
	  scope="request"
	  type="com.alkinos.soparias.webui.listing.action.GetList"
	  input="/soparias-listing-module/getlisting.jsp"/>
...

When I go through <html:link forward="getListing">getListing</html:link> in
my portal page, all the URIs (links, images) belonging to the
soparias-listing-module page become prefixed with
'soparias-listing-module'... Did I miss something?

I also tried the SwitchAction and I got the following error:
"Invalid sub-application prefix soparias-listing-module was specified"
(Error 400)

So what??? My module isn't a module (I don't think so since all my
struts-*-config.xml are red by the container)? I am not allowed to put
dashes in module names???

Please help, this is very urgent.

Have a nice day.

Vince



--
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>


[Tiles Controller] pagePattern bug(?)

Posted by Vincent PROSPER <Vi...@Alkinos.com>.
Hi,

When setting pagePattern="$P" in my subapp config, all <html:link page=...>
are now without any prefix. Good!

Unfortunately, this is not the case for <html:img pageKey=...> (neither for
<html:form action=...>, but this is another discussion).

Can someone tell me if this is a controller configuration misunderstanding
(org.apache.struts.tiles.TilesRequestProcessor) or a bug?

More generally, why does the controller always add "subapp/" to any URI -
excepted '<a href=...' - provided in an <html:...> tag, regardless of
ContextRelative or pagePattern values? This is a bit annoying when several
subapps must share common files (images, ...).

Can especially Craig and Cedric answer these questions?

Have a nice day.

Vince



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