SDK : web.xml file, what for ?

Hello,
I designed a new web service using the SDK, I noticed a file named web.xml, with some authority settings in it.
What's the purpose of such file ? Is it to define which roles is required to be able to call a WS ?
Thanks

Thank Ivan, can you give me more details ?
Here is my file content :
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>Extended Web Services</display-name>
     <login-config>
       <auth-method>BASIC</auth-method>
     </login-config>
     <security-constraint>
          <web-resource-collection>
               <web-resource-name>restricted methods</web-resource-name>
               <url-pattern>/*</url-pattern>
               <http-method>POST</http-method>
               <http-method>GET</http-method>
          </web-resource-collection>
          <auth-constraint>
               <role-name>Admin</role-name>
          </auth-constraint>
     </security-constraint>
</web-app>
What the purpose of the <role-name> node ? Is it referring a NW role needed to call WS ?

Similar Messages

  • Help on web.xml file, what if the parameters contains key words ?

    Hi:
    I am just wondering what should I do if I want to include key words suchs
    as <param> in web.xml file for a servlet config.
    Example:
    <servlet>
    <servlet-name>testServlet</servlet-name>
    <parameter>
    <param-name>some name</param-name>
    <param-value>some value</param-value>
    </parameter>
    </servlet>
    What should I do if I want to repleace 'some value' with '</param-value>some
    value' and still to prevent the engine to terminate parsing the param-value
    at the fake ending? Is there a standard way in XML to distanguish that?
    (in URL format it can be replaced %xx for some chars).
    ie,
    <param-value> </param-value>some value</param-value>
    where the second </param-value> is the real ending.
    Thank you!
    Gang

    Hi!
    You can use "& lt ;" and "& gt ;" xml entities for that. Or wrap text element in <![CDATA[...]]> section.
    Regards,
    Ignat.

  • Virtual-mapping in jrun-web.xml file for CFIDE is not working

    I have put virtual-mapping for my web root into jrun-web.xml
    file. It looks like this:
    <virtual-mapping>
    <resource-path>/*</resource-path>
    <system-path>E:/WebSites/mywebroot</system-path>
    </virtual-mapping>
    So I need give virtual-mapping for my CFIDE too. It looks
    like this:
    <virtual-mapping>
    <resource-path>/CFIDE/*</resource-path>
    <system-path>E:/Apps/JRun4/servers/myserver/cfusion-ear/cfusion-war/CFIDE</system-path>
    </virtual-mapping>
    It is now working for me. When I use following url:
    http://localhost:8002/CFIDE/administrator
    I am getting "HTTP 404 - File not found". I have set it for
    other servers they are working on same server. What I did wrong
    this time?
    Thanks ahead.
    Mikenj

    Hi John,
    i did some some changes in Account dimension in my Planning Dev server. When i was migrating it to QA using LCM in shared services it is howing this error: Import failed for the following reason - Error parsing the deployment xml.
    First i define migration in Dev for export and the migration was successful.Then i went into QA shared services and started migration, i got this error for importing.
    Could you help me out on this?
    Regards,
    Shilpa

  • Whats the purpose of the web.xml file?

    Hi
    What is the purpose of the web.xml fle?
    and does it have any impact on deployment?
    I get this msg when I am compiling .
    ignoring C:\JDeveloper9iRC\jdev\mywork\MIS_IntranetWS\mis_intranet\public_html\WEB-INF\web.xml; not on sourcepath
    I cannot deploy but for what reason I don't know. Am wondering if this is related at all
    Thanks

    The web.xml file is the standard deployment descriptor for a J2EE web application (or "web module" when it is part of a J2EE Application). The full details of what the web.xml is for is described in the Servlet 2.2 spec (if you're using J2EE 1.2) or the Servlet 2.3 spec (if you're using J2EE 1.3). You can download the Servlet spec from http://java.sun.com/products/servlet/download.html
    The web.xml file is used when deploying a WAR file to a J2EE app server. However the message you cite isn't indicating a deployment failure. When you get a deployment failure, you should see a message in the JDev Log Window indicating the reason for the failure. Be sure the Log Window is visible by selecting View | Log Window from the main menu.

  • URL Mapping for packaged JSP's in web.xml file

              Hi,
              I am using weblogic6.0sp2 enterprise edition.I have my JSP's in package structure.
              Suppose my login.jsp is in package com.advice.document. So for URL mapping in
              web.xml what should be given so that by giving that my JSP runs. I have tried
              many options but not got success.
              Here is my web.xml file..
              <web-app>
              <servlet>
              <servlet-name> Login </servlet-name>
              <jsp-file> com\advice\document\login.jsp</jsp-file>
              </servlet>
              <servlet-mapping>
              <servlet-name> Login </servlet-name>
              <url-pattern> /Login</url-pattern>
              </servlet-mapping>
              </web-app>
              If any body knows or have worked on the same then let me know.
              Thanks in advance.
              --- Vipul
              

    Did you try specifying the jsp-file with forward slashes (e.g.,
              com/advice/document/login.jsp)?
              Vipul Garg wrote:
              > Hi,
              > I am using weblogic6.0sp2 enterprise edition.I have my JSP's in package structure.
              > Suppose my login.jsp is in package com.advice.document. So for URL mapping in
              > web.xml what should be given so that by giving that my JSP runs. I have tried
              > many options but not got success.
              > Here is my web.xml file..
              > <web-app>
              > <servlet>
              > <servlet-name> Login </servlet-name>
              > <jsp-file> com\advice\document\login.jsp</jsp-file>
              > </servlet>
              > <servlet-mapping>
              > <servlet-name> Login </servlet-name>
              > <url-pattern> /Login</url-pattern>
              > </servlet-mapping>
              > </web-app>
              >
              > If any body knows or have worked on the same then let me know.
              > Thanks in advance.
              > --- Vipul
              

  • How to deploy the web.xml file when trying to use the JSP SDK from SAP?

    I want to use the adduser.jsp which downloaded form SAP SDK samples to add user in BO, but I cannot run it sucessfully. I believe it's caused the web.xml file was not deployed appropriately.
    could you please teach how to deploy the web.xml file for the JSP samples ?
    Could you show me some sample of web.xml for the SDK jsp files? Thank you very much!

    Ensure that you have followed below directory structure while deploying your web application.
       web_application_name
          WEB-INF
             lib
             classes
    web.xml must be placed in WEB-INF. Ensure that you have included all the jar files and other necessary files in your application.
    For more information refer to the below link:
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
    Regards,
    Anuj

  • Can i run a servlet without a web.xml file for servlet mapping?

    Hello everyone.
    The code i want to run compiles and everythink looks ok.
    It produces the .class file.
    I run Tomcat 4.1 and i build my Web site with Dreamweaver.
    I have a form in a page and i want to send the data upon form completion to a database i already have build with MySql.
    The database is up and running and the server is set-up ok.
    I have changed the port in Tomcat to run on port 80.
    The directory i have my site is
    Tomcat41\webapps\ROOT\se
    and the directory where i keep the servlet class is
    Tomcat41\webapps\ROOT\se\WEB-INF\servlet
    I have a web.xml file to map the servlet and placed it in
    Tomcat41\webapps\ROOT\se\WEB-INF
    In the Form action i write action:"/servlets/Classes/GroupRegistration"
    and I RECEIVE AN 404 ERROR FROM APACHE.
    Somethink is wrong .
    The following is the code from the GroupRegistration.java file
    and follws the web.xml file.
    Please Help.
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class GroupRegistration extends HttpServlet
    Connection con;
    public void doPost (HttpServletRequest req, HttpServletResponse res)
                             throws ServletException, java.io.IOException
         handleForm(req, res);
    public void init() throws ServletException {
         try{
         /* Loading the driver for the database */
         Class.forName("com.mysql.jdbc.Driver");
         Connection Con = DriverManager.getConnection("jdbc:mysql://localhost/se?user=luser&password=");
         catch (ClassNotFoundException e) {
         throw new UnavailableException("Couldn't load JdbcOdbcDriver");
         catch (SQLException e) {
         throw new UnavailableException("Couldn't get db connection");
         private void handleForm(HttpServletRequest req, HttpServletResponse res)
         throws ServletException {
         //ServletOutputStream out = res.OutputStream();
         //res.setContentType("text/html");
         //Extract the form Data Here
         String group = req.getParameter("GroupNo");
         String Name1 = req.getParameter("Name1");
         String LoginID1 = req.getParameter("LoginID1");
         String Name2 = req.getParameter("Name2");
         String LoginID2 = req.getParameter("LoginID2");
         String Name3 = req.getParameter("Name3");
         String LoginID3 = req.getParameter("LoginID3");
         String Name4 = req.getParameter("Name4");
         String LoginID4 = req.getParameter("LoginID4");
         String URL = req.getParameter("URL");
         String Title2 = req.getParameter("Title2");
         String date = req.getParameter("date");
         String INSERT = "INSERT INTO registration (groupno, name1, loginid1, name2, loginid2, name3, loginid3, name4, loginid4, url, topic, date) VALUES (" + group + "," + Name1 + "," + LoginID2 + "," + Name2 + "," + LoginID2 + "," + Name3 + "," + LoginID3 + "," + Name4 + "," + LoginID4 + "," + URL + "," + Title2 + "," + date + ")";
         PreparedStatement pstmt = null;
         try{
         pstmt = con.prepareStatement(INSERT);
         pstmt.executeUpdate();
         catch (SQLException e) {
         throw new ServletException(e);
         finally {
         try {
         if (pstmt != null)pstmt.close();
         catch (SQLException ignored){
    The web.xml file
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <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">
    <servlet>
    <servlet-name>GroupRegistration</servlet-name>
    <servlet-class>GroupRegistration</servlet-class>
    </servlet>
    <servlet-maping>
    <servlet-name>GroupRegistration</servlet-name>
    <url-pattern>/myGroupRegistration</url-patern>
    </servlet-mapping>
    </web-app>
    I apreciate your time.
    Thanks for any help.

    and the directory where i keep the servlet class is
    Tomcat41\webapps\ROOT\se\WEB-INF\servletOthers have pointed out that "servlet" should be "classes", but there is another mistake that hasn't been spotted. If you want your servlet to appear in the root context, you should use:
    Tomcat41\webapps\ROOT\WEB-INF\classes
    If you want your servlet to appear under the /se context, then you should use:
    Tomcat41\webapps\se\WEB-INF\classes
    and also, in the latter case, your form action should be /se/myGroupRegistration.

  • Automate creation of web.xml file for tomcat 4.1.29

    hi , this is with ref to Tomcat 4.1.29, if i am correct, each Servlet in the application has to be mentioned in the web.xml file for the Tomcat to know about it. Is there any way to automate the creation of web.xml file , depending on the contents of the Servlet folder of the application. Any way to escape from writing each Servlet name in web.xml file.
    rc

    Hello,
    Maybe you should check if you can use Ant tool to do
    that. I am not sure if it can help u.
    Zeph.
    http://ant.apache.org/
    It will, specially if used in conjunction with XDoclets :
    http://xdoclet.sourceforge.net/
    XDoclet has Ant tasks to generate web.xml files.

  • XML Question for web.xml file for LiteWebServer

    Hi,
    I have no clue of wut tags are required in the web.xml file.
    Currently the following code is in my web.xml file and i am trying to run servlets that are located under web-inf/*.class
    Pls tell me wuts wrong....
    Do i need those mime-mapping tags, session and welcome tags.......... ?
    Right now i just want those 2 servlets to work
    And wut is this encoding ="UTF-8" in the first line of the xml file. Wut does that do... ? ARe there any others
    Any help would b greatly appreciated
    Thanks
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app id="WebApp_1">
    <display-name>PDMPortal</display-name>
    <session-config id="SessionConfig_1">
    <session-timeout>60</session-timeout>
    </session-config>
    <mime-mapping id="MimeMapping_1">
    <extension>htc</extension>
    <mime-type>text/x-component</mime-type>
    </mime-mapping>
    <welcome-file-list id="WelcomeFileList_1">
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
    <servlet-name>HelloWorld</servlet-name>
    <servlet-class>HelloWorld</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>HelloWorldExample</servlet-name>
    <servlet-class>HelloWorldExample</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloWorld</servlet-name>
    <url-pattern>HelloWorld</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>HelloWorldExample</servlet-name>
    <url-pattern>HelloWorldExample</url-pattern>
    </servlet-mapping>
    </web-app>

    Try putting your servlets in the WEB-INF\classes directory.

  • Properties missing from the right click menu of web.xml file

    I am using JDeveloper version Studio Edition Version 11.1.1.3.0 on Ubuntu 10.
    I want to configure security for my webapplication.When I right click on web.xml , to navigate to properties, the properties is missing from the menu.
    Is this removed or a bug in this version of JDeveloper?I am new to this forum and not sure how to upload the screen shot.Can some one help me uploading it?
    Also is there a way to file an issue for bugs like these?
    Thanks
    Sreekanth

    HI,
    I saw it in a previous version of JDeveloper.I am new to this JDev world and I am in to a training where the instructor was asking me to do security config setting using the context menu on the web.xml file.
    This is the installation file that the instructor has given : jdevstudio11110install.exe. I guess it is some other minor patch release of JDeveloper to what I am using. I am using Linux on my laptop, so I downloaded the version I am using and setup the environment on my own and found it missing .
    If JDev engineering team could confirm that this is not an issue , let's mark this as answered. :-)
    Thanks
    Sreekanth

  • Taw web xml file ADMINREADCC8 context parameter

    when I run the scipt for CCA the Useme.sql I only see the ADMINCC8 user I don't see the ADMINREADCC8 so I'm not sure what to put on the following context for web.xml
    <!-- Needs to be removed for MSSQL-->
    <!--<context-param>-->
    <!--<param-name>databaseSchemaReadOnly</param-name>-->
    <!--<param-value>ADMINCCREAD813</param-value>-->
    <!--</context-param>-->

    This is the eclipse error
    The content of element type "web-app" must match "(icon?,display-
    name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-
    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*)".
    Web.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app
            PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
            "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
         <display-name>tapestryHiber Tapestry 5 Application</display-name>
         <context-param>
              <!-- The only significant configuration for Tapestry 5, this informs Tapestry
                   of where to look for pages, components and mixins. -->
              <param-name>tapestry.app-package</param-name>
              <param-value>com.kids.crm</param-value>
         </context-param>
         <filter>
              <filter-name>app</filter-name>
              <filter-class>org.apache.tapestry5.TapestryFilter</filter-class>
         </filter>
         <filter-mapping>
              <filter-name>app</filter-name>
              <url-pattern>/*</url-pattern>
         </filter-mapping>
         <context-param>
              <param-name>contextConfigLocation</param-name>
              <param-value>/WEB-INF/spring/spring-servlet.xml</param-value>
         </context-param>
         <listener>
              <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
         </listener>
    </web-app>
          Edited by: csckid on Aug 29, 2011 5:51 AM

  • 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

  • Infoview never times out (web.xml files indicate a 20 minute timeout)

    I currently am using Business Objects Enterprise XIR2 w/SP3.  we have an apache front end load balanced between two web servers and we are using the tomcat connector to interface with the two app servers.
    Right now InfoView does not timeout not matter how long you have it open (even after 24 hrs).
    I've seen several articles that mention the web.xml file and the <session-timeout> tag which all of our current files list the timeout as 20 (minutes I assume)
    the file that i believe sets the timeout for infoview is the located in desktoplaunch\WEB-INF\web.xml
    does anyone know if there is anohter file that i'm missing or why the timeout is not occuring.
    thanks
    Adam

    In addition to Lionel's comment, you might want to check whether the listener section of web.xml is uncommented. Specifically, change
    <!--  In Tomcat 5.0.27, if you are experiencing problem that the license count on your CMS doesn't drop even
             after the application server has been idled for a long time and all the http sessions should have
             expired, comment in the following lines.
      -->
    <!--     <listener>
          <listener-class>com.businessobjects.sdk.ceutils.SessionCleanupListener</listener-class>
        </listener>
      -->
    to
    <!--  In Tomcat 5.0.27, if you are experiencing problem that the license count on your CMS doesn't drop even
             after the application server has been idled for a long time and all the http sessions should have
             expired, comment in the following lines.
      -->
    <listener>
          <listener-class>com.businessobjects.sdk.ceutils.SessionCleanupListener</listener-class>
    </listener>

  • How can I get the context-parm from a web.xml file using struts?

    Hello:
    I need get the context-param from the web.xml file of my web project using struts. I want configurate the jdbc datasource connection pooling here. For example:
    <context-param>
    <param-name>datasource</param-name>
    <param-value>jdbc/formacion</param-value>
    <description>Jdbc datasource</description>
    </context-param>
    and then from any Action class get this parameter.
    Similar using a simple server can be:
    /** Initiates new XServlet */
    public void init(ServletConfig config) throws ServletException {
              for (Enumeration e = config.getInitParameterNames(); e.hasMoreElements();) {
                   System.out.println(e.nextElement());
              super.init(config);
              String str = config.getInitParameter("datasource");
              System.out.println(str);
         public void doPost(HttpServletRequest req, HttpServletResponse res)
              throws ServletException, IOException {
              // res.setContentType( );
              System.out.println("Got post request in XServlet");
              PrintWriter out = res.getWriter();
              out.println("nada");
              out.flush();
              out.close();
    but only this works for init-params, if I use
    <servlet>
         <servlet-name>MyServlet</servlet-name>
         <display-name>MyServlet</display-name>
         <servlet-class>myExamples.servlet.MyServlet</servlet-class>
         <init-param>
         <param-name>datasource</param-name>
         <param-value>jdbc/formacion</param-value>
    </init-param>
    </servlet>
    inside my web.xml. I need something similar, but using struts inside the action class for that I can get the context-params and call my database.
    Thank you

    To get context parameters from your web.xml file you can simply get the ActionServlet object from an implementing action object class. In the perform (or execute) method make the following call.
    ServletContext context = getServlet().getServletContext();
    String tempContextVar =
    context.getInitParameter("<your context param >");

  • JSP compiler reading the web.xml file?

    Hi,
              I am trying to use the weblogic JSP compiler (weblogic.jspc) to
              pre-compile some JSP that use custom tags. Does the compiler
              read the web.xml file if there is one? In particular the taglib
              elements in that file so that the compiler understands the
              <%@ taglib ... %> directive.
              In the JSP I try to compile I use this statement to declare a taglib:
              <%@ taglib uri="xyz/xyz-taglib" prefix="xyz" %>
              and in my web.xml I have:
              <taglib>
              <taglib-uri>xyz/xyz-taglib</taglib-uri>
              <taglib-location>/WEB-INF/tlds/xyz.tld</taglib-location>
              </taglib>
              When I try to compile the JSP I get the following error:
              Could not parse embedded JSP code: weblogic.utils.ParsingException: nested
              IOException: java.io.IOException: cannot resolve 'xyz/xyz-taglib' into a
              valid tag library.
              Any ideas how I can resolve this?
              In advance thank you for any help.
              Florian
              

    open it in a text editor and modify it.
    %

Maybe you are looking for

  • JRun4 service does not start!

    I installed JRun 4 trial edition.I have Java SE6.Everything goes well with the installation But JRun can not be started as a WindowsXP service.I have Microsoft WindowsXP Professional SP3.I tried executing the command C:\JRun4\bin>jrunsvc.exe -startti

  • Valuation Method

    Good Morning. may somebody help me please? I have a problem with the stock value method. I need to change the method from some items, from standard to weighted average. I followed all the step mentioned in "Help Sap". All warehouses are in zero, and

  • Power View stuck in loading forever in SharePoint

    Hi, we have just configured a new SharePoint instance. We've installed and configured PowerPivot, SSRS SharePoint mode, Excel Services, Performance Point Services, and Silverlight. We uploaded a workbook to a BI site. The workbook contains both stand

  • Help Me Spec a Server with Add-ons

    Need some help.  I am usually the network admin but need some help with server packages.  Need domain services, DHCP, remote computer management, and VPN access to folders for a small business.  Windows Server 2012 R2 Essentials is perfect except tha

  • Server Switching from STARTTLS to AUTH DIGEST-MD5

    We have been trying to track down the reason why our transaction against our Tumbleweed SMTP servers appear to be switching in midstream from STARTTLS to AUTH DIGEST-MD5 which causes us to get an authentication error. With Wire-shark, we have been ca