Solved

jsp run on server option not coming

Posted on 2013-01-29
10
436 Views
Last Modified: 2013-02-10
I am trying to run my jsp by right clicking on the file---> run as---->Run on server.

But it is not showing 'Run on server'


It only shows 'Run Configuration'


How do I see option 'Run on server'

As a work around i am setting welcome file in web.xml with this jsp to run.


Please advise. Any ideas, sample code, resources highly appreciated. Thanks

in advance.
jsp.jpg
jsp2.jpg
0
Comment
Question by:gudii9
  • 6
  • 3
10 Comments
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 38834003
does JSPProject is a web project or java project?
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 38834596
your does not code contain <form> tag its important ML(Jsp) page.

if your page contain <form> tag then only your reganice that its web page then only it will come run on server
0
 
LVL 7

Author Comment

by:gudii9
ID: 38835268
It is web project.

let me try with form tag and see.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Author Comment

by:gudii9
ID: 38835605
form tag is usually on html page right. Does jsp pages consist of form tag. i want to run jsp pages without form tag. how to do it.Please advise.
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 38838536
its main for jsp also .

because that form tag only knows where to go next ! (normaly you mention action ="some java class or jsp  " like that . )

You cant run the jsp page without form tag . because jsp is convert into servlet while compile. that servlet class only your IDE ref . if form tag is there then its web so its enable run on server .
0
 
LVL 7

Author Comment

by:gudii9
ID: 38840305
If you see the Loin.jsp file do have the form ta. Still it is not showin 'Run as Server' option' as in the attachment. Not sure why. Please advise

<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
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%>">
   
    <title>Login page</title>
   
      <meta http-equiv="pragma" content="no-cache">
      <meta http-equiv="cache-control" content="no-cache">
      <meta http-equiv="expires" content="0">    
      <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
      <meta http-equiv="description" content="This is my page">
      <!--
      <link rel="stylesheet" type="text/css" href="styles.css">
      -->

  </head>
 
  <body>

 <form method="post" action="loginservletpath">
 <br>User Id:<input type="text" name="userId">
 <br>Password:<input type="password" name="password"/>
<br> <input type="submit">
 </form>
  </body>
</html>
loinJsp.jpg
0
 
LVL 7

Author Comment

by:gudii9
ID: 38856165
Does MyEclipse Show 'Run on server' option at all. please advise
0
 
LVL 7

Author Comment

by:gudii9
ID: 38856170
any links to learn how to run servlets, jsps on myeclipse. please advise
0
 
LVL 20

Accepted Solution

by:
Sathish David  Kumar N earned 500 total points
ID: 38858360
change the prespective to j2ee mode i think its in java mode .

in your MyEclispe right corner you can see the prespetive
0
 
LVL 7

Author Comment

by:gudii9
ID: 38872996
oh really, my OS crashed. I will try by reinstalling later
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
hibernate example for saving data 19 72
runtime exception 2 50
login form jsp example 2 48
Need Help! Getting a syntax error and don't understand why 3 38
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question