Solved

jsp run on server option not coming

Posted on 2013-01-29
10
435 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Maven Project: Hibernate Dependencies Conflict 10 37
couple of eclipse 5 45
Eclipse with gitlab 1 77
hibernate insert example 13 34
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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 third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

792 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