Author Login
Post Reply
user Digest 2 Sep 2010 14:51:25 -0000 Issue 9161
Topics (messages 207347 through 207351):
Re: EL not working in tomcat 5.5.28 works in myeclipse
207347 by: Dave Newton
Re: Struts2 REST plugin problems
207348 by: Rafael Taboada
207349 by: Rafael Taboada
207350 by: Rafael Taboada
org.xml.sax.SAXParseException: The content of element type "package" must match
207351 by: Satheesh Kannan A B
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_207347.ezm (zipped)Have you tried in a Tomcat list?
On Sep 1, 2010 2:45 AM, "abhishek jain" <abhishek.netjain@(protected):
> On Tue, Aug 31, 2010 at 9:01 PM, abhishek jain
> <abhishek.netjain@(protected):
>
>> Hey ,
>> I just realized i acidently placed el-api.jar in WEB-INF/lib folder.
>> If i dont than i get the following exception:
>>
>>
>> Aug 31, 2010 4:28:44 PM
org.apache.catalina.core.StandardContext>> listenerStart
>> SEVERE: Error configuring application listener of class
>>
com.sun.faces.config.ConfigureListener>>
java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
>> at
java.lang.Class.getDeclaredConstructors0(Native Method)
>> at
java.lang.Class.privateGetDeclaredConstructors (
Class.java:2389)
>> at
java.lang.Class.getConstructor0 (
Class.java:2699)
>> at
java.lang.Class.newInstance0 (
Class.java:326)
>> at
java.lang.Class.newInstance (
Class.java:308)
>> at
>>
org.apache.catalina.core.StandardContext.listenerStart (
StandardContext.java:3744)
>> at
>>
org.apache.catalina.core.StandardContext.start (
StandardContext.java:4252)
>> at
>>
org.apache.catalina.manager.ManagerServlet.start (
ManagerServlet.java:1173)
>> at
>>
org.apache.catalina.manager.HTMLManagerServlet.start (
HTMLManagerServlet.java:549)
>> at
>>
org.apache.catalina.manager.HTMLManagerServlet.doGet (
HTMLManagerServlet.java:105)
>> at
javax.servlet.http.HttpServlet.service (
HttpServlet.java:627)
>> at
javax.servlet.http.HttpServlet.service (
HttpServlet.java:729)
>> at
>>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
ApplicationFilterChain.java:269)
>> at
>>
org.apache.catalina.core.ApplicationFilterChain.doFilter (
ApplicationFilterChain.java:188)
>> at
>>
org.apache.catalina.core.StandardWrapperValve.invoke (
StandardWrapperValve.java:213)
>> at
>>
org.apache.catalina.core.StandardContextValve.invoke (
StandardContextValve.java:172)
>> at
>>
org.apache.catalina.authenticator.AuthenticatorBase.invoke (
AuthenticatorBase.java:525)
>> at
>>
org.apache.catalina.core.StandardHostValve.invoke (
StandardHostValve.java:127)
>> at
>>
org.apache.catalina.valves.ErrorReportValve.invoke (
ErrorReportValve.java:117)
>> at
>>
org.apache.catalina.core.StandardEngineValve.invoke (
StandardEngineValve.java:108)
>> at
>>
org.apache.catalina.connector.CoyoteAdapter.service (
CoyoteAdapter.java:174)
>> at
>>
org.apache.coyote.http11.Http11Processor.process (
Http11Processor.java:873)
>> at
>>
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>> at
>>
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (
PoolTcpEndpoint.java:528)
>> at
>>
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt (
LeaderFollowerWorkerThread.java:81)
>> at
>>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>> at
java.lang.Thread.run (
Thread.java:619)
>> Caused by:
java.lang.ClassNotFoundException:
javax.el.ExpressionFactory>> at
>>
org.apache.catalina.loader.WebappClassLoader.loadClass (
WebappClassLoader.java:1386)
>> at
>>
org.apache.catalina.loader.WebappClassLoader.loadClass (
WebappClassLoader.java:1232)
>> at
java.lang.ClassLoader.loadClassInternal (
ClassLoader.java:316)
>> ... 27 more
>>
>>
>>
>> and the application is not started.
>>
>>
>> abhishek
>>
>>
>> On Tue, Aug 31, 2010 at 8:44 PM, abhishek jain <
abhishek.netjain@(protected)
>> > wrote:
>>
>>> Hi friends,
>>> I have a website in struts 1.2 hosted on tomcat 5.5.x and it uses EL.
>>> It is not being evaluated, any suggestions on the reasons why?
>>>
>>> I used struts 1.2 , myeclipse, tomcat 5.5.28 .
>>> EL is not working on live but works on development environment on
>>> myeclipse.
>>>
>>> I have tried changing the web.xml to 2.4 from 2.5 etc.
>>>
>>> Pl. help.
>>> --
>>> Thanks and kind Regards,
>>> Abhishek jain
>>>
>>
>>
> any comments?
> Pl. help,
> thanks
> abhishek

Attachment:
user_207348.ezm (zipped)Hi folks,
I've just resolved my issue. My goal is to add struts-restful-plugin to an
struts2 existent app. So i needed to have an url handler
If I request http://localhost:8080/myApp/login.action, it must be resolved
by DefaultActionMapper
If I request http://localhost:8080/myApp/service/client/324, it must be
resolved by org.apache.struts2.rest.
RestActionMapper
So I have in my struts.xml
<constant name="struts.mapper.class"
value="org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper"/>
<constant name="struts.mapper.prefixMapping" value="/service:rest,:struts"/>
Where rest is a bean defined in strus-config.xml (restful plugin) and it is
mapped to
org.apache.struts2.rest.RestActionMapperIn my struts.properties
struts.action.extension=action,xml,json,,
And that's all. I hope it can help to someone having the same problem.
Thanks for everything.
p.d. I'm using struts2.2.1
Bye
On Tue, Aug 31, 2010 at 5:24 PM, Dale Newfield <dale@(protected):
> On 8/31/10 5:17 PM, Rafael Taboada wrote:
>
>> But I'm having the same problem "HTTP status 404"
>>
>
> So it is failing to find any valid action mapping? What do your logs show?
> This might help you figure out what's going on:
> http://struts.apache.org/2.x/docs/config-browser-plugin.html
>
>
> My struts.xml looks like :
>>
>
> <include file="example.xml"/>
>>
>
> I don't know what's in that file--I'm guessing a package with the namespace
> "/example"? Do you have any packages whose namespace is "/service"?
>
>
> <package name="default" namespace="/" extends="struts-default">
>>
>
> I've not looked into the details of the plugins you said you're using. Do
> any of them provide packages that you need to extend instead of
> struts-default to get their benefits?
>
>
> <result type="redirectAction">
>> <param name="actionName">HelloWorld</param>
>> <param name="namespace">/example</param>
>>
>
> So if you try to access /index.action, does it redirect to
> /example/HellowWorld.action ?
>
>
> And when I try to acces
>> http://localhost:8080/struts221/example/HelloWorld.action, apparently it
>> is driven by restful, because it shows "HTTP status 404" error
>>
>
> Your configuration doesn't specify that this should be mapped by the
> Restful2ActionMapper, so why do you assume this?
>
>
> Maybe i'm missing another config? What am I doing wrong?
>>
>
> I don't know how the Restful2ActionMapper does it's thing. When I looked
> at the two provided Restful action mappers several years ago I found that
> neither really did what I needed, so I ended up writing my own. I've
> actually found that most of what people want when they say they want REST
> style urls can be provided by the default action mapper with wildcards.
> (Also, make sure that you have SlashesInActionNames set appropriately for
> the rest of your config.)
>
> http://struts.apache.org/2.x/docs/restfulactionmapper.html and/or
> http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.htmlshould be helpful.
>
> -Dale
>
--
Rafael Taboada
Software Engineer
Cell : +511-992741026
"No creo en el destino pues no me gusta tener la idea de controlar mi vida"

Attachment:
user_207349.ezm (zipped)Hi folks,
I've just resolved my issue. My goal is to add struts-restful-plugin to an
struts2 existent app. So i needed to have an url handler
If I request http://localhost:8080/myApp/login.action, it must be resolved
by DefaultActionMapper
If I request http://localhost:8080/myApp/service/client/324, it must be
resolved by org.apache.struts2.rest.
RestActionMapper
So I have in my struts.xml
<constant name="struts.mapper.class"
value="org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper"/>
<constant name="struts.mapper.prefixMapping" value="/service:rest,:struts"/>
Where rest is a bean defined in strus-config.xml (restful plugin) and it is
mapped to
org.apache.struts2.rest.RestActionMapperIn my struts.properties
struts.action.extension=action,xml,json,,
And that's all. I hope it can help to someone having the same problem.
Thanks for everything.
p.d. I'm using struts2.2.1
Bye
On Tue, Aug 31, 2010 at 5:24 PM, Dale Newfield <dale@(protected):
> On 8/31/10 5:17 PM, Rafael Taboada wrote:
>
>> But I'm having the same problem "HTTP status 404"
>>
>
> So it is failing to find any valid action mapping? What do your logs show?
> This might help you figure out what's going on:
> http://struts.apache.org/2.x/docs/config-browser-plugin.html
>
>
> My struts.xml looks like :
>>
>
> <include file="example.xml"/>
>>
>
> I don't know what's in that file--I'm guessing a package with the namespace
> "/example"? Do you have any packages whose namespace is "/service"?
>
>
> <package name="default" namespace="/" extends="struts-default">
>>
>
> I've not looked into the details of the plugins you said you're using. Do
> any of them provide packages that you need to extend instead of
> struts-default to get their benefits?
>
>
> <result type="redirectAction">
>> <param name="actionName">HelloWorld</param>
>> <param name="namespace">/example</param>
>>
>
> So if you try to access /index.action, does it redirect to
> /example/HellowWorld.action ?
>
>
> And when I try to acces
>> http://localhost:8080/struts221/example/HelloWorld.action, apparently it
>> is driven by restful, because it shows "HTTP status 404" error
>>
>
> Your configuration doesn't specify that this should be mapped by the
> Restful2ActionMapper, so why do you assume this?
>
>
> Maybe i'm missing another config? What am I doing wrong?
>>
>
> I don't know how the Restful2ActionMapper does it's thing. When I looked
> at the two provided Restful action mappers several years ago I found that
> neither really did what I needed, so I ended up writing my own. I've
> actually found that most of what people want when they say they want REST
> style urls can be provided by the default action mapper with wildcards.
> (Also, make sure that you have SlashesInActionNames set appropriately for
> the rest of your config.)
>
> http://struts.apache.org/2.x/docs/restfulactionmapper.html and/or
> http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.htmlshould be helpful.
>
> -Dale
>
--
Rafael Taboada
Software Engineer
Cell : +511-992741026
"No creo en el destino pues no me gusta tener la idea de controlar mi vida"

Attachment:
user_207350.ezm (zipped)Hi folks,
I've just resolved my issue. My goal is to add struts-restful-plugin to an
struts2 existent app. So i needed to have an url handler
If I request http://localhost:8080/myApp/login.action, it must be resolved
by DefaultActionMapper
If I request http://localhost:8080/myApp/service/client/324, it must be
resolved by org.apache.struts2.rest.
RestActionMapper
So I have in my struts.xml
<constant name="struts.mapper.class"
value="org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper"/>
<constant name="struts.mapper.prefixMapping" value="/service:rest,:struts"/>
Where rest is a bean defined in strus-config.xml (restful plugin) and it is
mapped to
org.apache.struts2.rest.RestActionMapperIn my struts.properties
struts.action.extension=action,xml,json,,
And that's all. I hope it can help to someone having the same problem.
Thanks for everything.
p.d. I'm using struts2.2.1
Bye
On Tue, Aug 31, 2010 at 5:24 PM, Dale Newfield <dale@(protected):
> On 8/31/10 5:17 PM, Rafael Taboada wrote:
>
>> But I'm having the same problem "HTTP status 404"
>>
>
> So it is failing to find any valid action mapping? What do your logs show?
> This might help you figure out what's going on:
> http://struts.apache.org/2.x/docs/config-browser-plugin.html
>
>
> My struts.xml looks like :
>>
>
> <include file="example.xml"/>
>>
>
> I don't know what's in that file--I'm guessing a package with the namespace
> "/example"? Do you have any packages whose namespace is "/service"?
>
>
> <package name="default" namespace="/" extends="struts-default">
>>
>
> I've not looked into the details of the plugins you said you're using. Do
> any of them provide packages that you need to extend instead of
> struts-default to get their benefits?
>
>
> <result type="redirectAction">
>> <param name="actionName">HelloWorld</param>
>> <param name="namespace">/example</param>
>>
>
> So if you try to access /index.action, does it redirect to
> /example/HellowWorld.action ?
>
>
> And when I try to acces
>> http://localhost:8080/struts221/example/HelloWorld.action, apparently it
>> is driven by restful, because it shows "HTTP status 404" error
>>
>
> Your configuration doesn't specify that this should be mapped by the
> Restful2ActionMapper, so why do you assume this?
>
>
> Maybe i'm missing another config? What am I doing wrong?
>>
>
> I don't know how the Restful2ActionMapper does it's thing. When I looked
> at the two provided Restful action mappers several years ago I found that
> neither really did what I needed, so I ended up writing my own. I've
> actually found that most of what people want when they say they want REST
> style urls can be provided by the default action mapper with wildcards.
> (Also, make sure that you have SlashesInActionNames set appropriately for
> the rest of your config.)
>
> http://struts.apache.org/2.x/docs/restfulactionmapper.html and/or
> http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.htmlshould be helpful.
>
> -Dale
>
--
Rafael Taboada
Software Engineer
Cell : +511-992741026
"No creo en el destino pues no me gusta tener la idea de controlar mi vida"

Attachment:
user_207351.ezm (zipped)Hi,
I think it's a existing and resolved issues in struts 2.1.8, since I have googled and searched here but am not able to resolve this.
Currently am configuring interceptors in my struts 2.1.8 application using websphere 6.0.1.
What I have coded is right I think so and u all please verify it and suggest me the thing to resolve this.
In the below if I remove the interceptors and global exceptions mapping my application working fine.
Am using struts 2.1.8, jdk 6, websphere 6.0.1, xercesImpl-2.8.1
The exception am getting is give below .........................
[9/2/10 18:41:56:113 IST] 0000002c SystemOut O 2010-09-02 18:41:56,082 [WebContainer : 0] ERROR
com.opensymphony.xwork2.util.DomHelper - The content of element type "package" must match "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-exception-mappings?,action*)". at (null:103:12)
org.xml.sax.SAXParseException: The content of element type "package" must match "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-exception-mappings?,action*)".
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at
com.opensymphony.xwork2.util.DomHelper.parse (
DomHelper.java:113)
etc..
and my code wat I have implemented given below ........
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.devMode" value="false" />
<package name="KEW" extends="struts-default" >
<global-results>
<result name="ldaperror">/search/ldaperror.jsp</result>
</global-results>
<interceptors>
<interceptor name="authenticationInterceptor" class="com.aegon.capitalexpiry.web.util.AuthenticationInterceptor"/>
<interceptor name="execAndWait" class="
org.apache.struts2.interceptor.ExecuteAndWaitInterceptor"/>
<interceptor name="fileUpload" class="
org.apache.struts2.interceptor.FileUploadInterceptor"/>
<interceptor name="i18n" class="
com.opensymphony.xwork2.interceptor.I18nInterceptor"/>
<interceptor name="logger" class="
com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
<interceptor name="modelDriven" class="
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor"/>
<interceptor name="scope" class="
org.apache.struts2.interceptor.ScopeInterceptor"/>
<interceptor name="params" class="
com.opensymphony.xwork2.interceptor.ParametersInterceptor"/>
<interceptor name="prepare" class="
com.opensymphony.xwork2.interceptor.PrepareInterceptor"/>
<interceptor name="static-params" class="
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor"/>
<interceptor name="servlet-config" class="com.opensymphony.xwork2.interceptor.ServletConfigInterceptor"/>
<interceptor name="sessionAutowiring" class="com.opensymphony.xwork2.interceptor.SessionContextAutowiringInterceptor"/>
<interceptor name="timer" class="
com.opensymphony.xwork2.interceptor.TimerInterceptor"/>
<interceptor name="token" class="com.opensymphony.xwork2.interceptor.TokenInterceptor"/>
<interceptor name="token-session" class="com.opensymphony.xwork2.interceptor.TokenSessionStoreInterceptor" />
<interceptor name="validation" class="com.opensymphony.xwork2.interceptor.ValidationInterceptor " />
<interceptor name="workflow" class="
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor"/>
<interceptor-stack name="defaultStack">
<interceptor-ref name="authenticationInterceptor"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="i18n"/>
<interceptor-ref name="logger"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="params"/>
<interceptor-ref name="prepare"/>
<interceptor-ref name="servlet-config"/>
<interceptor-ref name="sessionAutowiring"/>
<interceptor-ref name="timer"/>
<interceptor-ref name="token"/>
<interceptor-ref name="token-session"/>
<interceptor-ref name="validation"/>
<interceptor-ref name="workflow"/>
<interceptor-ref name="static-params"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="authenticationInterceptor"/>
<default-interceptor-ref name="defaultLoginStack" />
<default-action-ref name="start" />
<global-results>
<result name="sessionerror">/html/SessionError.html</result>
</global-results>
<result name="sessionerror" >/html/SessionError.html</result>
<global-exception-mappings>
<exception-mapping exception="
java.lang.Exception" result="sessionerror"/>
</global-exception-mappings>
<action name="start" class="startAction">
<result name="success">index_kew.jsp</result>
</action>
</package>
</struts>
Thanks and Regards,
Satheesh Kannan A B
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------