Error of xml doctype in web.xml
which version of doctype to be included for weblogic8.1
The following is the error that I get while starting my weblogic i.e. startWebLogic.sh
<Feb 25, 2006 6:34:44 PM IST> <Warning> <Management> <BEA-149317> <Application SmartRefinance is configured with a deprecated deploy
ment protocol and will be deployed as such.>
Unexpected Signal : 11 occurred at PC=0xFE09FED0
Function=[Unknown. Nearest: JVM_Close+0x48674]
Library=/dre2.ind/users/custody/jdk142_08/jre/lib/sparc/client/libjvm.so
Current Java thread:
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
- locked <0xb85d3270> (a sun.misc.Launcher$AppClassLoader)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
- locked <0xb85d3270> (a sun.misc.Launcher$AppClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
- locked <0xb8e892e8> (a weblogic.utils.classloaders.GenericClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
- locked <0xb1446ed0> (a weblogic.utils.classloaders.GenericClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
- locked <0xb162e050> (a weblogic.utils.classloaders.ChangeAwareClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:41)
- locked <0xb162e050> (a weblogic.utils.classloaders.ChangeAwareClassLoader)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:875)
- locked <0xb1654938> (a weblogic.servlet.internal.ServletStubImpl)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3430)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3387)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3373)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3356)
- locked <0xb146a500> (a weblogic.servlet.internal.WebAppServletContext)
at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:727)
at weblogic.servlet.internal.WebService.preloadResources(WebService.java:486)
at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:136)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:965)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:360)
at weblogic.Server.main(Server.java:32)
Dynamic libraries:
0x10000 /dre2.ind/users/custody/jdk142_08/bin/java
0xff350000 /usr/lib/libthread.so.1
0xff340000 /usr/lib/libdl.so.1
0xff200000 /usr/lib/libc.so.1
0xff390000 /usr/platform/SUNW,Sun-Fire-V890/lib/libc_psr.so.1
0xfe000000 /dre2.ind/users/custody/jdk142_08/jre/lib/sparc/client/libjvm.so
0xff2d0000 /usr/lib/libCrun.so.1
0xff1d0000 /usr/lib/libsocket.so.1
0xff100000 /usr/lib/libnsl.so.1
0xff0b0000 /usr/lib/libm.so.1
0xff090000 /usr/lib/libsched.so.1
0xff070000 /usr/lib/libmp.so.2
0xff040000 /dre2.ind/users/custody/jdk142_08/jre/lib/sparc/native_threads/libhpi.so
0xfe7d0000 /dre2.ind/users/custody/jdk142_08/jre/lib/sparc/libverify.so
0xfe790000 /dre2.ind/users/custody/jdk142_08/jre/lib/sparc/libjava.so
0xfe770000 /dre2.ind/users/custody/jdk142_08/jre/lib/sparc/libzip.so
0xf97d0000 /dre2.ind/users/custody/jdk142_08/jre/lib/sparc/libnet.so
0xf9690000 /dre2.ind/users/custody/weblogic81/server/lib/solaris/libweblogicunix1.so
0xf95e0000 /dre2.ind/users/custody/jdk142_08/jre/lib/sparc/libnio.so
0xf95c0000 /usr/lib/librt.so.1
0xf95a0000 /usr/lib/libaio.so.1
0xf94e0000 /usr/lib/libsendfile.so.1
0xf94c0000 /dre2.ind/users/custody/jdk142_08/jre/lib/sparc/libioser12.so
Heap at VM Abort:
Heap
def new generation total 113088K, used 5475K [0xb1400000, 0xb85c0000, 0xb85c0000)
eden space 109696K, 4% used [0xb1400000, 0xb1958e88, 0xb7f20000)
from space 3392K, 0% used [0xb7f20000, 0xb7f20000, 0xb8270000)
to space 3392K, 0% used [0xb8270000, 0xb8270000, 0xb85c0000)
tenured generation total 932096K, used 16719K [0xb85c0000, 0xf1400000, 0xf1400000)
the space 932096K, 1% used [0xb85c0000, 0xb9613cc8, 0xb9613e00, 0xf1400000)
compacting perm gen total 21504K, used 21331K [0xf1400000, 0xf2900000, 0xf9400000)
the space 21504K, 99% used [0xf1400000, 0xf28d4c18, 0xf28d4e00, 0xf2900000)
Local Time = Sat Feb 25 13:04:54 2006
Elapsed Time = 24
# HotSpot Virtual Machine Error : 11
# Error ID : 4F530E43505002EF 01
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
# Java VM: Java HotSpot(TM) Client VM (1.4.2_08-b03 mixed mode)
# An error report file has been saved as hs_err_pid6800.log.
# Please refer to the file for further information.
and it hangs over here.
Please show the file
helloworldtags.tld
Similar Messages
-
Include another xml file in web.xml
I was able to use XML Entity to include another xml file in web.xml for older servlet specifications, i.e.:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" [
<!ENTITY my-web SYSTEM "my-web.xml">
]>
<web-app>
&my-web;
</web-app>This allows me to share my-web.xml among various web applications.
How do I achieve the same thing for servlet specification 2.5, which does not have a DTD but rather an XSD?
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">I am using Glassfish V2UR1. I know about $domain-dir/config/default-web.xml, but for reasons I won't get into I cannot put things in there.Hi Maksim. I understood that. It's just that I would prefer some method that doesn't require the developers to do something like extracting a file from the EAR file, changing the file and then putting it back in. As you probably know, some developers could handle it and some will most certainly make mistakes.
When they do they come to my group and say "my app doesn't work" and then we have to spend time figuring out why.
Plus, once the developers get used to doing things the automated way they're going to have a hard time remembering to do a manual step each time they do a build.
I have heard that there may be some way to do something similar to this on Visual Administrator. I'm going to investigate that too.
Thanks!
David. -
JDev 10.1.3 compile error in servlet 2.4 web.xml
I built a Servlet 2.4/JSP 2.0 application in JDev 10.1.3. When I try to make/compile/deploy it the compiler gives me errors like the following for every JSP file that has a JSTL 1.1 taglib:
Error(2,9): Element "web-app' used but not declared
Error(2,63): Attribute 'xmlns:xsi' used but not declared
Error(3,103): Attribute 'xsi:schemaLocation' used but not declared
Error(4,16): Attribute 'version' used but not declared
Error(4,56): Attribute 'xmlns' used but not declared
Error(4,57): Can not build schema 'http://java.sun.com/xml/ns/j2ee' located at 'http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd'
Error(5,15): Element 'description used but not declared
It is obviously havng problems with the web.xml file (which is in the servlet 2.4 format) and is probably not finding the web.xml DTD document. How do I fix it?
Installation is on Solaris 9 using J2SDK 1.4.2_04-b05
By the way, this system is on a disconnected network. How do I get JDeveloper updates for a system not connected to the Internet?Allen,
A JSP with web.xml web-app element
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
runs in JDeveloper 10.1.3
thanks,
Deepak -
Can DOCTYPE in web.xml Be "Localized"
At times when starting WebLogic Server 5.1 (sp6) in a Windows NT
environment, our internet connection is slow and the DTD file specified in
the web.xml file cannot be resolved. I have been able to get around this
problem by changing the DOCTYPE in the web.xml file as follows:
From:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
To:
<!DOCTYPE web-app SYSTEM
"file:/d:\weblogic\examples\webapp\ensodex\WEB-INF\web-app_2_2.dtd">
I have placed a copy of Sun's web-app_2_2.dtd file in the specified
directory, and WLS starts up just fine and I can access our web application
without any problems, but ....
Is there any way to simplify the DOCTYPE specification so that the full,
explicit path doesn't have to be specified. A co-worker has been able to
resolve the issue with an Orion server with the following specification,
<!DOCTYPE web-app SYSTEM "web-app_2_2.dtd">, but I have been unable to get
this to work in the WebLogic environment.
I've read the BEA online documentation, and tried placing the
web-app_2_2.dtd file under the document root (defined as
weblogic.httpd.documentRoot=public_html/ in our weblogic.properties file,
but WLS was still unable to locate the file.
Our intent is to place the web-app_2_2.dtd file under WEB-INF along with the
web.xml file since WLS is able to locate the web.xml file successfully, yet
we don't want to have to specify an explicit path to web-app_2_2.dtd file
since this would have to be customized each time the web application is
installed in a different hardware/operating system environment.
Thanks in advance for any suggestions.
John J. Feigal Voice (651)766-8787 (main)
Sr. Technical Consultant (651)766-7249 (direct)
Ensodex, Inc. Fax (651)766-8792
4105 N. Lexington Ave., Suite 150 email [email protected]
Arden Hills, MN 55126 WebSite http://www.ensodex.comIf I remember correctly from the spec, anything that follows SYSTEM is
basically arbitrary, meaning the parser can interpret it as it may. It is
possible that Orion uses a different parser implementation or version. The
other possibility has to do with where the file would have to be in order to
be found; it might have to be in the JAR in the directory with the XML, or
it might have to be in the "working directory" that WebLogic is launched
from (i.e. the weblogic directory).
When we had this problem, we inlined the DTD into the XML, which is
supported by the XML specification.
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"John J. Feigal" <[email protected]> wrote in message
news:[email protected]...
At times when starting WebLogic Server 5.1 (sp6) in a Windows NT
environment, our internet connection is slow and the DTD file specified in
the web.xml file cannot be resolved. I have been able to get around this
problem by changing the DOCTYPE in the web.xml file as follows:
From:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
To:
<!DOCTYPE web-app SYSTEM
"file:/d:\weblogic\examples\webapp\ensodex\WEB-INF\web-app_2_2.dtd">
I have placed a copy of Sun's web-app_2_2.dtd file in the specified
directory, and WLS starts up just fine and I can access our webapplication
without any problems, but ....
Is there any way to simplify the DOCTYPE specification so that the full,
explicit path doesn't have to be specified. A co-worker has been able to
resolve the issue with an Orion server with the following specification,
<!DOCTYPE web-app SYSTEM "web-app_2_2.dtd">, but I have been unable to get
this to work in the WebLogic environment.
I've read the BEA online documentation, and tried placing the
web-app_2_2.dtd file under the document root (defined as
weblogic.httpd.documentRoot=public_html/ in our weblogic.properties file,
but WLS was still unable to locate the file.
Our intent is to place the web-app_2_2.dtd file under WEB-INF along withthe
web.xml file since WLS is able to locate the web.xml file successfully,yet
we don't want to have to specify an explicit path to web-app_2_2.dtd file
since this would have to be customized each time the web application is
installed in a different hardware/operating system environment.
Thanks in advance for any suggestions.
John J. Feigal Voice (651)766-8787 (main)
Sr. Technical Consultant (651)766-7249 (direct)
Ensodex, Inc. Fax (651)766-8792
4105 N. Lexington Ave., Suite 150 email [email protected]
Arden Hills, MN 55126 WebSite http://www.ensodex.com -
XML Question for web.xml file for LiteWebServer
Hi,
I have no clue of wut tags are required in the web.xml file.
Currently the following code is in my web.xml file and i am trying to run servlets that are located under web-inf/*.class
Pls tell me wuts wrong....
Do i need those mime-mapping tags, session and welcome tags.......... ?
Right now i just want those 2 servlets to work
And wut is this encoding ="UTF-8" in the first line of the xml file. Wut does that do... ? ARe there any others
Any help would b greatly appreciated
Thanks
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp_1">
<display-name>PDMPortal</display-name>
<session-config id="SessionConfig_1">
<session-timeout>60</session-timeout>
</session-config>
<mime-mapping id="MimeMapping_1">
<extension>htc</extension>
<mime-type>text/x-component</mime-type>
</mime-mapping>
<welcome-file-list id="WelcomeFileList_1">
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet>
<servlet-name>HelloWorldExample</servlet-name>
<servlet-class>HelloWorldExample</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>HelloWorld</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HelloWorldExample</servlet-name>
<url-pattern>HelloWorldExample</url-pattern>
</servlet-mapping>
</web-app>Try putting your servlets in the WEB-INF\classes directory.
-
Can a web.xml include another web.xml ?
The application i am working at has alot of servlets and i was wondering if i can put some order in my web-app by separating my web.xml in different smaller web.xml's ?
I can sympathize with you as far as the readability goes.
I know that Tomcat 4 provides a GUI that's intended to make editing server and container level XML files a lot easier, but I'm not certain if it handles application level XMLs too. I think it's safe to say that version 5 will probably either support modifying web.xml files through the GUI or someone will make that feature available through an add-on module.
In the meantime, the length of the XML doesn't affect Tomcat. I would just put up with it until the tool comes along. -
Data source needs to be specified in context.xml instead of web.xml - why?
Hi,
I'm using a Spring JndiObjectFactoryBean to create my JNDI data source in my code:
<bean id="jndiDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
<property name="jndiName" value="java:comp/env/jdbc/DS_OURDB_DB2" />
<property name="lookupOnStartup" value="false"/>
<property name="proxyInterface" value="javax.sql.DataSource"/>
</bean>I have the necessary Resource added to my Tomcat's server.xml:
<Resource accessToUnderlyingConnectionAllowed="false"
defaultAutoCommit="true" defaultReadOnly="false"
driverClassName="com.ibm.db2.jcc.DB2Driver"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
initialSize="0" logAbandoned="false" maxActive="8"
maxIdle="8" maxOpenPreparedStatements="0" maxWait="-1"
minEvictableIdleTimeMillis="1800000" minIdle="0"
name="jdbc/DS_OURDB_DB2" numTestsPerEvictionRun="3"
password="ourpass" poolPreparedStatements="false"
removeAbandoned="false" removeAbandonedTimeout="300"
testOnBorrow="true" testOnReturn="false"
testWhileIdle="false" timeBetweenEvictionRunsMillis="-1"
type="javax.sql.DataSource"
url="jdbc:db2://machine1:60056/DBD1" username="ouruser"
validationQuery="SELECT current date FROM sysibm.sysdummy1"/>I then have the resource referenced in my web.xml:
<resource-ref>
<res-ref-name>jdbc/DS_OURDB_DB2</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>However, I'm getting JndiLookupFailureExceptions when I attempt to use this JNDI resource.
I can resolve it by specifying the following in my META-INF/context.xml:
<Context>
<ResourceLink global="jdbc/DS_OURDB_DB2" name="jdbc/DS_OURDB_DB2" type="javax.sql.Datasource"/>
</Context>I've read some of the JNDI/Tomcat documentation. However, I still do not understand why it doesn't work with the web.xml. Can anyone explain please? ThanksCan answer this myself after some more investigation. The reason I required the entry in the META-INF/context.xml was because I had specified the Resource as a Global Reference in the server.xml. By adding this Resource to my application's Context in the server.xml the configuration in the web.xml worked as expected.
-
How to read configuration data from an xml file (not web.xml)?
Hi,
I want to separate the application specific configuration parameters in a separate xml file and read them as and when they are needed? I know that I can use the wb.xml but I want to separate them in a different xml file because I don't want the web.xml file to be played around later after deployment. If any change is needed then it should be done in the application-config.xml.
How can I read the parameters from this xml file in my jsp code and also what should be the location of this file if I have
../webapps/Root/application
directoty structure ?
Any help is greatly appreciated.can you give an example of a property file and also
it is loaded in the jsp ?Hmm... loading properties in a JSP is not a very good idea. You should do it in a separate class, rather than mixing the logic with the display logic.
Properties properties = new Properties();
properties.load(UtilClass.class.getResourceAsStream("config.properties"));
// Add a try - catch block around the load
// for IOException... -
Define global error page on global-web.xml
Dear fellows:
We want to create a common 404 web error page for all our J2EE applications. We have added these error pages to the global-web.xml through the Visual Administrator:
on several system local folders such as:
usrsap<SID><j2ee-instance>j2eecluster
usrsap<SID><j2ee-instance>j2eecluster<server-inst>
usrsap<SID><j2ee-instance>j2eecluster<server-inst>apps
usrsap<SID><j2ee-instance>j2eecluster<server-inst>sap.com
However, everytime we provoke the server error in order to retreive this Global Error Web Page, the system does not seem to find our custom error page, giving the following message:
The request cant be processed.
Details: Requested resource ( /testerrorpage.html ) not found.
We have discovered that the application was not trying to look up for our web Error page, but for another one located inside the application. However, we don't want to add a specific application web page but a global one common for all of them.
Since there is not any common folder, such as global/root folder, we dont know where the custom error page should be placed. Do we need to do something else?
We are currently using WAS: 6.40 SP 11 PatchLevel 89291.313.
Does anyone know how to configure this global error page? It is possible to do it?
Thank you
Gonzalo
Message was edited by: Gonzalo Pérez-PrimHello,
Yes, Uvaylo is right, the only way to edit the content of the global-web.xml is through the visual administrator --> Configuration Adapter.
I have the same problem as Gonzalo, I have modified the global-web.xml and added custom errors pages for each HTTP error and exceptions. The big deal is when I try to specify in the <b>location</b> field of <b>error-page</b> item: I dont know where I should place my custom error page. I have tried the same paths as Gonzalo did with the same result, when the error event is raised the error page is not found. In the log appears the following entry:
Processing an http request by the error page [/testerrorpage.html] finished with errors.
Probably the exception [com.sap.engine.services.servlets_jsp.server.exceptions.ServletNotFoundException:
Requested resource ( /custom_error.html ) not found.]
thrown by the requested servlet [/testerrorpage.html] cannot be processed.
The error is: com.sap.engine.services.servlets_jsp.server.exc
Please help! Where can I place my custom error pages, to make them available for all the applications of the server?
Thanks in advance for your help! -
exception-type in web.xml does not appear to work
WLS 60 SP1 (#101616)
<exception-type> in web.xml does not appear to work. WLS shows standard
"Internal error 500" page instead of a custom error page. The custom error
page is shown if <error-code> is used instead of <exception-type>.
Any ideas? Thanks
Can you show me some of your code? This works for me.
Also, you say that you are working with 6.0sp3. Are you sure? sp3 hasn't been
released yet, except in a very limited beta. (I believe only internally, but I
could be wrong about that.)
David
[email protected] wrote:
Hi all,
I have created a very simple servlet and an index.html file with a link
to it, then packaged it into a WAR file with the appropriate web.xml and
ias-web.xml files. I then created an application.xml file referencing
only this servlet and adding a context root. After deployment via
"iasdeploy deployapp simple.ear" and cycling the web server, I can reach
the welcome file (index.html) correctly
-"http://localhost/NASApp/simple". When I attempt to follow the link to
the servlet ("simple servlet") the URL ends
up as "http://localhost/NASApp/SimpleServlet" whereas it should be
http://localhost/NASApp/simple/SimpleServlet If I type that url in, the
servlet executes fine.
I've deployed this into Tomcat and get the behavior I expect. It appears
that the element in the application.xml file is ignored by
iAS.
I'm using iAS SP3 on Win2k (same problem on NT).
This is such a basic behavior that I can't believe this is an existing
bug. I must be doing something wrong...
Any ideas?
Thanks in advance,
-Glen
Files are attached.
Name: simple.ear
simple.ear Type: application/x-unknown-content-type-ear_auto_file
Encoding: base64
Description: filename="simple.ear" -
Setting up JNDI resources in web.xml only
Hi,
I'm using Tomca 4.0 LE and JDK 1.4.0_01.
I've been using a database connection pool on my local machine by editing the server.xml file and web.xml. However, I need to move the webapp onto a web hosting compaines server (same tomcat and jdk version). I cannot edit the server.xml file, so I need to set up my JNDI resource in web.xml only.
I have done this (in web.xml):
<resource-ref>
<res-ref-name>jdbc/ocb_clients</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref> Now, before when I had this all set up in web.xml, I had a list of <ResourceParams> within the <context> element:
<ResourceParams name="jdbc/ocb_clients">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>username</name>
<value>username_here</value>
</parameter>
<parameter>
<name>password</name>
<value>password_here</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/ocb_clients</value>
</parameter>
</ResourceParams>These parameters are obviously needed for the datasource to work. How can I set these up just using web.xml?
Also, this code is from a servlet that I have loading on tomcat startup. Will this still work with the new configuration?
public void init() throws ServletException
DataSource ds = null;
try
//Set up the inital context
Context ctx = new InitialContext();
//Look up the database
ds = (DataSource) ctx.lookup("java:comp/env/jdbc/ocb_clients");
catch(NamingException nameE)
System.err.println("Error looking up database: " + nameE);
//Add the datasource to the application scope
getServletContext().setAttribute("ocbDatabase", ds);
}Any help is greatly appricated,
Thanks, Mel.I am Having exactly the same problem with tomcat 5.0. I have tried to do everything mention as solutions at different fourums but I failed.
BTW I am using MySQL
Thanks
Dibakar -
Problem with the data source and web.xml
I have an issue where JSC is removing my resource reference:
<resource-ref>
<description>Creator generated DataSource Reference</description>
<res-ref-name>jdbc/localOracleDatabase</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
from the web.xml and sun-web.xml.
The application has been working great in the IDE for months then wham, no more data source definition. I try and add the reference manually and the IDE takes it out. I am "NOT" adding it to the .xml's in the build area. Why is JSC removing the data source entry?This continues to be a problem. The only way that I can get around the problem is to drag a table from the data source onto the design pallete and then the datasource is added back to the web.xml. I can run fine for 10 or 15 runs then the entry is once again removed from the web.xml.
Help please! -
Confused about jrun-web.xml
G'day there
I'm hoping someone can clarify the *actual* purpose of the
[cf]/WEB-INF/jrun-web.xml file, and how CF uses it.
My understanding of it was that it was the
JRun-internal-webserver's
equivalent of Apache's httpd.conf, or IIS's... err...
whereever IIS stores
its config. Basically a web server configuration file. So if
one wasn't
actually USING the JRun webserver for a given web site, then
that file is
just ignored.
However that understanding is incorrect, it seems.
I have this sort of set-up on my dev machine's file system:
C:\webroots
\webapp1root
\lib
\subapp
\myCfc.cfc
\webapp2root
\lib
\subapp
\myCfc.cfc
And my IIS default website (I'm just running XP Pro, so only
one website @
a time) is set up to have either webapp1root or webapp2root
as its webroot,
depending on which I am working on, at a given moment in
time. And the
website also has a virtual directory to "subapp", called...
"subapp".
Currently I'm working on webapp1, so was bemused that when I
did this:
createObject("component", "subapp.myCfc")
I was getting an instance of
C:\webroots\webapp2root\lib\subapp\myCfc.cfc
created, instead of the webapp1 version.
I spent rather too long ballocksing around checking virtual
directories, CF
mappings and all that sort of palarver, only to eventualy
find that I had a
residual mapping in my jrun-web.xml file pointing to
webapp2root's subapp
directory.
Once I removed that: all good.
Now to me, jrun-web.xml should be completely irrelevant to
that mix, as I'm
not using the JRun web server.
So obviously it's NOT just a web server config file. WTF *is*
it?
I have read various docs on the Adobe website, but they all
seem to be
written for an audience who would already know what the
author is on about
(hence making the doc a bit of a waste of time, in my view),
and it's all
completely impenetrable for me, as I'm just a CF developer
and haven't got
a clue about the inner workings of JRun (and, to be frank:
I'd like to keep
it that way if poss... JRun knowledge is not exactly a
marketable skill
What am I missing here?
AdamI didn't skip over that part, but I probably wasn't as clear
as I needed to be. web.xml (and jrun-web.xml) are deployment
descriptors for a J2EE web application. That actually has nothing
to do with a "web server", it has to do with telling the
application server (JRun, in this case), any information it needs
to deploy the web application (ColdFusion, in this case). The
jrun-web.xml file simply includes stuff that isn't apart of the
J2EE spec but JRun developers thought it helpful to add in.
Again, _it has nothing to do with the "web server" as you see
it_.
If you are using IIS as your frontend web server, you're
still using JRun, the Application Server. In order for the JRun
Application Server (_not_ the web server) to start, it looks at
certain files to determine what web applications to deploy and how
to deploy them. Those files are web.xml and jrun-web.xml, among
others. The reason they're named "web.xml" and "jrun-web.xml" is
because it's deploying a "J2EE
Web Application". It has absolutely nothing to do with a web
server (an application that listens on port 80 or 443 and responds
to HTTP requests).
Let's see if I missed anything from your post:
quote:
G'day there
I'm hoping someone can clarify the *actual* purpose of the
[cf]/WEB-INF/jrun-web.xml file, and how CF uses it.
My understanding of it was that it was the
JRun-internal-webserver's
equivalent of Apache's httpd.conf, or IIS's... err...
whereever IIS stores
its config. Basically a web server configuration file. So if
one wasn't
actually USING the JRun webserver for a given web site, then
that file is
just ignored.
Nope. It's not a "web server configuration file". It's a web
application deployment descriptor. Lots different. It all stems
from the fact that ColdFusion is nothing more than a J2EE web
application being deployed on JRun.
quote:
{snip}
Now to me, jrun-web.xml should be completely irrelevant to
that mix, as I'm
not using the JRun web server.
So obviously it's NOT just a web server config file. WTF *is*
it?
See my first post, and clarification at the top of this post
quote:
I have read various docs on the Adobe website, but they all
seem to be
written for an audience who would already know what the
author is on about
(hence making the doc a bit of a waste of time, in my view),
and it's all
completely impenetrable for me, as I'm just a CF developer
and haven't got
a clue about the inner workings of JRun (and, to be frank:
I'd like to keep
it that way if poss... JRun knowledge is not exactly a
marketable skill
What am I missing here?
I have no idea how that mapping got in there in the first
place, but this is standard J2EE deployment descriptor stuff. Most
other J2EE servers (BEA, Glassfish, JBoss, etc) all have a
server-specific ___-web.xml deployment descriptor that goes along
with each web app, telling the Application Server the information
it needs to deploy the web app.
So, to sum up:
jrun-web.xml is not a web server configuration file.
jrun-web.xml is a JRun-specific J2EE Web Application
deployment descriptor file.
J2EE Web Application deployment descriptor files have nothing
to do with a web server (an application that responds to HTTP
requests), though the web.xml and jrun-web.xml files do tell JRun
how to interpret the requests passed to it via the IIS ISAPI
filter.
I don't know how you got that mapping in there in the first
place. -
Need HELP!! Where I have to place an web.xml(servlet) file on server
I'm using E-business suite for oracle HR version 11.
On localhost i have developed an servlet file with using web.xml. On web.xml i have customized the file that can load a class for my servlet.But when I deploy on the server i had a cnfused wher do i have to place web.xml and my servlet.
I have made an servlet file for my custom. Where do I have to place an xml(servlet) file on server?
Would you give me know forsolving my problem.Please give me know,I really appreciated if you want to give some solution.
Regards,
Dany FauziCopy web.xml to WEB-INF directory of the web application.
-
Reference taglibs in web.xml
Hi,
I'm trying to find a way to avoid having to always reference commonly used taglibs in all my jsps. Its kind of a hassle to manually change all references when the taglib.tld changes name.
I looked at the <tag-lib> element for web.xml and am a little confused as to what purpose it serves. Does anyone know if this is suppose to provide the functionality I want or is used for earlier jsp specifications? Thanks.Which taglibs are you having trouble with that keep renaming their taglib.tld? Are they custom ones or standard ones available over the net?
There are two methods of doing this, one by specifying a uri inside the taglib (like JSTL does) the second by setting up mappings in web.xml.
The web.xml file can provide a mapping between the uri you specify in the jsp, and the actual tld file.
So for example if you have in your jsp:
<%@ taglib prefix="test" uri="http://my.testtag" %>in web.xml you would have the following:
<taglib>
<taglib-uri>/http://my.testtag</taglib-uri>
<taglib-location>/WEB-INF/mytag.tld</taglib-location>
</taglib>This sets up the mapping between the uri you used, and the actual tld on disk
Now if the name of the tld file changes, all you do is change it in web.xml, and all your jsp pages will point at it.
The better method IMO is to use the <uri> element in the tld file.
For instance taking an example from JSTL 1.1 , c.tld
<taglib>
<uri>http://java.sun.com/jsp/jstl/core</uri>
...The c.tld file is bundled with the JSTL file standard.jar in the META-INF directory.
This lets your jsp page just import the taglib with the uri, and the server will find it in the appropriate jar file. No need for any entries in web.xml to do this.
If the tag library is written half-decently nowadays, they follow this pattern, and installing a new taglib becomes painless.
Hope this helps,
evnafets
Maybe you are looking for
-
Still trying to customize the layout of my e-commerse module, but it's not working for me
I have followed the links http://kb.worldsecuresystems.com/134/bc_1342.html#main_eCommerce I am still unable to manipulate these tabs to modify the layout. Please help. I want to center justify my items and no luck no matter what I try. They are so
-
I need a timer function to ping the server every 5 secs??using threads.
I need a timer function to ping the server every 5 secs?? using threads...i have to use a thread coz i cant use Timer and Timer Task coz clients r on the JDK1.2 version.I have created a thread which keeps checking th ping msg & any server msg is ping
-
Error during the scheduling of splits
The long text saying that the person might be not available. But how is it possible to get an overview of the personal assignments to check if person is available or not?
-
I have successfully installed the Apple latest update for my HP CM1415 fnw laser printer, but even after rebooting, Apple keeps asking me to install this update again and again and again! Have I installed this update? If so, how can I stop Apple flag
-
Oracle.jbo.RowNotFoundException: JBO-25034: Row with handle not found
Hello, I am developing a fusion web application on Jdeveloper 11.1.2.1.0. I have a ADF table which is bound to a table in the backing bean. There is a "Process" button for each row that works completely fine. There is button called "Process All" bene