SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ankit Garg wrote:Hi Frank, welcome to javaranch.
Frank can you show us the package configuration of your struts.xml file?? If your package has a namespace, then you'll have to use that namespace in the s:form tag too...
David Newton wrote:A couple of other notes:
1) I assume you're using the "simple" theme (or a custom theme) by default?
2) I also assume you're returning the same strings you use to name your results and *not* Action.SUCCESS etc.--because they have different values than your result names.
3) Telling us the full path of your web app source isn't actually that useful; it's more important to know what's actually being deployed.
How are you deploying your app?
You can use the Struts 2 Config Browser plugin to find out what Struts 2 thinks your configuration looks like.
> I believe it's the simple theme. I can't remember what I put down for that when I was creating the project
"Put down for that"? I don't know how to parse that in this context. My point was that if you're not using the "simple" theme your HTML is going to be invalid: take a look at the rendered HTML. The default "xhtml" theme renders tables/rows/cells for form elements and labels.
> This isn't actually on a server per se, as yet. I'm still running this from Eclipse.
Deployed is deployed--there's a server *somewhere*, or you wouldn't be seeing *anything* :)
> it's telling me to copy "the jar" into my application, without specifying exactly which jar or where to put it (I'm presuming my /lib directory, as I can't think of anywhere else I would put it.) Any advice on this?
The config-browser jar, and in the context of a web application, "into the application" means to anywhere that will be deployed.
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
David Newton wrote:It comes in the Struts 2 distro--there's no reason to guess what you need. The plugin documentation page pretty much sums up how to use it.
Frank Serkland wrote:(My problem was that I was just using the basic Struts jars rather than all the Struts jars.)
David Newton wrote:I'd turn devMode on, turn up the log level to DEBUG, and see what's in the logs at startup.
Frank Serkland wrote:Hello. I have a Struts2 application in Eclipse. I'm getting the following error, and for the life of me I can't figure out why.
Here is the form in my JSP:
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
David Newton wrote:We need to see the startup logs, with debug logging enabled.
Ankit Garg wrote:As for logging, I think you can do that by including a log4j.properties file in your classpath (along with struts.xml) which contains an appender configuration like this
David Newton wrote:We need to see the startup logs, with debug logging enabled.
Frank Serkland wrote:
David Newton wrote:We need to see the startup logs, with debug logging enabled.
After nosing around on my hard drive, I found this. Is this what you need to see?
Jun 24, 2010 10:14:58 AM org.apache.tomcat.util.digester.SetPropertiesRule beginDavid Newton wrote:We need to see the startup logs, with debug logging enabled.
Frank Serkland wrote:Is this the startup log? It showed up in my console.
Frank Serkland wrote:Is there a specific place I should put the log4j.properties file? And would I put it my classpath the same way I'd put a jar file?
David Newton wrote:Is your struts2_resources directory listed as being a source directory? In other words, is your S2 config file even being deployed?
You state that your actions are under /src/action, and your config is under /src/struts2_resources--that would put the struts config file in a non-default location under normal circumstances.
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|