• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

content types jsp?

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im new to servlets world...I dont know if my question is right...
Can I put a content type of jsp instead of text/html ? I want to return a jsp instead of html.
Or the way is, I just straightly called jsp instead of servlet that returns text/html.
My objective is from login html form I want a to call a page(jsp or servlet?) that validates and redirects to other page if successfully login.
Thanks.
 
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can I put a content type of jsp instead of text/html ? I want to return a jsp instead of html.


That makes no sense. The purpose of a JSP is to be executed on the server in order to format an HTML page to send to the client. The browser wouldn't know what to make of a JSP sent directly to it.

My objective is from login html form I want a to call a page(jsp or servlet?) that validates and redirects to other page if successfully login.


Sounds like what you want to do is to submit the login form to a servlet which uses whatever means it will to validate the user, and then either forwards or redirects to the appropriate JSP upon success, or back to the login page upon failure.
hth,
bear
[ June 22, 2003: Message edited by: Bear Bibeault ]
reply
    Bookmark Topic Watch Topic
  • New Topic