<servlet-mapping>
<servlet-name>myName</servlet-name>
<url-pattern>/aName</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
...
<url-pattern>
/*
</url-pattern>
</web-res...
I have a J2EE app and it has a listener in web.xml.
Listener contains a method called contextInitialized
I want to know when does contextInitialized actually get called?
From my reading I understand that it gets called when deploying the application. Can there be situations/scenario's where it could be called after the application h...
While configuring the security constraints for a web-module's roles in J2EE application I'm having the following problem:
Application:
Giving a servlet named customersServlet, which receives two parameters in the URL:
A string representing an operation (INS, UPD, DLT and DSP).
An identification number to identify a customer on which ...
Obviously, load_on_startup value of 0 means don't, and 1 means do. But what does a value of 2 mean?
EDIT: Obviously, I shouldn't assume things before I check them. A value of 0 still means load on startup. Thanks stacker.
The servlet specification is surprisingly hard to reach.
(Here's where I saw 2 as a possible value).
...
How can I block a ip address with some configuration on web.xml?
Do I need a filter? How can I implement one?
...
How can I block access to the site if a user is not logged in?
Under web.xml > Security I checked Form authentication then I selected Login and Error page, but I don't know how to block the access and redirect the user to the login page.
Do I need a filter? If so, how can I get the login url I specified?
And how should I call the vali...
Hi everyone,
I'm just wondering when/why you would define a resource-ref element in your web.xml file?
I would have thought that it would be defined in your web/app server using JNDI and then look up the JNDI reference in your Java code?
The resource-ref definition seems a bit redundant to me and I can't think of when it might be usef...
Hi,
I would like to control the settings in web.xml and using different once for different environments.
Is it possible to use a property, from a property file on classpath, in web.xml? Something like this:
<context-param>
<param-name>myparam</param-name>
<param-value>classpath:mypropertyfile.properties['myproperty']</param-value...
I tried to use
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/errors/error.jsp</location>
</error-page>
but i dosen't catch 404 errors. How can I catch also 404 etc. errors to that same page ? I want to catch ALL error codes to same error page jsp.
...
I'm using persistence API and want to load jdbc URL from web.xml. URL should be a context parameter of servlet. I can't find how to construct EntityManagerFactory not using persistence.xml. May be I should create PersistenceUnit in servlet and set some parameters? Can you give me some short example?
Thank you
...
Hi guys,
I've followed http://static.springsource.org/spring/docs/3.0.2.RELEASE/spring-framework-reference/html/mvc.html#mvc-etag and put ShallowEtagHeaderFilter in my web.xml like this:
<filter>
<filter-name>etagFilter</filter-name>
<filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
</filter>
...
Been try to learn JSF, and sometimes I see the URL is .jsf and sometimes is .xhtml. Can sometimes fill my knowledge, please? When I create a JSF using Facelet, the file extension is .xhtml, so where does .jsf URL extension come from?
...
Hello,
I have a filter and parameters in web.xml
web.xml is like this:
<filter>
<description>
</description>
<display-name>AllClassFilter</display-name>
<filter-name>AllClassFilter</filter-name>
<filter-class>com.datval.homework.AllClassFilter</filter-class>
<init-param>
<param-name>DB_URL</param-nam...
Hi,
I have a web app, I want to define my index.jsp file to be shown when the entered url is like:
www.mysite.com
www.mysite.com/
www.mysite.com/index.jsp
but if any other url is entered, like:
wwww.mysite.com/g
I want a particular servlet to handle the request. In my web.xml file, I am doing this:
<servlet>
<servlet-name>Ser...
Hi,
I am new to Restlets. Trying to configure the web.xml (on JBoss). I have 2 entries, one for a servlet (got nothing to do with webservices) other for webservices, using Restlet. Here are the entries..
<servlet>
<servlet-name>AuthenticationServlet</servlet-name>
<servlet-class>com.safeid.web.server.api.servlet.AuthenticationServ...
My understanding is that glassfish 3 is JEE6 compliant and jax-rs-aware, and that consequently I do not have to include the jersey servlet container and mapping in my web.xml file. Here's what I was hoping my web.xml could look like
<webapp>
</webapp>
That doesn't work though, as I get 404's when I try to hit my jax-rs path-anotated ...
Jsf library (that is included in WEB-INF/lib) might contain its own faces-config.xml file.
Is it possible for such a library to include also its own web.xml file?
...
This is driving me nuts.
I'm using Tomcat 6, declaritive authentication, form based. No framework involved.
Everything works ok - some pages authenticated, some not, some use https, some http. Everything as I want it. EXCEPT...
I want the login page to always use https.
The login page comes up nicely as https if:
a) I go to it directl...
Hi,
I have a web-app that authenticates against a JDBC Realm. In the web.xml file I can use BASIC authentication or a custom form:
<auth-method>BASIC</auth-method>
<realm-name>JDBCRealm</realm-name>
or
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.html</form-login-page>
<form-error-page>/error...
I'm working on a JSF web application in which I need to bring up a "Session Expired" page if the view expires, but a general technical error page for all others. The application only goes to the technical error page when I trigger the exception. Here's the error-page definitions:
<error-page>
<exception-type>javax.faces.applicati...