Changing the directory Structure of Jsp and web.xml files

Hi,
I am using the JDeveloper 11g preview. Can any one tell me how to change the Jsp and web.xml files ( not in WEB-INF directory of the application) to another directory.
Thanks in Advance
Gopal

Hi Frank,
Is it possible for me to change the folder structure which JDeveloper is providing for web project?
By default JDeveloper is giving the following folder structure.
In the project's root folder there is a public_html and src folder along with .jpr file.
In public_html folder thre is an WEB-INF folder and a jsp file
In WEB-INF folder there is an classes folder along with web.xml file.
I need to have the following folder structure :
The WEB-INF folder should be in root folder of project not in public_html folder
src folder must be in WEB-INF folder.
Thanks in Advance
Anil Golla

Similar Messages

  • Can't I change the directory structure?

              Hello Everybody,
              So far everything is working when use the default directory structure,i.e. mydomain/applications/myWebApp/WEB-INF/classes/some package structure.
              But we have application with lot of html files which call servlets like this..myWebApp/WebApp/myServlet.
              In order not to change my html files, I've created this WebApp directory under weblogic directory structure shown above.
              I've done some trial and error in web.xml file to make servlets execute. But 404 error is showing up.
              I tried putting in web.xml like this...
              <servlet>
              <servlet-name>/WebApp/HelloWorldServlet</servlet-name>
              <servlet-class>com.reliable.servlets.HelloWorldServlet</servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>HelloWorldServlet</servlet-name>
              <url-pattern>/WebApp/HelloWorldServlet/*</url-pattern>
              </servlet-mapping>
              I also tried taking out slash(/) before WebApp but no luck.
              Can any one guide how to make this work.
              Thanks so much,
              Sri
              

    What he needs is something like:
              <servlet>
              <servlet-name>HHH</servlet-name>
              <servlet-class>com.reliable.servlets.HelloWorldServlet</servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>HHH</servlet-name>
              <url-pattern>HelloWorldServlet/*</url-pattern>
              </servlet-mapping>
              HHH is simply to link the mapping declaration to the servlet declaration.
              Then the URL would be something like:
              http://myserver:8801/appname/HelloWorldServlet/abc
              If this is the default app, then appname/ drops out.
              There is a good discussion of this in our docs and
              the servlet spec discusses this as well.
              mark
              Keith wrote:
              > Hi Sri and Alfonso,
              > Did you ever get the code? I am interested in seeing how I can do that too. I
              > have to migrate my servlets and jsp from tomcat and all the html files are referencing
              > the servlets with this format:
              > http://abc/servlet/servletA
              >
              > Thanks!
              > keith
              >
              > "sri" <[email protected]> wrote:
              > >
              > >Hi Alfonso,
              > >Thanks for trying to help me. In your response you said "Just copy my code".
              > >But I didn't find any code in your reply.
              > >Can you please clarify.
              > >Thanks so much,
              > >Sri
              > >"alfonso" <[email protected]> wrote:
              > >>
              > >>You are in wrong, the servlet name is a short name to identify the servlet
              > >in xml file not in URL. You can not load many servlet without to register
              > >it,one by one. But i found a solution, that you can find in servlet without
              > >registration subject. (pe: we have servlets calls as http;//b2web/servlet/XXX)
              > >>just copy my code, or email me if you have problems to [email protected]
              > >>
              > >>"sri" <[email protected]> wrote:
              > >>>
              > >>>Hello Everybody,
              > >>>So far everything is working when use the default directory structure,i.e.
              > >mydomain/applications/myWebApp/WEB-INF/classes/some package structure.
              > >>>
              > >>>But we have application with lot of html files which call servlets like
              > >this..myWebApp/WebApp/myServlet.
              > >>>
              > >>>In order not to change my html files, I've created this WebApp directory
              > >under weblogic directory structure shown above.
              > >>>I've done some trial and error in web.xml file to make servlets execute.
              > >But 404 error is showing up.
              > >>>I tried putting in web.xml like this...
              > >>you are in wrong, the servlet name is
              > >>> <servlet>
              > >>> <servlet-name>/WebApp/HelloWorldServlet</servlet-name>
              > >>> <servlet-class>com.reliable.servlets.HelloWorldServlet</servlet-class>
              > >>> </servlet>
              > >>> <servlet-mapping>
              > >>> <servlet-name>HelloWorldServlet</servlet-name>
              > >>> <url-pattern>/WebApp/HelloWorldServlet/*</url-pattern>
              > >>> </servlet-mapping>
              > >>>
              > >>>I also tried taking out slash(/) before WebApp but no luck.
              > >>>
              > >>>Can any one guide how to make this work.
              > >>>
              > >>>Thanks so much,
              > >>>Sri
              > >>
              > >
              

  • Wireless Toolkit J2ME - changing the directory structure for your projects

    When I create a new package in the Sun Java Wireless Toolkit, the toolkit is creating a folder for the application and its subfolders in the following directory:
    C:Documents and settings/Owner/j2mewtk/2.5.2/apps/<name_of_project>....
    I am trying to change the directory for new and existing projects so that the directory is:
    C:WTK2.5.2/apps/<name_of_project>....
    The WTK is already installed directly under the C drive (C:WTK2.5.2/ )
    Any help would be much appreciated.

    I experience the similar problem.
    But got success with some mobile models and most of them fail.
    I put the following file in the web page.
    (test.html, test.jad, test.jar)
    Sony Erisson P800, install successful when accessing http://x.x.x.x/test.html, or http://x.x.x.x/test.jar
    Nokia 7650, install successful when accessing http://x.x.x.x/test.jar
    Nokia 3530 Fail,
    Does anyone know how to install java game to Nokia 3530 through Web.

  • Weblogic 10 jaas and login.jsp and web.xml/weblogic.xml security constaints

    Hello,
    I struggled through and got the examples.security.jaas.SampleCallbackHandler.java and examples.common.utils.ExampleUtils.java/ExampleConstants.java into eclipse where they compile. A bean I made can call SambleCallbackHandler like such:
    mybean.logmein(username,password,url). I can then do a mybean.getStatus() or even a mybean.returnCode(). It does seem to correctly identlify that it is authenticating me (I see in stdout logs that it shows success or failures. The problem I have is I do not know how to apply this weblogic and web.xml/weblogic.xml so that if authentication works it redirects me to the page requiring the authentication. In web.xml I have the following set up:
    <security-role>
         <role-name>Admins</role-name>
    </security-role>
    <login-config>
         <auth-method>FORM</auth-method>
         <realm-name>default</realm-name>
         <form-login-config>
              <form-login-page>/login.jsp</form-login-page>
              <form-error-page>/badlogin.html</form-error-page>
         </form-login-config>
    </login-config>
    <security-constraint>
         <web-resource-collection>
              <web-resource-name>empower</web-resource-name>
              <description>These pages are only accessible by authorized users.</description>
              <url-pattern>/admin/*</url-pattern>
              <http-method>GET</http-method>
              <http-method>POST</http-method>
         </web-resource-collection>
    <auth-constraint>
    <description>These are the roles who have access</description>
    <role-name>Administrators</role-name>
    </auth-constraint>
         <user-data-constraint>
         <description>This is how the user data must be transmitted</description>
         <transport-guarantee>NONE</transport-guarantee>
         </user-data-constraint>
    </security-constraint>
    My weblogic.xml has:
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
    <wls:security-role-assignment>
    <wls:role-name>Admins</wls:role-name>
    <wls:principal-name>Administrators</wls:principal-name>
    <wls:principal-name>dashap</wls:principal-name>
    </wls:security-role-assignment>
    </wls:weblogic-web-app>
    With this set up, if I try to go to a page in /admin folder in my application, it correctly pops up the login page. The jaas in the bean is doing a loginContext.login(), which I thought does authentication too, but it never goes back to the /admin page I was going to that needed the authentication. With jaas, can I not use the web.xml FORM security option? Do I Need to use j_security in the login.jsp's form's action= option and j_username and j_password for the input type names? How do I use j_username/j_password things if I am using jaas? I could just ignore using the web.xml security stuff and put something in the pages that need authentication, but it would be easier if I could use jaas with the security featurs without doing all that. Note that my code above is using a realm called default just because that was what was in the example I got from the web. Does that need to be something else?

    Hi John,
    I would like magic of course. However, in this case I want something special: my authentication provider uses special means and contents of headers, cookies and service from external identity management systems to determine the user's identity.
    I do not want the application to present the login dialog! I want to derive the identity and the fact that the user is logged in from whatever the authentication provider returns in terms of Subject.
    Ideally, the flow is something like:
    - user accesses an unprotected resource - resource is shown, no interaction with authentication provider
    - user presses a link or button that takes him/her to a protected resource
    - the authentication provider is contacted to work with the identity asserter to establish the identity of the current user and create a subject object for this user
    - the application can access the subject and principals
    - ADF Security recognizes the identity and the roles (based on the principals) and coordinates access based on this.
    the authentication method is client certificate. presumably this prompts WebLogic/OPS to use an identity asserter to work with custom headers and cookies ("... when you configure a web application to use CLIENT-CERT authentication. In this case, WebLogic can perform identity assertion based on values from request headers and cookies. If the header name or cookie name matches the active token type for the provider, the value is passed to the provider."). No login form should be presented to the user, as all information required to perform the authentication is already available.
    I am trying to understand what I must do to have the ADF application adopt the subject set by the authentication provider - if anything?!
    If you more ideas to share - I would love to hear them.
    best regards,
    Lucas

  • (newbie) Question about replacing .class files and web.xml file

    I'm new to servlets and I have two quick questions...
    Do I absolutely need a web.xml file to define all my servlets, or can I simply place .class files into the WEB-INF directory and expect them to run?
    If my application server (for example Tomcat) is running and I replace a servlet .class file, do I need to restart the server for the new .class file to take effect?
    ...or are both of these questions specific to the application server I'm using?

    Hi,
    From an article I read:
    With Tomcat 3.x, by default servlet container was set up to allow invoking a servet through a common mapping under the /servlet/ directory.
    A servlet could be accessed by simply using an url like this one:
    http://[domain]:[port]/[context]/servlet/[servlet full qualified name].
    The mapping was set inside the web application descriptor (web.xml), located under $TOMCAT_HOME/conf.
    With Tomcat 4.x the Jakarta developers have decided to stop allowing this by default. The <servlet-mapping> tag that sets this mapping up, has been commented inside the default web application descriptor (web.xml), located under $CATALINA_HOME/conf:
    <!-- The mapping for the invoker servlet -->
    <!--
    <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
    -->
    A developer can simply map all the servlet inside the web application descriptor of its own web application (that is highly suggested), or simply uncomment that mapping (that is highly discouraged).
    It is important to notice that the /servlet/ isn't part of Servlet 2.3 specifications so there are no guarantee that the container will support that. So, if the developer decides to uncomment that mapping, the application will loose portabiliy.
    And declangallagher, I will use caution in future :-)

  • How can i change the directory permissions?

    my xampp htdocs directory does not include me as a user but has Nobody? how can i change the directory permissions because i cannot edit a file?
    Thank you

    Select the directory, CMD+I, go to the bottom, unlock the lock, and add yourself to the list with R&W permissions.

  • How to edit the web.xml file

    hi friends,
    i have been working with netbeans for webapplications so far therefore its not ever been requerd to edit the web.xml file that automatically done by IDE itself.
    now, i am just trying to deploy the servlet and jsp's externally without using any tool and i found a requrement to map the servlet and jsp in web.xml file. when i try to edit inside this file it seems noneditable, nothing gonna change. i have an alternate to do this is firstly copy the content of this file into txt file and after making the requred changes overwrite this file in .xml formate to orignal web.xml file.
    am i going in right way?? please help me
    regards
    san

    open it in a text editor and modify it.
    %

  • 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.

  • Web.xml file

    Hi
    I have a servlet that is working perfectly through JBuilder. When I try and run it through Tomcat I get an error saying it cannot find the file. In JBuilder I have a html form. The value entered in the form is passed to the servlet. The servlet calls Java classes from a different package. The servlet uses the value from the form as the paramater needed for the classes in the other package and outputs the results.
    I cannot get this working outside JBuilder.
    It could be something to do with the web.xml file. I tried copying the webapp folder from the JBuilder servlet project straight across to Tomcat but it didnt work. This project has its own WEB-INF folder and web.xml file. Should this work or do I need to change the Tomcat web.xml file.
    Any help
    Damul

    Hai,
    First you are taking the parameter value from the HTML page, pass it to the package class and show the out put.
    Fine, to run in Tomcat 4.1.24,first you have to create a context of yours.
    Else you can place your class files or package in the folder
    'examples' of webapps in Tomcat directory.
    Now place your HTML file in 'examples' folder.
    One more thing you have to include your package class name in the web.xml for the new context,if you create.Else if you place in the 'examples' folder , no need to edit web.xml
    to run this, for your package
    http://localhost:8080/examples/servlet/<packagename>.<classname>
    Hope this works out...

  • How to read and write Xml file at client side using JavaScript !

    Hello,
    i am new to javascript.
    I have requirement to read and update XML file at client side.
    Will you please guide what could be the best way to read and update XMl file using javascript.
    Thanks,
    Zuned

    This is a Java forum,not a Javascript forum. Maybe you should ask here [http://www.webdeveloper.com/forum/forumdisplay.php?forumid=3&s|http://www.webdeveloper.com/forum/forumdisplay.php?forumid=3&s].

  • How can  change the folder structure in Bex Analyser to match the Web

    Hi Experts,
    When I create a report using the Web Analyser and save it in My Portfolio or Bex Portfolio, I can't find the report (or folders) in Bex Analyser.
    How Can i change the folder structure in Bex Analyser to match the Web Analyser?

    Hi Reddy,
           As u have created reports and saved it in BEx portfolio or My portfolio it will be saved in the KM folder which is known as Knowledge management folder for the KM services such as feedback,rating etc.So u cant view them when u open in web analyzer.U can only see them when u save in favourites or the roles folders.
                              Hope this helps
                         Sunil Reddy

  • What is the directory structure of EJB applications?

    I am new to EJB program. I know that after the development is done, we package the EJB components into .jar file, and package the Web components (HTML/JSP/Servlets/JavaBeans) into .war file, and then together we package .jar file and .war file into a single .ear file. Then we just deploy the .ear file into WebLogic's application directory.
    But, before the deployment, I mean during the development, what kind of directory structure is good for us to develop our EJB, HTML, JSP, Servlets, and JavaBean components?
    Previously, when I was doing JSP/Servlets applications, my directoy structure is:
    webapps\
    --------myapplication\
    -----------------------*.html
    -----------------------images\
    ------------------------------*.jpeg, *.gif
    -----------------------jsp\
    ------------------------------*.jsp
    -----------------------WEB-INF\
    ------------------------------web.xml
    ------------------------------classes\
    -------------------------------------Java Servlets located here
    -------------------------------------beans\
    -------------------------------------------JavaBeans are located here
    Now, I am doing EJB applications, what should be the directory structure?
    Thank you very much for your help!
    Jingzhi

    I have been involved in a few enterprise applications but have not been happy with the packaging structures used and am starting a new one now and am looking for other examples.
    this is what I've used before.
    web/
    classes/
    client/
    server/
    but if a class was used in the client and server it was put under the server/ package. I feel that more separation is needed.

  • 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

  • How to change the default structure when exporting data in CSV format?

    Hello,
    can some one tell us how to change the default structure in CRM when exporting lists in CSV format (with Option "Always use unformatted list format (CSV) for download" ? Because we want to add a new structure for our own -is it possible ?
    If it is possible where can we find these structure ? In the blueprint customizing ?
    Thank you very much,
    Christian

    There is a workaround to move from 1.5 version to the older 1.4 version. But this could be specific to the browser setting the JRE version.
    Excerpts from sun docs:
    However, a user can still run older versions. To do so, launch the Java Plug-in Control Panel for the older version, then (re)select the browser in the Browser tab.
    Example:
    Assume you are running on Microsoft Windows with Microsoft Internet Explorer, have first installed version 1.4.2, then version 5.0, and you want to run 1.4.2.
    Go to the j2re1.4.2\bin directory where JRE 1.4.2 was installed. On a Windows default installation, this would be here: C:\Program Files\Java\j2re1.4.2\bin
    Double-click the jpicpl32.exe file located there. It will launch the control panel for 1.4.2.
    Select the Browser tab. Microsoft Internet Explorer might still appear to be set (checked). However, when 5.0 was installed, the registration of the 1.4.2 JRE with Internet Explorer was overwritten by the 5.0 JRE.
    If Microsoft Internet Explorer is shown as checked, uncheck it and click Apply. You will see a confirmation dialog stating that browser settings have changed.
    Check Microsoft Internet Explorer and click Apply. You should see a confirmation dialog.
    Restart the browser. It should now use the 1.4.2 JRE for conventional APPLET tags.
    Details are here
    http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/jcp.html
    My system (Windows XP) has the version 1.5_09 set as the default. However i just installed JRE 1.5_06 and would like to revert back to _06 as the default JRE..
    Will update if i find more information

  • Is there any way to specify a URL in the servlet-mapping that doesn't need to be in the directory structure?

              I migrated from WebLogic 5.1 to 7.0.2 Something I used to have set-up in 5.1 no
              longer
              works.
              I am using the weblogic.servlet.FileServlet and have the URL "/cxedocs/" mapped
              to this
              servlet. So whenever the URL http://localhost:7001/cxedocs/en_US/index.html
              is used it would use the docHome associated with the /cxedocs/ URL and then append
              the "en_US/index.html" on to it. So let's say d:\temp\en_US\index.html
              But now for WL 7.0.2 it appears that the URL also needs to be in the directory
              structure.
              So it now takes the docHome "d:\temp" adds the URL "/cxedocs/" and then appends
              the
              rest - so d:\temp\cxedocs\en_US\index.html.
              I can't require that the "cxedocs" directory be there. Is there anyway to map
              a certain URL
              without requiring it in the directory structure. I looked at virtual directory
              mapping too but
              it still seemed to require this.
              Any help would be appreciated!
              Thanks!
              -Lori
              

              I opened up a case with support on this. After some research they came back with
              that
              NO there is no way to do this. In 6.0 it was changed to follow the spec which
              restricts this.
              The URL must be part of the directory path.
              -Lori
              "Lori Ronning" <[email protected]> wrote:
              >
              >I migrated from WebLogic 5.1 to 7.0.2 Something I used to have set-up
              >in 5.1 no
              >longer
              >works.
              >
              >I am using the weblogic.servlet.FileServlet and have the URL "/cxedocs/"
              >mapped
              >to this
              >servlet. So whenever the URL http://localhost:7001/cxedocs/en_US/index.html
              >is used it would use the docHome associated with the /cxedocs/ URL and
              >then append
              >the "en_US/index.html" on to it. So let's say d:\temp\en_US\index.html
              >
              >But now for WL 7.0.2 it appears that the URL also needs to be in the
              >directory
              >structure.
              >So it now takes the docHome "d:\temp" adds the URL "/cxedocs/" and then
              >appends
              >the
              >rest - so d:\temp\cxedocs\en_US\index.html.
              >
              >I can't require that the "cxedocs" directory be there. Is there anyway
              >to map
              >a certain URL
              >without requiring it in the directory structure. I looked at virtual
              >directory
              >mapping too but
              >it still seemed to require this.
              >Any help would be appreciated!
              >Thanks!
              >-Lori
              

Maybe you are looking for

  • Can I set sidekick's Allowed Components for a parsys at the Template level?

    The components page section on parsys[1] explains that you can set the sidekick's Allowed Components for a parsys by clicking Design Mode (ruler icon) in sidekick, then clicking Edit on the parsys and putting a checkmark on the components you want. 

  • Set up of MM conditions in COPA

    Dumb question.... but in Customizing (next to KE4I) there is an option to map MM conditions to Value Fields just like we can map SD conditions to Value Fields... How is this used? What document in logistics triggers this posting? (Just like Billing w

  • SOAP Sender Web Service Authenication

    Dear Experts, Is there a way to authenticate a web service call from a third party system to local (to the company) De-central adapter. I would like to embed the required username and password in the SOAP call. I know it can be done in the URL of a H

  • Changing RMI Port in HTTP adapter in interconnect

    Hi I need to change the RMI port for one of my HTTP adapters in Interconnect. I have changed it in the adapter.ini and in the web.xml files. I have then recreated the JAR/EAR files and redeployed the application to the oai component. The adapter star

  • Is Query possible in SAPSCRIPT

    I want to use select statement inside SAPSCRIPT . Is it possible ?