About WEB.XML
Hello everyone,
I've a problem in servlet mapping.
I have this url-pattern is currently working.
<url-pattern>/abc/def/*</url-pattern>
Now, some changes required for doing more features. So I am required to map something like this.
<url-pattern>/abc/def/*.dm</url-pattern>
<url-pattern>/abc/def/*.dd</url-pattern>
in order to specify which file type for which serlvet to handle.
However, this doesn't work, is there any other method that I can use?
The following methods are unconsiderable:
1) two different path for *.dm and *.dd
2) Run one servlet to redirect to other servlet for handling.
Thanks.
Yes, you can say that.
If url-pattern supports both *.dm and /abc/def/ , then it can solve my problem.
But it seems only supporting either one of them.
Similar Messages
-
Odd message about web.xml
I'm getting this message on the console of the WL9.0 Admin server when
it starts up:
<Aug 10, 2007 10:28:30 AM EDT> <Warning> <J2EE Deployment SPI>
<BEA-260128> <Changes not allowed to DTD based descriptors. The
attempt to modify property 'ServletName' in WEB-INF/weblogic.xml for
module 'CES' will be vetoed if possible. The change will not be
persisted in either case.>
I don't get it. I use <servlet-name> three times in web.xml: twice in
a <servlet> block and once in a <servlet-mapping> block. In
weblogic.xml, I don't use <servlet-name" at all.
I have no clue what the message is complaining about.
Here's weblogic.xml:
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web
Application 8.1//EN"
"http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
<description>WebLogic Descriptor</description>
<jsp-descriptor>
<jsp-param>
<param-name>packagePrefix</param-name>
<param-value>gov.bls.idcf.ces.jsp_servlet</param-value>
</jsp-param>
<jsp-param>
<param-name>workingDir</param-name>
<param-value>/tmp</param-value>
</jsp-param>
<jsp-param>
<param-name>compileCommand</param-name>
<param-value>d:\Jikes\bin\jikes.exe</param-value>
</jsp-param>
</jsp-descriptor>
</weblogic-web-app>
Tim Slattery
[email protected]
http://members.cox.net/slatterytQuestion: does it work?
From my understanding this is not what you should do. The Welcome page is used when no specific page of the application is given in the url. It can either be a jspx page or a html page. A task flow may contain a page, but is not a page. From this definition I conclude that you should not do this.
One other reason is that is you use security you secure a task flow (as a whole resource) and the welcome page is the entry point giving the use the ability to log in (so it is not secured). The welcome page might also be the landing page after a logout.
Timo -
So in my web.xml file (for Tomcat 5.5) I used to map a servlet like this:
<servlet-mapping>
<servlet-name>
ServletName
</servlet-name>
<url-pattern>
/servlet/ServletName
</url-pattern>
</servlet-mapping>and it wouldn't work. Now when I map it like this:
<servlet-mapping>
<servlet-name>
ServletName
</servlet-name>
<url-pattern>
/servlet/*
</url-pattern>
</servlet-mapping>it works just fine. Can anyone explain to me why this is since I've seen web.xml files that don't use the /* for the dir. location?
Thanks in advance.I posted this too soon. Using that 'wild card' it grabs the last servlet mapped in web.xml. So I commented everything out and left the file with the following(I used '*' just to keep stuff private):
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
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">
<display-name>DISPLAY NAME</display-name>
<description>
DISPLAY NAME
</description>
<servlet>
<servlet-name>SignIn</servlet-name>
<servlet-class>lmt.SignIn</servlet-class>
<init-param>
<param-name>url</param-name>
<param-value>jdbc:mysql://localhost/********</param-value>
</init-param>
<init-param>
<param-name>**********</param-name>
<param-value>*******</param-value>
</init-param>
<init-param>
<param-name>********</param-name>
<param-value>***********</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>
SignIn
</servlet-name>
<url-pattern>
/servlet/SignIn
</url-pattern>
</servlet-mapping>
</web-app>This is will not locate the servlet.
I get a 404 with this message: "type Status report
message /servlet/SignIn/
description The requested resource (/servlet/SignIn/) is not available.
I really have no idea what's wrong here. Is there a problem with some configuration elsewhere? Thanks again. -
JDev 9.0.3_2: web.xml fails DTD validation
Hi all,
I just started using JDev 9.0.3_2 and found that it is trying to validate my web.xml when I build my Project.
It is complaining about the <distributable> Tag inside my web.xml file. It should NOT be complaining about this, but it is obviously using either an outdated DTD or the wrong one.
How can I either point JDev at the correct DTD or get it to stop attemting to validate web.xml?
Thanks!
Kevin DouganI think I have figured out a workaround: It appears that JDeveloper is extremely picking about web.xml and validates it in a strict sense. You MUST put your elements in EXACTLY the same order as specified in the DTD, or it throws an error.
However, that doesn't answer my original question: Is there a way to specify the DTD for web.xml (or other elements for that matter, Schema's aside for the moment) or at least turn off this form of validation? If not in the current release, is this coming in 9.0.4 or 9.0.5?
Thanks again,
Kevin -
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. -
(newbie) Question about replacing .class files and web.xml file
I'm new to servlets and I have two quick questions...
Do I absolutely need a web.xml file to define all my servlets, or can I simply place .class files into the WEB-INF directory and expect them to run?
If my application server (for example Tomcat) is running and I replace a servlet .class file, do I need to restart the server for the new .class file to take effect?
...or are both of these questions specific to the application server I'm using?Hi,
From an article I read:
With Tomcat 3.x, by default servlet container was set up to allow invoking a servet through a common mapping under the /servlet/ directory.
A servlet could be accessed by simply using an url like this one:
http://[domain]:[port]/[context]/servlet/[servlet full qualified name].
The mapping was set inside the web application descriptor (web.xml), located under $TOMCAT_HOME/conf.
With Tomcat 4.x the Jakarta developers have decided to stop allowing this by default. The <servlet-mapping> tag that sets this mapping up, has been commented inside the default web application descriptor (web.xml), located under $CATALINA_HOME/conf:
<!-- The mapping for the invoker servlet -->
<!--
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
-->
A developer can simply map all the servlet inside the web application descriptor of its own web application (that is highly suggested), or simply uncomment that mapping (that is highly discouraged).
It is important to notice that the /servlet/ isn't part of Servlet 2.3 specifications so there are no guarantee that the container will support that. So, if the developer decides to uncomment that mapping, the application will loose portabiliy.
And declangallagher, I will use caution in future :-) -
About Tomact's Web.xml file
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
PARSE error at line 38 column 11
org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,
distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page
*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)".
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
I am getting this message when i keep web.xml file in web-inf folder.that is after starting tomcat.Hi
The elements in web.xml file must follow a specific order, it the one tomcat prints in the error-message. (It should also tell THIS IS THE REQUESTED ORDER)
I made the same problem before... ;)
Made you have a <servlet-mapping> tag before a <servlet> tag? That is not correct! Hope this solves your problems. :)
/Tobias -
Client-cert auth impl in web.xml does not work in Oracle Application Server
Hi,
I am new to implementing security features on the web applications.. I have developed a new web service using jdev1012 and deployed in OAS 10.1.2. Its working fine according to the business requirements, but I am in need of implementing client-cert authentication to enable the web service available to only those who have client certificate.
My server details are:
Oracle Application Server 10g Release 2 (10.1.2)
Server certificate is in place and SSL mode have been already enabled.. able to access my web service through https://<mydomain.com>/myws/TreqWS as well able to see the WSDL file through https://<mydomain.com>/myws/TreqWS?WSDL.
I tried to include the following in my web.xml file as part of implementing CLIENT-CERT authentication.
<security-constraint>
<display-name>SecurityConstraint</display-name>
<web-resource-collection>
<web-resource-name>WSCollection</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>CLIENT-CERT</auth-method>
<realm-name>WSCollection</realm-name> <!-- am not sure about this realm-name and its purpose -->
</login-config>
It is not woking as expected, though I have restarted my oc4j container after including this content to the web.xml file. i.e, I am able to invoke the web service though my sample java client program, though I donot have client certificate/keystore.
I believe I am missing something..Can anyone help me in this regard to implement CLIENT-CERT authentication successfully?
Thanks,
MsI am having the same problem with doc and xsl. I have added this
<mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
<mime-mapping>
<extension>doc</extension>
<mime-type>application/msword</mime-type>
</mime-mapping>
to my web.xml. I even restarted the server. I still see doc and xsl in binary.
Is there some other setting that needs to take place?
I am using WL6.1 with fixpack 1.
I can see the doc and excel files in the browser if I don't go through the weblogic
server. That just confirms it's not my browser.
Kumar Allamraju <[email protected]> wrote:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
It works fine for me in 6.1 SP1.
<br><br>
If the following doesn't work , can you
<br>try application/winword instead of application/msword?
<p>--
<br>Kumar
<p>Siming Mu wrote:
<blockquote TYPE=CITE>Hi,
<p>I setup in my web.xml a mime mapping as follows,
<p><mime-mapping>
<br><extension>doc</extension><mime-type>application/msword</mime-type>
<br></mime-mapping>
<p>When I specify a test.doc url, the doc file appears in my browser
as
binary data
<br>instead of download.
<p>Please reference change request 055002, which decribes this problem.
According
<br>to edocs, it has been fixed in wls6.1sp1.
<p>But I am seeing it fixed. Am I doing anything wrong? Thanks.
<p>Siming</blockquote>
</html> -
Access custom variable value in web.xml context-param?
My requirement or need is to access a variable value either in a class in my Model project or a backing bean in my View project. For example, one variable I need to access is an application server I am integrating with - 'testserver' or 'productionserver' - I want to be able to configure this within an external file so that I do not have to re-compile my application to change the variable.
I was thinking about placing this variable in the web.xml <context-param> section as:
<context-param>
<param-name>servername</param-name>
<param-value>testserver</param-value>
</context-param>
I need to access this value within a class (not a servlet) on an Application Module service method, though if needed, I could access it from a backing bean and pass it to the service method (less desirable.) Is this a good approach and how do access this variable from within a Java class including any imports I need to do (code example)?
Thanks and Happy New Year!
Hopefully most everyone is out spending time with friends and family versus stuck trying to complete a project like me...I found an example from SRDemo that provides what I was looking for:
String serverhostaddress =
FacesContext.getCurrentInstance().getExternalContext().getInitParameter("param-name-var-in-webxml"); -
Need api for changing security role in web.xml !!
My requirement is to change the value of the deployment descriptor "security-role" (in web.xml) through an api and inturn to persist the new value in web.xml. Also I need to know if this change is automatically redeployed or an explicit redeployment is needed ? In that case how do I redeploy using an api call ?
I found a lot of apis related to roles like createRole, removeRole etc.. But there are no apis to change the name of the role and inturn persist in web.xml.
Do I need to provide any more information ? Let me know
Thanks,
Karthickwhy and when do you change security-role? try to use ant task (perhaph you need xpath also). it´s the better when you perform task about life´s cycle of application.
please, describe your problem.
of course in you change web.xml you must restart the application. -
Use of jsp-file in web.xml
hello
can anybody explain about , when we need <jsp-file> in web.xml
and why we use this tag in place of <url-pattern>?If you want to declare a JSP in your web.xml file you use the jsp-file tag instead of the servlet-class tag. Normally there is no need to declare a JSP in the web.xml file unless you want to use init-params.
Usually people can access a JSP directly wether it is declared in the web.xml or not. So it is not that the jsp-file tag replaces the url-pattern tag so much as the url-pattern tag is not needed for a JSP. However notthing prevents you from declaring the JSP in the web.xml and then mapping the JSP to a different url that doesn't end in '.jsp'. -
Hello,
I am a newbie to servlet programming. I am using Tomcat4.1.24. When I
am trying out some examples, I got a bunch of parsing errors. After double-checking my web.xml, I still do not see why it caused so many parsing errors. I am using NotePad to edit web.xml, does that affect this? These errors are always about the last line and the last column.
Very weird. Please help.
web.xml
<?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">
<web-app>
<display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>*.myservlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Primes</servlet-name>
<servlet-class>coreservlets.Primes</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Primes</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>
[ERROR] Digester - -Parse Error at line 29 column 11: The content of element typ
e "web-app" must match "(icon?,display-name?,description?,distributable?,context
-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-conf
ig?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resou
rce-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,e
jb-local-ref*)". <org.xml.sax.SAXParseException: The content of element type "we
b-app" must match "(icon?,display-name?,description?,distributable?,context-para
m*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,m
ime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-r
ef*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-lo
cal-ref*)".>Hi.
The answer is rather simple. The file is not valid against the XML v.1.0 standard. That's because all <servlet> elements must come first before all <servlet-mapping> elements. If you change the order of the Primes <servlet> element, the file is valid and Tomcat should not throw an exception.
This is the correct web deployment descriptor:
<?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">
<web-app>
<display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet>
<servlet-name>Primes</servlet-name>
<servlet-class>coreservlets.Primes</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>*.myservlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Primes</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app> -
Using security-constraint in web.xml; not recognizing url-pattern tag
I am creating a very simple jsp application within JDeveloper 10.1.3.1. I have 2 jsp files...a readData.jsp and a maintainData.jsp. I would like to deploy this application to Oracle Application Server 10.1.2.2. I would like to use Oracle Internet Directory with Single Sign on enabled. The deployment to OAS works fine. For the security, I would like an administrator user to get to both pages...and a user to only be able to see the readData.jsp. I used the security constraints on the properties of the web.xml file within JDeveloper. Here is my web.xml file:
<?xml version = '1.0' encoding = 'windows-1252'?>
<!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>
<description>Empty web.xml file for Web Application</description>
<session-config>
<session-timeout>35</session-timeout>
</session-config>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>adm_full_access</web-resource-name>
<url-pattern>*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>adm_all</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>usr_access</web-resource-name>
<url-pattern>readData.jsp</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>usr_all</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<security-role>
<role-name>usr_all</role-name>
</security-role>
<security-role>
<role-name>adm_all</role-name>
</security-role>
</web-app>
When I deploy to OAS I added an OID account to the adm_all role...this works fine I can log on as that user and get to both jsps. But, when I add my user to the usr_all role within OAS I try to log on to the app...I then enter my SSO username and password and I get Access Denied errors from my browser when trying to access either page. I am confused about the <url-pattern> tag...is that relative to a directory within my deployment? Most of the examples I have seen use servlets...so I was wondering if I can even use the <url-pattern> tag to restrict/allow access to individual jsps? If someone could point me to some documentation on this set-up I would appreciate it!
Thank you.I was able to get this to work. By doing the following:
<security-constraint>
<web-resource-collection>
<web-resource-name>adm_full_access</web-resource-name>
<url-pattern>*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>adm_all</role-name>
</auth-constraint>
</security-constraint>
I was restricting access to all other groups by uisng <url-pattern>*</url-pattern>. Any other security-constraints set-up after that will not work. So saying * requires usr_all will restrict ALL webpages to ONLY adm_all, regardless of what future constraints say. So, my first security-constraints lists all directories or pages that every user can access. My next security-constraint then list resources that only my admins (adm_all) can acess. Any other security constraints then are set-up for each user role that I have...if adm_all should have access to these then the <role-name>adm_all</role-name> is added to each security constraint. -
hello friends,
When i implement my project in to tomcat server ..... It raises this exception in web.xml pls help me.........
i have given below......
Thanks in advance....
Sep 6, 2008 10:16:53 AM org.apache.catalina.startup.ContextConfig applicationWebConfig
SEVERE: Parse error in application web.xml file at jndi:/localhost/hatsunSMS/WEB-INF/web.xml
java.net.NoRouteToHostException: No route to host
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:788)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:654)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:352)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1044)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4148)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Sep 6, 2008 10:16:53 AM org.apache.catalina.startup.ContextConfig startHi.
Please re-read your stacktrace and then have a look at http://java.sun.com/j2se/1.4.2/docs/api/java/net/NoRouteToHostException.html.
Then, take your time to think about it again.
Bye. -
Using error pages in web.xml
Having a few problems with error pages and web.xml with browsers caching the error
pages and strange errors coming out of weblogic.servlet.intenal.WebAppServletContext
I'm trying to set a web app up so that all http errors and all exceptions are
routed thruogh predefined resources. For now, I'm simply send 400 errors to 400.html
and the ServletException, IOException and RuntimeException to respective html
pages.
What I'm finding is that the error codes work fine but the exceptions are only
be routed to the correct error page for the first call to the servlet after server
restart.
So for example, I have my servlet throwing a ServletException as a test case.
The weblogic server log shows that ServletException is thrown, and the correct
error page for ServletExceptions is shown.
If I change the Servlet code to throw IOException in place of SevletException,
the weblogic.log shows that IOExceptyion is being thrown (so the servlet has deployed
successfully), however the Servletxception error page is shown on the browser.
I'm using IE6 and I've changed the setting such that a new page is requested every
time using the tools-internet options-temp internet files-settings option to "check
for new versions of stored pages: Every visit to the page".
Despite this, the servlet exception error page still appears.
If you clear the cache from the temp intenet files->delete files IE option, the
correct errror page will be shown so it appears that the browser cache is being
used after all.
everytime I delete the temp intenet files I get the correct error page on the
first request after but then not after that.
I have implemented the service method for this test to throw the exceptions -
does this make a differecne?
As a test, I have moved the imlpementation to the doGet method instead bu I now
get a strange eror from weblogic comlpaining about an arrayOutOfBoundsException
because eror codes in the web.xml are not supported! - see error above.
Any help is appreciated
Have you tried setting pragama no cache?
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
cheersmbg"Aaton" <[email protected]> wrote in message
news:[email protected]...
>
> Having a few problems with error pages and web.xml with browsers caching
the error
> pages and strange errors coming out of
weblogic.servlet.intenal.WebAppServletContext
>
> I'm trying to set a web app up so that all http errors and all exceptions
are
> routed thruogh predefined resources. For now, I'm simply send 400 errors
to 400.html
> and the ServletException, IOException and RuntimeException to respective
html
> pages.
>
> What I'm finding is that the error codes work fine but the exceptions are
only
> be routed to the correct error page for the first call to the servlet
after server
> restart.
>
> So for example, I have my servlet throwing a ServletException as a test
case.
> The weblogic server log shows that ServletException is thrown, and the
correct
> error page for ServletExceptions is shown.
>
> If I change the Servlet code to throw IOException in place of
SevletException,
> the weblogic.log shows that IOExceptyion is being thrown (so the servlet
has deployed
> successfully), however the Servletxception error page is shown on the
browser.
>
> I'm using IE6 and I've changed the setting such that a new page is
requested every
> time using the tools-internet options-temp internet files-settings option
to "check
> for new versions of stored pages: Every visit to the page".
>
> Despite this, the servlet exception error page still appears.
>
> If you clear the cache from the temp intenet files->delete files IE
option, the
> correct errror page will be shown so it appears that the browser cache is
being
> used after all.
>
> everytime I delete the temp intenet files I get the correct error page on
the
> first request after but then not after that.
>
> I have implemented the service method for this test to throw the
exceptions -
> does this make a differecne?
>
> As a test, I have moved the imlpementation to the doGet method instead bu
I now
> get a strange eror from weblogic comlpaining about an
arrayOutOfBoundsException
> because eror codes in the web.xml are not supported! - see error above.
>
> Any help is appreciated
Maybe you are looking for
-
Install windows 7 using Boot Camp
I have a 1st 13" MBA and would like to install Windows 7 as 2nd OS using Boot Camp. Can someone share some light on to me if it is pratical way to use Windows 7. I have tried VMware Fusion to install Windows XP and found the performance is far belo
-
How to enable my disabled iphone.it says connect to itunes
How do i enable my disabled iphone.It says connnect to itunes.Tell me what can i do about it
-
TREX Search does not return Job Postings
Hello: Recently our TREX engine stopped returning job postings. We ran RCF_CREATE_SP_FOR_CDCY_IN_JOB and did not stop the periodic services job. Since then, the TREX engine has not been able to return any job postings. We have tried everything unde
-
I am trying to run the samples that came with JAX-WS (the Java API for XML Web Services) I keep getting this error when I run ant on the build.xml file: wsimport-init: [mkdir] Created dir: C:\javaeetutorial5\examples\coffeebreak\cb-common\build \
-
hi guys, i want to design an application that can connect to a mysql database on a server(with domain example: http://www.somename.com) on the internet and read data to and from it. Also i want to be able to upload files(web pages) and download files