Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Security Spring Struts2 Acegi
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Ankur
Spring Struts2 Acegi
1 Answer(s)      6 years and 3 months ago
Posted in : Security



Advertisement
View Answers

March 17, 2011 at 1:31 PM


hi i am getting exception

The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]

this is my web.xml file

<p><?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <display-name>AcegiTraining</display-name>
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
                   /WEB-INF/context/applicationContext.xml
         </param-value>
    </context-param>
    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>classpath:dev.log4j.xml</param-value>
    </context-param>
    <context-param>
        <param-name>log4jExposeWebAppRoot</param-name>
        <param-value>false</param-value>
    </context-param>
    <mime-mapping>
        <extension>css</extension>
        <mime-type>text/css</mime-type>
    </mime-mapping>
    <filter>
        <filter-name>Acegi Filter Chain Proxy</filter-name>
        <filter-class>
            org.acegisecurity.util.FilterToBeanProxy
        </filter-class>
        <init-param>
            <param-name>targetClass</param-name>
            <param-value>
                org.acegisecurity.util.FilterChainProxy
            </param-value>
        </init-param>
    </filter>
    <filter>
        <filter-name>sitemesh</filter-name>
        <filter-class>
            com.opensymphony.module.sitemesh.filter.PageFilter
        </filter-class>
    </filter>
    <filter-mapping>
        <filter-name>Acegi Filter Chain Proxy</filter-name>
        <url-pattern>/j<em>acegi</em>security_check</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>Acegi Filter Chain Proxy</filter-name>
        <url-pattern>/j<em>acegi</em>logout</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>Acegi Filter Chain Proxy</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>Acegi Filter Chain Proxy</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sitemesh</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
    <listener>
        <display-name>log4jConfigListener</display-name>
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    </listener></p>

<pre class="prettyprint">&lt;listener&gt;
    &lt;listener-class&gt;
        org.springframework.web.context.ContextLoaderListener
    &lt;/listener-class&gt;
&lt;/listener&gt;
&lt;listener&gt;
    &lt;listener-class&gt;
        org.acegisecurity.ui.session.HttpSessionEventPublisher
    &lt;/listener-class&gt;
&lt;/listener&gt;
&lt;welcome-file-list&gt;
    &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
&lt;/welcome-file-list&gt;
&lt;error-page&gt;
    &lt;error-code&gt;404&lt;/error-code&gt;
    &lt;location&gt;/404.jsp&lt;/location&gt;
&lt;/error-page&gt;
&lt;error-page&gt;
    &lt;error-code&gt;500&lt;/error-code&gt;
    &lt;location&gt;/error.jsp&lt;/location&gt;
&lt;/error-page&gt;


 &lt;listener&gt;
    &lt;listener-class&gt;org.apache.axis.transport.http.AxisHTTPSessionListener&lt;/listener-class&gt;
&lt;/listener&gt;
</code></pre>

<p>  <servlet>
    <servlet-name>AxisServlet</servlet-name>
    <display-name>Apache-Axis Servlet</display-name>
    <servlet-class>
        org.apache.axis.transport.http.AxisServlet
    </servlet-class>
  </servlet></p>

<p>  <servlet>
    <servlet-name>AdminServlet</servlet-name>
    <display-name>Axis Admin Servlet</display-name>
    <servlet-class>
        org.apache.axis.transport.http.AdminServlet
    </servlet-class>
    <load-on-startup>100</load-on-startup>
  </servlet></p>

<p>  <servlet>
    <servlet-name>SOAPMonitorService</servlet-name>
    <display-name>SOAPMonitorService</display-name>
    <servlet-class>
        org.apache.axis.monitor.SOAPMonitorService
    </servlet-class>
    <init-param>
      <param-name>SOAPMonitorPort</param-name>
      <param-value>5001</param-value>
    </init-param>
    <load-on-startup>100</load-on-startup>
  </servlet></p>

<p>  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/servlet/AxisServlet</url-pattern>
  </servlet-mapping></p>

<p>  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>*.jws</url-pattern>
  </servlet-mapping></p>

<p>  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/services/*</url-pattern>
  </servlet-mapping></p>

<p>  <servlet-mapping>
    <servlet-name>SOAPMonitorService</servlet-name>
    <url-pattern>/SOAPMonitor</url-pattern>
  </servlet-mapping></p>

<p> <!-- uncomment this if you want the admin servlet -->
   <session-config>
       <!-- Default to 5 minute session timeouts -->
       <session-timeout>5</session-timeout>
   </session-config></p>

<p>  <mime-mapping>
    <extension>wsdl</extension>
     <mime-type>text/xml</mime-type>
  </mime-mapping></p>

<p>  <mime-mapping>
    <extension>xsd</extension>
    <mime-type>text/xml</mime-type>
  </mime-mapping></p>

<p>  <welcome-file-list id="WelcomeFileList">
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.jws</welcome-file>
  </welcome-file-list></p>

<pre class="prettyprint">&lt;!-- For Struts Framework --&gt;
&lt;filter&gt;
 &lt;filter-name&gt;eproSessionFilter&lt;/filter-name&gt;
    &lt;filter-class&gt;com.epro.util.EproSessionFilter&lt;/filter-class&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;ignorePage1&lt;/param-name&gt;
      &lt;param-value&gt;default/showLogin.action&lt;/param-value&gt;
   &lt;/init-param&gt;

&lt;/filter&gt;
</code></pre>

<p> <filter>
    <filter-name>hibernateFilter</filter-name>
    <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
  </filter></p>

<pre class="prettyprint">&lt;filter&gt;
    &lt;filter-name&gt;struts2&lt;/filter-name&gt;
    &lt;filter-class&gt;org.apache.struts2.dispatcher.FilterDispatcher&lt;/filter-class&gt;
&lt;/filter&gt;
</code></pre>

<p><filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
</web-app></p>


Related Tutorials/Questions & Answers:
Spring Struts2 Acegi - Security
Spring Struts2 Acegi  I want to implement Springs Acegi security with Struts2. Can some one provide me source code for that? Thanks in advance
Struts2 Spring Hibernate integration
Struts2 Spring Hibernate integration  How to integrate Struts2 Spring2.5 and Hibernate3 in a web application project?Could anyone give some example
Advertisements
struts2 with hibernate - Spring
struts2 with hibernate  hi can i use struts2 with spring i am a new user of spring please send me some tutorials of spring  Hi friend... information. http://www.roseindia.net/spring/ http://www.roseindia.net
Acegi Security exclusions Error - Security
Acegi Security exclusions Error  Hello, I was implementing Acegi... the following code in POM file: org.acegisecurity acegi-security... acegi-security 1.0.6 org.springframework spring-dao  Hi,I used the following code
spring security - Spring
spring security  Can i use spring security concept acegi for any type of java applications
spring
spring  how to upgrade from struts2 to spring
struts2
struts2  sir.... i am doing one struts2 application and i have to make pagination in struts2....how can i do
struts2
struts2  dear deepak sir plz give the struts 2 examples using applicationresources.properties file
Struts2
Struts2  i want select multiple items from select list in struts2.when i did like that the two selected values must saved into databse in two diffirent rows.pls provide any one code for this i am new to Struts2
struts2
struts2  hi all i am going to run struts2.x program i got this error when server started java.lang.RuntimeException...: Struts2 Tutorials
struts2
struts2   Sir when i have run my struts 2 web application,every time i get error " request resources is not available",,,what is this,,,plz help me
Struts2
Struts2  Hi, I need a solution for displaying success message in same page in struts2. how to redirect same page in struts2.Please help me.   hi friend, To know how redirect action can be done in struts 2 you can go
Struts2
Struts2  Hi I am using struts 2,In struts2 architecture ,I couldn't understand the purpose of ActionMapper and ActionProxy.My Question is,when the request comes into the picture,the filterdispatcher consult the ActionMapper
Struts2
Struts2  java.lang.NullPointerException org.apache.struts2.impl.StrutsActionProxy.getErrorMessage(StrutsActionProxy.java:69... exception while submitting the update form in struts2 I am using tomcat6.0 ... its
struts2
struts2  how to read properties file in jsp of struts2   Hi, You can use the Properties class of Java in your action class. Properties pro = new Properties(); FileInputStream in = new FileInputStream(f); pro.load
STRUTS2
STRUTS2  sir but my question is using ApplicationResources.properties in STRUTS 2.i cant get the values into my application.but in the exmple given at roseindia,u cant use the properties file.i use actionclass-validation.xml
struts2 - Struts
Struts2 and Ajax Example  how to use struts2 and ajax
Struts2 and Hibernate
Struts2 and Hibernate  how to fetch database value from one page to another page in struts2 and hibernate
struts2 - Struts
struts2  how to pre populate the fields using struts2 from the database
spring
spring   hi how can we make spring bean as prototype how can we load applicationcontext in spring what is dependency injection
spring
spring  javascript browse image in spring progrme
spring
spring  Access JSP files in Spring
spring
spring  sir how to access multiple jsp's in spring
spring
spring   i am a beginner in java.. but i have to learn spring framework.. i know the core java concepts with some J2EE knowledge..can i learn spring without knowing anything about struts
Spring
Spring  What is AOP concept in spring? How AOP concept differ from DI concept
spring
spring  sir can you explain me the flow of sample example by using spring? thanks
Struts2 tag
Struts2 tag  function of hidden tag?   Hi Friend, <s:hidden> tag create a hidden value field.It means it stores the value but cannot be visible. For more information, visit the following link: Struts2 Tutorial
Struts2 and Hibernate
Struts2 and Hibernate  Sir/ madam, Can we use iterator tag in struts for fetch the database value and shown on form. if yes then how
New to struts2
New to struts2   Please let me know the link where to start for struts 2 beginners   Struts 2 Tutorials
struts2 - Framework
struts2  Hello, I am sathish.. I got problem in stuts2 ? Do tomcat5.5 support struts2 ? Now , currently my application running on tomcat 6... and mainly i want support with tiles(struts 2)...now which struts2 jars i have to use
struts2 - Framework
struts2   RoseIndia i m using this code for a bean in struts2.but geting error SEVERE: Could not instantiate bean how to resolve this.thnx
 

 

 

DMCA.com