My servlet and the Different OS
Hi
When a form is posted to a servlet from a web page, the request is handled by the servlet and a response is sent back to the client without any problem ( only if the client is using Win 98 , 2000 or NT )
But if any the clients is using winXP the servlet handles the request twice ?? ie the form seems to be posted twice
Can someone please help on why this happens with WinXP .
I have tried to set the winxp explorer options but to no vail
Regards
IB
Try to use a HTTP sniffer to see if your browser under winXP is really sending 2 HTTP REQUEST.
Similar Messages
-
so i just got new service with Verizon on the 4 of July and the phones when on sale or should i say drop in price i return to the store to get the different back . i call verizon nice lady told me i will be able to get my money back just go to a verizon store. I came into the store i didn't want the money back i just wanted more things for the phone like the cool mophie case gold to match my phone she come back out after 30 minute of me waiting to tell me im sorry but we cannot give you your money back and i ask her why im still with in the 14 day return period and was told that i can get the different back i try telling her that all i wanted to do is get the case and the different she can put to the account. she kept saying no it cannot happen so i ask to speak to a manger and she would not come out she stay in the office and the lady that was helping me was just going back forth with me and the manger i told her i would like to cancel the service and i just go back to my old phone company she wouldn't cancel the service with me told me now the manger would put a credit to the account and i can order the case that way with really don't make sense to me if you can credit my account why is it i cannot get credit for my case today and i really don't know as she kept saying to me, i didn't want a credit to my account i want my case .
Maybe 5 minutes max?
-
Help With Integrating Servlet and JSP Page?
Hello There
--i made jsp page that contain name and description fields and add button
--and i made servlet that contain the code to insert name and description in the database
--and i want to make that when the user hit the add button
-->the entered name and description is sent to the servlet
and the servlet sent them to database?
here's what i 've done:
the jsp code:
<html:html locale="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
Categories Page
</title>
<html:base/>
</head>
<body style="background-color: white">
<form action="jpage.jsp" method="get">
<h1>
<center>
categories Operations
</center>
</h1>
<h3>
<label>Name</label>
<input type="text" name="name" value="" size="10" />
<label>Description</label>
<input type="text" name="description" value="" size="10" />
<input type="submit" value="Add" name="button" />
</h3>
</form>
</body>
</html:html>the servlet code:
import java.io.*;
import java.util.Enumeration;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.net.*;
class NewServlet1 extends HttpServlet{
Connection conn;
private ServletConfig config;
public void init(ServletConfig config)
throws ServletException{
this.config=config;
public void service (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
HttpSession session = req.getSession(true);
res.setContentType("text/html");
try{
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost/struts", "root", "");
PreparedStatement ps;
ps = conn.prepareStatement ("INSERT INTO categories (Name, Description) VALUES(?,?)");
ps.setString (1, "aa");
ps.setString (3, "bb");
ps.executeUpdate();
ps.close();
conn.close();
}catch(Exception e){ e.getMessage();}
public void destroy(){}
}The JSP Code:
<html:html locale="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
Categories Page
</title>
<html:base/>
</head>
<body style="background-color: white">
<form action="actionServlet.do?action=Additem" method="*post*">
<h1>
<center>
categories Operations
</center>
</h1>
<h3>
<label>Name</label>
<input type="text" name="name" value="" size="10" />
<label>Description</label>
<input type="text" name="description" value="" size="10" />
<input type="button" value="Submit">
</h3>
</form>
</body>
</html:html>The Servlet Code:
import java.io.*;
import java.util.Enumeration;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.net.*;
public class NewServlet1 extends HttpServlet implements SingleThreadModel {
public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException,IOException {
doPost(request,response);
public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException,IOException {
String action = request.getParameter("action"); // action = "Additem"
if (action.equals("Additem")) {
String name = request.getParameter("name");
String description = request.getParameter("description");
RequestDispatcher reqDisp = null;
try{
Connection conn;
PreparedStatement ps;
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost/struts", "root", "");
ps = conn.prepareStatement ("INSERT INTO categories (Name, Description) VALUES(?,?)");
ps.setString (1, name);
ps.setString (3, description);
ps.executeUpdate();
ps.close();
conn.close();
reqDisp= request.getRequestDispatcher("./index.jsp");
reqDisp.forward(request, response);
catch (Exception ex){
System.out.println("Error: "+ ex);
}The web.xml code:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>NewServlet1</servlet-name>
<servlet-class>NewServlet1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>NewServlet1</servlet-name>
<url-pattern>/NewServlet1</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>actionServlet</servlet-name>
<servlet-class>com.test.servlet.NewServlet1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>actionServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app> -
Differences between servlet and backing bean
Could anyone please tell me whether everywhere that servlet can be used, backing bean and JSF can be used too? Are JSF and backing beans the new alternatives for JSP and servlets? please clarify the relations between these concepts for me.
Thanks
LauraLaura_Jlover wrote:
Thank you. You mean backing beans can do every thing that servlets can do? Yes.
JSF pages can work with servlets? Strictly speaking, every JSF page gets passed through the FacesServlet which does all the task. The lifecycle, creating the FacesContext, putting the request parameters in backing beans, rendering the response, etcetera.
what are the advantages of servlet and the advantages of backing beans? what's the disadvantages? In general, which one is better?In context of JSF, you should be using backing beans, not Servlets. There is nothing what a Servlet can offer you as an advantage in the JSF context. It is simply not an option/alternative. You can't even call a Servlet (directly) using a JSF h:form. You, however, can access backing beans in any JSP or Servlet outside the JSF context.
Just carefully read the JSF specification or buy a JSF book and the picture will be clear.
JSF spec: [http://jcp.org/aboutJava/communityprocess/final/jsr252/index.html].
JSF book: [http://www.amazon.com/JavaServer-Faces-Complete-Reference/dp/0072262400]. -
Interaction between 2 classes (servlet and someother)
Hi all,
I have 2 java files one is a servlet and the other is an ordinary java file which checks to see whether a username and password exists in the database(UserPresent.java).This file has got the presentation layer which has to be put into the servlet.
The servlet file must call the UserPresent.java file.I am going to make an interface to the UserPresent.java file ,I will call it User.java.This User.java file will have a method by name
public boolean validateUser(String username,String pasword) .
The UserPresent.java file will implement this interface.
My question now is,where will these java files be put ?,hope that my point is conveyed.How do I test UserPresent.java file.Kindly excuse me if there is a much more sophisticated way of expressing this.
Hoping to hear from you all
Thanks
ASIf put means where does that files goes into directories.
then u can put that files in same package as servlet resides or put in anther package and import
thats all my understanding
regards
hithesh -
Servlet and EJB on different machine: Security propagation
Hi all,
I have an application, where my servlets and EJBS are deployed on the same machine.So
when in my servlet a user need to authenticate himself, security credentials are
propagated to the EJB automatically.I'd like to know in the case where the components
are on different machine if I need to put the credential in my InitialContext
when my servlet calls my EJB or if it is also done automatically.
Cheers
romainSay your stub is in a jar called stub.jar.
You need to put that stub somewhere that it can be reached through a protocol for which Java has a URL type - so you can put it on a shared file system and use a file URL or behind an http server and use an http URL.
Let's use http - put stub.jar at the docroot of a web server.
Then, when you start your SERVER code, include this VM parameter:
-Djava.rmi.server.codebase="http://<serveraddress>stub.jar"
Now your client will be able to use http to load the stub file out of stub.jar through http.
If you do use a file URL, make sure the shared directory you put your jar in is not on the client's classpath. -
Servlet is giving different output on JBuilder 2005(IDE) and on browser
Hi all
I am using JBuilder2005 for devloping servlets.
While I am executing the code on JBuilder itself..it's working out fine..
But when I am trying to use browser for calling a servlet...I am getting Different output..
Can Anyone tell me why is so..and where I have to make changes so that I can do the same from browser also
Thx
VijayWhat do u mean on JBuilder? The browser built-in to JBuilder? What are the different outputs?
-
SSO between WebDynpro and Servlet on the same machine
Hi,
I have an WebDynpro application running in our portal which makes some calls using RFC to a backend system. The RFC connection is obtained using DestinationService and SAP Logon Ticket is used for authentication.
This app should call a servlet on the same instance which also uses RFC to get some data from the backend.
Now, wenn I call the servlet from the WebDynpro, the exception java.lang.IllegalStateException: No SAP logon ticket found comes up. Does anyone have an idea how to configure the servlet-webapp to accept logon tickets?
Thanks in advance
Thorstenthis must mean that your windows drive is formatted NTFS. NTFS drives are not natively writable from OS X (only readable). However, you can install Macfuse and [NTFS-3g|http://macntfs-3g.blogspot.com> (both are free) to make them writable.
-
i downloaded 3 songs to my pc and sync'd my ipod and the songs do not tranfer. is this related to not having the proper itunes version vs ios? I cannot get the songs to sync, but I can move other songs to different playlists and they sync fine...any ideas what's wrong?
Hi Dennis!
I have a couple of steps for you to try in order to get those songs transferred to your iPod touch. First, make sure all of your software is updated with the latest versions. If the songs were downloaded from iTunes, you will also want to delete the songs from your library and then download them again from the list of past purchases on your iTunes account. An article about doing that can be found here:
Downloading past purchases from the App Store, iBookstore, and iTunes Store
http://support.apple.com/kb/ht2519
If you try a sync after those two steps and are still seeing the issue, then I would like you to try syncing the iPod by setting it to manually manage. An article outlining more information on manually managing your iPod sync can be found here:
Managing content manually on iPhone, iPad, and iPod
http://support.apple.com/kb/ht1535
If you are still having issues after that, I have another article that can outline some other reasons why your songs may not transfer to your iPod, and it can be found here:
Some songs in iTunes won't copy to iPod
http://support.apple.com/kb/TS1420
Thanks for being a part of the Apple Support Communities!
Regards,
Braden -
What is the different between Sharepoint fast search service and Sql server fulltext search?
HI ,
I want to kow what is the different between Sharepoint fast search service and Sql server fulltext search?
Or Can I abstract the Sharepoint fast search from the Sharepoint platform as a isolate component?
Thank you.
JamesThey are very, very different beasts.
Firstly FAST Search for SharePoint is the old name for the product and is only relevant for SharePoint 2010 not 2013. It got merged into the standard SharePoint search for the 2013 release.
SharePoint search is aimed at providing a Bing or Google like experience for your intranet content, as well as providing some nifty features that are purely SharePoint releated along the way. That means it can crawl SharePoint content, file shares,
outlook mailboxes, internal and external websites and probably fifty other different things if you really tried. Whilst i'm not an expert on SQL full text search I believe it's intended to provide a search feature for content held within SQL databases
and tables.
Can you run SharePoint purely for Search? Yes, definitely. -
How to get the query values from the url in a servlet and pass them to jsp
ok..this is the situation...
all applications are routed through a login page...
so if we have a url like www.abc.com/appA/login?param1=A¶m2=B , the query string must be passed onto a servlet(which is invoked before the login page is displayed)..the servlet must process the query string and then should pass all those values(as hidden values) to the login jsp..then user enters username and pswd, then there should be another servlet which takes all the hidden values of jsp and also username and pswd, authenticates the user and sends the control back to that particular application along with the hidden values...
so i need help on how to parse the query string from the original url in the servlet, pass it out to jsp, and then pass it back to the servlet and back to the original application...damnn...any help would be greatly appreciated...thanksok..this is the situation...Sounds like you have a bad design on your hands.
You're going to send passwords in a GET request as clear text? Nice security there.
Why not start with basic security and work your way up?
% -
As I said, the other day I had downloaded the latest version of Firefox and after doing so none of the icons for the different websites that normally go to are no longer there. Websites such as MSNBC, MSN, Most visited, that entire strip is no longer visible. I tired resetting Firefox and still nothing. Can anyone tell me how to get them to appear again? It's a hassle every time that I want to go to one of those sites I have to type it in the search bar, instead of just clicking on it as I did before. Please keep in mind if you answer, that I'm still learning about these things called computers and not very well versed in some of the things that you experts know:) Thanks
On Windows XP Firefox shows the menu bar by default and not the orange Firefox menu button that is shown when the menu bar is hidden.<br />
The menu bar is the toolbar at the top that shows menu items like File, Edit, View, History, Bookmarks, Tools, Help.<br />
You can press the F10 key or tap the Alt key to bring up the "Menu Bar" temporarily in case this bar is hidden (View > Toolbars or Firefox > Options).
The Navigation Toolbar shows the Back and forward button and the input field where you type the address of a site that you want to visit (aka location bar) and also has a search bar where you can type items that you want to look up with a search engine (Google).
See also:
*https://support.mozilla.org/kb/how-do-i-get-firefox-button
*https://support.mozilla.org/kb/Menu+bar+is+missing
*https://support.mozilla.org/kb/Browsing+basics
*https://support.mozilla.org/kb/Tabbed+browsing
You can attach a screenshot in case you still have problems with the toolbars to show what you want to change.
*http://en.wikipedia.org/wiki/Screenshot
*https://support.mozilla.org/kb/how-do-i-create-screenshot-my-problem
Use a compressed image type like PNG or JPG to save the screenshot. -
I am trying to hook my MacBook Pro to a Sony Bravia TV via DVI to HDMI cable and the TV will not recognize the signal. I have used the same setup with three other TV's, each a different brand with no problem. Any ideas?
Is the TV set to take input from the HDMI connection?
On your computer, if you open the Displays preferences and do not see an Arrangement tab (or there is an Arrangement tab that shows only a single monitor) then there is something physically wrong with your connection. Try clicking Detect Displays just to see if the computer can now sense the presence of the connection. Check your connections.
If you do have an Arrangement tab, and it shows two screens, then click Gather Windows to bring the TV's Displays preferences on to your main screen if the TV is not yet showing an image. Set the proper resolution (probably 720p, 1080i, or 1080p). Set the refresh rate (probably 60Hz) if that preference is shown. You should see a picture at this point. I recommend turning off mirrored displays if it is enabled. -
I am trying to edit footage in PE12 from 2 different cameras and the output looks terrible
I am trying to edit footage in PE12 from 2 different cameras. One is a canon HD video camera taking AVCHD at 1440x1080 at 29fps. I am also using a canon 70D DSLR taking a MOV at 1920x 1080 at 29FPS
I want to make a 2 camera angle video. When i import both videos into PE12 and edit them together (i am dropping in footage and editing them back to back on video/audio 1) and start rendering, the output video is horrible. there are no straight lines and its blurry. the source video looks great...I am wondering if the difference in size of the 2 videos are messing up the project. is there anything i could do to make the final video look better?
I am very new at using this program and any information would be helpful...
thanks in advance,
jasonjason
Both 1440 x 1080 HD anamorphic 16:9 (pixel aspect ratio = 1.33) and 1920 x 1080 16:9 (pixel aspect ratio = 1.0) have the same
display, that is, 1920 x 1080. Whether you use a project preset for either, the space established by the project preset in the Edit area
monitor is 1920 x 1080 for editing. So, we achieve the goal of a 1920 x 1080 Edit area monitor space in selecting the project preset cited
above, that is
NTSC
DSLR
1080p
DSLR 1080p30
On the export side of things, it has long been suggested that 1440 x 1080 HD anamorphic content be exported with preset for 1920 x 1080 16:9
instead of 1440 x 1080 HD anamorphic 16:9 since both give the same display (1920 x 1080) and the choice 1920 x 1080 16:9 avoids the use of
a format that depends on a 16:9 flag to stretch the 1440 x 1080 for display after encoding. The latter has implications regarding issue of the player and recognition
of the 16:9 flag.
So, we should be OK on the import and export choices.
What about what happens between import and export. You wrote
I tried this solution and it seemed like it helped at first but when the final project was done, it looked bad again.
How did the final product look bad....was it the 1440 x 1080 HD anamorphic 16:8, the 1920 x 1080 16:9, or both that presented poorly in the export
which I am assuming was Publish+Share/Computer/AVCHD with Presets = MP4 H.264 1920 x 1080p30?
Depending on your further details, I have some suggestions for the Timeline content prior to export to file.
Please review and consider.
Thanks.
ATR -
Web service and servlets in the same project...web.xml?
Hello, I have a problem with my web service.
I have a server, which displays a web service. I programmed this service with JAXRPC.
I have a client, in another directory. I succeded in compiling, deploying and running the web service.
The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
But of course, it's not working by itself. I know there's something to do with the web.xml files.
The thing is that I created a web.xml file for the service, and another for the servlets.
I was thinking of joining both of them in one xml file, but everything crashes then...
Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
Thanks for any help
PhilippeHello, I have a problem with my web service.
I have a server, which displays a web service. I programmed this service with JAXRPC.
I have a client, in another directory. I succeded in compiling, deploying and running the web service.
The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
But of course, it's not working by itself. I know there's something to do with the web.xml files.
The thing is that I created a web.xml file for the service, and another for the servlets.
I was thinking of joining both of them in one xml file, but everything crashes then...
Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
Thanks for any help
Philippe
Maybe you are looking for
-
Runs fine in preview, but doesn't work when burned
I've been running into a few nagging problems on iDVD 6... When I preview what I've assembled in iDVD, it runs as intended -- an autoplay intro movie, then to the main menu. When I've burned it to DVD, it starts with the intro movie, but then goes in
-
Sending HTML content in body for emailnotification in OSB
hi, i have done an emailnotification service in OSB.. currently HTML content in body is not supported in OSB.. how to send the html content as body for an email.. please provide a solution at the earlist.. thanks
-
Change pointer entries not updated in BDCP table
I am using a IDOC to file senario.For message type ISM_MATMAS. In Tcode JP28 when changing Business partner only CDHDR and CDPOS table are getting updated but BDCP table is not getting updated. I have activated CP's for message type in Tcode BD50, Gl
-
How does one replace a lost Time Capsule power cord? thanks
how does one replace a lost Time Capsule power cord? thanks
-
I gto a bill for games i bought with my itunes card and they sent me a bill for the games i bought and i have no credit card on my account.