Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Simplest Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Simplest Problem" Watch "Simplest Problem" New topic
Author

Simplest Problem

Rohit Ahuja
Ranch Hand

Joined: Oct 04, 2001
Posts: 121
Hi Guys,
Am a newbie when it comes to Struts. Am just wondering what the following tag wud look like in struts.

My bean(say Hello) has a field phone_number.

in common jsp language i wud say jsp:useBean name="Hello"

<%
if( Hello.getPhone_number().toString().length() == 10)
{
<%=Hello.getPhone_number().subString(0,3)%>
-
<%=Hello.getPhone_number().subString(4,5)%>
-
<%=Hello.getPhone_number().subString(6,9)%>
}
%>

Want a quick solution.


Face Off.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Before you get your quick solution, would you mind changing your display name so that it complies with our naming policy?

Thank you.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

I'll wait until you meet Lasse's request.


A good workman is known by his tools.
Rohit Ahuja
Ranch Hand

Joined: Oct 04, 2001
Posts: 121
Now This is not done mate. ((((( We all know software engineers are a fancy lot. So what if i am named as a stylish hunk on this site ? (
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simplest Problem