• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

Problem in Displayig Storage Procedure values

hi everyone,

Out put  of a Storage Procedures is something like this:
-----------------------------------------------------------
Name        Version     Path                      FileSize
-----------------------------------------------------------
Bat.exe       1.1          /abc/bat/              52344
Read.txt     1.1          /abc/read/                413
Install.iso     1.1          /abc/install/            1111
------------------------------------------------------------

Now in JSP page I wanna display this values, please fill up the (?) here:

<% .......
ResultSet rs= cs.executeQuery();

<a href="(????Path + ????Name)"> Install</a>    FileSize: ???????
<a href="<%=rs.getString(3)%>"> Read Me</a>   <== I tried thils line but showed error.
<a href="????path plus file name??????"> Batch File</a>

..........%>
======================================
Bascialy I want the output something like this:

<a href="/abc/install/Install.iso">    Install       </a>   FileSize: 52344
<a href="/abc/read/Read.txt">     Read Me   </a>   FileSize: 413
<a href="/abc/bat/Batch.exe">     Batch File  </a>   FileSize: 1111

Please help
0
princehyderabad
Asked:
princehyderabad
  • 3
  • 3
1 Solution
 
bloodredsunCommented:
while (rs.next()) {
%>

<a href="(????Path + ????Name)"> Install</a>    FileSize: ???????
<a href="<%=rs.getString(3)%>"> Read Me</a>   <== I tried thils line but showed error.
<a href="????path plus file name??????"> Batch File</a>

<%}>

for the resultset value use get<type>(int index) or use getString(String columnName)
0
 
princehyderabadAuthor Commented:
yeah I tried the same, wrong output giving me three sets of values;

 See the output:

<a href="/abc/install/Install.iso">    Install       </a>   FileSize: 52344
<a href="/abc/install/Install.iso">     Read Me   </a>   FileSize: 52344
<a href="/abc/install/Install.iso">     Batch File  </a>   FileSize: 52344

<a href="/abc/read/Read.txt">    Install       </a>   FileSize: 413
<a href="/abc/read/Read.txt">     Read Me   </a>   FileSize: 413
<a href="/abc/read/Read.txt">     Batch File  </a>   FileSize: 413

<a href="/abc/bat/Batch.exe">    Install       </a>   FileSize: 1111
<a href="/abc/bat/Batch.exe">     Read Me   </a>   FileSize: 1111
<a href="/abc/bat/Batch.exe">     Batch File  </a>   FileSize: 1111
0
 
bloodredsunCommented:
Then just do one line at a time not three. You'll have to do a if statement to get the String between the a tags
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
princehyderabadAuthor Commented:
How ? Thats is what I'm seeking help for
0
 
bloodredsunCommented:
Do a subString on the returned value you use fot the url that stops at the docs. You need to look for the indexOf(".") for the stop point.
0
 
princehyderabadAuthor Commented:
Anyone to help on this issues.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now