Re: Struts 2 issue with Spring, Hibernate, and Tiles
Don't put the struts.xml in your classes directory, put it in the root of your source directory (i.e. if your packages are in ProjectRoot\src, put struts.xml in ProjectRoot\src). Al. - Original Message - From: "Kelly.Graus" <[EMAIL PROTECTED]> To: Sent: Thursday, March 06, 2008 5:46 PM Subject: Re: Struts 2 issue with Spring, Hibernate, and Tiles Well, it turns out that for some reason, Eclipse isn't publishing my struts.xml file when it's in the classes directory. Moving it to the WEB-INF directory causes it to be published, by it doesn't do anything there. I manually copied it to the correct location after publishing, then started the server, and now my actions are working. So now I just need to get Eclipse to publish it to the correct location somehow. Thanks for the help! Kelly -- View this message in context: http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15879661.html Sent from the Struts - User mailing list archive at Nabble.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]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
--- "Kelly.Graus" <[EMAIL PROTECTED]> wrote: > That worked! Thanks! Ah, I remember when programming was a matter of toggling some front-panel switches. Deployment was much less complicated, if not more callus-y. Glad it got worked out :) Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
newton.dave wrote: > > --- "Kelly.Graus" <[EMAIL PROTECTED]> wrote: >> Well, it turns out that for some reason, Eclipse isn't publishing my >> struts.xml file when it's in the classes directory. Moving it to the >> WEB-INF directory causes it to be published, by it doesn't do anything >> there. I manually copied it to the correct location after publishing, >> then >> started the server, and now my actions are working. So now I just need >> to >> get Eclipse to publish it to the correct location somehow. > > Are you editing your struts.xml in your package hierarchy or do you have > it > directly in your /WEB-INF/classes? I keep all my classpath config files in > the source tree and everything works fine. I'd try keeping it in your > source > (I'm guessing you're not). > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > Hi Dave, That worked! Thanks! Kelly -- View this message in context: http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15880505.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
--- "Kelly.Graus" <[EMAIL PROTECTED]> wrote: > Well, it turns out that for some reason, Eclipse isn't publishing my > struts.xml file when it's in the classes directory. Moving it to the > WEB-INF directory causes it to be published, by it doesn't do anything > there. I manually copied it to the correct location after publishing, then > started the server, and now my actions are working. So now I just need to > get Eclipse to publish it to the correct location somehow. Are you editing your struts.xml in your package hierarchy or do you have it directly in your /WEB-INF/classes? I keep all my classpath config files in the source tree and everything works fine. I'd try keeping it in your source (I'm guessing you're not). Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
No they come. if you can pay myeclipse use it. it is very good plugin. try lomboz, it's free and also a very good plugin. Both of them will deploy your struts.xml every time you change it but restart your server to apply chenges. On Thu, Mar 6, 2008 at 11:59 AM, Kelly.Graus <[EMAIL PROTECTED]> wrote: > > > Othon Reyes Sanchez wrote: > > > > are you using any plugin for eclipse like lomboz or myeclipse? > > > No, I don't have any additional plugins installed (unless they come with > the > default Eclipse install). > -- > View this message in context: > http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15879964.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Struts 2 issue with Spring, Hibernate, and Tiles
Othon Reyes Sanchez wrote: > > are you using any plugin for eclipse like lomboz or myeclipse? > No, I don't have any additional plugins installed (unless they come with the default Eclipse install). -- View this message in context: http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15879964.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
are you using any plugin for eclipse like lomboz or myeclipse? On Thu, Mar 6, 2008 at 11:46 AM, Kelly.Graus <[EMAIL PROTECTED]> wrote: > > Well, it turns out that for some reason, Eclipse isn't publishing my > struts.xml file when it's in the classes directory. Moving it to the > WEB-INF directory causes it to be published, by it doesn't do anything > there. I manually copied it to the correct location after publishing, > then > started the server, and now my actions are working. So now I just need to > get Eclipse to publish it to the correct location somehow. > > Thanks for the help! > > Kelly > -- > View this message in context: > http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15879661.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Struts 2 issue with Spring, Hibernate, and Tiles
Well, it turns out that for some reason, Eclipse isn't publishing my struts.xml file when it's in the classes directory. Moving it to the WEB-INF directory causes it to be published, by it doesn't do anything there. I manually copied it to the correct location after publishing, then started the server, and now my actions are working. So now I just need to get Eclipse to publish it to the correct location somehow. Thanks for the help! Kelly -- View this message in context: http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15879661.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
BTW the text in orange needs to be equal but it can be any text. On Thu, Mar 6, 2008 at 11:21 AM, Othon Reyes Sanchez <[EMAIL PROTECTED]> wrote: > As a suggestion try to add log4j to your application and change the level > of messages to debug. > In your xml add the following: > > webAppRootKey > sap.root > > > log4jConfigLocation > WEB-INF/log4j.properties > > ... > > > org.springframework.web.util.Log4jConfigListener > > > > > Add a log4j.properties in your WEB-INF folder. > This is an example of code for your log4j.properties. > *# For JBoss: Avoid to setup Log4J outside > $JBOSS_HOME/server/default/deploy/log4j.xml! > # For all other servers: Comment out the Log4J listener in web.xml to > activate Log4J. > log4j.rootLogger=DEBUG, stdout, logfile > > log4j.appender.stdout=org.apache.log4j.ConsoleAppender > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout > log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n > > log4j.appender.logfile=org.apache.log4j.RollingFileAppender > log4j.appender.logfile.File=${sap.root}/WEB-INF/sap.log > log4j.appender.logfile.MaxFileSize=512KB > # Keep three backup files. > log4j.appender.logfile.MaxBackupIndex=3 > # Pattern to output: date priority [category] - message > log4j.appender.logfile.layout=org.apache.log4j.PatternLayout > log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n* > > Can you send more code about how are you calling your action?. > > > On Thu, Mar 6, 2008 at 10:53 AM, Kelly.Graus <[EMAIL PROTECTED]> > wrote: > > > > > > > newton.dave wrote: > > > > > > If you turn on devMode do you see any additional log messages that > > might > > > indicate a problem? I don't see anything immediately obvious, but it's > > > late > > > and I'm crabby ;) You can also turn the logging levels up for both S2 > > and > > > XWork and see if any additional information is provided. > > > > > > I'd also fire up the config browser and see if it indicates any > > obvious > > > issues and make sure that my action class is deployed correctly. > > > > > > Dave > > > > > > > > I tried turning on devMode (added > value="true" /> to my struts.xml file), but I didn't see any change. > > I'm > > thinking that in itself is indicative of a problem. I'm using Eclipse > > to > > publish and test this application, and I'm somewhat confused as to the > > directory structure that is needed for everything to be published > > correctly. > > Here is my directory structure: > > > > TermsTranslator > > WebContent > > META-INF > > context.xml > > WEB-INF > > applicationContext.xml > > web.xml > > tiles-defs.xml > > classes > >struts.xml > >application.properties > > > > One thing I've noticed is that when I change my struts.xml file, Eclipse > > doesn't think that the application needs to be republished. In my > > previous > > project (just Struts 2), anytime struts.xml changed Eclipse would show > > that > > the server needed to be restarted. > > > > Is there somewhere in the log when the server starts up that shows if > > it's > > even using my struts.xml file? > > > > Kelly > > > > -- > > View this message in context: > > http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15878118.html > > Sent from the Struts - User mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >
Re: Struts 2 issue with Spring, Hibernate, and Tiles
As a suggestion try to add log4j to your application and change the level of messages to debug. In your xml add the following: webAppRootKey sap.root log4jConfigLocation WEB-INF/log4j.properties ... org.springframework.web.util.Log4jConfigListener Add a log4j.properties in your WEB-INF folder. This is an example of code for your log4j.properties. *# For JBoss: Avoid to setup Log4J outside $JBOSS_HOME/server/default/deploy/log4j.xml! # For all other servers: Comment out the Log4J listener in web.xml to activate Log4J. log4j.rootLogger=DEBUG, stdout, logfile log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n log4j.appender.logfile=org.apache.log4j.RollingFileAppender log4j.appender.logfile.File=${sap.root}/WEB-INF/sap.log log4j.appender.logfile.MaxFileSize=512KB # Keep three backup files. log4j.appender.logfile.MaxBackupIndex=3 # Pattern to output: date priority [category] - message log4j.appender.logfile.layout=org.apache.log4j.PatternLayout log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n* Can you send more code about how are you calling your action?. On Thu, Mar 6, 2008 at 10:53 AM, Kelly.Graus <[EMAIL PROTECTED]> wrote: > > > newton.dave wrote: > > > > If you turn on devMode do you see any additional log messages that might > > indicate a problem? I don't see anything immediately obvious, but it's > > late > > and I'm crabby ;) You can also turn the logging levels up for both S2 > and > > XWork and see if any additional information is provided. > > > > I'd also fire up the config browser and see if it indicates any obvious > > issues and make sure that my action class is deployed correctly. > > > > Dave > > > > > I tried turning on devMode (added value="true" /> to my struts.xml file), but I didn't see any change. I'm > thinking that in itself is indicative of a problem. I'm using Eclipse to > publish and test this application, and I'm somewhat confused as to the > directory structure that is needed for everything to be published > correctly. > Here is my directory structure: > > TermsTranslator > WebContent > META-INF > context.xml > WEB-INF > applicationContext.xml > web.xml > tiles-defs.xml > classes >struts.xml >application.properties > > One thing I've noticed is that when I change my struts.xml file, Eclipse > doesn't think that the application needs to be republished. In my > previous > project (just Struts 2), anytime struts.xml changed Eclipse would show > that > the server needed to be restarted. > > Is there somewhere in the log when the server starts up that shows if it's > even using my struts.xml file? > > Kelly > > -- > View this message in context: > http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15878118.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Struts 2 issue with Spring, Hibernate, and Tiles
--- "Kelly.Graus" <[EMAIL PROTECTED]> wrote: > newton.dave wrote: > I tried turning on devMode (added value="true" /> to my struts.xml file), but I didn't see any change. I'm > thinking that in itself is indicative of a problem. I'm using Eclipse to > publish and test this application, and I'm somewhat confused as to the > directory structure that is needed for everything to be published > correctly. > Here is my directory structure: > > TermsTranslator > WebContent > META-INF >context.xml > WEB-INF >applicationContext.xml >web.xml >tiles-defs.xml >classes > struts.xml > application.properties That seems fine at first glance. I'd still recommend throwing in the config-browser [1] and visiting /$YOUR_CONTEXT/config-browser/index.action and seeing how S2 thinks your app is configured. > One thing I've noticed is that when I change my struts.xml file, Eclipse > doesn't think that the application needs to be republished. In my previous > project (just Struts 2), anytime struts.xml changed Eclipse would show that > the server needed to be restarted. You're right; that's suspicious... it should throw up some log messages within several seconds of changing the struts.xml when devMode is turned on. > Is there somewhere in the log when the server starts up that shows if it's > even using my struts.xml file? Very close to the top of the startup log messages you should see xwork2 messages saying it's loading struts-default.xml, struts-plugin.xml, and struts.xml. Dave [1] http://struts.apache.org/2.x/docs/config-browser-plugin.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
newton.dave wrote: > > If you turn on devMode do you see any additional log messages that might > indicate a problem? I don't see anything immediately obvious, but it's > late > and I'm crabby ;) You can also turn the logging levels up for both S2 and > XWork and see if any additional information is provided. > > I'd also fire up the config browser and see if it indicates any obvious > issues and make sure that my action class is deployed correctly. > > Dave > > I tried turning on devMode (added to my struts.xml file), but I didn't see any change. I'm thinking that in itself is indicative of a problem. I'm using Eclipse to publish and test this application, and I'm somewhat confused as to the directory structure that is needed for everything to be published correctly. Here is my directory structure: TermsTranslator WebContent META-INF context.xml WEB-INF applicationContext.xml web.xml tiles-defs.xml classes struts.xml application.properties One thing I've noticed is that when I change my struts.xml file, Eclipse doesn't think that the application needs to be republished. In my previous project (just Struts 2), anytime struts.xml changed Eclipse would show that the server needed to be restarted. Is there somewhere in the log when the server starts up that shows if it's even using my struts.xml file? Kelly -- View this message in context: http://www.nabble.com/Struts-2-issue-with-Spring%2C-Hibernate%2C-and-Tiles-tp15866292p15878118.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 issue with Spring, Hibernate, and Tiles
If you turn on devMode do you see any additional log messages that might indicate a problem? I don't see anything immediately obvious, but it's late and I'm crabby ;) You can also turn the logging levels up for both S2 and XWork and see if any additional information is provided. I'd also fire up the config browser and see if it indicates any obvious issues and make sure that my action class is deployed correctly. Dave --- Kelly Graus <[EMAIL PROTECTED]> wrote: > I am trying to setup my first Struts 2 project with Spring, Hibernate, > and Tiles (and only my second Struts 2 project). I think I have Spring, > Hibernate, and Tiles all working correctly. I'm using Tomcat 6, with > the newest released versions of Struts, Spring, Hibernate, and Tiles. I > am able to start the server with no error messages. I can also navigate > to the welcome page with no issues. However, I seem to have something > wrong with my Struts setup. When I try to go to an action, I get this > error: > > SEVERE: Could not find action or result > There is no Action mapped for namespace / and action name getTerm_input. > - [unknown location] > > I'm a total newbie, so it's probably something stupid. Below are my > web.xml and struts.xml configuration files. If someone could look at > them, that would be much appreciated! I can also send any of the other > configuration files if necessary. > > [STRUTS.XML] > > > > class="org.apache.struts2.views.tiles.TilesResult" default="true"/> > > > class="net.toltech.anatabase.webapp.action.GetTerm"> > displayTerm > getTerm > > > > welcome > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]