Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

set port :8443

 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
how can my jsp page specify the port :8443 in the links url?

At the moment the links looks like this:

to access to files undes ssl I'm forced to specify the port :8443, I could do it using absolute url, like:

but it would imply some complications in maintainance.

Does anyone knows how to automatically specify, just for some links in the same page, the port to use in the url?
Thanks in advance.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two approaches you could take; declarative and programmatic.

The declarative approach involves setting up a security-constraint in your web.xml file. In that constraint, you can declare mappings for pages that must be accessed under SSL. There is a link to the servlet spec in my signature. It goes over this in detail

If you want to do this from your own code, you can still avoid hard coding the values by reading them from the request:
 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my problem was actually given by the connector in Apache.
My webapps already uses the security constraint.
Anyway, I used the following work around:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!