Appc does not compile JSPs under WEB-INF

Hi,
          We are using WLS 8.1 and I noticed that appc does not compile jsps that are
          under WEB-INF. Is this expected? If the jsps are outside of WEB-INF then
          appc works fine...
          Thanks!
          John
          

Although the client is not allowed to directly access jsps under WEB-INF, it
          is perfectly acceptable (and often recommended) to use a front controller to
          forward to jsps. Often these jsps are "hidden" in the WEB-INF directory so
          that they can't be accessed directly by the client. This pattern works fine
          under 8.1 except that appc won't precompile the jsps under WEB-INF (the
          container does compile the jsps when they are called). I believe this is a
          bug... If jsps are allowed in WEB-INF then appc should compile them...
          John
          "Stjepan Brbot" <stjepan.brbot@@zg.hinet.hr> wrote in message
          news:[email protected]...
          > Yes, this is expected! Web container, or better to say it's web component,
          > does not serve content of WEB-INF directory directly mening you cannot
          > access jsp inside WEB-INF like
          http://host:port/WebApp/WEB-INF/something.jsp
          > hence there's no need for compiling JSP's in it! The content of WEB-INF
          > directory can be accessed only via internal links so it is mostly used for
          > referencing taglibs. JSPs, HTMLs, images and all other file type that has
          to
          > be accessible directly by client web-server (not container internally)
          > should be in application directory or one of it's subdirectories.
          >
          > "John Hampton" <[email protected]> wrote in message
          > news:[email protected]...
          > > Hi,
          > >
          > > We are using WLS 8.1 and I noticed that appc does not compile jsps that
          > are
          > > under WEB-INF. Is this expected? If the jsps are outside of WEB-INF
          then
          > > appc works fine...
          > >
          > > Thanks!
          > > John
          > >
          > >
          >
          

Similar Messages

  • Crystal Report Images Not Showing - JSP inside /WEB-INF folder

    Hi Experts,
    I am using Crystal report for Eclipse and also using Struts2 and tiles framework combination.
    The problem is when viewing the report all I've got is red X on all images and the graph image also not showing. This is when I use tiles and my jsp is inside the web-inf folder.
    This is my struts link: href="s:url value='/report/reportOpen.action?report=1'
    I've checked that the path to the viewer generated HTML is not correct. see code below.
    src="../../../crystalreportviewers/js/crviewerinclude.js"
    But when I test to access a simple jsp viewer that resides on the web root folder, this works fine but of course this is not what I want to have. I need to have my banner and menus on top of the report page (using tiles)
    This is my jsp link: href="s:url value='/ReportViewer.jsp?report=1'
    Viewer generated HTML below.
    src="crystalreportviewers/js/crviewerinclude.js"
    This might be a common problem and that you can share to me your solution.
    Note: I removed the script tags because I can't submit this entry.
    Thank you  in advance,
    Regards,
    Rulix Batistil
    Crystal Report Images Not Showing - JSP inside /WEB-INF folder

    Hi Saravana,
    After a few experimentation from your idea i was able to figure out the problem and now it is working.
    I don't have to copy the folder to where my jsp resides but still maintains it in the root location:  web/crystalreportviewers
    The changes should always be in web.xml.
    1st: change the crystal_image_uri value to ../crystalreportviewers
    2nd: change crystal_image_use_relative value to "web"
    Change to "web" instead of webapp because that is what I named my web root folder.
    <context-param>
              <param-name>crystal_image_uri</param-name>
              <param-value>../crystalreportviewers</param-value>
         </context-param>
         <context-param>
              <param-name>crystal_image_use_relative</param-name>
              <param-value>web</param-value>
         </context-param>
    Thank you. You showed me the way on how to solve the 3 day problem.
    BTW, my next problem is when clicking on any buttons prev/next/print/export, I got this error HTTP Status 404.
    Well, at least for now I can view my initial report.  I just need to figure out the next issue and with the help of the great people here in the forum.
    Thanks a lot.
    Regards,
    Rulix
    Edited by: Rulix Batistil on Nov 26, 2008 7:27 AM

  • NWDS 7 does not compile JSPs

    I have recently downloaded NWDS tool that comes with the NW04s trial version (NWDS version 7).
    When I create portal components (par files), NWDS does not compile the java files.  It creates a par file even with errors in Java. Is this a new "feature" of NWDS? am I missing anything?

    Create DC for the JSP also. It will work.

  • Access resources not present directly under web-inf

    hi,
    My web application needs access to resources (e.g XML files, Image resources), with the following constraints:
    1. Resources cannot be bundled into a jar file.
    2. Resources cannot be placed under the context root, i.e. under the WEB-INF/classes. i.e these resources are placed in some other directory
    It would be great help if somebody could throw more light on this topic.
    thanks in advance,
    java developer

    In the %CATALINA_HOME%\bin\catalina.bat (or catalina.sh) file you can add the path to these resoures to the CLASSPATH that is built for tomcat. This should make them available to your web-apps. Then use 'catalina start' or 'catalina run' to start tomcat. If not using tomcat you'll have to look for where the server creates it's classpath.

  • Jsps under WEB-INF

    Hello,
    i've moved my jsps from outside WEB-INF to WEB-INF directory
    /web-inf/jsp/private/home.jspBut now i can't receive the home.jsp page. what do i have to do to see the home.jsp in the browser? Do i have to change my faces-config.xml ?
    thanks

    Files in WEB-INF and META-INF are not public accessible. You may create kind of a servlet which serves those files using an absolute path. But that's just a nasty workaround for kind of a workaround. What are you trying to achieve? Why have you moved the files to the WEB-INF?

  • Oc4j 10.1.3.0.0Prev4 does not load libs in WEB-INF/lib

    Hi,
    trying to use an existing application with oc4j I have serious problems.
    When trying to deploy I get exceptions (ClassNotFound) of classes that are in libs that are in the WEB-INF/lib folder of the war file I want to deploy:
    05/09/23 17:20:21 CharScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
    This class is in hibernate3.jar which is included in the war-file.
    When I place all the libs into the applib folder it does deploy. But then it crashes at runtime telling me the classes are duplicate (one in the war, one in applib).
    Any suggestions what I can do would be greatly appreciated.
    Norbert

    Hello,
    Instead of simply dropping the Jar file in the applib directory you should create shared libraries that will give you better control of what is happening at the classloader level (System, Application and Web Application)
    Please take a look to the 10.1.3 How tos about shared library. (Swapping XML parser and JDBC driver), and also to the documentation, chapter 7 "Using Shared Libraries" of the OC4J Configuration and Administration Guide
    Regards
    Tugdual Grall

  • Weblogic does not look in application WEB-INF/lib

    Hi,
              I am migrating a Tomcat app to Weblogic 5.1 SP10. I have JAR files in
              the WEB-INF/lib directory, but Weblogic doesn't realize they are there
              and gives me noClassDefFound errors. Should I be adding lines to the
              wlsrc file? If so, can I list a directory or each JAR file separately?
              Thanks and frustrated.
              Dean
              

    The applets classes are in a jar. The reset of the web applications jar files are in the applications WEB-INF/lib, which is also where the applets jar is. I thought that's how its suppose to be done and that tomcat would load up the classpath with the jar files in the WEB-INF/lib directory.

  • Precompile JSP in WEB-INF

    Hi,
    We're using split-directory. Our jsps live inside of WEB-INF to protect them from
    direct accessing. Only the Servlet controller can access jsps. A few questions
    here:
    1. How can I precompile jsps at the compilation time? Appc doesn't work, since
    it assumes jsps always live outside of the WEB-INF.
    2. Where is the output directory that we should set if we can precompile. Our
    jsps are located in WEB-INF/jsps.
    3. Right now we leave the server compile them on fly. But where the compiled classes
    are stored on the server. We deploy the EAR to the server.
    Thanks!

    Hi,
    1) Thanks for pointing this out. Indeed appc & jspc (8.1) don't compile jsps
    under WEB-INF and the CR associated with this bug is CR133172. Please
    contact [email protected] to obtain a patch for this issue.
    2) If appc were used on a split directory ear, the .class files for the
    jsps are copied into the destination directory of the split dir (more
    specifically into the webapp module's WEB-INF/classes being compiled)
    3) When compiled at runtime, the default outputDirectory is under the server
    temp dirs : .wlnotdelete/extract/<server-name>_<app/ear-name>_<module-name>/
    --Nagesh
    "Kelly" <[email protected]> wrote in message
    news:40771782$[email protected]..
    >
    Hi,
    We're using split-directory. Our jsps live inside of WEB-INF to protectthem from
    direct accessing. Only the Servlet controller can access jsps. A fewquestions
    here:
    1. How can I precompile jsps at the compilation time? Appc doesn't work,since
    it assumes jsps always live outside of the WEB-INF.
    2. Where is the output directory that we should set if we can precompile.Our
    jsps are located in WEB-INF/jsps.
    3. Right now we leave the server compile them on fly. But where thecompiled classes
    are stored on the server. We deploy the EAR to the server.
    Thanks!

  • Warning - When Compiling .jsp pages under WEB-INF

    Created a directory jsp under WEB-INF and when i compile the jsp pages i get the following warning message
    Warning: package name web2d_inf._jsp does not match source file name C:\ProviderEnrollment\ProvEnrollView\classes\.jsps\_WEB_2d_INF\_jsp\_searchprovider.java
    Need help
    Thanks

    We have encountered this warning too.
    I'm not an Oracle employee, but it looks like there's a bug in JDev that preserves the case for the output directories but not for the package name that is supposed to correspond to the output directories.
    In any case, we haven't seen any runtime problems that seem to be related to this warning, so you may be safe to disregard it. It does foul up the build log though.
    Any JDev team members watching this topic are welcome to chime in with a confirmation and details of this apparent bug, as well as any workaround that might exist to avoid having the warning appear. Thanks!

  • Jsp-file="/WEB-INF/index.jsp" cannot load

              Hi,
              I am defining a servlet in the web.xml file using the following syntax.
              <servlet>
              <servlet-name>TestServlet</servlet-name>
              <jsp-file>/WEB-INF/index.jsp</jsp-file>
              </servlet>
              Then when I tried to access this servlet, I get a 404 not found error. The weblogic.log
              file complains with the following message:
              java.io.FileNotFoundException: no resource '/WEB-INF/index.jsp' in servlet context
              root '/home/dev/web/apps/MyApp'
              at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:293)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:227)
              at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:115)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:922)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:886)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              My jsp file in located in /home/dev/web/apps/MyApp/WEB-INF/index.jsp, I know weblogic
              doesn't support jsp under WEB-INF, however, according to Sun's Servlet specification,
              anything under web-inf should be accessible to getResource and getResourceAsStream
              method, and it looks like that's what weblogic implementation is using (from the
              error message). So I am not sure whether this is weblogic issue or I am doing
              something wrong. By the way, the above config in web.xml is supported in Tomcat.
              

              What version of WebLogic will incorporate Servlet spec 2.4 and allow jsp under
              web-inf?
              Chris
              "Narayan Anand" <[email protected]> wrote:
              >Regarding S-12864 - It will not work as stated in the solution in any
              >of
              >the available releases of WLS.
              >Please ignore that. I already informed the concerned person to correct
              >the
              >solution.
              >
              >The story behind this is:
              >Our engineering team is already aware of the fact that the request
              >dispatcher calls (include/forward) for a jsp under the web-inf directory
              >works in other app server - Tomcat.
              >Our engineering team had a discussion with the servlet/jsp spec experts
              >group for clarifying the spec and the tomcat implementation.
              >So the servlet expert group has decided to explicitly state in the spec
              >that
              >RD.forward() and RD.include() should be allowed access to resources in
              >/WEB-INF and it will be included in servlet spec 2.4. For now, WLS works
              >as
              >per the current specification.
              >
              >So far the story is - WLS will implement this in our next major release
              >which will be compliance with servlet spec 2.4.
              >In all the currently available WLS releases, accessed to a jsp under
              >the
              >WEB-INF directory is prohibited.
              >
              >--
              >Best Regards,
              >Narayan Anand
              >Developer Relations Engineer
              >BEA Systems, Inc.
              >
              >
              >
              >
              >
              >
              >"Ming Fan" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Thanks for the explanation. So this means weblogic treats such mapped
              >servlet request
              >> as a direct request to the jsp under WEB-INF, instead of forwarding
              >it to
              >some
              >> JspCompiler servlet and let that compiler servlet use some resource
              >loader
              >to
              >> load the jsp and then compile. I believe that latter implementation
              >approach also
              >> conforms the Servlet spec (it's a different way of treating the request,
              >I
              >guess).
              >>
              >> Now here's another question. According to Web logic Customer Support
              >Solution
              >> ID S-12864 (WLS 6.x - Cannot access JSP under the WEB-INF directory),
              >the
              >servlet
              >> should be able to get a request dispatcher, and then forward the request
              >to the
              >> jsp under WEB-INF. I am still using WLS 5.1, so does the above solution
              >apply
              >> to 5.1 also? It doesn't seem to work with 5.1. So is this a 5.1 problem
              >and I
              >> should upgrade to 6.1?
              >>
              >> Thanks.
              >>
              >> "Narayan Anand" <[email protected]> wrote:
              >> >Hi Ming,
              >> >
              >> >It is legal to put files under WEB-INF directory. But as mentioned
              >in
              >> >the
              >> >spec, it will be available only to servlet code and not directly to
              >client
              >> >request.
              >> >Read the last statement of the same paragraph in section9.5.
              >> >"Since requests are matched to resource mappings case-sensitively,
              >client
              >> >requests for '/WEB-INF/foo', '/WEb-iNf/foo', for example, should not
              >> >result
              >> >in contents of the web application located under /WEB-INF being returned,
              >> >nor any form of directory listing thereof.".
              >> >
              >> >So in your case, when you access the servlet which gets mapped to
              >> >/WEB-INF/your-jspfile, under no condition it should result in display
              >> >of jsp
              >> >contents.
              >> >It is working as per the specification.
              >> >
              >> >I hope this helps.
              >> >
              >> >Regards,
              >> >Narayan Anand
              >> >Developer Relations Engineer
              >> >BEA WebLogic Support
              >> >
              >> >
              >> >
              >> >"Ming Fan" <[email protected]> wrote in message
              >> >news:[email protected]...
              >> >>
              >> >> Actaully there are other ways to solve my problem. But what I am
              >> >interested to
              >> >> know is under the Servlet specification 2.3, is it legal to put
              >jsp
              >> >under
              >> >WEB-INF,
              >> >> define it in <jsp-file> xml tag, and should the JSP compiler be
              >able
              >> >to
              >> >see this
              >> >> as a resource. Apparently, Tomcat allows this behavior, so does
              >this
              >> >mean
              >> >Tomcat
              >> >> conforms better to the Servlet spec, or Tomcat is wrong but Weblogic
              >> >conforms
              >> >> better? Can anyone let me know what's the correct interpretation
              >of
              >> >section 9.5
              >> >> in servlet spec 2.3?
              >> >>
              >> >>
              >> >> "Jerrie Pineda" <[email protected]> wrote:
              >> >> >Try moving it to a different dir. You normally don't place jsp
              >file
              >> >> >in the
              >> >> >WEB-INF dir.
              >> >> >
              >> >> >
              >> >> >"Ming Fan" <[email protected]> wrote in message
              >> >> >news:[email protected]...
              >> >> >>
              >> >> >> Hi,
              >> >> >>
              >> >> >> I am defining a servlet in the web.xml file using the following
              >> >syntax.
              >> >> >> <servlet>
              >> >> >> <servlet-name>TestServlet</servlet-name>
              >> >> >> <jsp-file>/WEB-INF/index.jsp</jsp-file>
              >> >> >> </servlet>
              >> >> >>
              >> >> >> Then when I tried to access this servlet, I get a 404 not found
              >> >error.
              >> >> >The
              >> >> >weblogic.log
              >> >> >> file complains with the following message:
              >> >> >> java.io.FileNotFoundException: no resource '/WEB-INF/index.jsp'
              >> >in
              >> >> >servlet
              >> >> >context
              >> >> >> root '/home/dev/web/apps/MyApp'
              >> >> >> at
              >weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:293)
              >> >> >> at
              >> >weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:227)
              >> >> >> at
              >> >>
              >>
              >>>weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:
              >2
              >> >0
              >> >> >0)
              >> >> >> at
              >> >>
              >>
              >>>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.ja
              >v
              >> >a
              >> >> >:115)
              >> >> >> at
              >> >>
              >>
              >>>weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextI
              >m
              >> >p
              >> >> >l.java:922)
              >> >> >> at
              >> >>
              >>
              >>>weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextI
              >m
              >> >p
              >> >> >l.java:886)
              >> >> >> at
              >> >>
              >>
              >>>weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletConte
              >x
              >> >t
              >> >> >Manager.java:269)
              >> >> >> at
              >> >>
              >>
              >>>weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380
              >)
              >> >> >> at
              >> >> >weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
              >> >> >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              >> >> >>
              >> >> >> My jsp file in located in
              >/home/dev/web/apps/MyApp/WEB-INF/index.jsp,
              >> >> >I
              >> >> >know weblogic
              >> >> >> doesn't support jsp under WEB-INF, however, according to Sun's
              >Servlet
              >> >> >specification,
              >> >> >> anything under web-inf should be accessible to getResource and
              >> >> >getResourceAsStream
              >> >> >> method, and it looks like that's what weblogic implementation
              >is
              >> >using
              >> >> >(from the
              >> >> >> error message). So I am not sure whether this is weblogic issue
              >> >or
              >> >> >I am
              >> >> >doing
              >> >> >> something wrong. By the way, the above config in web.xml is
              >supported
              >> >> >in
              >> >> >Tomcat.
              >> >> >
              >> >> >
              >> >>
              >> >
              >> >
              >>
              >
              >
              

  • JSPs in WEB-INF

    Hi,
    i have two (basicly?) questions:
    1)
    i try to put my JSP under WEB-INF, like i am able to do in struts
    so in struts i have a URL: http://myhost/strutsApp/loadFile.do
    that triggers an action-class, doing something an returns ActionForward,
    which is my JSP under WEB-INF
    can i deal so in JSF?
    2)
    is it possible to add "actions" ?
    i need a "logical-access" before presenting my jsf-sites,
    a URL like this http://myhost/jsfApp/loadCarById?id=9876543
    so a class must load some data from database and convert it to a backbean in my jsfs
    any ideas?
    thanks for any comment!!!

    Ahh! Now I copy.
    Inside my backing bean I call java.sql based code. I got away from using jsp sql tags or the access to databases via the JNDI of tomcat. The java.sql based code I use comes from over the years and can connect to multiple databases. It is not based on javax.sql which I'm considering. I don't know if there is such an endeavor out there. Do you know of any? The javax.servlet.jsp.jstl.sql package does not look too useful. I have a sourceforge project where I could put this code if I thought it was useful.
    I do use PreparedStatement's and a parameter coming back from a component in a form could readily be set into a PreparedStatement and the result set put back into the HtmlDataTable for the table in a jsf form.
    Here is what I call during initialization and I'm trying to make the per session; just like the title is set into a PreparedStatement so can a parameter returned from a jsf form component.
    com.neuralworks.jdbc.Hub hub;
    //try
    hub=(com.neuralworks.jdbc.Hub)new com.neuralworks.jdbc.Hub();//java.beans.Beans.instantiate(null,"com.neuralworks.jdbc.Hub");
    hub.setPropertyFileName("com.hypernex.jsf.bundles.databases");
    hub.connectJDBCAdapter();
    //hub.setUrl(getString("URL2"));
    //hub.setUser(getString("User"));
    //hub.setPassword(getString("Password"));
    //hub.connectJDBCAdapter();
    com.hypernex.jordbc.CrystallographyDataModel.getInstance().setHub(hub);
    com.hypernex.jordbc.CrystallographyDataModel.getInstance().initialize();
    com.hypernex.jordbc.CrystallographyDataModel crystallographyDataModel=com.hypernex.jordbc.CrystallographyDataModel.getInstance();
    title=com.hypernex.jordbc.CrystallographyDataModel.getInstance().getMapName();
    //double[] xMap=crystallographyDataModel.getXMap();
    //double[] yMap=crystallographyDataModel.getYMap();
    //String[] patternName=new String[xMap.length];
    //String[] mapID=crystallographyDataModel.getMapID();
    dataTable=new HtmlDataTable();
    //dataTable.setRows(xMap.length);
    hub.prepareStatement("select X, Y, MAP_ID from MAP_LOCATIONS, MAP where MAP_LOCATIONS.MAP_PK = MAP.MAP_PK and MAP.NAME=? ORDER BY MAP_LOCATIONS_PK");
    hub.setObjectAt(1,title);
    java.sql.ResultSet resultSet=hub.executeQuery();
    dataTable.setValue(new ResultSetDataModel(resultSet));
    //dataTable.setRows(xMap.length);
    System.out.println("title="+title+" "+dataTable.getRowData());
    hub.prepareStatement("select NAME from MAP where REMOVE=0");
    java.util.Vector v=hub.vectorizeColumnQuery(1);
    for(int i=0; i < v.size(); i++)
    String recipe=(String)v.elementAt(i);
    recipes.add(new SelectItem(recipe, recipe, recipe));

  • Does JSP best practice of putting under WEB-INF apply to JSF pages?

    I'm new to JSF and wondering if the "best practice" advice that used to be given of storing your jsp pages under WEB-INF (when using Model2) to keep them from being served up without going through your controller still applies with JSF.
    Since the component lifecycle is so different, I'm wondering if it would still apply? If anyone can explain why it might or might not apply I'd appreciate it!
    Thanks!

    The rule is:
    keep all the pages you don�t user to "browse", under the WEB-INF directory.
    MeTitus

  • Access JSP pages under WEB-INF

    Hello, I have a web application and i use Java,JSP, servlets etc.
    In my webpage i have three different categories of users
    *1)* Registered users
    *2)* Not Registered users
    *3)* Administrator
    I would like the welcome page index.jsp and register page be accessed by everyone.
    But as far as the other pages are concerned , i would like to be accessed only by the registered users.
    What shall i do??
    I placed the index.jsp and register.jsp under the public folder and the other pages under WEB-INF folder in order to be accesses only from the registered users.
    But it's not working!
    What exactly shall i do in order to make that work??
    Thanks, in advance!

    g_p_java wrote:
    Thanks for the link! As i understood i don't have to place my web pages under WEB-INF (only the web.xml which is already there).
    *1)* So i have to follow the steps that are being mentioned there for all the users right??
    Registered , Not Registered and admin.
    Yes, security constraining through web.xml is a url pattern based protection for your resources. You could create multiple urls - /secured/* and map them to your resources accessible to registered users only or you may have /admin/* and define that only 'admin' roles have access to these resources. Some portions of such setup would be server specific (eg: how you create users and map them to roles)
    *2)* I would like to make a question: Who is the "FrontController" in the link you posted me? [http://onjava.com/onjava/2001/08/06/webform.html]
    It's the Container. Because such features are mandated by the spec, the container provides an implementation and options to customize the implementation (for example in weblogic, you can specify that your users are bound to an LDAP or configured in a Users table in the db)
    Nevertheless, you would have your own Controllers for your application management (Struts or Spring or whatever suits your need). On the same note, you should have your own Filters to implement whatever common logic you have across your application.
    Madathil_Prasad wrote:
    2. Write a filter that checks for the presence of a session (and entitlements possibly) before allowing access to a resource.
    *3)* when you write "_entitlements_" what exactly do you mean??
    Thanks!
    This is the other road I was talking about. You could throw all configuration and j2ee based security configuration out of the window (they do have their limitations) and implement custom security logic in a Filter. For example,
    String urlPattern = request.getRequestURI();
    if(urlPattern.indexOf("/secured") != null{
             if(request.getSession(false) == null){
                   //redirect to login page.
             }else{
                  //valid session
                  //now check specific entitlement to see whether user has access
    }Here entitlement refers to permissions at a granular level (authorization if you wish to call it). For example, you have 2 kinds of admin users - some who can generate reports of web activity and another who can change application settings.
    ram.

  • [weblogic 8.1-sp4] taglibs not allowed any other place then under WEB-INF?

    i pack my application as EAR with several skinny WARs + JAR libs under "lib" directory of EAR (and ofc WARs have their manifest adjusted to point to those). standard.jar is also there, no web.xml definition of the taglibs.
    when i deploy the EAR, any of the JSPs throw famous IOException: "cannot resolve 'http://java.sun.com/jstl/core' into a valid tag library".
    i dug a bit and saw people mention that TLDs are scanned for only when they are placed under WEB-INF of a WAR (hence you suck when your TLDs are somewhere else like "/lib" in my case) and classpath has nothing to do with that. is it true and what can be done to avoid it?
    ps.
    to clarify: servlets 2.3; jstl 1.0; jsp 1.2
    Edited by: [email protected] on Dec 8, 2008 6:33 PM

    well placing 10 taglib definitions in each web.xml is imho a bad idea. as there's no real way to exclude all but certain JARs from a WAR using maven (the ideal solution i'd prefer), the solution i had to choose was to set maven-dependency-plugin up the way it would extract the TLDs from certain JARs and place it anywhere under WEB-INF of the WAR when it's assembled. the cons is that TLDs are duplicated, but on the other hand the configuration for that is minimal (which also seems important to me).

  • JAR files under WEB-INF but not in lib directory

    I am working with JDeveloper 10g and I have several jar files under WEB-INF/lib and other under WEB-INF/libEst.
    I have add this libraries to Project properties > Paths and it works fine when I run my aplication in local environment, but it fails when I deploy and run in the server.
    I have configured our deploy file to include these WEB-INF/libEst jar files, but when I deploy to our server, it seems to be that this classes included in these jar files are not reachable and they cannot be loaded and throw a ClassNotFoundException.
    Is it possible to have jar files under any WEB-INF subdirectory distinct of /lib?
    Why is it working in local but not in server?
    If someone can help me to configure this in order to deploy in server, I will be very grateful.
    Thanks a lot,
    Antonio.

    Hi Antonio,
    I think this document is what you are looking for: http://www.oracle.com/technology/tech/java/oc4j/htdocs/how-to-servlet-warmanifest.html
    .. your manifest entries would look like
    Class-Path: WEB-INF/libExt/<jarName1>.jar, WEB-INF/libExt/<jarName2>.jar, ...
    Let me know if this works for you.
    thanks,
    Harsha

Maybe you are looking for

  • Can't create a profile or find newtwork

    I have a WRT300N and a WMP300N card with 3 computers in my house. My bro's computer is wired. My sisters has one WMP300N card and works fine. My Computer was working fine I used it this morning then I lost my connection and my linksys wireless networ

  • Getting the name of the varray

    Getting the original name of the Varray: 9.2.0.6 I have a simple procedure which does work but I would like to tighten it up. procedure printVarray(u IN numUsed, varrayName IN VARCHAR2 DEFAULT NULL) is begin IF varrayName IS NOT NULL THEN      dbms_o

  • Recording LPs with smart recorder and sound quality off.....

    Hi, I have X-Fi Extreme music card on my PC and trying to record some LPs with SmartRecorder. These are classical LPs and I find that when played back, the orchestra (violins, choir, etc) sound like this was recorded in a tin can. Any ideas why this

  • Recovery disk killing CPU?

    Hello. I have a HP ENVY 17-j130ea. When I first got it, the first thing I done was create recovery disks for it to put in the box so if I need to recover it, I had the discs to do so. Anyway, before completely setting it up I decided to run the recov

  • Webutil in forms(10.1.2.1)

    is how I can sign both the jar with the same digital certificate