|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
Struts 2 Plug-in and JSP 404I am working on a plug-in that needs to display a JSP. I have the plug-in packaged with the following struts-plugin.xml, however, rather than the /pages/config.jsp page appearing, I get a 404! The folder "pages" is in the root of my config-plugin.jar file and I have changed the result by both including and omitting the leading slash and I get a 404 either way. My action is returning SUCCESS as verified through the debugger. Does anyone see anything glaringly wrong?
<struts> <package name="config" namespace="/config" extends="struts-default"> <action name="maintainConfig_*" class="com.erac.wsf.action.ConfigAction" method="{1}"> <result>/pages/config.jsp</result> <result name="error">/pages/config.jsp</result> </action> </package> </struts> Peace, Scott |
|
|
Re: Struts 2 Plug-in and JSP 404stanlick wrote:
> I am working on a plug-in that needs to display a JSP. > The folder "pages" is in the root of my config-plugin.jar I believe jsp files must be in the file system, not in jars. -Dale --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Struts 2 Plug-in and JSP 404Thanks Dale --
I hear what you are saying, and this seemed a little foreign to me too! However, for a plug-in to be a drop-n-go deal, I sort of think the goods should all be in the plug-in jar itself? Make sense? I was looking at this article, and it appears this cat has a JSP working in his plug-in? http://www.struts2.org/category/struts2-plugins/ The reason for this plug-in is to eliminate a couple pages of configuration steps for the adopter of my application. I'd rather not say just drop the plug-in in your WEB-INF/lib folder and then copy JSP files here... Peace, Scott
|
|
|
Re: Struts 2 Plug-in and JSP 404It is a limitation on the JSP API, you can't embed them. You will have
to use FreeMarker or Velocity or any other decent template lib. musachy On Thu, Jul 9, 2009 at 12:47 PM, stanlick<stanlick@...> wrote: > > Thanks Dale -- > > I hear what you are saying, and this seemed a little foreign to me too! > However, for a plug-in to be a drop-n-go deal, I sort of think the goods > should all be in the plug-in jar itself? Make sense? I was looking at this > article, and it appears this cat has a JSP working in his plug-in? > > http://www.struts2.org/category/struts2-plugins/ > http://www.struts2.org/category/struts2-plugins/ > > The reason for this plug-in is to eliminate a couple pages of configuration > steps for the adopter of my application. I'd rather not say just drop the > plug-in in your WEB-INF/lib folder and then copy JSP files here... > > Peace, > Scott > > > > DNewfield wrote: >> >> stanlick wrote: >>> I am working on a plug-in that needs to display a JSP. >> >>> The folder "pages" is in the root of my config-plugin.jar >> >> I believe jsp files must be in the file system, not in jars. >> >> -Dale >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@... >> For additional commands, e-mail: user-help@... >> >> >> > > -- > View this message in context: http://www.nabble.com/Struts-2-Plug-in-and-JSP-404-tp24415564p24416650.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Struts 2 Plug-in and JSP 404stanlick wrote:
> However, for a plug-in to be a drop-n-go deal, I sort of think the goods > should all be in the plug-in jar itself? Make sense? Agreed, but I believe I've been told that can't be done with jsp templates. This is why plugins that I've seen have been implemented in freemarker. > I was looking at this > article, and it appears this cat has a JSP working in his plug-in? > > http://www.struts2.org/category/struts2-plugins/ I downloaded that zip, and looked inside the .jars: no .jsps. > The reason for this plug-in is to eliminate a couple pages of configuration > steps for the adopter of my application. I'd rather not say just drop the > plug-in in your WEB-INF/lib folder and then copy JSP files here... I'm simply reporting hear-say here, but I believe you've already hit the roadblock that'll prevent you from getting farther w/o using a different template engine. -Dale --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Struts 2 Plug-in and JSP 404Or if you are very brave, and using java 6, you can use jasper to
compile the jsp to java, then use the java api compile to compile to a class file, load it and then execute it, but yeah FreeMarker would be easier :) musachy On Thu, Jul 9, 2009 at 1:06 PM, Dale Newfield<dale@...> wrote: > stanlick wrote: >> >> However, for a plug-in to be a drop-n-go deal, I sort of think the goods >> should all be in the plug-in jar itself? Make sense? > > Agreed, but I believe I've been told that can't be done with jsp templates. > This is why plugins that I've seen have been implemented in freemarker. > >> I was looking at this >> article, and it appears this cat has a JSP working in his plug-in? >> >> http://www.struts2.org/category/struts2-plugins/ > > I downloaded that zip, and looked inside the .jars: no .jsps. > >> The reason for this plug-in is to eliminate a couple pages of >> configuration >> steps for the adopter of my application. I'd rather not say just drop the >> plug-in in your WEB-INF/lib folder and then copy JSP files here... > > I'm simply reporting hear-say here, but I believe you've already hit the > roadblock that'll prevent you from getting farther w/o using a different > template engine. > > -Dale > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Struts 2 Plug-in and JSP 404Thanks brother! Do you know of a decent JSP ---> Freemarker converter? I sort of wondered why the config-browser plug in was using Freemarker. It really sucks when something like this rears it ugly head and brings productivity to a screeching halt!
P.S. And I really thought I was going to have time this evening for that Harley ride up the river road! Peace, Scott
![]() ![]() ![]() ![]() ![]() |
|
|
Re: Struts 2 Plug-in and JSP 404Please tell me it isn't the little woman that has you talking all crazy bro!
P.S. You failed to mention the option about just writing the response with print statements from the action! Peace, Scott
|
|
|
Re: Struts 2 Plug-in and JSP 404JSP tags wont't funtion inside jars -- the "JSP"s you might have spotted in jars are probably using Freemarker tags which will work in jars. Chris -----Original Message----- From: Dale Newfield <dale@...> To: Struts Users Mailing List <user@...> Sent: Fri, Jul 10, 2009 5:06 am Subject: Re: Struts 2 Plug-in and JSP 404 stanlick wrote:? > However, for a plug-in to be a drop-n-go deal, I sort of think the goods? > should all be in the plug-in jar itself? Make sense?? ? Agreed, but I believe I've been told that can't be done with jsp templates. This is why plugins that I've seen have been implemented in freemarker.? ? > I was looking at this? > article, and it appears this cat has a JSP working in his plug-in?? > > http://www.struts2.org/category/struts2-plugins/? ? I downloaded that zip, and looked inside the .jars: no .jsps.? ? > The reason for this plug-in is to eliminate a couple pages of configuration? > steps for the adopter of my application. I'd rather not say just drop the? > plug-in in your WEB-INF/lib folder and then copy JSP files here...? ? I'm simply reporting hear-say here, but I believe you've already hit the roadblock that'll prevent you from getting farther w/o using a different template engine.? ? -Dale? ? ---------------------------------------------------------------------? To unsubscribe, e-mail: user-unsubscribe@...? For additional commands, e-mail: user-help@...? ? |
|
|
Re: Struts 2 Plug-in and JSP 404You might want to take a look at this:
http://cwiki.apache.org/confluence/display/S2PLUGINS/Embedded+JSP+Plugin fresh from the oven, early adopters wanted ;) musachy On Thu, Jul 9, 2009 at 1:11 PM, stanlick<stanlick@...> wrote: > > Thanks brother! Do you know of a decent JSP ---> Freemarker converter? I > sort of wondered why the config-browser plug in was using Freemarker. It > really sucks when something like this rears it ugly head and brings > productivity to a screeching halt! > > P.S. And I really thought I was going to have time this evening for that > Harley ride up the river road! > > Peace, > Scott > > > DNewfield wrote: >> >> stanlick wrote: >>> However, for a plug-in to be a drop-n-go deal, I sort of think the goods >>> should all be in the plug-in jar itself? Make sense? >> >> Agreed, but I believe I've been told that can't be done with jsp >> templates. This is why plugins that I've seen have been implemented in >> freemarker. >> >>> I was looking at this >>> article, and it appears this cat has a JSP working in his plug-in? >>> >>> http://www.struts2.org/category/struts2-plugins/ >> >> I downloaded that zip, and looked inside the .jars: no .jsps. >> >>> The reason for this plug-in is to eliminate a couple pages of >>> configuration >>> steps for the adopter of my application. I'd rather not say just drop >>> the >>> plug-in in your WEB-INF/lib folder and then copy JSP files here... >> >> I'm simply reporting hear-say here, but I believe you've already hit the >> roadblock that'll prevent you from getting farther w/o using a different >> template engine. >> >> -Dale >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@... >> For additional commands, e-mail: user-help@... >> >> >> > :rules::rules:%-|%-|%-| > -- > View this message in context: http://www.nabble.com/Struts-2-Plug-in-and-JSP-404-tp24415564p24417005.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Struts 2 Plug-in and JSP 404Musachy Barroso wrote:
> You might want to take a look at this: > > http://cwiki.apache.org/confluence/display/S2PLUGINS/Embedded+JSP+Plugin > > fresh from the oven, early adopters wanted ;) Did we ever come up with a way to order the loading of plugins so that interdependencies can be properly resolved? I.E.: Can one write a plugin that uses the capabilities of this plugin and ensure that it will be loaded only after the dependency? -Dale --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Struts 2 Plug-in and JSP 404Yeah, I can't remember when it was added, but the 'struts' element in
struts-plugin.xml can take an attribute called 'order' Take a look at the osgi and convention plugin, they are the only two using it... But, I think they were the problem before, OSGi needed to be loaded before convention for the two to work together properly. -Wes On Wed, Aug 5, 2009 at 11:16 AM, Dale Newfield<dale@...> wrote: > Musachy Barroso wrote: >> >> You might want to take a look at this: >> >> http://cwiki.apache.org/confluence/display/S2PLUGINS/Embedded+JSP+Plugin >> >> fresh from the oven, early adopters wanted ;) > > Did we ever come up with a way to order the loading of plugins so that > interdependencies can be properly resolved? I.E.: Can one write a plugin > that uses the capabilities of this plugin and ensure that it will be loaded > only after the dependency? > > -Dale > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Struts 2 Plug-in and JSP 404yes, it is intentionally not documented as we don't want people to
experiment with it much, but xwork will sort the plugins according to the "order" attribute, the default is Integer.MAX_VALUE. musachy On Wed, Aug 5, 2009 at 8:28 AM, Wes Wannemacher<wesw@...> wrote: > Yeah, I can't remember when it was added, but the 'struts' element in > struts-plugin.xml can take an attribute called 'order' > > Take a look at the osgi and convention plugin, they are the only two > using it... But, I think they were the problem before, OSGi needed to > be loaded before convention for the two to work together properly. > > -Wes > > On Wed, Aug 5, 2009 at 11:16 AM, Dale Newfield<dale@...> wrote: >> Musachy Barroso wrote: >>> >>> You might want to take a look at this: >>> >>> http://cwiki.apache.org/confluence/display/S2PLUGINS/Embedded+JSP+Plugin >>> >>> fresh from the oven, early adopters wanted ;) >> >> Did we ever come up with a way to order the loading of plugins so that >> interdependencies can be properly resolved? I.E.: Can one write a plugin >> that uses the capabilities of this plugin and ensure that it will be loaded >> only after the dependency? >> >> -Dale >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@... >> For additional commands, e-mail: user-help@... >> >> > > > > -- > Wes Wannemacher > > Head Engineer, WanTii, Inc. > Need Training? Struts, Spring, Maven, Tomcat... > Ask me for a quote! > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
| Free embeddable forum powered by Nabble | Forum Help |