File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes JSTL and Struts tomcat setup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JSTL and Struts tomcat setup" Watch "JSTL and Struts tomcat setup" New topic
Author

JSTL and Struts tomcat setup

stevenson lee
Greenhorn

Joined: Sep 25, 2010
Posts: 11
Just a little background on me, I've mostly worked with servlets and wicket; I'm not a master of either but I'm pretty average. As for struts and jsp, I am a bit lost on what xml file, I should look for.

Right now, I am tasked to work with JSTL and Struts for this bank. Its concern is to work on an existing system and do some fixes for it. So right now I am setting up the existing system thats runs on Windows 2004 server with a SQL 2000 SP 4 backend. I got it to run but the login is weird. The login pops up on firefox but not on windows IE 6. this results in me not being able to login and getting redirected to a you are not authorized to login page. I am not too familiar wiht how JSTL and Struts work. I don't know if this is a configuration issue or is a program issue, can someone help me?

Also when I have project that has a netbeans project folder, can I import it to eclipse helios? So this project is mainly JSTL and struts. I am confused by the tools in netbeans; so I was thinking of just using eclipse since I used it for a couple of years.
It shows me two logs from tomcat which I'm not sure is the default or not. There is a localhost log and a catalina log. I recall always just tailing the catalina log. Can someone clarify for me what each log is suppose to tell me?

Thanks. I really appreciate it.

Best Regards,
Stevenson Lee


keep learning...
stevenson lee
Greenhorn

Joined: Sep 25, 2010
Posts: 11
Some additional info:
Usually I'd look for exceptions but so far the only exception i got is from the manager log.

Here are the logs I get:

manager.2010-10-29.log
Oct 29, 2010 1:45:18 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost'
Oct 29, 2010 1:45:18 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Global resources are available
Oct 29, 2010 1:45:18 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Oct 29, 2010 1:45:25 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: stop: Stopping web application at '/LBP'
Oct 29, 2010 1:45:25 PM org.apache.catalina.core.ApplicationContext log
SEVERE: HTMLManager: ManagerServlet.stop[/LBP]
java.lang.NoClassDefFoundError: com/ibatis/sqlmap/engine/mapping/result/ResultObjectFactoryUtil$1
at java.lang.Class.getDeclaringClass(Native Method)
at java.lang.Class.getEnclosingClass(Class.java:1085)
at java.lang.Class.getCanonicalName(Class.java:1169)
at org.apache.catalina.loader.WebappClassLoader.clearThreadLocalMap(WebappClassLoader.java:2192)
at org.apache.catalina.loader.WebappClassLoader.clearReferencesThreadLocals(WebappClassLoader.java:2126)
at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1746)
at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1658)
at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:710)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4649)
at org.apache.catalina.manager.ManagerServlet.stop(ManagerServlet.java:1327)
at org.apache.catalina.manager.HTMLManagerServlet.stop(HTMLManagerServlet.java:642)
at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil$1
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
... 27 more
Oct 29, 2010 1:45:25 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Oct 29, 2010 1:45:30 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: undeploy: Undeploying web application at '/LBP'
Oct 29, 2010 1:45:30 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Oct 29, 2010 1:45:54 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'


catalina.2010-10-29.log
Oct 29, 2010 1:44:47 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
Oct 29, 2010 1:44:47 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Oct 29, 2010 1:44:49 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 29, 2010 1:44:49 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Oct 29, 2010 1:44:49 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3255 ms
Oct 29, 2010 1:44:49 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 29, 2010 1:44:49 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
Oct 29, 2010 1:44:49 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Oct 29, 2010 1:44:50 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor LBP.xml
Oct 29, 2010 1:45:02 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Oct 29, 2010 1:45:02 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Oct 29, 2010 1:45:02 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Oct 29, 2010 1:45:03 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Oct 29, 2010 1:45:03 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 29, 2010 1:45:03 PM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Oct 29, 2010 1:45:03 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 13974 ms
Oct 29, 2010 1:45:30 PM org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/LBP] has not been started
Oct 29, 2010 1:45:30 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/LBP]
Oct 29, 2010 1:45:46 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive LBP.war

localhost.2010-10-29.log
Oct 29, 2010 1:45:03 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 29, 2010 1:45:03 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
stevenson lee
Greenhorn

Joined: Sep 25, 2010
Posts: 11
I also get this error. I'm really lost as to what causes this set of errors.

SEVERE: A web application created a ThreadLocal with key of type [java.lang.Thre
adLocal] (value [java.lang.ThreadLocal@537935]) and a value of type [com.ibatis.
sqlmap.engine.impl.SqlMapSessionImpl] (value [com.ibatis.sqlmap.engine.impl.SqlM
apSessionImpl@3aa791]) but failed to remove it when the web application was stop
ped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
Oct 29, 2010 3:33:19 PM org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/
LBP] has not been started
Oct 29, 2010 3:33:19 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/LBP]
Oct 29, 2010 3:33:20 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor LBP.xml

Best Regards,
Stevenson Lee
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3837

stevenson lee wrote:Also when I have project that has a netbeans project folder, can I import it to eclipse helios?

I'm not sure it's possible (import as a Java/JEE project) as both have different project structures. Of course you could add the source files/libraries etc... in to Eclipse Java/JEE project as they fit. You may import it as a folder in the file sysytem but all the features provided by Eclipse for Java project will not be available.
I am not too familiar wiht how JSTL and Struts work

JSTL is the standard tag library for JSPs, these are to manipulate datastructures inside the JSP without writing Java code directly inside JSPs. Struts is a web framework which provides higher level abstraction based on the servlet/JSP... specifications.

BTW, have you successfully deployed the application? Is your application context is "/LBP"? Looks like there is an issue with "ibatis" framework... Have you tried redeploying everything and start up the server again?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3837

And you'd find the resources for introduction to JSTL here helpful. Also we have a separate Struts forum.
stevenson lee
Greenhorn

Joined: Sep 25, 2010
Posts: 11
Thanks for the quick reply.

I have rebuilt and re-deployed already and I do have the ibatis jar as well. Thanks for the link. I'll go through them.

I posted here because I thought it was a JSP problem. since most of the code runs on JSTL.

Best Regards,

Stevenson Lee
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL and Struts tomcat setup