New to JSP. Can I do this?

B

bravesplace

I need to add an image to the top left hand corner of a webpage. If it
was HTML, then no problem.

<p><img src="imagename.gif"></p>

However, this is a .jsp page, and the only person who knows less about
JSP is the person asking me to do this. So my question is... How can I
do this?

Thanks for the time.
 
D

Daniel Pitts

I need to add an image to the top left hand corner of a webpage. If it
was HTML, then no problem.

<p><img src="imagename.gif"></p>

However, this is a .jsp page, and the only person who knows less about
JSP is the person asking me to do this. So my question is... How can I
do this?

Thanks for the time.

JSP is a way to create a servlet that will serve HTML.
JSP's have special ways to process your HTML template, but if you need
to do flat HTML, you can.

So, do it the same way.
 
B

bravesplace

Thanks for the reply. Just to verify, are you saying I can just add the
tag as I would with HTML. If so, that is great!! Thanks for taking the
time to reply.
 
M

Mark Jeffcoat

Thanks for the reply. Just to verify, are you saying I can just add the
tag as I would with HTML. If so, that is great!! Thanks for taking the
time to reply.

That is correct. A well-written JSP will look almost
exactly like a normal HTML file, with the occasional
<% %> intrusion.

(This is a statement of opinion, but it's also The Truth.
If your JSP looks more like a Java program with occasional
HTML tags, you're doing it the hard way.)
 
B

bravesplace

Thank you so much for your help, and advise.

exactly like a normal HTML file, with the occasional
<% %> intrusion.

(This is a statement of opinion, but it's also The Truth.
If your JSP looks more like a Java program with occasional
HTML tags, you're doing it the hard way.)
 
D

Daniel Pitts

Mark said:
That is correct. A well-written JSP will look almost
exactly like a normal HTML file, with the occasional
<% %> intrusion.

(This is a statement of opinion, but it's also The Truth.
If your JSP looks more like a Java program with occasional
HTML tags, you're doing it the hard way.)

Actually, a well-written JSP will look like XHTML with namespaced
action tags such as "<c:if test='${something}'>Something is
true</c:if>"
:)
 
A

aflat362

Daniel said:
Actually, a well-written JSP will look like XHTML with namespaced
action tags such as "<c:if test='${something}'>Something is
true</c:if>"
:)

Actually, a well-written JSP would work - bug free - regardless of
whether you use scriptlets or tag libraries or EL. Nothing is wrong
with scriptlets.
 
D

Daniel Pitts

aflat362 said:
Actually, a well-written JSP would work - bug free - regardless of
whether you use scriptlets or tag libraries or EL. Nothing is wrong
with scriptlets.

Nothing is "wrong" with them, but they tend to be abused.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top