togehter with convention plugin ther exists this constant <constant name="struts.convention.result.path" value="/WEB-INF/jasp"/>
this works fine for me, bit I don't know a solution without convention plugin. Best Regards Johannes Geppert Miguel-55 wrote: > > Hello, > > I use struts 2.1.81. and I don't want that my users access directly my > .jsp, so I put them inside WEB-INF. > But the struts.xml is difficult to mantain, so I have a question: > Is there some sort of constant that defines a prefix for the JSP > inside struts.xml? > Apparently in struts1 there is something like this. > > Putting the jsp directly in the app (world accessible) makes your > struts.xml look like this: > ... > <package name="administracion" extends="proyectox" namespace="/admin"> > <action name="pais_*" method="{1}" class="com.proyectox.ui.PaisAction"> > <result>paisDetail.jsp</result> > </action> > ... > and the JSP is: /admin/paisDetail.jsp (relative to the app root) > > but if you "protect" your JSP, you need to write this: > ... > <package name="administracion" extends="proyectox" namespace="/admin"> > <action name="pais_*" method="{1}" class="com.proyectox.ui.PaisAction"> > <result>/WEB-INF/admin/paisDetail.jsp</result> > </action> > ... > and your JSP is : /WEB-INF/admin/paisDetail.jsp > and you lose the "auto namespace prepend" (let's say it's called that > way), and also makes the struts.xml difficult to read. > > So the thing I'm asking is if there is something like this: > ... > <constant name="struts.jsp_prefix" value="/WEB-INF/jsp/" /> > <package name="administracion" extends="proyectox" namespace="/admin"> > <action name="pais_*" method="{1}" class="com.proyectox.ui.PaisAction"> > <result>paisDetail.jsp</result> > </action> > ... > and makes struts2 search the jsp as: /WEB-INF/jsp/admin/paisDetail.jsp > > Is there something like this? > Thanks > > Si quieres ser más positivo, pierde un electrón > Miguel Ruiz Velasco Sobrino > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > ----- --- web: http://www.jgeppert.com twitter: http://twitter.com/jogep -- View this message in context: http://old.nabble.com/jsp-in-WEB-INF-tp29179165p29181264.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org