When to use WEB-INF?

Hello,
I am seeing some projects I workd on the past, and I noticed that I used to put all my pages inside the WEB-INF folder, and then an index.jsp page outside it, just to redirect to a page inside that WEB-INF file.
Now the WEB-INF folder is there so that pages can not be directly accessed from the outside. Am I right? So am I also to right if I say that it is also incorect to put all files inside the WEB-INF?
I tought that in the WEB-INF folder only pages like something that can only be accessed if loged in or something like that! is that right?
thanks and regards,
sim085

Just one last question to make sure I get this right.
Any content which should not be protected then
n should NOT be in the WEB-INF, and if it needs to be
protected, (for example only internal users shold
access it) then it should be there. (Real Life
Example)This forum is not in the WEB-INF since I can
access it directly and read posts without having to
be loged in.Well, yes and no. If you are directly accessing something, like web pages or JSPs maybe, you cannot have them in WEB-INF. The posts are not something which are directly accessible, the page for posts is. The data comes through a few layers from some data store, which is render onto a page which is accessible to the user logged in [that could be implemented through some conditional checking as well, it need not be essentially protected by placing it in WEB-INF]. Some frameworks liek Tapestry [which I am presently working with] places even the HTML files under WEB-INF because it parses and generates all the content, unlike what a JSP engine does.
I hope I did not confuse you in the process. ;)

Similar Messages

  • How to setup using WEB-INF/lib in weblogic 10.3.1

    Hello everybody:
    I check weblogic 10.3.1 in %WLS_PAHT%/modules find com.bea.core.apache.commons.lang_2.1.0.jar.
    But I want using org.apache.commons.lang.time.DateUtils.addDays(java.util.Date date, int amount).
    In server version,no this method
    So I download commons-lang 2.4 from apache,and put it in WEB-INF/lib.
    and I aslo setting this :
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-application xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.0/weblogic-application.xsd">
    <!--weblogic-version:10.3.1-->
    <wls:application-param>
    <wls:param-name>webapp.encoding.default</wls:param-name>
    <wls:param-value>UTF-8</wls:param-value>
    </wls:application-param>
    <wls:prefer-application-packages>
    <wls:package-name>org.apache.commons.lang.time.*</wls:package-name>
    </wls:prefer-application-packages>
    </wls:weblogic-application>
    but when I run
    <body>
    <%=DateFormatUtils.format(DateUtils.addDays(new Date(),2),"yyyyMMdd HHmm")%>
    </body>
    this result :
    The method addDays(Date, int) is undefined for the type DateUtils
    <%=DateFormatUtils.format(DateUtils.addDays(new Date(),2),"yyyyMMdd HHmm")%>
    ^----^
         at weblogic.servlet.jsp.JavelinxJSPStub.reportCompilationErrorIfNeccessary(JavelinxJSPStub.java:221)
         at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:157)
         at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:246)
         at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:191)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
         Truncated. see log file for complete stacktrace
    >
    anyboby can tell me,how to setting this.

    Try to set &lt;prefer-web-inf-classes>true&lt;/prefer-web-inf-classes>
    --olaf
    Edited by: Olaf Heimburger on Oct 30, 2009 6:06 PM

  • Bug using WEB-INF/lib Jar archives

    Hi, I am running iPlanet 6.0Sp3 on Windows 2000. I deployed our Web
    application in the form of a War file and it is now under the APPS/modules
    directory as the following directory: APPS/modules/ourapp.
    When I start the iPlanet Application Server, it fails to find any of the
    classes in the Jar files in APPS/modules/ourapp/WEB-INF/lib/. Is this a bug?
    One workaround is to unjar all of these files, but this is counter to the
    J2EE spec. Another workaround is to modify the classpath in the iPlanet
    registry, but this would expose the classes to other Web applications
    running in the same server.
    Thanks for any help. Martin

    Hi Martin,
    I think you are packinh up the jar file inside the war module, as far as i know
    there should be no jar file inside the module/App-name dir tree.
    all the modules either war or jar should be in <GX_ROOT_DIR>/JAR dir.
    So try making the war module with class files only(static content can also be
    added) with appropriate deployment descriptor.
    I will mail you separately the procedure for creating a war file from deployment
    tool gui.
    Please mail me back if you have any other problems.
    Sanjeev.
    Developer Support Group iAS.
    Martin Gilchrist wrote:
    Hi, I am running iPlanet 6.0Sp3 on Windows 2000. I deployed our Web
    application in the form of a War file and it is now under the APPS/modules
    directory as the following directory: APPS/modules/ourapp.
    When I start the iPlanet Application Server, it fails to find any of the
    classes in the Jar files in APPS/modules/ourapp/WEB-INF/lib/. Is this a bug?
    One workaround is to unjar all of these files, but this is counter to the
    J2EE spec. Another workaround is to modify the classpath in the iPlanet
    registry, but this would expose the classes to other Web applications
    running in the same server.
    Thanks for any help. Martin

  • When to use 'Web dynpro ABAP' and when to go for 'Web Dynpro Java'

    Hi,
    I am trying to learn 'Web dynpro ABAP' from tutorials available on SDN as i am presently working in ABAP. I am also Java learned.
    Please tell me the selection criteria for using Web Dynpro component / application using ABAP or JAVA.
    Regards,
    Tanaya

    Hi,
    Go through this
    Web Dynpro: ABAP or Java?
    WebDynpro for ABAP Vs Java
    Re: Javascript future in Webdynpro (JAVA and ABAP)
    Javascript future in Webdynpro (JAVA and ABAP)
    PradeeP

  • Can we have . inbetween the file name when we use WEB.SHOW_DOCUM

    i am using froms 10 g
    i have 2 buttons .on clicking those buttons i have to open a csv files.
    for that i have used WEB.SHOW_DOCUMENT in button Pressed.
    the name of the csv files is as follows
    1. ICCM_PAK_MLP_IN1CE_15092006_ReceptionSDB.csv
    2. ICCM_PAK_MLP.tar.gz_ReceptionSDB.csv
    the 1 st button will open the first file and the second will open the second .csv file
    On pressing the button 1 it opens the first csv file ICCM_PAK_MLP_IN1CE_15092006_ReceptionSDB.csv
    correctly.
    but the problem is ,On pressing the button 2 is not opening the file whereas it pop ups a window asking do you want to extract the zip file if i say yes it is not doing anything.
    i think the problem is with the csv file name
    ICCM_PAK_MLP.tar.gz_ReceptionSDB.csv
    can we have . inbetween the file name i thk it is considering the .tar which is inbetween the file name as file type
    anyone please advise

    "can we have . inbetween the file name i thk it is considering the .tar which is inbetween the file name as file type"
    I believe you found the answer to your question. Why not try removing the . in the filename? It would be faster than asking.
    :)

  • When to use WEb Dynpro application and Portal application in NW dev studio

    I would like to know what is the difference between
    webdynpro application  and EP Application using PDK.
    Are they comaparable  ...Which one has an edge over the other specific to any applications.
    I want develop an application related to e-commerce using the SAP R3 as backend for an industiry(where in a registered user can place an order and query on the staus of order. All the data will be stored in R3 ).
    I am planning to dev this using NW dev studio , but have an appehension about which application is useful for this kind of application either webdynpro or EP application .
    can anybody explain which one has edge over the other ( Webdynpro or EP applcations in context with NW Dev studio) and why.
    thanks
    PK

    Hi,
    <b>Webdynpro</b> is used when requirements ask for a prototype using minimal time n effort.
    Highly skilled programmers are not necessary to write a webdynpro application
    It uses dynamic controls without reloading the page.
    <b>Portal components</b> esp Abstract portal component provides a lean method to write HTML command to web client
    Large interactive components requires more programming.
    <b>WebDynpro</b> is a highly declarative, tool-based programming model. It minimizes platform-dependent "plumbing" code for building UIs and maximizes declarative metadata describing huge portions of a typical application in a platform-independent way.
    Web Dynpro follows a "top-down" approach in order to consistently support multiple runtime platforms.
    In Web Dynpro you just have to drag & drop the UI components.
    <b>Portal components</b> has followed a "bottom-up", programming-driven approach to Web development.
    Regards,
    Pooja.

  • Unsecure when "Open" using web-mail

    I'm using Ironport C350 with Ironport Mail Encryption server...
    When a user receives a secure email using something like Yahoo! Mail on-line (mail.yahoo.com), then selects the option to "Open" the html attachment, it opens unsecure and is temp'd at the mail host, not the users PC and it's not using SSL.
    Not sure where I've gone wrong.

    The content of the message should be encrypted throughout the whole process until the user supplies their password and clicks on open. When they click on Open, the information is sent via https (port 443) to the secure https://res.cisco.com. Below is the url that it's using. The decrypting process occurs over the secure https port and then once it's decrypted, it gets displayed in the users browser.
    https://res.cisco.com/websafe/custom.action?cmd=authFrame
    I'm using Ironport C350 with Ironport Mail Encryption server...
    When a user receives a secure email using something like Yahoo! Mail on-line (mail.yahoo.com), then selects the option to "Open" the html attachment, it opens unsecure and is temp'd at the mail host, not the users PC and it's not using SSL.
    Not sure where I've gone wrong.

  • Cant get email but can when I use web mail and then sync

    I casn send but cannot receive mail on my mac. However if I go to webmail with my ISP and then sync i can receive mail. What could cause this?

    Check your incoming server entries. Your outgoing server seems to be working.

  • Error opening report using WEB.SHOW_DOCUMENT

    Hi
    I have a report in pdf format that opens ok by itself. When I use WEB.SHOW_DOCUMENT in the when_mouse_click trigger on the item in the form the report doesnt display. Only an IE window with "The page cannot be displayed" message.
    Here is the trigger code:
    Web.show_document(http://nbotlaguduru.dms.local/export/||FMSLaborChargesalcs20060829132645.pdf)
    where FMSLaborChargesalcs20060829132645.pdf is the name of the report I am trying to open.
    Here is the URL that appears in the second window that opens:
    http://nbotlaguduru.dms.local/export/FMSLaborChargesalcs20060829132645.pdf
    this url generates the error message "The page cannot be displayed"
    I am using Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Report Builder 10.1.2.0.2
    ORACLE Server Release 10.1.0.4.2
    and I running the forms and reports server on my local machine.
    Any help would be greatly appreciated. Thanks

    Thanks for answering,
    I changed the URL from
    http://nbotlaguduru.dms.local/export/FMSLaborChargesalcs20060829132645.pdf
    to
    http://nbotlaguduru.dms.local:8889/export/FMSLaborChargesalcs20060829132645.pdf
    and the same problem occured
    the file is located on my local C drive in:
    C:\lcs\export
    seems as though I am missing something else as well
    any ideas?

  • Always lower case web-inf when WARing

    The strangest thing happens when I try to create a WAR for
    deployment. First let me start off by saying I have never had to
    deploy on a windows box before and I am wondering if this is a
    Windows (2K) problem. I am trying to use "jar cvf app.war ." from the
    staging root dir to create the WAR file. The directory structure
    inside the WAR is great except for any files directly under the WEB-INF
    directory. Here is an example of the contents (when viewed with
    WinZip):
    web-inf\web.xml
    WEB-INF\lib\struts.jar
    WEB-INF\jsp\main\abc.jsp
    WEB-INF\classes\abc\def\xyz.class
    Notice that the web.xml file is in 'web-inf' instead of 'WEB-INF'.
    To determine if it had to do with web.xml being an XML file extension
    (or something, I am grasping for straws at why this is happening) I
    added a file named test.txt to WEB-INF directory and it shows up as:
    web-inf\test.txt
    so it tells me that any file directly under the WEB-INF dir is the only
    case where 'web-inf' is reported as it's directory. When the WAR is
    created it actaully prints:
    adding: WEB-INF/web.xml(in = 4131) (out= 992)(deflated 75%)
    which appears as it is added as 'WEB-INF' and not 'web-inf'.
    This, I believe, is what is stopping my deployment from working
    with JRun. JRun works fine for me when deploying flat.
    TIA!

    To update this...
    This is actually not a real problem. I created the WAR file using
    everything from deploytool to the jar executable to Ant but the problem
    was that I was using WinZip everytime to view the contents. It was
    just a WinZip setting combined with a JRun specific deploy problem
    (but the WinZip thing threw me off from finding that out right away).
    I just needed to move on to something else and come back to it to
    finally figure that out. :(

  • Unable to delete WEB-INF\\lib\*.jar using ant

    Using ant to build struts.
    This is part of the build.xml for struts-example.war
    <property name="deploy.dir" value="${tomcat.home}/webapps"/>
    <target name="cleanWebApp">
    <delete file="${deploy.dir}/${war.file.name}" />
    <delete dir="${deploy.dir}/${war.file}" includeEmptyDirs="true" />
    </target>
    But when I try to build and reload it to tomcat, it gives me errors:
    cleanWebApp:
    [delete] Deleting: D:\jakarta-tomcat-5.5.7\webapps\struts-example.war
    [delete] Deleting directory D:\jakarta-tomcat-5.5.7\webapps\struts-example
    BUILD FAILED
    D:Java\code\struts\strutsexamples\build.xml:46: Unable to delete file D:\jakarta-tomcat-5.5.7\webapps\struts-example\WEB-INF\lib\commons-digester.jar
    Also lib\struts.jar(maybe more) can't be deleted.
    Now I have to stop tomcat, delete it manually, and reinstall the war.
    How can I fix this problem?

    All the advice above seems to make sense, but .....
    - Tomcat shutdown,
    - with all java processes shutdown,
    - after a full reboot,
    - with antiJARLocking="true" set in every context.xml I can find:
    [delete] Deleting directory C:\Program Files\Apache Software
    Foundation\Tomcat 5.5\webapps\myApp
    BUILD FAILED
    C:\myApp\build.xml:118: Unable to delete file C:\Program Files\Apache
    Software Foundation\Tomcat 5.5\webapps\myApp\WEB-INF\lib\antlr.jar
    But I CAN delete the jars using the normal Windows Explorer or from the DOS Command Prompt.
    And per the advice found here:
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=67&t=000574
    I've downloaded the Process Explorer from www.sysinternals.com and no windows processes appear to have a handle on there directory.
    I think the solution is indeed to exclude jar files from <delete> target.
    Regards,
    Stewart

  • Why native code outside the VM when I use JNI in web application?

    I have a web application by using JBOSS as the server in windows XP environment. I need to call native functions in my servletAction class to check some information. After I start JBOSS and WebServer(tomcat), it works well when I launch the web page to call that native funtions in the first a few times, but after a while when I reopen that page in IE to call native funtions it throws me an unexpected error and shut down the jboss automatically. Could know how to solve it? Thank you guys in advance!
    Error message:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x63BA7AD
    Function=[Unknown.]
    Library=C:\WINDOWS\system32\HaspKeyDAO.dll
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
         at Key.readBlock(Native Method)     
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
         at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:283)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
         at org.jboss.ejb.Container.invoke(Container.java:854)
         at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:775)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382)
         at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:534)
    Dynamic libraries:
    0x00400000 - 0x0040B000      C:\j2sdk1.4.2_06\bin\java.exe
    0x7C900000 - 0x7C9B0000      C:\WINDOWS\system32\ntdll.dll
    0x7C800000 - 0x7C8F4000      C:\WINDOWS\system32\kernel32.dll
    0x77DD0000 - 0x77E6B000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77E70000 - 0x77F01000      C:\WINDOWS\system32\RPCRT4.dll
    0x77C10000 - 0x77C68000      C:\WINDOWS\system32\MSVCRT.dll
    0x08000000 - 0x08139000      C:\j2sdk1.4.2_06\jre\bin\client\jvm.dll
    0x77D40000 - 0x77DD0000      C:\WINDOWS\system32\USER32.dll
    0x77F10000 - 0x77F56000      C:\WINDOWS\system32\GDI32.dll
    0x76B40000 - 0x76B6D000      C:\WINDOWS\system32\WINMM.dll
    0x10000000 - 0x10007000      C:\j2sdk1.4.2_06\jre\bin\hpi.dll
    0x00390000 - 0x0039E000      C:\j2sdk1.4.2_06\jre\bin\verify.dll
    0x003B0000 - 0x003C9000      C:\j2sdk1.4.2_06\jre\bin\java.dll
    0x003D0000 - 0x003DD000      C:\j2sdk1.4.2_06\jre\bin\zip.dll
    0x003E0000 - 0x003EF000      C:\j2sdk1.4.2_06\jre\bin\net.dll
    0x71AB0000 - 0x71AC7000      C:\WINDOWS\system32\WS2_32.dll
    0x71AA0000 - 0x71AA8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71A50000 - 0x71A8F000      C:\WINDOWS\System32\mswsock.dll
    0x76F20000 - 0x76F47000      C:\WINDOWS\system32\DNSAPI.dll
    0x76FB0000 - 0x76FB8000      C:\WINDOWS\System32\winrnr.dll
    0x76F60000 - 0x76F8C000      C:\WINDOWS\system32\WLDAP32.dll
    0x03070000 - 0x030AC000      C:\Program Files\NewDotNet\newdotnet6_38.dll
    0x774E0000 - 0x7761D000      C:\WINDOWS\system32\ole32.dll
    0x77120000 - 0x771AC000      C:\WINDOWS\system32\OLEAUT32.dll
    0x77260000 - 0x772FE000      C:\WINDOWS\system32\urlmon.dll
    0x77F60000 - 0x77FD6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x77C00000 - 0x77C08000      C:\WINDOWS\system32\VERSION.dll
    0x771B0000 - 0x77256000      C:\WINDOWS\system32\WININET.dll
    0x77A80000 - 0x77B14000      C:\WINDOWS\system32\CRYPT32.dll
    0x77B20000 - 0x77B32000      C:\WINDOWS\system32\MSASN1.dll
    0x77920000 - 0x77A13000      C:\WINDOWS\system32\SETUPAPI.dll
    0x71B20000 - 0x71B32000      C:\WINDOWS\system32\MPR.dll
    0x76C30000 - 0x76C5E000      C:\WINDOWS\system32\WINTRUST.dll
    0x76C90000 - 0x76CB8000      C:\WINDOWS\system32\IMAGEHLP.dll
    0x7C9C0000 - 0x7D1D4000      C:\WINDOWS\system32\SHELL32.dll
    0x773D0000 - 0x774D2000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x5D090000 - 0x5D127000      C:\WINDOWS\system32\comctl32.dll
    0x76FC0000 - 0x76FC6000      C:\WINDOWS\system32\rasadhlp.dll
    0x662B0000 - 0x66308000      C:\WINDOWS\system32\hnetcfg.dll
    0x71A90000 - 0x71A98000      C:\WINDOWS\System32\wshtcpip.dll
    0x042C0000 - 0x042C6000      C:\j2sdk1.4.2_06\jre\bin\ioser12.dll
    0x04410000 - 0x04418000      C:\j2sdk1.4.2_06\jre\bin\nio.dll
    0x046A0000 - 0x046A5000      C:\j2sdk1.4.2_06\jre\bin\rmi.dll
    0x047F0000 - 0x0490E000      C:\jboss-4.0.0-winsort\server\default\tmp\native\SharedLib\HaspKeyDAO.dll
    0x04A20000 - 0x04A73000      C:\jboss-4.0.0-winsort\server\default\tmp\native\msc\dll\haspms32.dll
    0x06390000 - 0x064AE000      C:\WINDOWS\system32\HaspKeyDAO.dll
    0x76F50000 - 0x76F58000      C:\WINDOWS\system32\wtsapi32.dll
    0x76360000 - 0x76370000      C:\WINDOWS\system32\WINSTA.dll
    0x5B860000 - 0x5B8B4000      C:\WINDOWS\system32\NETAPI32.dll
    0x59A60000 - 0x59B01000      C:\WINDOWS\system32\DBGHELP.dll
    0x76BF0000 - 0x76BFB000      C:\WINDOWS\system32\PSAPI.DLL
    Heap at VM Abort:
    Heap
    def new generation total 9216K, used 2204K [0x10010000, 0x10a00000, 0x12770000)
    eden space 8256K, 26% used [0x10010000, 0x102370e8, 0x10820000)
    from space 960K, 0% used [0x10820000, 0x10820000, 0x10910000)
    to space 960K, 0% used [0x10910000, 0x10910000, 0x10a00000)
    tenured generation total 121024K, used 39043K [0x12770000, 0x19da0000, 0x30010000)
    the space 121024K, 32% used [0x12770000, 0x14d90ec8, 0x14d91000, 0x19da0000)
    compacting perm gen total 23808K, used 23618K [0x30010000, 0x31750000, 0x34010000)
    the space 23808K, 99% used [0x30010000, 0x31720888, 0x31720a00, 0x31750000)
    Local Time = Thu May 26 11:34:39 2005
    Elapsed Time = 3209
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode)
    Following is what I am doing:
    I have a key.java file with several native functions.
    In key.cpp I defined the implementation of above functions then created dynamic link library file key.dll. I put the key.dll to WEB-INF/lib/key.dll.
    Then in a servlet Action class, I called new key().keyPresent and new key().readBlock(0, 8, block, p1,p1).
    Public class Key{
    public native int keyPresent(int password1, int password2);
    public native void readBlock(int startMemoryLocation, int size,
    byte[] block, int password1, int password2);
    static {
    System.loadLibrary("Key");
    //A Singleton Class
    private static Key key;
    private Key()
    public static Key getSingletonObject()
    if ( key== null)
    key = new Key();          
    return key;
    public Object clone()
         throws CloneNotSupportedException
    throw new CloneNotSupportedException();
    Key.cpp:
    #include <jni.h>
    #include "Key.h"
    #include <stdio.h>
    #include "hasp.h"
    #include <memory.h>
    JNIEXPORT jint JNICALL Java_Key_keyPresent
    (JNIEnv *env, jobject obj, jint pass1, jint pass2)
         try{
              int keyPresent = 0;
              int p1, p2, p3, p4;
              int seed = 100;
              int port = 0;
              p1 = p2 = p3 = p4 = 0;
              hasp(LOCALHASP_ISHASP, seed, port, 0, 0, &p1, &p2, &p3, &p4);
              if (p1 == 0) {
                   printf("\nNo Hasp exists. Program aborted.\n");
                   return -1;
              if (p3 == HASPERR_VERSION_MISMATCH) {
              printf("Old driver found - please update driver to actual version.\n");
              return 2;
              hasp(LOCALHASP_HASPSTATUS, seed, port, pass1, pass2, &p1, &p2, &p3, &p4);
              if (p3 == 0) {
                   return 4;
              hasp(LOCALHASP_HASPGENERATION, seed, port, pass1, pass2, &p1, &p2, &p3, &p4);
              if (p3) {
                   printf("Failed: haspKey password is not correct!");
                   return 4;
              } else {
                   switch (p1) {
                   case 0:
                   keyPresent = 3;
                                  break;
                   case 1:
                        keyPresent =1;
                        break;
              return keyPresent;
         }catch(...){
              return -999;
    * READBLOCK
    * reads a block of data from the HASP memory
    JNIEXPORT void JNICALL Java_Key_readBlock
    (JNIEnv *env, jobject obj, jint startMemoryLocation, jint nSize, jbyteArray pBlock, jint pass1, jint pass2)
         try{
              int     p1, p2, p3, p4;
              p1 = (startMemoryLocation+1)/2;
              p2 = nSize >> 1;
              jbyte *javablob = env->GetByteArrayElements(pBlock, 0);
              memset(javablob, 0, nSize);
              p4 = (int)javablob;
              int seed = 100;
              int port = 102;
              hasp(MEMOHASP_READBLOCK, seed, port, pass1, pass2, &p1, &p2, &p3, &p4);
              env->ReleaseByteArrayElements(pBlock, javablob, 0);
              if (p3) {
                   printf("Failed. Error number: %d.\n", p3);
              } else {
         }catch(...){
              printf("readBlock function failed");
    }

    the error happens in your native-code which runs outside the VM of course, since its native.
    You access some memory where you don't have rights to do so, in a normal win32-app you would get the "application crashed at 0xdeadbeef"-window, and since java cannon guarantee that your code did not destroy something it shuts down.
    I would try to debug my code withought java in a C++ IDE/Debugger.
    good luck, lg Clemens

  • Screen light auto turn dark when I use program/web with background dark in windows 8.1

    Hi there,
    I used HP Pavilion dv6t-6000 CTO Quad for 3 years.
    CPU: Intel core i7-2630QM
    GPU: AMD Radeon 6490m
    It build in windows 7 and I manual install ( fresh install ) windows 8. It's fine. But when I upgrade to windows 8.1, it have an issue and I really hate it.
    When I use "Sublime Text" ( with background is black ), the screen light is become darker. And when I back to ( e.g: a website with background is white ), the screen turn back to lighter.
    I tried many ways, included 4 ways here but it's NOT WORK. 
    NOTE: When I used Option 1 ( upper )
    1. Open PC settings, and click/tap on PC and devices on the left side
    2. Click/tap on Power and sleep on the left side, and turn on or off Adjust my screen brightness automatically on the right side under Brightness.
    ==> It's NOT SHOW button "Adjust my screen brightness automatically". It mean: I have NO built in auto brightness sensor.
    I think this issue is about AMD driver or Intel Graphic driver.
    Is anybody have idea???

    Hi @kolz,
    Welcome to the HP Forums!
    It is a wonderful  place to find answers and solutions!
    For you to have the best experience in the HP forum I would like to direct your attention to the HP Forums Guide Learn How to Post and More
    i grasp that after updating your system from Windows 8 to 8.1 you are having an issue with the display going dim.
    You have tried some steps you located on the web but there was no change.
    Windows 8 an 8.1 are not supported Operating Systems for your notebook.  This does not mean they will not work only that HP has not tested it and therefore does not supply updated drivers.  You would need to check the manufacturer's site for any updated drivers.
    Downloading or Updating Software and Drivers for HP Computers
    When I checked the driver page for your notebook I did notice there is a  bios update, have you done that?
    HP Pavilion dv6t-6000 CTO Quad Edition Entertainment Drivers and Software
    As a bios update does have a potential to cause damage I suggest contacting HP support for assistance with that process.
    Updating the BIOS
    Please call our technical support at 800 474 6836. If you live outside the US/Canada Region, please click the link below to get a support number for your region.
    World Wide Phone Support
    Good Luck!
    Here is a link to Troubleshooting a dim display (Windows 8, Windows 7 and Windows Vista)
    Sparkles1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!

  • Problem when using WEB.SHOW_DOCUMENT and passing in lexical parameter

    Hi,
    I got a blank page with error "An error has occured while trying to use this document" when I tried to use web.show_document and passing a lexical parameter to 10g report on 10gAS. The URL in the web.show_document is:
    http://<srvname>:<portnum>/reports/rwservlet?server=repserver90&report=myrpt.rdf&destype=Cache&desformat=pdf&userid=<usr>/<pw>@<db>&where_clause=where%20product_type%20in%20('REPORT')
    If I change the desformat to htmlcss, it is fine to display the report. But doesn't work with desformat=pdf. The pdf file has been generated in the cache. Why can't it display on the screen.
    Also I tried to use double quote the value for where_clause. The pdf report showed up. But it ignored the where clause.
    Experts please help.
    Ying

    I use lexical parameters and they work fine, but I use a parameter list. The code is contained in a form that is called by all forms that wish to run a report. This way you only need the logic for printing in a single form. If you want the form, email me at [email protected]

  • When to use Java Web Service from WSDL, Webservice proxy, Web Service DataControl -- JDeveloper 11.1.1.7

    Hi Experts!
    I am having confusion among these 3 services provided in Oracle ADF. When to use and what service needs to be used?
    Once we generate Webservice WSDL. With the WSDL we have 3  options in Jdeveloper to invoke this service.
    1. Java Web Service From WSDL.
    2. Web Service proxy,
    3. Web Service Data Control.
    Can anyone give us some brief description of these 3 services when do we need to use and which service is to be used for which scenario ?
    Please give me your valuable inputs.
    Thanks & Regards,
    Guravaiah Tata.

    Hi,
    Can you share your WSDL.
    You can send it to me at [email protected]
    -Vishal

Maybe you are looking for