Tomcat / Struts Example Request

Hi,

Does anyone have a Tomcat / Struts IDEA project that they would be willing to share as a configuration example?

Currently, I can launch Tomcat from the command line, but not from IDEA.

I'd also like to make sure I have tomcat's server.xml configured correctly. I have a context pointing into the Document Root directory of my IDEA project, but I wonder if I did that correctly.

Since I am using Struts a Struts example would be helpful. I currently have my TLD in their own directory under the DOC ROOT and want to make sure such a practice is considered OK.

I have read the howtos on this forumn and the web-app pdf ; both resources where helpful, but I am still have a little trouble.

Thanks,

9 comments
Comment actions Permalink

I had to manually add an entry to the Tomcat server.xml file (under
jakarta-tomcat/conf:

]]>

(Replace "project" with your project's relative root path)

My struts TLDs are all under my WEB-INF directory; I don't know if
that's normal, but it works for me.

Good luck,
- Bill




Spencer Marks wrote:

Hi,

Does anyone have a Tomcat / Struts IDEA project that they would be willing to share as a configuration example?

Currently, I can launch Tomcat from the command line, but not from IDEA.

I'd also like to make sure I have tomcat's server.xml configured correctly. I have a context pointing into the Document Root directory of my IDEA project, but I wonder if I did that correctly.

Since I am using Struts a Struts example would be helpful. I currently have my TLD in their own directory under the DOC ROOT and want to make sure such a practice is considered OK.

I have read the howtos on this forumn and the web-app pdf ; both resources where helpful, but I am still have a little trouble.

Thanks,


0
Comment actions Permalink

Tnanks for reply.

That one change to server.xml is all you did?

I did a similar thing, but IDEA can't seem to launch Tomcat.

I will keep trying.

Spencer

0
Comment actions Permalink

I'll try to remember what I did; as I recall it was pretty
straightforward except for the server.xml modification.

1. Make sure you have Tomcat 4.0.x installed somewhere, like under
C:\jakarta-tomcat-4.0.6. Don't use Tomcat 4.1.x or 5.0; they're not
supported yet.

2. In your project properties, on the Run/Debug Webapp page, select
Tomcat as your app server, set up your web application name and path,
and make sure that Catalina Home is set to "C:\jakarta-tomcat-4.0.6".
Path to Catalina configs should be "C:\jakarta-tomcat-4.0.6\conf". Your
application context path should be /project or whatever -- I think that
needs to match what is in your server.xml.

I think that's all I did. Are you getting a specific error in the debug
output?



Spencer Marks wrote:

Tnanks for reply.

That one change to server.xml is all you did?

I did a similar thing, but IDEA can't seem to launch Tomcat.

I will keep trying.

Spencer


0
Comment actions Permalink

Thanks for the info. I have done basically what you said and now I am getting the error below. Looks like it might be a classpath struts issue, but the nullpointer is bad.
Thanks for your help,
Spencer

tarting service Tomcat-Standalone
Apache Tomcat/4.0.6
Feb 6, 2003 11:28:17 AM org.apache.struts.util.PropertyMessageResources INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Feb 6, 2003 11:28:17 AM org.apache.struts.util.PropertyMessageResources ]]>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Feb 6, 2003 11:28:17 AM org.apache.struts.action.ActionServlet initModuleConfig
SEVERE: Parsing error processing resource path
java.lang.NullPointerException
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:941)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3279)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at org.apache.catalina.core.StandardService.start(StandardService.java:388)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
Starting service Tomcat-Apache
Apache Tomcat/4.0.6

0
Comment actions Permalink

SEVERE: Parsing error processing resource path


Hmm, this might be a problem with your web.xml. Make sure that it can
find it, and that you have your Action servlet set up correctly in there:

action org.apache.struts.action.ActionServlet debug 6 config /WEB-INF/struts-config.xml application com.path.to.ResourcesFile> detail 6 validate true 2 ]]>

0
Comment actions Permalink

I've contacted Mark off line, I have a sample project (about 2.4MB including all the jar files you need to run) with sample code for a registration for and login page which I can send you if you want. It will have broken images because I don't include the image files.

R

0
Comment actions Permalink

Could you split and post the sample project in zip files. I'm learning Struts using IDEA and would like to see a Struts example. Thank you.

0
Comment actions Permalink

Could you post to me the sample project in zip files. I have a project and want to use struts, but I have any problems using struts witth idea.

Thanks

0
Comment actions Permalink

Hello,

could you post to me the sample project in zip file. I have a project and want to use struts, but I have any problems using struts with idea.

Thanks

0

Please sign in to leave a comment.