• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

cannot redirect to secure page

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use Oracle JDeveloper to write servlets & JSP. I made subdirectory secure authorized and when I directly try to connect to secure.SecurePage.java servlet it tells me I am not authorized. That's OK.
But I want to come to this servlet from SecurePage.jsp. PLEASE look at the code below. PLEASE PLEASE tell me if I should post in another content.
I've added into web.xml:***
<servlet>
<servlet-name>SecurePage</servlet-name>
<servlet-class>secure.SecurePage</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SecurePage</servlet-name>
<url-pattern>/securepage</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>SafePage</web-resource-name>
<url-pattern>/secure/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint><role-name>Admin</role-name>
<role-name>*</role-name>
</auth-constraint>
<!-- <user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint> -->
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>SecurePage.jsp</form-login-page>
<form-error-page>BadPage.jsp</form-error-page>
</form-login-config>
</login-config>
***
and my SecurePage.jsp is:***
<form action="j_security_check" method="POST">
User: <input name="j_username" type="text" />
is in love with a password: <input name="j_password" type="password" />
<input name="submit" type="submit" value="Go to secure page" />
</form>
***

The problem is SecurePage.jsp it never redirects to SecurePage.java servlet.
What can be wrong? What can I do?

Thanks in advance!!
 
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you're going to have more luck getting help in a different forum... this doesn't sound like an Oracle specific issue but more a servlet configuration issue.

I would pm Jeanne and ask her to move this to a forum where you can get more help.
 
author & internet detective
Posts: 42016
916
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Paul Campbell:
I would pm Jeanne and ask her to move this to a forum where you can get more help.


Thanks. Moving to servlets.
 
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you a Authorized user ??
 
Popeye has his spinach. I have this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic