struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Kiley" <jhki...@summa-tech.com>
Subject Struts 2 - Namespaces and hiding JSPs in WEB-INF
Date Fri, 16 May 2008 18:50:57 GMT
Hey gang,

I'm doing something that appears to be a bit strange and I'd appreciate any
advice anyone might have.

I have two areas within my app -- "admin" and "user".  So I have <package
name="user" namespace="/user"> and <package name="admin"
namespace="/admin">.  That seems simple enough.

The problem I'm running into stems from an earlier decision to "hide" my
JSPs within /WEB-INF/.  So I have, for instance, (greatly truncated),

<package name="user" extends="struts-default" namespace="/user">
<action name="index">
<result>/WEB-INF/jsp/index.jsp</result>
</action>
</package>

Well -- this innocuous bit of code throws a 404, because the Dispatcher
appears to be looking under myapp/user/WEB-INF/jsp/index.jsp.  Obviously it
ain't there.  But I can't persuade the Struts to use a different context
root than /user to hunt for the JSPs.

Any suggestions as to how I can work around this problem without yanking all
my JSPs up and out of WEB-INF?

-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message