What you need to do to have Struts work with VAJ 3.5.3 : 1) Get a parser that corresponds to the JAXP API and works with Struts, but does not conflict with the IBM XML4Java parser that the WTE requires. In order to do that : - Download JAXP 1.01 at http://java.sun.com/xml/archive.html - Unzip jaxp-1_0_1.zip - Create a new project "JAXP no w3c project" - Import the entire contents of the jaxp.jar file and all of the classes in the parser.jar file except those that start with org into VisualAge for Java.
2) In org.apache.struts.taglib.html.FormTag.doEndTag on the Form tag, change: pageContext.removeAttribute(Constants.BEAN_KEY, PageContext.REQUEST_SCOPE); pageContext.removeAttribute(Constants.FORM_KEY, PageContext.REQUEST_SCOPE); to: pageContext.getRequest().removeAttribute(Constants.BEAN_KEY); pageContext.getRequest().removeAttribute(Constants.FORM_KEY); pageContext.removeAttribute(Constants.BEAN_KEY); pageContext.removeAttribute(Constants.FORM_KEY); 3) Changes you mentioned concerning GetResource() and GetResourceAsStream() are not necessary if you put your struts- config.xml, web.xml ApplicationResources.properties and all the other properties files included in struts.jar into VAJ resources or into some folder (in that case, you will have to add the folder to the extra class path of WTE) You are right that VAJ uses .webapp files instead of web.xml but Struts needs to know ActionServlet servlet mapping (usualy *.do) for generating actions URLs in JSPs. Struts considers itself to be running in a full J2EE appserver so it's trying to read it from web.xml file. web.xml is needed and do not forget if you change ActionServlet mapping in your webapp to change it as well in your web.xml. For more information : http://www7.software.ibm.com/vad.nsf/Data/ Document2557?OpenDocument&SubMast=1 http://www7.software.ibm.com/vad.nsf/Data/ Document2558?OpenDocument&SubMast=1 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10964.html http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10571.html Hope this would help you. Francois-Xavier Bonnet >Hi, >I have a pb with VAS 3.5.3 and Struts... > >I try to do all the modifications found in the web site of IBM >but it wasn't work... > >I don't understand the use of the file << web.xml >> >It seems that we only use the .webapp and not the web.xml >is it right with the norm of VAS ? >web.xml is only for J2EE ? >I did the conversion with cvtwebxml.bat but i had to change in the >function ActionServlet.initServlet() the road to the file web.xml >In fact, it can be launched only if i give the name file.webapp and not >web.xml ? why ? > > >So I must change in the source code of these functions : > >(1) org\apache\struts\taglib\html\FormTag.doEndTag() : > ------------------------------------------------ > pageContext.getRequest().removeAttribute(Constants.BEAN_KEY); > pageContext.getRequest().removeAttribute(Constants.FORM_KEY); > pageContext.removeAttribute(Constants.BEAN_KEY); > pageContext.removeAttribute(Constants.FORM_KEY); > >(2) ActionServlet.initMapping() : > --------------------------- > InputStream input = new java.io.FileInputStream(getServletContext >().getRealPath(config)); > > >(3) ActionServlet.initServlet() > --------------------------- > > input = new >java.io.FileInputStream(getServletContext().getRealPath("/WEB-INF/ web.xml")); >[ in fact i put file.webapp rather than web.xml] > > >(4) ResourceTag.doStartTag() : > -------------------------- > > InputStream stream = null; >stream = new >java.io.FileInputStream(pageContext.getServletContext().getRealPath(nam e)); > } catch (IOException e) { > RequestUtils.saveException(pageContext, e); > throw new JspException > (messages.getMessage("resource.get", name)); > > > >Must I do it ? > >This is my error message when I test with the demo file from >IMB(employeelist) >There is a problem with the parser JAXP... > >if someone succeed with VAS 3.3.5 and Struts, can he contact me ? > >Sorry for my being bad practice of English. > >Thanks > > > > > > >Unhandled error! You might want to consider having an error page to report >such errors more gracefully > >org.apache.jasper.JasperException: 3,0:"Unable to open taglibrary >/WEB-INF/struts-html.tld : Parse Error in the tag library descriptor: null > java.lang.Throwable(java.lang.String) > java.lang.Exception(java.lang.String) > javax.servlet.ServletException(java.lang.String) > org.apache.jasper.JasperException(java.lang.String) > void >com.ibm.ivj.jsp.jasper.compiler.ibmtsx.JspDebugTsxParser.parse(java.lan g.String, >java.lang.Class []) > void org.apache.jasper.compiler.Parser.parse(java.lang.String) > void org.apache.jasper.compiler.Parser.parse() > boolean com.ibm.ivj.jsp.jasper.compiler.JspDebugPageCompiler.compile() > boolean >com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet.compile(org.apache.jaspe r.compiler.Compiler, >java.lang.Class) > boolean >com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet.loadJSP(java.lang.String , >java.lang.String, boolean, javax.servlet.http.HttpServletRequest, >javax.servlet.http.HttpServletResponse) > void >org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary( javax.servlet.http.HttpServletRequest, >javax.servlet.http.HttpServletResponse) > void >org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.se rvlet.http.HttpServletRequest, >javax.servlet.http.HttpServletResponse, boolean) > void >org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http. HttpServletRequest, >javax.servlet.http.HttpServletResponse, java.lang.String, >java.lang.Throwable, boolean) > void >org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpSer vletRequest, >javax.servlet.http.HttpServletResponse) > void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, >javax.servlet.ServletResponse) > void >com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.ser vlet.ServletRequest, >javax.servlet.ServletResponse) > void >com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.ser vlet.ServletRequest, >javax.servlet.ServletResponse) > void >com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet. engine.webapp.StrictLifecycleServlet, >javax.servlet.ServletRequest, javax.servlet.ServletResponse) > void >com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.serv let.ServletRequest, >javax.servlet.ServletResponse) > void >com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.Ser vletRequest, >javax.servlet.ServletResponse, >com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) > void >com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.i bm.servlet.engine.webapp.ServletInstanceReference, >javax.servlet.ServletRequest, javax.servlet.ServletResponse, >com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) > void >com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.s ervlet.ServletRequest, >javax.servlet.ServletResponse, >com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) > void >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispa tch(com.ibm.servlet.engine.webapp.WebAppRequest, >javax.servlet.http.HttpServletResponse, boolean) > void >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.se rvlet.ServletRequest, >javax.servlet.ServletResponse, boolean) > void >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.ser vlet.ServletRequest, >javax.servlet.ServletResponse) > void >com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(java.lang Object) > void >com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(jav a.lang.Object) > void >com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(java.l ang.String, >com.ibm.servlet.engine.srp.ISRPConnection) > void >com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(com.ib m.servlet.engine.oselistener.api.IOSEConnection) > void >com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnec tion(java.net.Socket) > void com.ibm.servlet.engine.http_transport.HttpTransportHandler.run() > void java.lang.Thread.run() > > > >_________________________________________________________________ >Téléchargez MSN Explorer gratuitement à l'adresse >http://explorer.msn.fr/intl.asp > > >-- >To unsubscribe, e-mail: <mailto:struts-user- [EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:struts-user- [EMAIL PROTECTED]> > > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>