Integrating tomcat 4.1 in intellijIDEA 5.0 is not working

Hi All,
I am new to tomcat and i wanted to integrate tomcat in intellij IDEA 5.0.,I used an article at http://www.phasesoft.com/articles/tomcat4idea/ it does seem to compile ok but i am getting this message


C:\Java\jdk1.5.0_04\bin\java "-Djava.endorsed.dirs=c:\Java\Tomcat 4.1\bin; c:\Java\Tomcat 4.1\common\endorsed;" "-Dcatalina.base=c:\Java\Tomcat 4.1;" "-Dcatalina.home=c:\Java\Tomcat 4.1" "-Djava.ip/tmpdir=c:\Java\Tomcat 4.1\temp" -Didea.launcher.port=7536 "-Didea.launcher.bin.path=C:\Java\IntelliJ IDEA 5.0\bin" -Dfile.encoding=windows-1252 -classpath "C:\Java\jdk1.5.0_04\jre\lib\charsets.jar;C:\Java\jdk1.5.0_04\jre\lib\deploy.jar;C:\Java\jdk1.5.0_04\jre\lib\javaws.jar;C:\Java\jdk1.5.0_04\jre\lib\jce.jar;C:\Java\jdk1.5.0_04\jre\lib\jsse.jar;C:\Java\jdk1.5.0_04\jre\lib\plugin.jar;C:\Java\jdk1.5.0_04\jre\lib\rt.jar;C:\Java\jdk1.5.0_04\jre\lib\ext\dnsns.jar;C:\Java\jdk1.5.0_04\jre\lib\ext\localedata.jar;C:\Java\jdk1.5.0_04\jre\lib\ext\sunjce_provider.jar;C:\Java\jdk1.5.0_04\jre\lib\ext\sunpkcs11.jar;C:\Java\Tomcat 4.1\webapps\examples\classes;C:\Java\jdk1.5.0_04\lib\tools.jar;C:\Java\Tomcat 4.1\bin\bootstrap.jar;C:\Java\Tomcat 4.1\common\lib\naming-common.jar;C:\Java\Tomcat 4.1\common\lib\jndi.jar;C:\Java\Tomcat 4.1\common\lib\commons-collections.jar;C:\Java\Tomcat 4.1\common\lib\ant.jar;C:\Java\Tomcat 4.1\common\lib\naming-resources.jar;C:\Java\Tomcat 4.1\common\lib\naming-factory.jar;C:\Java\Tomcat 4.1\common\lib\commons-pool.jar;C:\Java\Tomcat 4.1\common\lib\jta.jar;C:\Java\Tomcat 4.1\common\lib\jasper-runtime.jar;C:\Java\Tomcat 4.1\common\lib\jdbc2_0-stdext.jar;C:\Java\Tomcat 4.1\common\lib\jasper-compiler.jar;C:\Java\Tomcat 4.1\common\lib\tools.jar;C:\Java\Tomcat 4.1\common\lib\activation.jar;C:\Java\Tomcat 4.1\common\lib\commons-dbcp.jar;C:\Java\Tomcat 4.1\common\lib\commons-logging-api.jar;C:\Java\Tomcat 4.1\common\lib\servlet.jar;C:\Java\Tomcat 4.1\common\lib\mail.jar;C:\Java\Tomcat 4.1\server\lib\tomcat-http11.jar;C:\Java\Tomcat 4.1\server\lib\tomcat-util.jar;C:\Java\Tomcat 4.1\server\lib\jakarta-regexp-1.2.jar;C:\Java\Tomcat 4.1\server\lib\tomcat-coyote.jar;C:\Java\Tomcat 4.1\server\lib\servlets-common.jar;C:\Java\Tomcat 4.1\server\lib\catalina-ant.jar;C:\Java\Tomcat 4.1\server\lib\tomcat-warp.jar;C:\Java\Tomcat 4.1\server\lib\servlets-manager.jar;C:\Java\Tomcat 4.1\server\lib\servlets-invoker.jar;C:\Java\Tomcat 4.1\server\lib\commons-digester.jar;C:\Java\Tomcat 4.1\server\lib\tomcat-jk2.jar;C:\Java\Tomcat 4.1\server\lib\servlets-webdav.jar;C:\Java\Tomcat 4.1\server\lib\commons-logging.jar;C:\Java\Tomcat 4.1\server\lib\tomcat-jk.jar;C:\Java\Tomcat 4.1\server\lib\catalina.jar;C:\Java\Tomcat 4.1\server\lib\jaas.jar;C:\Java\Tomcat 4.1\server\lib\servlets-default.jar;C:\Java\Tomcat 4.1\server\lib\commons-modeler.jar;C:\Java\Tomcat 4.1\server\lib\commons-beanutils.jar;C:\Java\Tomcat 4.1\server\lib\mx4j-jmx.jar;C:\Java\IntelliJ IDEA 5.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.apache.catalina.startup.Bootstrap start
Catalina.start: java.io.FileNotFoundException: c:\Java\Tomcat 4.1;\conf\server.xml (The system cannot find the path specified)
java.io.FileNotFoundException: c:\Java\Tomcat 4.1;\conf\server.xml (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.]]>(FileInputStream.java:106)
at org.apache.catalina.startup.Catalina.start(Catalina.java:446)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
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:585)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
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:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:86)

Process finished with exit code 1





Sorry for the lengthy output.Can anybody help me pls.

Thanks in Advance,
Priya

19 comments

Thanks for the immediate reply and i will try the tutorial and get back to u.

Thanks,
Priya

0

Hi Serge,
I tried the tutorial and it works. Thanks a lot and you saved my time(a lot).

Priya

0

Hi Serge,
I tried your tutorial ie.ftp://intellij.net/pub/.idea/TomcatTutorial/TomcatJspDebug.zip
and the index.jsp in working fine. So, i wrote a sample submit.jsp as below

Submit example

Example Submit Page

Last Name:
Address:
Sex: Male Female
Married:
Age: 0-19 20-49 50-
]]>

and in web.xml i wrote

<welcome-file-list>
<welcome-file>submit.jsp</welcome-file>

</welcome-file-list>

When i run in tomcat5.5.13 server from intellij 5 i got the following message

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Exception in JSP: /submit.jsp:18

15: Example Submit Page 17: 18: 19: Last Name:
20: Address:
21: Sex: ]]>
Male


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.submit_jsp._jspService(org.apache.jsp.submit_jsp:107)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:798)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
org.apache.jsp.submit_jsp._jspx_meth_html_form_0(org.apache.jsp.submit_jsp:140)
org.apache.jsp.submit_jsp._jspService(org.apache.jsp.submit_jsp:96)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.13 logs.

Can anybody help me please. Thanks in advance

Priya



0

Hello Priya,

Can anybody help me please. Thanks in advance


Your project is configured incorrectly, get a sample working Struts project
here:
ftp://intellij.net/pub/.idea/idea-struts-tomcat5-sample.zip


--
Serge Baranov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Hi Serge,
Thanks for the reply.I will try and get back to you.

Thanks,
Priya

0

Hi Serge,
The tutorial works fine. Thanks a lot. Now i will try to configure my project.Can you give me some useful sites on "how to configure struts,tomcat and intellij".

Thanks,
Priya

0

Hello Priya,

Hi Serge,
The tutorial works fine. Thanks a lot. Now i will try to configure
my project.Can you give me some useful sites on "how to configure
struts,tomcat and intellij".


I'm not aware of such sites. Make sure that your project configuration is
similar to the configuration of the sample project. JSPs and taglibs must
be located under the Web Resource Directory and all necessary libraries should
be deployed with your web application.

--
Serge Baranov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Hi Serge,
Thanks for your help. I will figure out whats wrong with my configuration.

Thanks,
Priya

0

Make sure that your project configuration is

>similar to the configuration of the sample project. JSPs >and taglibs must
>be located under the Web Resource Directory and all >necessary libraries should
>be deployed with your web application.

*Hi Serge,
Now my project configuration look similar to the sample project which you provided. when i try to run my project i am getting the following error:*

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: org/apache/tools/ant/BuildException
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException
org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:203)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:471)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.13 logs.

Can you please tell me what i am doing wrong. Thanks in advance.


Thanks,
Priya

0

Hello Priya,

>> Make sure that your project configuration is similar to the
>> configuration of the sample project. JSPs >and taglibs must be
>> located under the Web Resource Directory and all >necessary libraries
>> should be deployed with your web application.
>>

*Hi Serge,
Now my project configuration look similar to the sample project
which you provided. when i try to run my project i am getting the
following error:*
type Exception report



Does your application run in the standalone Tomcat outside of IDEA without
errors? What makes you think that it's IDEA problem?


--
Serge Baranov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Hi Serge,
It works fine when i copy my webapps/WEB-INF folders back to tomcat installation folder ie i am able see the main JSP page. But, when i keep it in IDEA it has the problem.I think something with the "Web Resource Directory Path" because, when i created my project i selected as below:

Web resource directory path:
c:\myproject\resources
relative path in deployment directory:
/

And i wrote a sample html under resources and it works. When i did all the jsp/taglib etc. and changed my "web Module Settings" ie. Changed as below

Web Resource Directory:
c:\myproject\webapps
path relative to deployment root:
/

Its not working.I really don't know why. On IDEA when i run the program i was able to open a browser and go to tomcat home. Don't know why ;-). Any ideas Please. Thanks in advance.

Thanks,
Priya.

0

Hello Priya,

Hi Serge,
It works fine when i copy my webapps/WEB-INF folders back to tomcat
installation folder ie i am able see the main JSP page. But, when i
keep it in IDEA it has the problem.I think something with the "Web
Resource Directory Path" because, when i created my project i selected
as below:
Web resource directory path:
c:\myproject\resources
relative path in deployment directory:
/
And i wrote a sample html under resources and it works. When i did all
the jsp/taglib etc. and changed my "web Module Settings" ie. Changed
as below

Web Resource Directory:
c:\myproject\webapps
path relative to deployment root:
/
Its not working.I really don't know why. On IDEA when i run the
program i was able to open a browser and go to tomcat home. Don't know
why ;-). Any ideas Please. Thanks in advance.


What context is set in the Tomcat Run/Debug conguration? If it's not /, do
you add it to the URL you open in the browser?
Also it's not clear what is under webapps Web Resource Directory. A single
web application with WEB-INF, your JSPs and taglibs or subdirectories with
web applications?

It's not convenient for me to communicate via this newsgroup, please zip
and send complete IDEA project which doesn't work for you to support@jetbrains.com
and we'll help you to configure it.


--
Serge Baranov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Hi Serge,
Thanks for the reply and sorry i couldn't reply fast. I will post the zipped version of my IDEA project on support at jetbrains.com.Thanks for the help and appreciate a lot.

Thanks,
Priya

0

Please sign in to leave a comment.