Implication of not adding amagent filter to web.xml of protected applicatio

Hi, i have installed an J2EE agent to protect my application. The filtering mode is J2EE_ONLY and web tier declarative security is used. The agent is protecting my application without the am agent filter added to the web.xml of the application. Is adding of the filter required? What feature will be missing if the filter is not added?
Thanks,

Hi,
Yes, you need to add the filter element to reference the opensso/am agent. This is the mechanism that is used so that the agent can intercept all the we requests and let the agent check do security checks etc.
hth,
Sean

Similar Messages

  • Is there any alternative for adding servlet name in Web.xml?

    Hi,
    I am new to Weblogic and I have an application(Ear file) which was developed
    in Websphere and I am trying to install in weblogic 8.1. I have installed my application
    in Websphere without adding servlet entries in Web.xml and it was working fine.
    I have installed the same Ear file in Tomcat and added the
    following to make all my all servlets work.
    <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
    Is there any alternative of doing like that in WebLogic instead of adding each
    and every servlet entry in web.xml because my application has around 200 servlets
    Thanks&Regards,
    Gopi.

    Is Servlet servlet same as weblogic.servlet.ServletServlet?
    Deepak
    Rob Woollen <[email protected]> wrote:
    Yes, you could register weblogic.servlet.ServletServlet.
    -- Rob
    Gopi Krishna wrote:
    Hi,
    I am new to Weblogic and I have an application(Ear file) whichwas developed
    in Websphere and I am trying to install in weblogic 8.1. I have installedmy application
    in Websphere without adding servlet entries in Web.xml and it was workingfine.
    I have installed the same Ear file in Tomcat and added the
    following to make all my all servlets work.
    <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
    Is there any alternative of doing like that in WebLogic instead ofadding each
    and every servlet entry in web.xml because my application has around200 servlets
    Thanks&Regards,
    Gopi.

  • Critical: Adding session-config to web.xml cause application NOT to start

    I added the <session-config> element under <web-app> in web.xml:
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    Now the app won't start!
    The reason: the built-in sun app server removes context-root attribute from <web-module> element in domain.xml when the app tries to start!
    Please fix this ASAP, guys!

    I placed it in the wrong place. After following the instructions contained in the Technical FAQ (below), it worked.
    Add the following element in your web.xml file, placing it after the mapping for the error servlet and before the welcome file list:
    <session-config>
    <!-- Set global default timeout to 60 minutes -->
    <session-timeout> 60 </session-timeout>
    </session-config>

  • Adding servlet entry in web.xml of j2ee engine

    Hi ,
    I want a servlet to be loaded on startup of the j2ee engine SAP WAS which is basically flex based (MessageBrokerServlet). 
    The init param for the servlet is not accessible or cannot be initialized in init method of the servlet using the servletconfig object.
    This is when the servlet is used as a portal component of type servlet.
    So as to load the servlet and the servlet being able to access the init param i would be changing the web.xml of the sap j2ee engine (NW CE 7.1). are there any other effects of the same or is it fine if i just add this param in the web.xml
        <servlet>
            <servlet-name>MessageBrokerServlet</servlet-name>
            <display-name>MessageBrokerServlet</display-name>
            <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
            <init-param>
                <param-name>services.configuration.file</param-name>
                <param-value>/WEB-INF/flex/services-config.xml</param-value>
           </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>

    Hi ,
    Vivek in case my servlet is part of the Portal Application as PortalComponent how do i define init parameters  that can be accessed in the servlet.
    The config file would be accessed in the init method of the servlet how do i do that when the servlet is added as PortalComponent in PortalApplication. The servlet config file needs to accessed in t he init method.
    The load on startup thing would be taken care of by setting parameter startup = true of application properties.
    Regards
    Srikumar V

  • Trouble adding alias to the web.xml file (External Facing Portal)

    I'm trying to implement the external facing portal. I don't really have any real custom content to add to it but have just created an iView that contains a webpage that's contained within a copy of the light framework.
    I'm having trouble adding or accessing the alias that I've created to go to this iView.
    I can test my iView by adding it to the master rule collection under one of the predefined aliases in the web.xml (e.g. portal/anonymous etc) but when i define my own (e.g. "ext" etc) and then go to http://portal:<port>/irj/ext I'm just getting an error:
      The requested resource does not exist.
      Details:   Go to main page of this application!
    This is what my entry in the web.xml file looks like:
    <web-app>
    <display-name>The Java iView Runtime</display-name>
    <listener>
    <listener-class>
    com.sapportals.portal.prt.session.HttpSessionHandler
    </listener-class>
    </listener>
    <servlet>
    <servlet>
    <init-param>
       <param-name>
          portal/anonymous
       </param-name>
       <param-value>
    anonymous=1,proxy=0,low_bandwidth=0,include_in_url=1,include_application_name_in_url=1
       </param-value>
    </init-param>
    <init-param>
      <param-name>
       ext
      </param-name>
      <param-value>
    anonymous=1,proxy=0,low_bandwidth=1,include_in_url=1,include_application_name_in_url=1
      </param-value>
    <init-param>
    </servlet>
    My master rule collection seems to be correct, since I can test the iView etc by adding it to a predefined alias. I've tried closing all browsers etc. Nothing seems to work.
    Any ideas what this could be?
    Thanks!
    I'll award points for any help.

    Hi Beau
    Just Have a try.
    In the servlet mapping add the following entry.
    <servlet-mapping>
    <servlet-name> gateway </servlet-name>
    <url-pattern> /portal/* </url-pattern>
    </servlet-mapping>
    <b><servlet-mapping>
    <servlet-name> gateway </servlet-name>
    <url-pattern> /ext/* </url-pattern>
    </servlet-mapping></b>
    <servlet-mapping>
    <servlet-name> prt </servlet-name>
    <url-pattern> /irj/* </url-pattern>
    </servlet-mapping>
    Restart after making the changes.
    Regards
    Geogi Luke

  • Adding resource-ref  in web.xml

    dos it make any difference adding
         <resource-ref>
               <description>Application Datasource </description>
               <res-ref-name>jdbc/myDataSource</res-ref-name>
               <res-type>javax.sql.DataSource</res-type>
               <res-auth>Container</res-auth>
         </resource-ref>inside web.xml , it works with or without , please tell me the importance of this

    The optional resource-ref element defines a reference lookup name to an external resource. This allows the servlet code to look up a resource by a "virtual" name that is mapped to the actual location at deployment time.
    http://www.chariotsolutions.com/geronimo/geronimo-1.1/database-mapping.html

  • In Web.xml  welcome file tag not works

    Hi All ,
    I am developing simple web application using spring framework
    when i am try to add welcome file tag in web.xml with respective welcome page path but it not works.
    but when use jsp page without to having any property it works.
    what the problem with me
    Thanks

    Hi Frank
    Thank you for your reply.
    This is how I registered the session filter in web.xml
    <filter>
    <filter-name>SessionFilter</filter-name>
    <filter-class>com.avery.view.filter.SessionFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>SessionFilter</filter-name>
    <url-pattern>/faces/*.jsf</url-pattern>
    </filter-mapping>
    I'll try to use phaselisenter as you suggested.
    Also, one more thing please, in the session filter, I have something like this.
    public void doFilter(ServletRequest request, ServletResponse response,
    FilterChain chain) throws IOException, ServletException {
    System.out.println("JF--- Calling the Filter");
    if (request instanceof HttpServletRequest) {
    HttpServletRequest httpRequest = (HttpServletRequest)request;
    HttpServletResponse httpResponse = (HttpServletResponse)response;
    HttpSession session = httpRequest.getSession();
    String url = httpRequest.getPathTranslated();
    String path = httpRequest.getContextPath() + httpRequest.getServletPath();
    if (httpRequest.getRequestURI().equals(path+"/Login")) {
    System.out.println(" the request path is" + httpRequest.getRequestURI().toString());
    session.setAttribute("WELCOME", Boolean.TRUE);
    chain.doFilter(request, response);
    else if (session.getAttribute("WELCOME") == null){
    httpResponse.sendRedirect(path+"/Login");
    else {
    chain.doFilter(request, response);
    else {
    chain.doFilter(request, response);
    Do you think it looks right ?
    thanks
    Edited by: Lang on Apr 13, 2012 1:41 AM

  • Processing web.xml -Adding servlet

    Can you please give me an out line how to add servlets/filters/session-configs to web.xml programatically.
    I have writen a program for adding these but In web.xml the order in which elements are placed matters. So right now in the program I specify that I should add this element before another specified element like that .
    How can we make this generic ? I mean how I can maintain the same order as of DTD ?
    please help me.

    Answering your original question. Yes it is possible to have a web.xml without servlet classes, if you are not using servlet classes.
    >
    But I got the following error from Tomcat.
    2007-01-12 18:31:25 ContextConfig[worktigers] Parse
    error in application web.xml
    org.xml.sax.SAXParseException: The processing
    instruction target matching "[xX][mM][lL]" is not
    allowed.
    at
    t
    org.apache.xerces.parsers.AbstractSAXParser.parse(Unkn
    own Source)
    TA
    MalaiIt looks like there may be BOM characters (invisible in regular editors), before the opening angle bracket of the XML prolog: <?xml version="1.0"
    The special characters usually are inserted by some editors such as Notepad.
    You can download a free Hex editor, like Cygnus hex editor and see if you have the 3 special characters (in Hex) appearing before the XML prolog.
    If you see anything before the prolog delete them, save the web.xml file and re-test it.
    Reading from previous answers to your problem from here:
    http://forum.java.sun.com/thread.jspa?threadID=694303&messageID=4033694
    http://mail-archives.apache.org/mod_mbox/xerces-j-users/200201.mbox/%3Cp04330102b8689660dcbc@%5B192.168.254.4%5D%3E

  • Web.xml not working

    Hi
    I have created one application using
    GWT-Ext with RPC call but its working fine in tomcat.
    but in Apache/1.3.39 server
    its not running.I think in web.xml file only i made mistakes.This is my web.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app id="WebApp_ID">
         <display-name>MyRpc</display-name>
         <servlet>
         <servlet-name>/MyRpc/MyService</servlet-name>
         <servlet-class>com.ikkoTech.myRpc.server.MyServiceImpl</servlet-class>
         </servlet>
         <servlet-mapping>
         <servlet-name>/MyRpc/MyService</servlet-name>
         <url-pattern>/MyRpc/MyService</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>default.html</welcome-file>
              <welcome-file>default.htm</welcome-file>
              <welcome-file>default.jsp</welcome-file>
         </welcome-file-list>
    </web-app>
    Got 404 error with this message
    The requested URL /myrpc//MyRpc/MyService was not found on this
    server.
    Saw this using Firebug
    Please suggest me about this.
    Thanks in Advance

    No, the port is okay, because in fact jboss is running, but the servlet is not loaded the mesasge on the web page is a message of the jboss. About the code give some time to post it.

  • Web.xml entries

    hi
    i have made a entry of the following code in web.xml in my personal folder
    <welcome-file-list>
    <welcome-file>allocate_index.html
    </welcome-file>
    </welcome-file-list>
    i have a main folder in webapps named "allocation" .Now i need to get
    "http://localhost:8080/allocation/allocate_index.html" directly when i make a request by "http://localhost:8080/allocation". so i have added the tags in web.xml within my folder named "allocation" in webapps folder . Now tomcat showing some error given below
    note: i dont get this message in browser and even my requirements have been solved.It is all well when seen in browser. but tomcat console shows error.
    May 26, 2006 11:34:32 AM org.apache.commons.digester.Digester error
    SEVERE: Parse Error at line 53 column 11: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,s
    ervlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref
    org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapp
    ****,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
    at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1196)
    at org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1781)
    at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1425)
    at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1149)
    at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
    ......continues---
    --------------------------------------------------------------------------------------

    What does this have to do with Collections: Lists, Sets, and Maps?
    You might be better off asking on a Tomcat mailing list, or somewhere in the Enterprisy bit.

  • Is there any way to prevent web.xml from any change ?

    hi all,
    we have a filter in web.xml. Now we want to prevent it from any change in future. I mean after making a war(EAR) no one can change the filter in web.xml. if he chaged it then he will not be able to re deploy the application.Right now it is in web.xml so one can easily change it and then he can redeploy the application.
    Is there any way to prevent web.xml from any change after making EAR(WAR)?
    One can easily make a change in web.xml and redeploy the application to get the result. Now we want to restrict the web.xml as java class for any change after making EAR(or WAR).
    Could some one help me to do this?
    thanks,
    dinesh

    I think you could use some third party software to lock the folder like FolderLock, just make sure others ppl cannot access your file should be fined.
    This is my stupid solution only,cheers.

  • Problem with the data source and web.xml

    I have an issue where JSC is removing my resource reference:
    <resource-ref>
    <description>Creator generated DataSource Reference</description>
    <res-ref-name>jdbc/localOracleDatabase</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    from the web.xml and sun-web.xml.
    The application has been working great in the IDE for months then wham, no more data source definition. I try and add the reference manually and the IDE takes it out. I am "NOT" adding it to the .xml's in the build area. Why is JSC removing the data source entry?

    This continues to be a problem. The only way that I can get around the problem is to drag a table from the data source onto the design pallete and then the datasource is added back to the web.xml. I can run fine for 10 or 15 runs then the entry is once again removed from the web.xml.
    Help please!

  • Using taglib in web.xml in WLS 9.2

    I am trying to build a web application in which the JSPs refer to a JSF taglib at the following URI(http://java.sun.com/jsf/core). When i deploy the application in WLS 9.2 and attempt to load this JSP, WLS says that it is unable to resolve this taglib. I added the following to web.xml to help the application find the taglibs.
              <taglib>
              <taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
              <taglib-location>
              /WEB-INF/jsf_core.tld
              </taglib-location>
              </taglib>
              But now when i attempt to startup WLS, it looks like the appserver does not recognize the <taglib> as a valid element. It gives the following exception:
              Expected elements 'description@http://java.sun.com/xml/ns/j2ee display-name@http://java.sun.com/xml/ns/j2ee
              instead of 'taglib@http://java.sun.com/xml/ns/j2ee' here in element web-app@http://java.sun.com/xml/ns/j2ee
              ..." VALIDATION PROBLEMS WERE FOUND"
              Any clues as to what i am doing wrong here since I have seen documentation which shows using taglib elements in web.xml.
              Thanks
              Ramdas

    I figured out looking at one of the webapp samples that is packaged as part of WLS9.2 that the taglib element needs to be part of the jsp-config element.
              -Ramdas

  • Security constraint in Web.xml of tomcat

    Hi
    I have a web-application running on tomcat . Inside the context folder i have several directories having some pre-defined configuration files . But the user is able to directly access them by typing the path including the fileName in the URL ( I have disabled the listings property however)
    How can i prevent accessing the specific files .... I tried using
    <security-constraint>
    <display-name>Security constarint</display-name>
    <web-resource-collection>
    <web-resource-name>Java Application</web-resource-name>
    <url-pattern>/folder/*</url-pattern>
    <auth-constraint>
    <role-name>tomcat</role-name>
    </auth-constraint>
    </web-resource-collection>
    <auth-constraint>
    <role-name>tomcat</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>OnJava Application</realm-name>
    </login-config>
    This seems to be working fine , but when the user enters the wrong security info thrice , 401 error page is coming instead i want my custom page . Hence i configured an error page for 401 code which overwrited the earlier behavaiour ie.. that BASIC authentication popup is not coming
    Can any one let me know how to go about this

    Hi ,
    I have tried adding the following into web.xml but the security feature just doesnt work and the user can go to any page without any restriction.
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Declarative Security Test</web-resource-name>
    <url-pattern>/SuperServlet</url-pattern>
    <url-pattern>/*</url-pattern>
    <http-method>post</http-method>
    <http-method>get</http-method>
    </web-resource-collection>
    <user-data-constraint>
         <transport-guarantee>CONFIDENTIAL</transport-guarantee>
         </user-data-constraint>
    <auth-constraint>
    <role-name>guest</role-name>
    <role-name>member</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    </login-config>
    <security-role>
    <role-name>guest</role-name>
    <role-name>member</role-name>
    </security-role>
    The roles mentioned above have been added correctly into tomcat-users.xml..The version of tomcat I am using is tomcat5.0.28.Please help.

  • How to use dynamic file as welcome-file-list in web.xml

    I have configured my web.xml file as this,
    <web-app>
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>login.jsf</welcome-file>
    </welcome-file-list>
    </web-app>
    and my login.xhtml file as this,
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:f="http://java.sun.com/jsf/core">
    <body>
    <f:view>
    <h:form>
    UserName:<h:inputText id="userName"
    value="#{bean.userName}" rendered="true"
    required="true"/>
    Password:<h:inputText id="password"
    value="#{bean.password}" rendered="true"
    required="true"/>
    <h:commandButton id="submit" value="Submit" action="#{bean.authenticate}" />
    </h:form>
    </f:view>
    </body>
    </html>
    but when i deploy this using tomcat and try to put url as this,
    http://localhost:8080/project
    Its not identifying welcome file from web.xml
    I am getting error like this,
    The requested resource (/project/) is not available.
    How to resolve this,
    Thanks,
    Vinutha

    This might help:
    http://forum.java.sun.com/thread.jspa?threadID=696586
    As well, you might have to change the servlet-mapping in your web.xml. The url-pattern, I think, needs to be .xhtml. Your login.jsf file in the welcome list will need to be renamed to login.xhtml.
    CowKing

Maybe you are looking for