• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

How to Use HTML tags in between scriptlets without println  RSS feed

 
Ranch Hand
Posts: 106
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Community!

I want to add some HTML-Tags between my java-scriptlet-tags.
But I dont wanna use the expression language right now.

This is my code:



I just want to use these HTML-Tags without using "println".



I hope you can help me!
Thank you very much

 
Marshal
Posts: 67197
169
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scriptlets have been obsolete for over 15 years. You should be using the JSTL and EL in JSP pages.

In any case, anything that's not a JSP element is part of the template (in this case, the HTML), so just put the HTML code outside any scriptlet or other JSP element.

To understand how JSP operates please see this article.
 
Ralf Coby
Ranch Hand
Posts: 106
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much
 
Bartender
Posts: 20124
103
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By using the JSTL "if" tag, you can code this without any Java scriptlet code at all.

Regardless, as a login page, a hacker could shred it in little or no time.

Don't write your own login system. Use the J2EE container security standard or at least a reputable third-party security package. If you're not a full-time trained security professional, it's very, very unlikely that you're going to produce a secure system, no matter how clever you think you are.
 
Ralf Coby
Ranch Hand
Posts: 106
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for the tips!
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!