Re: mapping of a directory containing JSP files

Thanks for the quick response..
          but i want some other root directory other than the DefaultWebApp where i
          can put my jsp files...either under DefaultWebApp or preferably some where
          else....
          Is that possible ?
          Pankaj
          "Deepak Vohra" <[email protected]> wrote in message
          news:[email protected]...
          > JSPs do not require specific mappings as do HTTP servlets.
          > Place your Jsps, for example configureJsp.jsp, in the
          DefaultWebApp/presentation
          > directory.
          >
          > In a web browser, request the JSP file using the following URL:
          > http://localhost:7001/presentation/configureJsp.jsp
          >
          > Pankaj Bansal wrote:
          >
          > > Hi,
          > > Iam using weblogic 6.1, SP2.
          > >
          > > I have created a web application with the DefaultWebApp directory
          where
          > > u can put ur jsp files for them to be available automatically..
          > >
          > > Can someone tell me is there a way to map jsp files to some other
          directory
          > > ?
          > > Or can i make some subdirectory under DefaultWebApp like 'presentation'
          and
          > > keep my jsp files in that and not be required to write the directory
          name
          > > ( presentation) for accessing my files.
          > >
          > > In short is it possible in some way to map some directory where i put my
          jsp
          > > files and they are readily accessible, other than the DefaultWebApp
          > > directory.
          > >
          > > thanks,
          > > --
          > >
          > > Pankaj
          >
          

          how to To install a jsp under another Web Application in wls 7.0.1? and i just
          don't want to deploy jar,ear,war... file.
          It seems there are many differences between wls7 and wls7.0.1.
          Deepak Vohra <[email protected]> wrote:
          >Pankaj
          >
          >DefaultWebApp is the default Web application. To install a jsp under
          >another Web
          >
          > Application,create a new Web Application, for example ConfigJspWebApp.
          >Install
          >the
          >new Web Application. Place Jsp, for example configJsp.jsp in the
          > ConfigJspWebApp/presentation directory.
          >
          >
          >In a web browser, request the JSP file using the following URL:
          >http://localhost:7001/ConfigJspWebApp/presentation/configJsp.jsp
          >
          >
          >Pankaj Bansal wrote:
          >
          >> Thanks for the quick response..
          >> but i want some other root directory other than the DefaultWebApp where
          >i
          >> can put my jsp files...either under DefaultWebApp or preferably some
          >where
          >> else....
          >> Is that possible ?
          >>
          >> --
          >>
          >> Pankaj
          >>
          >> "Deepak Vohra" <[email protected]> wrote in message
          >> news:[email protected]...
          >> > JSPs do not require specific mappings as do HTTP servlets.
          >> > Place your Jsps, for example configureJsp.jsp, in the
          >> DefaultWebApp/presentation
          >> > directory.
          >> >
          >> > In a web browser, request the JSP file using the following URL:
          >> > http://localhost:7001/presentation/configureJsp.jsp
          >> >
          >> > Pankaj Bansal wrote:
          >> >
          >> > > Hi,
          >> > > Iam using weblogic 6.1, SP2.
          >> > >
          >> > > I have created a web application with the DefaultWebApp directory
          >> where
          >> > > u can put ur jsp files for them to be available automatically..
          >> > >
          >> > > Can someone tell me is there a way to map jsp files to some other
          >> directory
          >> > > ?
          >> > > Or can i make some subdirectory under DefaultWebApp like 'presentation'
          >> and
          >> > > keep my jsp files in that and not be required to write the directory
          >> name
          >> > > ( presentation) for accessing my files.
          >> > >
          >> > > In short is it possible in some way to map some directory where
          >i put my
          >> jsp
          >> > > files and they are readily accessible, other than the DefaultWebApp
          >> > > directory.
          >> > >
          >> > > thanks,
          >> > > --
          >> > >
          >> > > Pankaj
          >> >
          >
          

Similar Messages

  • Mapping of a directory containing JSP files

    Hi,
              Iam using weblogic 6.1, SP2.
              I have created a web application with the DefaultWebApp directory where
              u can put ur jsp files for them to be available automatically..
              Can someone tell me is there a way to map jsp files to some other directory
              Or can i make some subdirectory under DefaultWebApp like 'presentation' and
              keep my jsp files in that and not be required to write the directory name
              ( presentation) for accessing my files.
              In short is it possible in some way to map some directory where i put my jsp
              files and they are readily accessible, other than the DefaultWebApp
              directory.
              thanks,
              Pankaj
              

    JSPs do not require specific mappings as do HTTP servlets.
              Place your Jsps, for example configureJsp.jsp, in the DefaultWebApp/presentation
              directory.
              In a web browser, request the JSP file using the following URL:
              http://localhost:7001/presentation/configureJsp.jsp
              Pankaj Bansal wrote:
              > Hi,
              > Iam using weblogic 6.1, SP2.
              >
              > I have created a web application with the DefaultWebApp directory where
              > u can put ur jsp files for them to be available automatically..
              >
              > Can someone tell me is there a way to map jsp files to some other directory
              > ?
              > Or can i make some subdirectory under DefaultWebApp like 'presentation' and
              > keep my jsp files in that and not be required to write the directory name
              > ( presentation) for accessing my files.
              >
              > In short is it possible in some way to map some directory where i put my jsp
              > files and they are readily accessible, other than the DefaultWebApp
              > directory.
              >
              > thanks,
              > --
              >
              > Pankaj
              

  • The best way to solve  problem with the site containing  JSP Files java co

    I am getting NullPointerException pointing at some java file but I have the same JSP file of that name.
    and which line it is pointing it is not there in that file means file has 500 lines and it ponting to 700.
    I got this information from log file but I cannot get the exact line where the error is coming from.
    Can I arrange all code of site according to Netbeans, so that I can complile and run everything to get the problems solved.
    I don't know how to proceed?
    And one more thing the results on web sites are comimg very slow , any suggetions to improve the performance
    I am working on a undocumented code left inbetween by some one and new in real time coding.

    JSP pages compile dynamically into Servlets when requested. The error line number you got corresponds to line number of this dynamically generated Servlet not the jsp page. If you are using Apache Tomcat, these dynamically generated files should be located somewhere inside Work Folder. Anyway, you need to debug your jsp page. some line in this particular jsp page is throwing NullPointerException.

  • Determine Target directory from Source file names with out mapping

    Hi All,
    I have a requirement to determine the Target Directories from the Source file names.
    File Sender Adapter - XI - File Receiver Adapter
    In this scenario I am not doing any mapping. Source File directory contain 3 files. These file should go to 3 directories in the Target Server.
    Please help me how can meet this requirement
    Thanks in advance
    Kevin

    Hi Kevin,
    if you can separate the files by name. have 3 sender communication channels each picking up one of the files (you do this by making the regex in the file name mutually exclusive) and then send them all to the target system using the same comm. channel.
    regards,
    Horia

  • JSP File Browser

    Hi All,
    I have a requirment to create a list box of all ".csv" and ".xml" files in a serveable directory in tomcat. I say its serveable because when i type in "http://localhost:8080/myApp/test.csv", the file is served up. However this directory contains multiple files and i'd like to create a list box of said files and have the user select which one she'd like to see. I'm having trouble with generating the list in the jsp, here's what i tried to do...
    File dir = new File(new URI(request.getRequestURL()));
    String[] files = dir.list(new OnlyCSVOrXMLFiles());
    for(int i=0; i<files.length; i++)
         out.println(files);
    i'm hung up on that first line, it doesn't seem to be the right way to do this... any help would be greatly appreciated. thanks in advance

    Have you thought about using the server side path?
    Then you can just go
    File dir = new File(dirWithTheFiles);Is there any requirement that the directory of files MUST be obtained from the URL?
    The problem with using the URL is that the server ridirects and plays tricks on the browser eg: hitting http://localhost:8080/myApp/ may not actually look in the myApp dir it may send the user off somewhere/anywhere else!
    As the saying goes:
    keep it simple and stupid.

  • Modifications to a jsp file not getting loaded after it has been served out once

    Hi,
    I am using Weblogic 6.1 on solaris platform.
    I have created a new managed server under the default domain. A new
    default web application was created with a DefaultWebApp directory which
    acts as the default directory for JSP files for this server.
    problem 1:
    In this new server if i make changes to a jsp file which has been served out
    once, the modifications are not reflected until and unless i restart the
    server.
    problem 2:
    If I start the server and after that I add a JSP file to the DefaultWebApp
    directory, if I try to access it it gives a 404 error which is file not
    found.
    These problems do not occur in the original server which got created when i
    did the installation.
    Can someone help me out please.
    Pankaj

    Hi.
    On reflection I believe this is normal behavior for WLS 6.x. In order to see
    changes to jsps (or other elements in the webapp) you need to either
    undeploy/redeploy the webapp via the console or the command line utility, or you
    can use the refresh utility if your webapp is deployed in the exploded directory
    format (ie not a war file).
    For docs on redeploying and refreshing from the command line see:
    http://e-docs.bea.com/wls/docs61/webapp/deployment.html
    Regards,
    Michael
    Pankaj Bansal wrote:
    yes we installed SP2 for weblogic 6.1....
    the OS is Solaris ver 2.8
    any suggestions on what can i do apart from opening a case with support?
    Pankaj
    "Michael Young" <[email protected]> wrote in message
    news:[email protected]..
    Hi.
    Are you running with service pack 2? If not please try this. If youstill see
    this with sp2 then please open a case with support.
    Thanks,
    Michael
    Pankaj Bansal wrote:
    Hi,
    I am using Weblogic 6.1 on solaris platform.
    I have created a new managed server under the default domain. A new
    default web application was created with a DefaultWebApp directory which
    acts as the default directory for JSP files for this server.
    problem 1:
    In this new server if i make changes to a jsp file which has been served
    out
    once, the modifications are not reflected until and unless i restart the
    server.
    problem 2:
    If I start the server and after that I add a JSP file to theDefaultWebApp
    directory, if I try to access it it gives a 404 error which is file not
    found.
    These problems do not occur in the original server which got createdwhen i
    did the installation.
    Can someone help me out please.
    Pankaj--
    Michael Young
    Developer Relations Engineer
    BEA Support
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Deploying a WAR file containing .jsp and servlets (also uses JNI)

    Deploying a WAR file containing .jsp and servlets (also uses JNI) on Windows 2000
    We had problems making it initially work on Sun ONE Web Server 6.0 Service Pack 1 because of lack of good iPlanet Web
    Server documentation on deploying such files.
    This is how we went about it:
    1) Make one of the servlet and JSP (must call another Java Class) web application (.war) examples work with iPlanet Web
    Server.
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\HelloWorld\HelloWorld.war
    and
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    a) Go to your Web Server Administration to deploy the application using GUI Web Application Deploy.
    (We usually use command line, we experienced some issues with the GUI version, but maybe it is fixed in the new Web Server
    service packs)
    From browser, open http://yourserver:8888/
    Click on Select a Server:Manage
    Click on Virtual Server Class
    Click on https-yourserver
    Click on the Web Applications Tab
    Then, click on Deploy Web Application
    Enter the following -
    WAR File On: Local
    WAR File Path: C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Application URI: /jakarta
    Installation Directory: c:\iPlanet\examples\jakarta-examples
    By clicking on OK it deployed the application.
    I can verify that it is deployed by selecting "Edit Web Applications" and I see the following entry:
    Edit     /jakarta     c:/iPlanet/examples/jakarta-examples
    Also, c:/iPlanet/examples/jakarta-examples should have the similar following directory structure ..
    - [images]
    - [jsp]
    - index.html
    - [servlets]
    - [META-INF]
    - [WEB-INF]
    - [classes]
    - [tlds]
    - web.xml
    - index.html
    I restarted the server and accessed it using the following URL from my IE browser:
    http://yourserver/jakarta/index.html
    Then I clicked on the JSP Examples and tried some JSP examples.
    b) Alternatively, you can also deploy the same example from the command-line.
    Make sure C:\iPlanet\Servers\bin\https\httpadmin\bin\ is in your path
    wdeploy deploy      -u /jakarta
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\jakarta-examples
              C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Restart the web server (I don't think you have to restart, but .. might as well).
    2)Deploy your web-application
    My Foo.war has the following structure.
    You can use jar tf Foo.war to look at the file contents from command line (assuming you have JDK installed and the bin is
    in your PATH)
    Foo.war
    - [META-INF]
    - [WEB-INF]
    - web.xml
    - [classes]
    - Bar.class
    - MoServlet.class
    - [lib]
    - ThirdParty.jar
    - [natlib]
    - extlib.dll
    - foo.jsp
    Here is our application scenario:
    foo.jsp uses a class call Bar (it is not in any package). The Bar java class uses classes from ThirdParty.jar. The
    ThirdParty.jar in turn uses JNI to load library extlib.dll. foo.jsp also calls /servlet/Mo as well.
    Now to deploy it, do the following:
    (a) Make sure that within foo.jsp, you import the Bar class ( I don't know why you have to do it, but if you don't you get
    JSP compile error).
    <%@page language="java" import="Bar" contentType="text/html"%>
    (b) Check web.xml (for Servlets)
    Within web.xml, make sure you have the following mappings:
    <servlet>
    <servlet-name> MoLink </servlet-name>
    <servlet-class> MoServlet </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name> MoLink </servlet-name>
    <url-pattern> /servlet/Mo </url-pattern>
    </servlet-mapping>
    (c) Deploy the application
    Using command line:
    wdeploy deploy      -u /foo
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\foo-dir
              Foo.war
    (d) Change web-apps.xml file (for picking up ThirdParty.jar)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    You should see something similar to following after successful deployment.
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true"/>
    Change it to look like following to pick up the ThirdParty.jar
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true">
    <class-loader reload-interval="300"
              classpath="C:/iPlanet/examples/foo-dir/WEB-INF/lib/ThirdParty.jar"
              delegate="false"/>
    </web-app>
    (e) Change jvm12.conf file (for JNI)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    Add or uncomment the following lines:
    #optional - just helps with instrumenting the jsp and servlet code
    jvm.include.CLASSPATH=1
    jvm.enableDebug=1
    nes.jsp.enabledebug=1
    jvm.trace=7
    jvm.verboseMode=1
    #required for JNI
    java.compiler=NONE
    jvm.classpath=.;C:\JDK1.3.1\lib\tools.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar;
    jvm.option=-Xrs
    jvm.option=-Xnoagent
    # not sure if this is needed for iPlanet web server
    jvm.option=-Djava.library.path=C:/iPlanet/examples/foo-dir/natlib/ -Djava.compiler=NONE
    (f) Change magnus.conf file (for JNI)
    We HAD to change this file in order for ThirdParty.jar file to pick up the native C++ code using JNI. Apparently, the
    iPlanet Web Server doesn't pick the Environment Variable Path. Because when we had the directory containing the DLL just
    in Path, it didn't work.
    Change Extrapath directive:
    ExtraPath C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    to
    ExtraPath c:/iPlanet/examples/foo-dir/natlib;C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    (g) Apply changes from the Web Server Administration Console and Restart the web server.
    You should be able to see the behaviour that you want from your application.
    http://yourserver/foo/foo.jsp
    Hope this was helpful!!!
    Sonu

    Deploying a WAR file containing .jsp and servlets (also uses JNI) on Windows 2000
    We had problems making it initially work on Sun ONE Web Server 6.0 Service Pack 1 because of lack of good iPlanet Web
    Server documentation on deploying such files.
    This is how we went about it:
    1) Make one of the servlet and JSP (must call another Java Class) web application (.war) examples work with iPlanet Web
    Server.
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\HelloWorld\HelloWorld.war
    and
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    a) Go to your Web Server Administration to deploy the application using GUI Web Application Deploy.
    (We usually use command line, we experienced some issues with the GUI version, but maybe it is fixed in the new Web Server
    service packs)
    From browser, open http://yourserver:8888/
    Click on Select a Server:Manage
    Click on Virtual Server Class
    Click on https-yourserver
    Click on the Web Applications Tab
    Then, click on Deploy Web Application
    Enter the following -
    WAR File On: Local
    WAR File Path: C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Application URI: /jakarta
    Installation Directory: c:\iPlanet\examples\jakarta-examples
    By clicking on OK it deployed the application.
    I can verify that it is deployed by selecting "Edit Web Applications" and I see the following entry:
    Edit     /jakarta     c:/iPlanet/examples/jakarta-examples
    Also, c:/iPlanet/examples/jakarta-examples should have the similar following directory structure ..
    - [images]
    - [jsp]
    - index.html
    - [servlets]
    - [META-INF]
    - [WEB-INF]
    - [classes]
    - [tlds]
    - web.xml
    - index.html
    I restarted the server and accessed it using the following URL from my IE browser:
    http://yourserver/jakarta/index.html
    Then I clicked on the JSP Examples and tried some JSP examples.
    b) Alternatively, you can also deploy the same example from the command-line.
    Make sure C:\iPlanet\Servers\bin\https\httpadmin\bin\ is in your path
    wdeploy deploy      -u /jakarta
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\jakarta-examples
              C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Restart the web server (I don't think you have to restart, but .. might as well).
    2)Deploy your web-application
    My Foo.war has the following structure.
    You can use jar tf Foo.war to look at the file contents from command line (assuming you have JDK installed and the bin is
    in your PATH)
    Foo.war
    - [META-INF]
    - [WEB-INF]
    - web.xml
    - [classes]
    - Bar.class
    - MoServlet.class
    - [lib]
    - ThirdParty.jar
    - [natlib]
    - extlib.dll
    - foo.jsp
    Here is our application scenario:
    foo.jsp uses a class call Bar (it is not in any package). The Bar java class uses classes from ThirdParty.jar. The
    ThirdParty.jar in turn uses JNI to load library extlib.dll. foo.jsp also calls /servlet/Mo as well.
    Now to deploy it, do the following:
    (a) Make sure that within foo.jsp, you import the Bar class ( I don't know why you have to do it, but if you don't you get
    JSP compile error).
    <%@page language="java" import="Bar" contentType="text/html"%>
    (b) Check web.xml (for Servlets)
    Within web.xml, make sure you have the following mappings:
    <servlet>
    <servlet-name> MoLink </servlet-name>
    <servlet-class> MoServlet </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name> MoLink </servlet-name>
    <url-pattern> /servlet/Mo </url-pattern>
    </servlet-mapping>
    (c) Deploy the application
    Using command line:
    wdeploy deploy      -u /foo
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\foo-dir
              Foo.war
    (d) Change web-apps.xml file (for picking up ThirdParty.jar)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    You should see something similar to following after successful deployment.
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true"/>
    Change it to look like following to pick up the ThirdParty.jar
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true">
    <class-loader reload-interval="300"
              classpath="C:/iPlanet/examples/foo-dir/WEB-INF/lib/ThirdParty.jar"
              delegate="false"/>
    </web-app>
    (e) Change jvm12.conf file (for JNI)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    Add or uncomment the following lines:
    #optional - just helps with instrumenting the jsp and servlet code
    jvm.include.CLASSPATH=1
    jvm.enableDebug=1
    nes.jsp.enabledebug=1
    jvm.trace=7
    jvm.verboseMode=1
    #required for JNI
    java.compiler=NONE
    jvm.classpath=.;C:\JDK1.3.1\lib\tools.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar;
    jvm.option=-Xrs
    jvm.option=-Xnoagent
    # not sure if this is needed for iPlanet web server
    jvm.option=-Djava.library.path=C:/iPlanet/examples/foo-dir/natlib/ -Djava.compiler=NONE
    (f) Change magnus.conf file (for JNI)
    We HAD to change this file in order for ThirdParty.jar file to pick up the native C++ code using JNI. Apparently, the
    iPlanet Web Server doesn't pick the Environment Variable Path. Because when we had the directory containing the DLL just
    in Path, it didn't work.
    Change Extrapath directive:
    ExtraPath C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    to
    ExtraPath c:/iPlanet/examples/foo-dir/natlib;C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    (g) Apply changes from the Web Server Administration Console and Restart the web server.
    You should be able to see the behaviour that you want from your application.
    http://yourserver/foo/foo.jsp
    Hope this was helpful!!!
    Sonu

  • Get directory listing or files contained in a folder which is placed on a s

    Hello,
    I want to get the directory listing of a particular folder say 'xyz' which is placed on the server.
    I am using tomcat. I want to use Http to do it. How do it do it.
    Please guide.
    Regards,
    JAVA_student

    JAVA_student ,
    as pointed out file list is (in productional environments) usually turned off for security reasons.
    But I had a similiar requirement to the one you posted. I had a directory with thousands of image files with the name pattern <id>.jpg and the id's stored in a database. Not for every id in the database there existed a file. I wanted to show an image or in case the image file did not exist a default jpg. I could not set the error pages in web.xml to do it.
    So I had to take the id (a parameter in the request to the servlet I wrote for that), had to concat it with the 'virtual' directory name used in the applicationserver for the img directory. Then I had to check the existance of the file and to load it it and display it, if it existed otherwise I had to load and display the default picture.
    The problem is similiar to yours as the problem basically is to map a directory in a web application to a real directory in a filesystem (which works for files and directories.
    The answer is use getRealPath(String) of the ServletContext-object.
    Note: This only allows access to files and directories in the web application.
    e.g.
    http://www.theserver.com/mywebapp/img/ is a folder containing img files. The server does not allow directory listing.
    In a jsp within the application mywebapp you want to show a list of the files in /mywebapp/img/ .
    <HTML>
    <BODY>
    <%
    // in a jsp application gives you access to the context
    String sRealPath = application.getRealPath("/img") ;
    java.io.File fDir = new java.io.File(sRealPath) ;
    java.io.File[] allFiles = fDir.listFiles() ;
    for (int i = 0 ; i < allFiles.length;i++) {
       String sName = allFiles.getName() ;
    %>
    <%=sName%><br>
    <%
    %>
    </BODY>
    </HTML>

  • Storing .jsp files in the web-inf directory

    Has anyone ever heard about storing JSP files in the web-inf directory instead of the web app root directory.
    Apparently it improves security.
    If this is so, how is the user suppose to access the jsp file since I thought that users were not able to access what is stored in the web-inf directory.
    Any thoughts
    Thanks
    Nat

    I didn't tyr this but I think it is possible. You can do it using <servlet-mapping/> as you do with any other servlet.
    For example include lines below, in web.xml of web-inf,
    <servlet>
    <servlet-name>ReportRouter</servlet-name>
    <jsp-file>/web-inf/jsp/ReportRouter.jsp</jsp-file>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>ReportRouter</servlet-name>
    <url-pattern>/myrouter</url-pattern>
    </servlet-mapping>
    This may work. Don't you think so?
    Sudha

  • Reading a file in the same directory as the JSP files

    Hi,
    Okay so I have my JSP files in the directory $Catalina/webapps/webservices, I also have a text fire in the same directory called users.txt
    All I want to do is open the users.txt from the JSP program and read from it. But JSP can't seem to find the users.txt.
    Code I have tried include,
    File users = new File("users.txt");
    File users = new File("http://localhost:8080/webservcies/users.txt"); Also File users = new File(new URI ("http://localhost:8080/webservcies/users.txt"));
    File users = new File("webservices/users.txt");
    I guess part of the problem is that I don't know what the JSP working directory is. I assumed it was $Cataline/work/standalone/localhost/webservices
    but even if I use,
    File users = new File("../../../../webapps/webservices/users.txt");
    It doesn't work. Does anyone know how I can read the file? Any help in this matter would be appreciated.

    From within a JSP you have a reference to a PageContext called pageContext. This has a method getServletContext(). From the ServletContext you can find the real path the servlet lives in. So...
    File basePath = new File(pageContext.getServletContext().getRealPath("/"));Now basePath contains your path $Catalina/webapps/webservices. Then it's just a matter of working relative to that, e.g.:
    File usersFile = new File(basePath, "users.txt");

  • Managing JSP files (.java, .class) size in working directory

              Our new web application automatically generates JSP pages which
              causes the working directory holding the JSP files to grow
              too large to manage,does Weblogic have a alternate way to
              compile JSP without permanently storing the .java, .class files
              on disk.
              Maybe in cache were they can be managed, cleaned up similar
              to how a database cache works.
              Any ideas or advice would be appreciated.
              THANKS IN ADVANCE.
              

              Just don't look in the classfiles directory and everything will
              be fine.
              WLS will only leave the .java files if you ask it to keep them (keepgenerated).
              If you don't keep the .class files on disk then WLS will have to
              recompile them every time it is restarted. If you have so many
              JSPs you are having trouble managing them, you definitely don't
              want to recompile everytime you restart WLS.
              Last time I looked in our public_html there were 67000 JSP files.
              We don't have any problems managing them.
              Mike
              "denis mercier" <[email protected]> wrote:
              >
              >Our new web application automatically generates JSP pages which
              >causes the working directory holding the JSP files to grow
              >too large to manage,does Weblogic have a alternate way to
              >compile JSP without permanently storing the .java, .class files
              >on disk.
              >Maybe in cache were they can be managed, cleaned up similar
              >to how a database cache works.
              >Any ideas or advice would be appreciated.
              >THANKS IN ADVANCE.
              

  • Tomcat servlet/JSP container default files on 10gAS(10.1.2.0.2)

    Hi Friends,
    I am using Oracle Application Server 10g (10.1.2.0.2) on windows
    I have the Vulnerability: Apache Tomcat servlet/JSP container default files.
    and the fix is Review the files and delete those that are not needed.
    i would like to know the location of the files to review and delete.Please suggest?
    Regards,
    DB

    Apache/Tomcat is not related to OAS, where did you get this info? OAS is based in a Orion Web Server and Apache HTTP Server, not Tomcat.
    For this kind of problems there are the CPU you may want to check in Metalink for them.
    Can you clarify also what default files?
    Greetings.

  • Library info directory path contains a file where a folder was expected

    Cannot reopen my Aperture library (Aperture 2) after successfully exporting a few images to desktop as jpegs and then closing Aperture. Tried to reopen Aperture and got the following message:
    Library info directory path contains a file where a folder was expected.
    The Aperture Library could not be created at “/Volumes/Data/Pictures/Aperture Library.aplibrary/Aperture.aplib”. Check the path and try again.
    No idea what has happened here. Anyone know how to fix?
    I have a referenced library on my data drive (4 drive Mac Pro) Data drive/d300 Masters folder/another sub folder/then all my images. Did nothing other than to adjust,crop and export images. Images all still there (can open in PS).

    Sounds strange.
    Did you try to double click your "Aperture Library.aplibrary"?
    Maybe trying to open backuped library...
    Or creating a new library by pressing the alt key when clicking on the Aperture Dock icon.

  • Mapping JSP files

    Hi, I am using Tomcat 4.0.3. I am trying to map my JSP pages by giving the following code in web.xml file.
    <servlet>
    <servlet-name>AJSP</servlet-name>
    <jsp-file>/myjsp.jsp</jsp-file>
    </servlet>
    <servlet-mapping>
    <servlet-name>AJSP</servlet-name>
    <url-pattern>/hello</url-pattern>
    </servlet-mapping>
    But I am getting the following error when I try to start tomcat. If I remove above lines, then there is no problem.
    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-mapping*,session-config?,mime-mapping*,welco
    me-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-const
    raint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
    Thank in advance
    Ravi

    Why would you map a jsp?
    you can just add jsp files to your directories and they will be compiled at the first load...
    when you update files they will be loaded also...
    I can't imagine any advantage on mapping jsp files...
    greetings

  • I use FPT to try to view a directory on a remote server that contains 19000 files,  only 10000 are showing.  Please help.

    I use FPT to try to view a directory on a remote server that contains 19000 files,  but only 10000 are showing.  Please help.

    Hi Steve,
    You can be right that DISM don’t support the scenario that User profile and System are in the separated volumes.
    As a workaround, we should use the defaults to put the profile on C: during capture image, and then set the profile path to be on the D: drive after the image deploying.
    Please refer to below KB for how to using Sysprep to redirect profiles’ locations.
    Customize the default local user profile when preparing an image of Windows
    http://support.microsoft.com/kb/973289/en-hk
    Hope these could be helpful.
    Kate Li
    TechNet Community Support

Maybe you are looking for

  • Multiple version of Java on one machine

    Is it possible to have multiple versions of Java co-exist on the same XP Pro machine? Here is our scenario: we have apps that use Java 1.5, but we have one critical app that doesn't support that version yet. It has to use the 1.4 version. Is there a

  • Strut-Portlets errors in Weblogic 8.1 SP5

    I am getting the below mentioned error when running a portal containing Struts-Portlet in Webloigc 8.1Sp5. I have tried everything but not able to resolve it, does anyone know how to resolve and how to successfully run a Struts-Portlet application? T

  • MDM's merging feature in EP

    Hi, I want to add MDM's merging feature to the MDM ResultSet iView which is available with MDM Business packages for EP. Is there any way I can modify the ResultSet iView or do I have to create a new iView? Kindly help

  • Upgrading from nano to video

    I got my nano about a week after it came out with a protection plan. My question is whether I can bring it to an apple store, pay an extra $100, and get an iPod video (I bought the nano from amazon if that changes anything...)

  • IPhone 4S - problems loading the app store to the correct app

    Sorry for the cross-post, but I think I accidentally posted this in the wrong place. This problem is only occurring on the iPhone 4S, iPhone 4 is fine. We were hoping iOS 5.1 would fix the problem but it hasn't. The problem is very easy to replicate