Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filters

 
Nikita Manohar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are trying to write a filter to force http pages to https automatically. We have added a security constraint in web.xml for <url pattern>/*</url pattern>

But the web application that we have developed does not run on https. Could you please help us?
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nikita, welcome to javaranch.
Nikita Manohar wrote:We have added a security constraint in web.xml for <url pattern>/*</url pattern>

Can you show us that security constraint element of your web.xml...
 
Nikita Manohar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Our web application is running on https except the java pages. ie. *.html and *.jsp pages are running over https.
The code as below:


<security-constraint>
<web-resource-collection>
<web-resource-name>survey1</web-resource-name>
<url-pattern>*.jsp</url-pattern>
<url-pattern>*.html</url-pattern>
<url-pattern>*.java</url-pattern>

</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>

</web-app>

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

A title such as "filters" is not helpful. What would happen if all posts had such a title?

Please go back and change your post to add a more meaningful subject by clicking the button on your post.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic