Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-04-2007, 03:47 PM
Member
 
Join Date: Jun 2007
Posts: 92
Marcus is on a distinguished road
Help with Tags JSP
Under WEB-INF/tags directory there is a file called select.tag.
I viewed the filed and found there are some lines of java codes wrapped within the
Code:
<%! %>: <%! ... try { Object bean = jspContext.findAttribute(beanName); Method m = bean.getClass().getMethod(methodName, null); result = m.invoke(bean, null).toString(); ... %>
My question is: why use "!" after the
Code:
<%? Why not directly use <%.... %>>
Thanks.
Marcus
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-04-2007, 03:50 PM
Senior Member
 
Join Date: Jun 2007
Posts: 111
Eric is on a distinguished road
JSP, not client-side javascript.

Please check this link

Greetings.
Eric
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-04-2007, 03:53 PM
Member
 
Join Date: Jun 2007
Posts: 92
Daniel is on a distinguished road
Code:
<%! ... %> i
s referred to as a declaration block.

it can also be written in xml syntax...for example

Code:
<jsp:declaration> String user_name = new String(); </jsp:declaration
the following is a comment
Code:
<%-- comment --%>
the following is an expression
Code:
<%= expression %>
Say for example, you have a string and it contains a user's name "John Smith" and you want to print it...you can write
Code:
<%= name %> instead or typing <% out.println( name ); %>
Greetings
Daniel
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Struts2 Tags (IV) JavaForums Java Blogs 0 01-18-2008 03:40 PM
Using Struts2 Tags (II) JavaForums Java Blogs 0 01-16-2008 11:00 PM
Using Struts2 Tags (I) JavaForums Java Blogs 0 01-16-2008 06:51 PM
Using tags in Struts(II) JavaForums Java Blogs 0 01-09-2008 02:51 PM
Using tags in Struts(I) JavaForums Java Blogs 0 01-08-2008 02:20 PM


All times are GMT +3. The time now is 07:48 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org