Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,256
Total Threads: 106,575
Total Posts: 592,698
There are 97 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming :

Urgent Help Needed - JSP Related

Thread title: Urgent Help Needed - JSP Related
Reply    
    Thread tools Search this thread Display Modes  
08-10-2011, 06:30 PM
#1
jshotzz is offline jshotzz
Status: I'm new around here
Join date: Oct 2008
Location: Mississauga Ontario
Expertise:
Software:
 
Posts: 10
iTrader: 0 / 0%
 

jshotzz is on a distinguished road

  Old  Urgent Help Needed - JSP Related

Site I'm working on in jsp has a string inside a title I'd like to TitleCase but not sure what function to use or how to implement it.

<title>Sports Site: <%= title %> </title>

Can I add a function to the variable?

I know in php I can do this

<title>Sports Site: <?php ucfirst($title); ?> </title>

and problem solved. But wondering if anyone knows a fix for jsp

Thanks

Reply With Quote
08-10-2011, 06:33 PM
#2
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,892
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

Have you tried this? If so what results did you get and if not go try it.

Reply With Quote
Thanked by:
jshotzz (08-10-2011)
08-10-2011, 06:46 PM
#3
jshotzz is offline jshotzz
Status: I'm new around here
Join date: Oct 2008
Location: Mississauga Ontario
Expertise:
Software:
 
Posts: 10
iTrader: 0 / 0%
 

jshotzz is on a distinguished road

  Old

I know the php works, but I have yet to have an idea of the function used for jsp. I'm restricted to using jsp.

Reply With Quote
08-10-2011, 07:06 PM
#4
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,892
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

Go learn JSP and that answer will make itself clear. I don't know any JSP but I'm sure the answer is ten seconds away on google. Try looking for "shorthand jsp"

Reply With Quote
03-25-2012, 05:41 AM
#5
badams77 is offline badams77
Status: I'm new around here
Join date: Mar 2012
Location: London
Expertise: Java Programmer
Software: Linux
 
Posts: 1
iTrader: 0 / 0%
 

badams77 is on a distinguished road

  Old

You can place any expression within the <%= %> tags and it will be evaluated and displayed as either a String or a numeric type. If you want to call at function that is easy.

<%=func()%>

And you may define the function else where as

<%! String func(){
doSomething();
} %>

Note the explaination mark to indicate that the code is to be placed into the servlet object, and not into straight into the doRequest method.

Reply With Quote
Reply    


Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed