How to run a jsp file written in a struts framework using tomcat5.0 server
hi,
plz somebody help me.
how do i run a jsp file which i've written in struts framework .
and anybody plz tell me the process from installing a tomcat server to setting its path such that my jsp page runs....
hi,
this is zoya,I gathered from the name that appears in the post header already. :^)
an engineering student,and i require
help.
plz somebody specify the whole process from
installing tomcat and how to set its path so that i
can run a jsp page written in struts using tomcatThere are dozens of tutorials on this. First, you need to get Tomcat running without Struts. There are HOW-TO's, sample apps, the whole shebang over at Jakarta's site. Start there. If you get stuck, there are also tutorials on Servlets (and probably Tomcat in specific) on the Net. Do a Google search.
Next, download Struts. There is, again, extensive HOW-TO and tutorials on their site as well.
No one will do your work for you. Make an attempt, then post when you are stuck.
- Saish
Similar Messages
-
i am writing a simple jsp file
i dont know how to run in the tomcat server
for servlets first i created the dot class files by using the command prompt and then in the tomcat server we go the webapps folder and i copy the class files and due to xml file i run the program
I have added the jsp-api.jar and el-api.jar files in the environment variables so what i do to run the jsp
can anyone can tell me how to do that
here is the program
<%@page contentType="text/html" import="java.util.*" %>
<!--
Date.jsp
-->
<html>
<body>
<p> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing
="0" width="460" bgcolor="#EEFFCA">
<tr>
<td width="100%"><font size="6" color
="#008000"> Date Example</font></td>
</tr>
<tr>
<td width="100%"><b> Current Date
and time is: <font color="#FF0000">
<%= new java.util.Date() %>
</font></b></td>
</tr>
</table>
</center>
</div>
</body>
</html>i am getting an http 500 error for running the jsp file
here is the code
<%@ page import="java.util.Date" %>
<% Date now = new Date(); %>
<html>
<body>
<p>Hello, world! It is now <%= now.toString() %>.</p>
</body>
</html> -
New to JSP-How to run a .jsp file
I Have just begin to learn JSP. I downloaded the JSP developer kit from java.sun.com. However I dont know how to proceed. I have seen references to'the container'. what is it and how do I start it? and the same for the server which I have in the form a batch file. How do I configure the environment? Are there any prerequisites to using this kit wrt software? Please do help me, since I am absolutely clueless
Regards,
SwetaHi Sweta,
Please use any editor like eclipse or netbeans or you create one jsp page(assumes you know jsp).
and then create two folders web-inf inside which create classes and lib folder and web.xml is created, and meta-inf inside which context.xml is created. And use tomcat container to deploy.
Apache tomcat is container which would receive the client request from browser that will route to servlet/jsp.
whereas Apache webserver is different it provides the request to container if it exists then we can replace localhost:8080 by user defined.
JSP is nothing but Dynamic web page creator which embed java program in html.
JSPinit initializes and while running converts to servlet and will be processed according to the java code embed and display as per the html tags.
But you should use struts framework why it is constructed upon MVC architecture and purely object oriented.
So struts is nothing but the execution calls are drived by configuration xml files.
If anything you need to know in details, pls msg me to [email protected]
Thanking you
Charles v c -
I have installed Tomcat5.5
when i type locahost:8080 the apache home page cmes up but i need my jsp file to appear when i type local host
Plz Help me
ShasiC:\Program Files\Apache Group\Tomcat 4.1\webapps\
change your file with index.jsp
will give ur result -
How to read a binary file written in LabVIEW 6.1 using VB ?
How to read a file saved in binay forrmat in LabVIEW 6.1 platform through VB.
Is there any code ?
ThanksHello,
LabVIEW files stored in binary can take on just about any format that
you choose, so there will not be a single piece of code that will give
you what you are looking for. You can use VB's standard file
operation functions to read in a binary file created by LabVIEW, just
as you would read in any other binary file. See this page
on Microsoft's web site for more information on the binary file read
operation. How you stored the data in the binary file will
determine how you need to extract it from the byte array. So, if
the first element stored in the file was a 32-bit integer, you could
extract an int from the byte stream to recover that piece of your
data. You would need to know in advance how the file was
formatted in order to successfully retrieve the information. If
you need a reference for the VB functions, the microsoft link above
will get you to some good information.
Cheers,
Matt Pollock
National Instruments -
hello to all of u
i m bit comfortable with SERVLET and please tell me that how to run a JSP page.i m using TOMCAT.
someplace it is written that " write the program ,save under the root of tomcat i.e in my system it is tomcat 4.1 and to store in tomcat4.1\helloworld.jsp ,,, and then after start the server write in the url --:
http://localhost:8080/hello.jsp.
but it is giving error while running.please tell me the procedure.
thank you
byeWhy oh WHY do you want to fiddle with the server.xml file?
You don't need to.
Under tomcat is a directory called "Webapps"
This is where you put your web applications.
You will see there is an existing one there called ROOT - which funnily enough is the root one used for Tomcat.
If you put your hello.jsp in the ROOT directory, http://localhost:8080/hello.jsp will work.
However it is not recommended to use the ROOT directory. Make your own one.
Create a new directory in the "Webapps" directory eg "test"
Put your jsps in here.
under test create a directory called "WEB-INF"
Copy the web.xml file from [TOMCAT_HOME]/webapps/ROOT/web-inf into the new web-inf directory.
Now go to http://localhost:8080/test/hello.jsp
Cheers,
evnafets -
Regarding the running the jsp file
i am getting an error class names date.jsp are only acceptable is annotation processing is explicitly requested
i have saved this file by name date.jsp
and when i run this .jsp file in commant prompt i am getting an error
so what should i do
do i need any extra software to install to run the jsp
i have tomcat and jdk1.6 in my system
<%@page contentType="text/html" import="java.util.*" %>
<!--
Date.jsp
-->
<html>
<body>
<p> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing
="0" width="460" bgcolor="#EEFFCA">
<tr>
<td width="100%"><font size="6" color
="#008000"> Date Example</font></td>
</tr>
<tr>
<td width="100%"><b> Current Date
and time is: <font color="#FF0000">
<%= new java.util.Date() %>
</font></b></td>
</tr>
</table>
</center>
</div>
</body>
</html>and when i run this .jsp file in commant prompt i am getting an error How do you run a jsp file from a command prompt? What command are you using?
The standard way to run a jsp page is to deploy it onto a server as part of a web application, and then access the page through the browser.
Tomcat should take care of compiling/running it for you.
Cheers,
evnafets -
How to deploy a jsp file?
Hello,
I am new to Java. I have been developing a small web application which contains three files HTML,SERVLET and a JSP. I don't have any problem with the html & Servlet, It runs well and I get the desired output.
I use the JSP file for validation.
But, How to run this JSP?
i.e. I want to run this JSP page from Servlet while performing some validations.
Plz let me know
where should I put this JSP? (I am using Tomcat server)
Is there any need to enter data into web.xml similar to Servlet?
Is there any need to set some environmental variables etc etc...
Hope a quick respone.
Thank you.This is my servlet code........
import java.sql.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class ServerConfig extends HttpServlet
Connection con;
Statement st;
ResultSet rs;
public void init(ServletConfig config) throws ServletException
super.init(config);
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:ServerConfig"," "," ");
st=con.createStatement();
}catch(Exception se){System.out.println("problem with connection establishment");}
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
String s1,s2,s3,s4;
res.setContentType("text/html");
PrintWriter out = res.getWriter();
int branches = Integer.parseInt(req.getParameter("txtBranches"));
int users = Integer.parseInt(req.getParameter("txtUsers"));
int accounts = Integer.parseInt(req.getParameter("txtAccounts"));
int transactions = Integer.parseInt(req.getParameter("txtTransactions"));
out.println("<HTML>");
out.println("<HEAD><TITLE>Server Configuraion</TITLE></HEAD>");
out.println("<BODY>");
out.println("<B>Best Server Configuraion</B><HR>");
out.println("<FORM>");
out.println("Branches: " + branches);
out.println("<BR>");
out.println("Users: "+ users);
out.println("<BR>");
out.println("Accounts: "+ accounts);
out.println("<BR>");
out.println("Transactions: "+ transactions);
out.println("<HR>");
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("DriverLoaded");
Connection con=DriverManager.getConnection("jdbc:odbc:ServerConfig"," "," ");
System.out.println("Connected");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select DatabaseConfig,ApplicationConfig,WebConfig,BranchConfig from Configuration where Branches="+ branches +" and Transactions="+ transactions +" and Accounts="+ accounts +" and Users="+ users +";");
rs.next();
s1 = rs.getString(1);
s2 = rs.getString(2);
s3 = rs.getString(3);
s4 = rs.getString(4);
if (s1.length()==0)||(s2.length()==0)||(s3.length()==0)
//Plz let me know how should I call JSP?????
out.println("Database Server:<BR> <textarea rows=5 cols=30>"+s1+"</textarea><BR>");
out.println("Application Server:<BR> <textarea rows=5 cols=30>"+s2+"</textarea><BR>");
out.println("Branch Server:<BR> <textarea rows=5 cols=30>"+s3+"</textarea><BR>");
out.println("Web Server:<BR> <textarea rows=5 cols=30>"+s4+"</textarea><BR>");
out.println("</FORM>");
out.println("</BODY>");
out.println("</HTML>");
con.close();
}catch(Exception ex){System.out.println(ex);ex.printStackTrace();}
}; -
How to add existing jsp file to a project?
I am trying out 10g developer preview. Looks like a lot of bugs are there in the tool. I would like to know how to add existing jsp file into a project. I tried the Import functionality, but it shows the option to create a project and include only Java files. Is there a way to do this? Thank you
Just copy the files in the directory where the rest of your source file is.
-
How to call a .jsp file from Applet
Could any one guide me how to call a .jsp file from a Applet using action Event.
Thankshttp://javaalmanac.com/cgi-bin/search/find.pl?words=URL+post
-
How to run a jar file in JBuilder
Hi there
I need to know how to run a jar file using JBuilder. Thanks :)
Countesswell i have a german version of jbuilder and there it is under
experten Archiv-builder
look at something that has a similar name -
How to run a JAR file in Unix system?
hi there
ca anyone tell me how to run a JAR file in unix system or X window, thank youYou want to create an executable JAR file? You do it in the following way.
Create a manifest file such as manif.txt and the contents should contain
Main-Class: foo
assuming foo is the name of your main class. Then create the jar as follows
jar cvfm foo.jar manif.txt foo.class
I hope that helps you!
you can find more info here http://java.sun.com/docs/books/tutorial/jar/ -
Running a JSP file from the IDE causes error
When I try to run a JSP file from a list of project files, I'm getting the following error:
- C:\jdev\jdev9.0.3.4\jdev\mywork\ei_SmartWS\JavaEdge.war!\JavaEdge\src\web\WEB-INF\jsp\searchFormContent.jsp
X Error: JSP files must reside in the server root directory or a subdirectory beneath it
Anyone knows why it's doing this?Or Web app root, of course:
your-web-app ---> JSPs, HTML pages here
WEB-INF ---> web.xml goes here
classes ---> Loose .class files go here.
lib ---> 3rd party JAR files go here.
MOD -
How to run an exe file in a java program
Hi,
Can somebody tell me how to run an exe file in a java program.
Thank you!Yes, java.lang.Runtime.exec().
Read this carefully before you do:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
Don't write a line of code before you're reviewed and understood the article completely. - MOD -
How to run a batch file as windows Nt service
Hi friends
I want to know how to run a batch file as windows NT service.
I got some information in the following link
http://support.microsoft.com/kb/q243486/
I tried it but i want to know what we need to include in Autoexnt.bat
And one thing i need Instexnt.exe file. I cannot find tht file.
Please search tht file and send me tht file or else send the link in which this file is present
Please give me reply fast.its very urgent.
Thanks in advance.Hi,
My aim is to run a MS-DOS Batch file, that I created to run a Java Prgram.
I need to call the Batch File from the Oracle Procedure, Also I may need to change the content of the Batch File (Argument to the Java JAR File ).
I can keep the JAR FIle either in the Oracle Server or in the Application Server.
The Java program is to convert XML Format FIle to PDF and MS Word format.
Oracle Version : 10g 2.0.1.0.
Thanks in advance
Rizly
Maybe you are looking for
-
How to change the graph results selections in a query?
Hi, i want to change the graphical representaions of a workbook which were based on the past year 2007 now i want to have the results for the year 2008. how the year selections can be made for graphical results? Raj
-
I cannot configure my iPhone 5 for the first time
-
Re:tv recorded dvd rw and dvd-rw wont play anymore on my mac
Re:tv recorded dvd rw and dvd-rw wont play anymore on my mac
-
How to call a method of a view in popup view
Hi Experts, I have created WDJ program. It has 3 views - view1, view 2 and 1 pop up view. view1 and view2 are in window1. popup view is in window2. There are input and output plugs in view1 and view2. view1 and view2 are connected by navigation link
-
Using Photoshop to create menus
This question was posted in response to the following article: http://help.adobe.com/en_US/encore/cs/using/WS2C3F3ABD-6457-4ca0-898F-720B7E3D0C10.html