Tech Curiosity & Bio Curiosity Discussion Forum Index Tech Curiosity & Bio Curiosity Discussion Forum

 
 HomeHome | ServicesServices | ContactContact Us
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
  Post GuidelinesPosting Guidelines    ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  TutorialsFree Tutorials - Linux | Web Hosting | Web Templates | Bioinformatics | Free BioScripts
 

Allwebco Website Templates Reliable Web Solutions
How to test if JSP is working for your account on the server

 
Post new topic   Reply to topic    Tech Curiosity & Bio Curiosity Discussion Forum Index -> Java - JSP
View previous topic :: View next topic  
Author Message
telson



Joined: 29 Nov 2006
Posts: 123

PostPosted: Tue Aug 26, 2008 6:42 pm    Post subject: How to test if JSP is working for your account on the server Reply with quote

How to test if JSP is working for your account on the server

Once JSP is enabled for your account, you can create a file " jsptest.jsp " and add the following line of code in it.

Code:
<html>
<head>
<title>Test JSP page</title></head>
<body bgcolor=white>                                                                                 
<table border="0">
<tr> <td>
<h1>Sample Application JSP Page</h1>
This is the output of a JSP page that is part of the Hello, Worldapplication.  It displays several useful values from the request we are currently processing.
</td></tr>
</table>                                                                               
<table border="0" border="100%">
<tr> 
<th align="right">Context Path:</th> 
<td align="left"><%= request.getContextPath() %></td></tr>
<tr>  <th align="right">Path Information:</th> 
<td align="left"><%= request.getPathInfo() %></td>
</tr>
<tr> 
<th align="right">Query String:</th> 
<td align="left"><%= request.getQueryString() %></td>
</tr>
<tr> 
<th align="right">Request Method:</th> 
<td align="left"><%= request.getMethod() %></td>
</tr>
<tr>  <th align="right">Servlet Path:</th> 
<td align="left"><%= request.getServletPath() %></td>
</tr>
</table>
</body>
</html>


Access the file using your browser.
Example: domain.com/jsptest.jsp
_________________
Regards,
Telson Thomas
Linux Web Server Administrator
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Tech Curiosity & Bio Curiosity Discussion Forum Index -> Java - JSP All times are GMT + 5.5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Help us in our Mission - Donate to TechCuriosity


 
Partners:
Web hosting comparison | Web Hosting | Dedicated Server | Link Building SEO