File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes embedding style tag in java syntax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "embedding style tag in java syntax" Watch "embedding style tag in java syntax" New topic

embedding style tag in java syntax

gradnash nash

Joined: Mar 14, 2006
Posts: 11
Hello all,

I would like to know whether there is any way for me to embed a style in java like

ifPrint() {
<style> noprint.display:none; </style>

Is this possible, please let me know.

Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Are you perhaps talking about *Javascript*?

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Jan Groth
Ranch Hand

Joined: Feb 03, 2004
Posts: 456
or JSP (java server pages)?

you cannot embed anything in your java-code which is not java syntax. but that's obvious ;-)

what you can do is mixing java-code with markup code, which assumes that you are working in a servlet environment. in this case you have to mark the source code (usually a jsp-page) which section contains the markup code (usually html)

I agree. Here's the link:
subject: embedding style tag in java syntax
It's not a secret anymore!