This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

basePath in jsp

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

i am using eclipse..Here you see,every jsp file has the basePath(We have to do like below)..please anyone can explain me?why it is?
----------------------------------------
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
-------------------------------------------

thanks & regards,
seetharaman



[ March 31, 2008: Message edited by: Bear Bibeault ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are looking for the meaning of the BASE tag, you can refer to this document.
 
Mohammed Yousuff
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Base URL is the URL which will appended with the relative path to give absolute path. Most of the time when you code, you will refer CS and JS files as relative paths.
Using this URL they will converted by the browsers to get the resources from the Server.
When you are not using this URL tag, then the current URL will be takes as the BASE URL PATH.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic