logic:foward results in IllegalStateException
I currently have a welcome page that requires an action be done to grab announcements from the db. On my welcome page, index.jsp, I have: %@ page language=java % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % logic:forward name=homepage/ Under struts-config.xml's global fowards, I have: forward name=homepage path=/homepage.do/ And under struts-config-xml's action-mappings I have: actionpath=/homepage type=blitzDev.AnnouncementAction name=announcementForm scope=request input=/home.jsp forward name=success path=/home.jsp/ /action When I hit my homepage, it loads fine but I find this in the log file: StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:159) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:166) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:158) at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:205) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:176) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:198) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:193) at org.apache.jsp.index$jsp._jspService(index$jsp.java:89) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) This only happens with the forwarding. Anyone know how I can fix this? Calvin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem running my Struts App on Tomcat4 (NoClassDefFoundError)
I installed Tomcat4 and have the examples and struts-example webapps working. However I can't seem to get my webapp which was working fine under Tomcat3.2.1 to work. I get the error listed below when I try go to any *.do. Anyone have any idea what the problem is? Here's an abridge version of the error: == Root Cause: java.lang.NoClassDefFoundError: javax/sql/DataSource at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1488)... == And here's the whole thing: A Servlet Exception Has Occurred Exception Report: javax.servlet.ServletException: Servlet.init() for servlet action threw exception at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:875) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:621) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1005) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098) at java.lang.Thread.run(Unknown Source) Root Cause: java.lang.NoClassDefFoundError: javax/sql/DataSource at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1488) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:851) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1113) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152) at org.apache.struts.digester.Digester.startElement(Digester.java:528) at org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:329) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1451) at org.apache.crimson.parser.Parser2.content(Parser2.java:1700) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468) at org.apache.crimson.parser.Parser2.content(Parser2.java:1700) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:499) at org.apache.crimson.parser.Parser2.parse(Parser2.java:304) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at javax.xml.parsers.SAXParser.parse(SAXParser.java:317) at javax.xml.parsers.SAXParser.parse(SAXParser.java:108) at
RE: Tomcat 4.0b7 and struts-example webapp
I just installed Tomcat4.0-b7 and have the examples working. I tried running my webapp that ran fine under Tomcat3.2 and it gives me these errors when Tomcat starts: Starting service Tomcat-Standalone Apache Tomcat/4.0-b7 register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'jar:file:/c:/web/blitzDev/WEB-INF/lib/struts.jar!/org/apache/struts/resources/struts-config_1_0.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'jar:file:/c:/web/blitzDev/WEB-INF/lib/struts.jar!/org/apache/struts/resources/web-app_2_2.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'jar:file:/c:/web/blitzDev/WEB-INF/lib/struts.jar!/org/apache/struts/resources/web-app_2_3.dtd' Starting service Tomcat-Apache Apache Tomcat/4.0-b7 When I try to hit the webapp root, I get the following: A Servlet Exception Has Occurred Exception Report: javax.servlet.ServletException: Cannot find global ActionForward for name homepage at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:452) at org.apache.jsp._0002findex_jsp._jspService(_0002findex_jsp.java:87) I tried adding the struts-examples by sticking the .WAR files in the webapps directory and it gave me the exact same 'register' messages when I restarted Tomcat. Is this another XML parsing issue? I have jaxp.jar and crimson.jar in CATALINA_HOME/server/lib, CATALINA_HOME/jasper, and JAVA_HOME/lib/jaxp-1.1. Getting rid of the files in one in JAVA_HOME didn't fix anything. Calvin --- Jonathan Rosenblitt [EMAIL PROTECTED] wrote: In the install instructions for JAXP 1.1 they recommend putting the jaxp.jar and crimson.jar files in $JAVA_HOME/jre/lib/ext if you are running Java 2. I did this and also got the sealing violation exception. When I replaced the files with the same name files, from the $CATALINA_HOME/jasper subdir the examples worked fine. After fiddling and moving files around for a long time it seemed to me that the jar files from $CATALINA work and the files from the JAXP 1.1 download, don't work correctly with Catalina b5 or b7. By the way, the files are slightly different sizes. When I tried to follow up on the Security Exception, it came up with something about different certificates being used to sign the classes. I don't know if this is relevant. Jonathan Rosenblitt -Original Message- From: Marcel Mare [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 02, 2001 12:24 AM To: [EMAIL PROTECTED] Subject: RE: Tomcat 4.0b7 and struts-example webapp I had this same problem when putting crimson.jar and jaxp.jar from my own JAXP 1.1 installation. I solved it by using the crimson.jar and jaxp.jar from the %CATALINA%/jasper subdir. Sure looks the same like WIndows DLL hell to me ;-) Marcel Mare -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Verzonden: vrijdag 31 augustus 2001 23:43 Aan: [EMAIL PROTECTED] Onderwerp: Re: Tomcat 4.0b7 and struts-example webapp So the problem was that the Struts example wouldn't load in Tomcat4.0 B7 because it didn't have a parser or the jaxp.jar. Someone suggested putting a parser and jaxp.jar in the CATALINA_HOME/lib directory. This worked for me. But a post from the tomcat list suggested putting them in the web-inf/lib directory. Indeed this latter method should work and seems a better solution to me: Craig McClanahan posts: the order in which Tomcat 4 looks for classes to load. - /WEB-INF/classes - /WEB-INF/lib (undefined order of JAR files) - $CATALINA_HOME/classes - $CATALINA_HOME/lib (undefined order of JAR files) - $CATALINA_HOME/common/classes - $CATALINA_HOME/common/lib (undefined order of JAR files) So I put crimson.jar JAXP in the WEB-INF/lib directory. It's not loading properly, it throws a sealing violation. The classloader isn't having it. Not sure why this is happening. Anyone? Craig R. Craig_Reichenbach @lotus.com To: [EMAIL PROTECTED] cc: (bcc: Craig Reichenbach/CAM/Lotus) 08/31/2001 03:05 Subject: Re: Tomcat 4.0b7 and struts-example webapp PM Please respond to struts-user This is more a question for the Tomcat list, but since it came up below, what is the best practice for including needed libraries and implementations (such as crimson.jar jaxp.jar) in Catalina? While Ian's suggestion below moves these from /jasper to /lib, I found the struts example also works in B7 by putting jaxp and crimson in /common/lib and leaving them in jasper. Can someone point me to where I can discern the differences between the different lib directories in Catalina? This has no
RE: Tomcat4.0 Contexts
Nope...still not working. I get: Starting service Tomcat-Standalone Apache Tomcat/4.0-b7 PARSE error at line 7 column -1 org.xml.sax.SAXParseException: XML declaration may only begin entities. Starting service Tomcat-Apache Apache Tomcat/4.0-b7 When I add: Context path=/ docBase=c:/web/blitzDev crossContext=false debug=0 reloadable=true /Context Calvin --- Mark Bennett [EMAIL PROTECTED] wrote: Hey Calvin, I know this is old, but did you ever managed to resolve it. I think I am having exactly the same problem. The struts examples which worked with 3.2 don't with 4.0. They say that the root cause has something to do with a noClassDefnFound error when looking for a SAXParserException or something like that. The error message can be seen on my server at http://26.64.133.82:8080/struts-example. If you could let me know I would really appreciate it as I am about to roll back to Tomcat 3.2. Thanks man! -Mark Bennett Computer Science III University of Alberta -Original Message- From: Calvin Lau [mailto:[EMAIL PROTECTED]] Sent: August 29, 2001 2:09 AM To: [EMAIL PROTECTED] Subject: Tomcat4.0 Contexts Does anyone have an example of a Tomcat4.0 server.xml that uses Contexts? I want to run an application that has it's root outside of Tomcat's root directory but keep getting XML parse errors for some reason. It was all working fine on Tomcat3.2. Any good resource on Tomcat4.0 would also be good. I haven't been able to find anything relevant. Thanks, Calvin __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com
Tomcat4.0 Contexts
Does anyone have an example of a Tomcat4.0 server.xml that uses Contexts? I want to run an application that has it's root outside of Tomcat's root directory but keep getting XML parse errors for some reason. It was all working fine on Tomcat3.2. Any good resource on Tomcat4.0 would also be good. I haven't been able to find anything relevant. Thanks, Calvin __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: I have a problem
It must be the damned French! ;) --- ALAMI Ahmed - BOR [EMAIL PROTECTED] wrote: I don't understand what is happening to me now. Before i could use Struts with Tomcat with no pronlem, but now when i try to use it i have this kind of error (notice that it's in French) Error: 500 Location: /struts-example/index.jsp Erreur Interne de Servlet: javax.servlet.ServletException: Missing message for key index.title at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at _0002findex_0002ejspindex_jsp_0._jspService(_0002findex_0002ejspindex_jsp_0. java:444) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) So i can't work with Struts. Please if u have encountered the same problem and that u found a solution or u didn't get this problem and u have the solution email me please Ahmed ALAMI Stagiaire ...OLE_Obj... ...OLE_Obj... 8, rue Gustave Hertz - 33600 Pessac * 05.57.89.00.36 *06.17.23.26.61 * 05.56.36.64.71 * [EMAIL PROTECTED] __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
automatically calling an Action
I have an ActionServlet that needs to be run everytime a user makes any http request to my site. How and where should I tell the controller to do this? __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: TextArea Wrapping using Form Tags
The wrap attribute is invalid in the HTML TLD I'm using. Is there a newer version? Calvin --- Erik Hatcher [EMAIL PROTECTED] wrote: Ted, Your example says this: To seed the textarea from the form bean, you could code something like: textarea name=article rows=15 cols=60 wrap=soft/textarea But there is something additional to set the initial value from the form bean, correct? textarea name=article rows=15 cols=60 wrap=softbean:write name=formName property=article//textarea Erik - Original Message - From: Ted Husted [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 19, 2001 7:02 AM Subject: Re: TextArea Wrapping using Form Tags See Wrapping a text area at http://husted.com/about/struts/FAQ/view-html.htm Calvin Lau wrote: Is there any way to set the wrapping in a text area when using the struts form tags? In HTML you can set virtual, physical, or none. Netscape doesn't do any wrapping by default so large portions of text are lost when I grab information to display in a textarea to be modified. Any ideas? __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: TextArea Wrapping using Form Tags
Am I missing something? I realize that Netscape and IE support the wrap tag but when i add wrap='soft' to my form:textarea tag, I get an error saying the attribute wrap is invalid. --- Dave Van Even [EMAIL PROTECTED] wrote: No, the wrap attribute isn't part of the HTML spec, but it's supported in both Netscape and IE, and it's pretty useful. - Original Message - From: Calvin Lau [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 20, 2001 12:22 AM Subject: Re: TextArea Wrapping using Form Tags The wrap attribute is invalid in the HTML TLD I'm using. Is there a newer version? Calvin --- Erik Hatcher [EMAIL PROTECTED] wrote: Ted, Your example says this: To seed the textarea from the form bean, you could code something like: textarea name=article rows=15 cols=60 wrap=soft/textarea But there is something additional to set the initial value from the form bean, correct? textarea name=article rows=15 cols=60 wrap=softbean:write name=formName property=article//textarea Erik - Original Message - From: Ted Husted [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 19, 2001 7:02 AM Subject: Re: TextArea Wrapping using Form Tags See Wrapping a text area at http://husted.com/about/struts/FAQ/view-html.htm Calvin Lau wrote: Is there any way to set the wrapping in a text area when using the struts form tags? In HTML you can set virtual, physical, or none. Netscape doesn't do any wrapping by default so large portions of text are lost when I grab information to display in a textarea to be modified. Any ideas? __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: TextArea Wrapping using Form Tags
Ahh... I was mainly paying attention to the wrap=soft part and didn't notice it was using regular HTML tags =). Thanks --- [EMAIL PROTECTED] wrote: Am I missing something? Yes. :-) What you're missing is that the suggestion is to use a regular HTML textarea tag instead of the Struts tag, and then use bean:write to provide the initial value. -- Martin Cooper - Original Message - From: Calvin Lau [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 19, 2001 3:43 PM Subject: Re: TextArea Wrapping using Form Tags Am I missing something? I realize that Netscape and IE support the wrap tag but when i add wrap='soft' to my form:textarea tag, I get an error saying the attribute wrap is invalid. --- Dave Van Even [EMAIL PROTECTED] wrote: No, the wrap attribute isn't part of the HTML spec, but it's supported in both Netscape and IE, and it's pretty useful. - Original Message - From: Calvin Lau [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 20, 2001 12:22 AM Subject: Re: TextArea Wrapping using Form Tags The wrap attribute is invalid in the HTML TLD I'm using. Is there a newer version? Calvin --- Erik Hatcher [EMAIL PROTECTED] wrote: Ted, Your example says this: To seed the textarea from the form bean, you could code something like: textarea name=article rows=15 cols=60 wrap=soft/textarea But there is something additional to set the initial value from the form bean, correct? textarea name=article rows=15 cols=60 wrap=softbean:write name=formName property=article//textarea Erik - Original Message - From: Ted Husted [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 19, 2001 7:02 AM Subject: Re: TextArea Wrapping using Form Tags See Wrapping a text area at http://husted.com/about/struts/FAQ/view-html.htm Calvin Lau wrote: Is there any way to set the wrapping in a text area when using the struts form tags? In HTML you can set virtual, physical, or none. Netscape doesn't do any wrapping by default so large portions of text are lost when I grab information to display in a textarea to be modified. Any ideas? __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
TextArea Wrapping using Form Tags
Is there any way to set the wrapping in a text area when using the struts form tags? In HTML you can set virtual, physical, or none. Netscape doesn't do any wrapping by default so large portions of text are lost when I grab information to display in a textarea to be modified. Any ideas? __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Beans In Form Tags
For some reason I get the following error when I try to access a bean from within a form tag: Attribute entry has no value... When I use the regular HTML textbox instead of the Struts Form tag for a textbox, it works. Anyone know why? Thanks. This works: logic:iterate id=entry name=clientSingleForm property=clientSingleQueryList ... input type=text property=clientLogin size=10 value=bean:write name=entry property=clientLogin / This does NOT work: logic:iterate id=entry name=clientSingleForm property=clientSingleQueryList ... form:text property=clientLogin size=10 value=bean:write name=entry property=clientLogin //form:text __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/