This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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

 
Author and ninkuma
Marshal
Posts: 66804
168
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: 19728
92
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!
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!